Skip to content

Commit

Permalink
Merge branch 'develop' into feature/more-chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmr1993 committed Oct 10, 2023
2 parents 8e15884 + 9e52acf commit eb4d4b7
Show file tree
Hide file tree
Showing 43 changed files with 1,113 additions and 700 deletions.
4 changes: 2 additions & 2 deletions automation/terraform/monitoring/o1-testnet-alerts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ terraform {
module "o1testnet_alerts" {
source = "../modules/testnet-alerts"

rule_filter = "{testnet!~\"^(berkeley|it-|ci-net|test-).+\"}" # omit testnets deployed by integration/CI tests and also omit berkeley network
rule_filter = "{testnet!~\"^(berkeley|testworld-2-0|it-|ci-net|test-).+\"}" # omit testnets deployed by integration/CI tests and also omit berkeley network and testworld-2-0
alert_timeframe = "1h"
alert_duration = "10m"
pagerduty_alert_filter = "devnet2|mainnet"
berkeley_testnet = "testnet=\"berkeley\""
berkeley_testnet = "testnet=\"(berkeley|testworld-2-0)\""
synced_status_filter = "syncStatus=\"SYNCED\""
}

Expand Down
3 changes: 3 additions & 0 deletions buildkite/scripts/unit-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ time make build
echo "--- Build all targets"
dune build "${path}" --profile="${profile}" -j16

echo "--- Check for changes to verification keys"
time dune runtest "src/app/print_blockchain_snark_vk" --profile="${profile}" -j16

echo "--- Run unit tests"
time dune runtest "${path}" --profile="${profile}" -j16 || (./scripts/link-coredumps.sh)
8 changes: 4 additions & 4 deletions buildkite/src/Constants/ContainerImages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
-- NOTE: minaToolchainBookworm is also used for building Ubuntu Jammy packages in CI
{
toolchainBase = "codaprotocol/ci-toolchain-base:v3",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:563fd7adda282fb3b6765c1811a3566e0fa0560f5d1c5270003483030d82d394",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchainBookworm = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchain = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:71173ebccf6af3e24d27262a5071f3dd0bd2c40b9de1c258422fdb9419507d3c",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
minaToolchainBookworm = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
minaToolchain = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
delegationBackendToolchain = "gcr.io/o1labs-192920/delegation-backend-production@sha256:12ffd0a9016819c720687f440c7a46b8815f8d3ad06d306d342ee5f8dd4375f5",
elixirToolchain = "elixir:1.10-alpine",
nodeToolchain = "node:14.13.1-stretch-slim",
Expand Down
10 changes: 7 additions & 3 deletions dockerfiles/stages/1-build-deps
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ ARG GO_VERSION=1.19.11
ARG GO_CAPNP_VERSION=v3.0.0-alpha.5

# Rust Version passed into rustup-init, can also be "stable", "nightly" or similar
ARG RUST_VERSION=1.63.0
# This should stay in line with:
# - src/lib/crypto/kimchi_bindings/stubs/rust-toolchain.toml
# - src/lib/crypto/proof-systems/rust-toolchain.toml
ARG RUST_VERSION=1.72
# Nightly Rust Version used for WebAssembly builds
ARG RUST_NIGHTLY=2022-09-12
# - src/lib/snarkyjs/src/bindings/kimchi/wasm/rust-toolchain.toml
ARG RUST_NIGHTLY=2023-09-01
# wasm-pack version
ARG WASM_PACK_VERSION=v0.10.3
ARG WASM_PACK_VERSION=v0.12.1

# Rocksdb commit tag/branch to clone
ARG ROCKSDB_VERSION=v5.18.4
Expand Down
18 changes: 18 additions & 0 deletions helm/cron_jobs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Replayer cron jobs
==================

There are replayer cron jobs for Mainnet, Devnet, and Berkeley. These
jobs are run daily, to replay a day's worth of transactions.

Each cron job downloads the most recent archive dump corresponding to
a network, and loads the data into PostgreSQL. That results in an
archive database. The most recent replayer checkpoint file is
downloaded, which provides the starting point for the replayer. When
the replayer runs, it creates new checkpoint files every 50
blocks. When the replayer finishes, it uploads the most recent
checkpoint file, so it can be used in the following day's run. If
there are any errors, the replayer logs are also uploaded.

There is a separate checkpoint file bucket for each network. Both the
checkpoint files and error files for a given network are uploaded to
the same bucket.
20 changes: 13 additions & 7 deletions nix/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ let
# override stdenv.targetPlatform here, if neccesary
};
toolchainHashes = {
"1.67.0" = "sha256-riZUc+R9V35c/9e8KJUE+8pzpXyl0lRXt3ZkKlxoY0g=";
"nightly-2023-02-05" =
"sha256-MM8fdvveBEWzpwjH7u6C0F7qSWGPIMpfZWLgVxSqtxY=";
# copy this line with the correct toolchain name
"1.72" = "sha256-dxE7lmCFWlq0nl/wKcmYvpP9zqQbBitAQgZ1zx9Ooik=";
"nightly-2023-09-01" = "sha256-zek9JAnRaoX8V0U2Y5ssXVe9tvoQ0ERGXfUCUGYdrMA=";
# copy the placeholder line with the correct toolchain name when adding a new toolchain
# That is,
# 1. Put the correct version name;
#
# 2. Put the hash you get in line "got" from the error you obtain, which looks like
# error: hash mismatch in fixed-output derivation '/nix/store/XXXXX'
# specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
# got: sha256-Q9UgzzvxLi4x9aWUJTn+/5EXekC98ODRU1TwhUs9RnY=
"placeholder" = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
# rust-toolchain.toml -> { rustc, cargo, rust-analyzer, ... }
Expand Down Expand Up @@ -150,8 +156,9 @@ in

checkInputs = [ final.nodejs ];

# other tests require it to be ran in the wasm-bindgen monorepo
cargoTestFlags = [ "--test=interface-types" ];
# other tests, like --test=wasm-bindgen, require it to be ran in the
# wasm-bindgen monorepo
cargoTestFlags = [ "--test=interface-types --test=reference" ];
};
in
rustPlatform.buildRustPackage {
Expand Down Expand Up @@ -200,4 +207,3 @@ in
cargoLock.lockFile = ../src/app/trace-tool/Cargo.lock;
};
}

20 changes: 20 additions & 0 deletions src/app/archive_blocks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
archive_blocks
==============

The `archive_blocks` app adds blocks in either "precomputed" or
"extensional" format to the archive database.

Precomputed blocks are stored in the bucket `mina_network_block_data`
on Google Cloud Storage. Blocks are named NETWORK-HEIGHT-STATEHASH.json.
Example: mainnet-100000-3NKLvMCimUjX1zjjiC3XPMT34D1bVQGzkKW58XDwFJgQ5wDQ9Tki.json.

Extensional blocks are extracted from other archive databases using
the `extract_blocks` app.

As many blocks as are available can be added at a time, but all blocks
must be in the same format.

Except for blocks from the original mainnet, both precomputed and
extensional blocks have a version in their JSON representation. That
version must match the corresponding OCaml type in the code when this
app was built.
2 changes: 1 addition & 1 deletion src/app/archive_blocks/archive_blocks.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* archive_blocks.ml -- archive precomputed or extensional blocks to Postgresql *)
(* archive_blocks.ml *)

open Core_kernel
open Async
Expand Down
12 changes: 12 additions & 0 deletions src/app/extract_blocks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extract_blocks
==============

The `extract_blocks` app pulls out individual blocks from an archive
database in "extensional" format. Such blocks can be added to other
archive databases using the `archive_blocks` app.

Blocks are extracted into files with name <state-hash>.json.

The app offers the choice to extract all canonical blocks, or a
subchain specified with starting state hash, or a subchain specified
with starting and ending state hashes.
1 change: 1 addition & 0 deletions src/app/extract_blocks/extract_blocks.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(* extract_blocks.ml -- dump extensional blocks from archive db *)

[@@@coverage exclude_file]

open Core_kernel
Expand Down
10 changes: 10 additions & 0 deletions src/app/missing_blocks_auditor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
missing_blocks_auditor
======================

The `missing_blocks_auditor` app looks for blocks without parent
blocks in an archive database.

The app also looks for blocks marked as pending that are lower (have a
lesser height) than the highest (most recent) canonical block. There
can be such blocks if blocks are added when there are missing blocks
in the database.
2 changes: 1 addition & 1 deletion src/app/missing_blocks_auditor/missing_blocks_auditor.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* missing_blocks_auditor.ml -- report missing blocks from an archive db *)
(* missing_blocks_auditor.ml *)

open Core_kernel
open Async
Expand Down
1 change: 1 addition & 0 deletions src/app/print_blockchain_snark_vk/.ocamlformat
1 change: 1 addition & 0 deletions src/app/print_blockchain_snark_vk/blockchain_snark_vk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"commitments":{"sigma_comm":[["0x1A8B2FCF1A5D4F6D1902517B6BF31A4288186F5AA647804402E14E4DC63ABE1F","0x3224B1C182312B364F659896357A40D2EF566959E6C11AD0A347EA80D82CDBF6"],["0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC","0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4"],["0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB","0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D"],["0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05","0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E"],["0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB","0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B"],["0x2F5C56AA39D6FD87055E7CA6F5FA61E94FCF17336DA4476E328D2CC184F93D47","0x089B80235867482E24087360E161AC76A5249D826CFAC51AB537093D86EAA632"],["0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555","0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224"]],"coefficients_comm":[["0x2113503AE01039434E72D555369C460EE5C45260396DD4782CE0BE81B19F2F6C","0x2F72056BEC498916F4176C6410A31801F81CDE4D427F1C15566C018393751E2B"],["0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922","0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28"],["0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F","0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6"],["0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236","0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A"],["0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614","0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E"],["0x2CD387D1747E5594DF7FBAE6B40C7A674875F6F9FBB4E3632FBAFD49D41E67A6","0x33C14453CA5F229C77B5259999798D42B36BE08F68C09F969937C2C13FE1C34D"],["0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121","0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E"],["0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA","0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B"],["0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F","0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89"],["0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766","0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE"],["0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036","0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455"],["0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103","0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4"],["0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E","0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645"],["0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF","0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF"],["0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39","0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567"]],"generic_comm":["0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B","0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C"],"psm_comm":["0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324","0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B"],"complete_add_comm":["0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B","0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688"],"mul_comm":["0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5","0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689"],"emul_comm":["0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9","0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9"],"endomul_scalar_comm":["0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD","0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244"]},"index":{"domain":{"log_size_of_group":14,"group_gen":"0x1E5587687024253BB079B38D9C5371594958E496C605D3BD898B34D068AFBEE7"},"max_poly_size":32768,"public":40,"prev_challenges":2,"srs":null,"evals":{"sigma_comm":[{"unshifted":[["Finite",["0x1A8B2FCF1A5D4F6D1902517B6BF31A4288186F5AA647804402E14E4DC63ABE1F","0x3224B1C182312B364F659896357A40D2EF566959E6C11AD0A347EA80D82CDBF6"]]],"shifted":null},{"unshifted":[["Finite",["0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC","0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4"]]],"shifted":null},{"unshifted":[["Finite",["0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB","0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D"]]],"shifted":null},{"unshifted":[["Finite",["0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05","0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E"]]],"shifted":null},{"unshifted":[["Finite",["0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB","0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B"]]],"shifted":null},{"unshifted":[["Finite",["0x2F5C56AA39D6FD87055E7CA6F5FA61E94FCF17336DA4476E328D2CC184F93D47","0x089B80235867482E24087360E161AC76A5249D826CFAC51AB537093D86EAA632"]]],"shifted":null},{"unshifted":[["Finite",["0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555","0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224"]]],"shifted":null}],"coefficients_comm":[{"unshifted":[["Finite",["0x2113503AE01039434E72D555369C460EE5C45260396DD4782CE0BE81B19F2F6C","0x2F72056BEC498916F4176C6410A31801F81CDE4D427F1C15566C018393751E2B"]]],"shifted":null},{"unshifted":[["Finite",["0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922","0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28"]]],"shifted":null},{"unshifted":[["Finite",["0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F","0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6"]]],"shifted":null},{"unshifted":[["Finite",["0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236","0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A"]]],"shifted":null},{"unshifted":[["Finite",["0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614","0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E"]]],"shifted":null},{"unshifted":[["Finite",["0x2CD387D1747E5594DF7FBAE6B40C7A674875F6F9FBB4E3632FBAFD49D41E67A6","0x33C14453CA5F229C77B5259999798D42B36BE08F68C09F969937C2C13FE1C34D"]]],"shifted":null},{"unshifted":[["Finite",["0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121","0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E"]]],"shifted":null},{"unshifted":[["Finite",["0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA","0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B"]]],"shifted":null},{"unshifted":[["Finite",["0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F","0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89"]]],"shifted":null},{"unshifted":[["Finite",["0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766","0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE"]]],"shifted":null},{"unshifted":[["Finite",["0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036","0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455"]]],"shifted":null},{"unshifted":[["Finite",["0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103","0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4"]]],"shifted":null},{"unshifted":[["Finite",["0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E","0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645"]]],"shifted":null},{"unshifted":[["Finite",["0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF","0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF"]]],"shifted":null},{"unshifted":[["Finite",["0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39","0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567"]]],"shifted":null}],"generic_comm":{"unshifted":[["Finite",["0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B","0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C"]]],"shifted":null},"psm_comm":{"unshifted":[["Finite",["0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324","0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B"]]],"shifted":null},"complete_add_comm":{"unshifted":[["Finite",["0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B","0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688"]]],"shifted":null},"mul_comm":{"unshifted":[["Finite",["0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5","0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689"]]],"shifted":null},"emul_comm":{"unshifted":[["Finite",["0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9","0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9"]]],"shifted":null},"endomul_scalar_comm":{"unshifted":[["Finite",["0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD","0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244"]]],"shifted":null},"xor_comm":null,"range_check0_comm":null,"range_check1_comm":null,"foreign_field_add_comm":null,"foreign_field_mul_comm":null,"rot_comm":null},"shifts":["0x0000000000000000000000000000000000000000000000000000000000000001","0x00B9CDC8FD0BD4B27E2A74AF7AEBD5734D52D75BDF85EBF1CAD03413E914A2E3","0x007CF68160D84012626E0046A932AD12E68B3394D6E2A001A537FFB40D3527C6","0x0077D45AECB939AE97A3952B48189964AA209609F19BE4A4B89F339A33440F6D","0x0077C7E54505D4771F6AF1FED2195500481EF1F3C0397B0AC819E678BD2309B4","0x00B3AF68ECC6AE7A4727F0708EDF4736BE1C99281FA380846E42264C62407484","0x00381CA4536FC0ED935D50A74A87136F1A0675B618898DBCE67E564AB20174A1"],"lookup_index":null},"data":{"constraints":16384}}
18 changes: 18 additions & 0 deletions src/app/print_blockchain_snark_vk/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(executable
(name print_blockchain_snark_vk)
(libraries
blockchain_snark)
(instrumentation (backend bisect_ppx))
(preprocess (pps ppx_version)))

(rule
(deps print_blockchain_snark_vk.exe)
(targets blockchain_snark_vk.json.corrected)
(action
(with-stdout-to %{targets}
(run %{deps}))))

(rule
(alias runtest)
(action
(diff blockchain_snark_vk.json blockchain_snark_vk.json.corrected)))
1 change: 1 addition & 0 deletions src/app/print_blockchain_snark_vk/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 3.3)
41 changes: 41 additions & 0 deletions src/app/print_blockchain_snark_vk/print_blockchain_snark_vk.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
open Core_kernel

module Config = struct
let constraint_constants = Genesis_constants.Constraint_constants.compiled

let proof_level = Genesis_constants.Proof_level.Full
end

let () = Format.eprintf "Generating transaction snark circuit..@."

let before = Time.now ()

module Transaction_snark_instance = Transaction_snark.Make (Config)

let after = Time.now ()

let () =
Format.eprintf "Generated transaction snark circuit in %s.@."
(Time.Span.to_string_hum (Time.diff after before))

let () = Format.eprintf "Generating blockchain snark circuit..@."

let before = Time.now ()

module Blockchain_snark_instance =
Blockchain_snark.Blockchain_snark_state.Make (struct
let tag = Transaction_snark_instance.tag

include Config
end)

let after = Time.now ()

let () =
Format.eprintf "Generated blockchain snark circuit in %s.@."
(Time.Span.to_string_hum (Time.diff after before))

let () =
Lazy.force Blockchain_snark_instance.Proof.verification_key
|> Pickles.Verification_key.to_yojson |> Yojson.Safe.to_string
|> Format.print_string
5 changes: 3 additions & 2 deletions src/app/test_executive/block_reward_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
let run network t =
let open Malleable_error.Let_syntax in
let logger = Logger.create () in
let all_nodes = Network.all_nodes network in
let all_mina_nodes = Network.all_mina_nodes network in
let%bind () =
wait_for t
(Wait_condition.nodes_to_initialize (Core.String.Map.data all_nodes))
(Wait_condition.nodes_to_initialize
(Core.String.Map.data all_mina_nodes) )
in
let node =
Core.String.Map.find_exn (Network.block_producers network) "node"
Expand Down
Loading

0 comments on commit eb4d4b7

Please sign in to comment.