From 8be1925b18dcbf268eb03b8ea5f07adfd5330876 Mon Sep 17 00:00:00 2001 From: EmilLuta Date: Wed, 3 Jan 2024 12:52:15 +0100 Subject: [PATCH] feat(prover): Remove old prover (#810) This is one of many commits, most notable upcoming: - remove database tables via migrations - move prover related data from core to prover (I.E. prover_utils) This comes as part of migration to boojum. Old prover is decomissioned; this PR removes what's left of main components of old prover subsystems. It includes: - remove old prover - remove old prover protocol version - untangle old prover and fri prover common dependencies - and many more ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- .dockerignore | 1 - .gitignore | 1 - Cargo.lock | 20 - Cargo.toml | 1 - .../Cargo.toml | 37 - .../README.md | 39 - .../data/verification_0_key.json | 399 ------ .../data/verification_10_key.json | 399 ------ .../data/verification_11_key.json | 399 ------ .../data/verification_12_key.json | 399 ------ .../data/verification_13_key.json | 399 ------ .../data/verification_14_key.json | 399 ------ .../data/verification_15_key.json | 399 ------ .../data/verification_16_key.json | 399 ------ .../data/verification_17_key.json | 399 ------ .../data/verification_18_key.json | 399 ------ .../data/verification_1_key.json | 399 ------ .../data/verification_2_key.json | 399 ------ .../data/verification_3_key.json | 399 ------ .../data/verification_4_key.json | 399 ------ .../data/verification_5_key.json | 399 ------ .../data/verification_6_key.json | 399 ------ .../data/verification_7_key.json | 399 ------ .../data/verification_8_key.json | 399 ------ .../data/verification_9_key.json | 399 ------ .../src/commitment_generator.rs | 37 - .../src/json_to_binary_vk_converter.rs | 31 - .../src/lib.rs | 188 --- .../src/main.rs | 48 - .../src/tests.rs | 68 - core/bin/zksync_server/src/main.rs | 6 +- core/lib/config/src/configs/fri_prover.rs | 1 + core/lib/config/src/configs/mod.rs | 4 - core/lib/config/src/configs/prover.rs | 61 - core/lib/config/src/configs/prover_group.rs | 66 - core/lib/config/src/lib.rs | 2 +- core/lib/dal/sqlx-data.json | 1128 ++--------------- core/lib/dal/src/gpu_prover_queue_dal.rs | 218 ---- core/lib/dal/src/lib.rs | 16 +- core/lib/dal/src/protocol_versions_dal.rs | 104 +- core/lib/dal/src/prover_dal.rs | 724 ----------- core/lib/dal/src/tests/mod.rs | 149 +-- core/lib/env_config/src/fri_prover.rs | 3 + core/lib/env_config/src/lib.rs | 2 - core/lib/env_config/src/prover.rs | 197 --- core/lib/env_config/src/prover_group.rs | 149 --- core/lib/prover_utils/src/region_fetcher.rs | 66 +- core/lib/zksync_core/Cargo.toml | 1 - .../house_keeper/gpu_prover_queue_monitor.rs | 66 - core/lib/zksync_core/src/house_keeper/mod.rs | 3 - .../house_keeper/prover_job_retry_manager.rs | 56 - .../src/house_keeper/prover_queue_monitor.rs | 82 -- .../waiting_to_queued_witness_job_mover.rs | 95 -- .../witness_generator_queue_monitor.rs | 121 -- core/lib/zksync_core/src/lib.rs | 27 - core/lib/zksync_core/src/temp_config_store.rs | 6 +- docker/prover-gar/Dockerfile | 21 - docker/prover/Dockerfile | 63 - docker/server-v2/Dockerfile | 1 - docs/guides/launch.md | 23 - etc/env/base/fri_prover.toml | 1 + etc/env/base/prover.toml | 74 -- etc/env/base/prover_group.toml | 17 - etc/env/base/rust.toml | 3 - infrastructure/zk/src/config.ts | 2 - prover/Cargo.lock | 248 +--- prover/Cargo.toml | 2 - prover/README.md | 12 - prover/prover/Cargo.toml | 57 - prover/prover/README.md | 8 - prover/prover/src/artifact_provider.rs | 25 - prover/prover/src/main.rs | 26 - prover/prover/src/metrics.rs | 41 - prover/prover/src/prover.rs | 286 ----- prover/prover/src/prover_params.rs | 35 - prover/prover/src/run.rs | 255 ---- prover/prover/src/socket_listener.rs | 122 -- .../src/synthesized_circuit_provider.rs | 81 -- prover/prover_fri/src/main.rs | 15 +- .../setup_key_generator_and_server/Cargo.toml | 42 - .../data/.gitkeep | 0 .../setup_key_generator_and_server/src/lib.rs | 63 - .../src/main.rs | 68 - prover/witness_vector_generator/src/main.rs | 9 +- 84 files changed, 154 insertions(+), 12851 deletions(-) delete mode 100644 core/bin/verification_key_generator_and_server/Cargo.toml delete mode 100644 core/bin/verification_key_generator_and_server/README.md delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_0_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_10_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_11_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_12_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_13_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_14_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_15_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_16_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_17_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_18_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_1_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_2_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_3_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_4_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_5_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_6_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_7_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_8_key.json delete mode 100644 core/bin/verification_key_generator_and_server/data/verification_9_key.json delete mode 100644 core/bin/verification_key_generator_and_server/src/commitment_generator.rs delete mode 100644 core/bin/verification_key_generator_and_server/src/json_to_binary_vk_converter.rs delete mode 100644 core/bin/verification_key_generator_and_server/src/lib.rs delete mode 100644 core/bin/verification_key_generator_and_server/src/main.rs delete mode 100644 core/bin/verification_key_generator_and_server/src/tests.rs delete mode 100644 core/lib/config/src/configs/prover.rs delete mode 100644 core/lib/config/src/configs/prover_group.rs delete mode 100644 core/lib/dal/src/gpu_prover_queue_dal.rs delete mode 100644 core/lib/dal/src/prover_dal.rs delete mode 100644 core/lib/env_config/src/prover.rs delete mode 100644 core/lib/env_config/src/prover_group.rs delete mode 100644 core/lib/zksync_core/src/house_keeper/gpu_prover_queue_monitor.rs delete mode 100644 core/lib/zksync_core/src/house_keeper/prover_job_retry_manager.rs delete mode 100644 core/lib/zksync_core/src/house_keeper/prover_queue_monitor.rs delete mode 100644 core/lib/zksync_core/src/house_keeper/waiting_to_queued_witness_job_mover.rs delete mode 100644 core/lib/zksync_core/src/house_keeper/witness_generator_queue_monitor.rs delete mode 100644 docker/prover-gar/Dockerfile delete mode 100644 docker/prover/Dockerfile delete mode 100644 etc/env/base/prover.toml delete mode 100644 etc/env/base/prover_group.toml delete mode 100644 prover/prover/Cargo.toml delete mode 100644 prover/prover/README.md delete mode 100644 prover/prover/src/artifact_provider.rs delete mode 100644 prover/prover/src/main.rs delete mode 100644 prover/prover/src/metrics.rs delete mode 100644 prover/prover/src/prover.rs delete mode 100644 prover/prover/src/prover_params.rs delete mode 100644 prover/prover/src/run.rs delete mode 100644 prover/prover/src/socket_listener.rs delete mode 100644 prover/prover/src/synthesized_circuit_provider.rs delete mode 100644 prover/setup_key_generator_and_server/Cargo.toml delete mode 100644 prover/setup_key_generator_and_server/data/.gitkeep delete mode 100644 prover/setup_key_generator_and_server/src/lib.rs delete mode 100644 prover/setup_key_generator_and_server/src/main.rs diff --git a/.dockerignore b/.dockerignore index 67be353d0bd4..8268fb1049e6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -37,6 +37,5 @@ contracts/.git !etc/multivm_bootloaders !cargo !bellman-cuda -!core/bin/verification_key_generator_and_server/data/ !prover/vk_setup_data_generator_server_fri/data/ !.github/release-please/manifest.json diff --git a/.gitignore b/.gitignore index eff8079e75db..20c5973e8f48 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ todo Cargo.lock !/Cargo.lock -!/core/bin/verification_key_generator_and_server/Cargo.lock !/infrastructure/zksync-crypto/Cargo.lock !/prover/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock index c794cc5fe803..d6f5176bf778 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8508,7 +8508,6 @@ dependencies = [ "zksync_test_account", "zksync_types", "zksync_utils", - "zksync_verification_key_generator_and_server", "zksync_web3_decl", ] @@ -8925,25 +8924,6 @@ dependencies = [ "zksync_basic_types", ] -[[package]] -name = "zksync_verification_key_generator_and_server" -version = "0.1.0" -dependencies = [ - "anyhow", - "bincode", - "circuit_testing", - "ff_ce", - "hex", - "itertools", - "once_cell", - "serde_json", - "structopt", - "tracing", - "vlog", - "zksync_prover_utils", - "zksync_types", -] - [[package]] name = "zksync_web3_decl" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 34115e84bead..151921aef57e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ members = [ "core/bin/snapshots_creator", "core/bin/storage_logs_dedup_migration", "core/bin/system-constants-generator", - "core/bin/verification_key_generator_and_server", "core/bin/verified_sources_fetcher", "core/bin/zksync_server", # Libraries diff --git a/core/bin/verification_key_generator_and_server/Cargo.toml b/core/bin/verification_key_generator_and_server/Cargo.toml deleted file mode 100644 index b49683424a40..000000000000 --- a/core/bin/verification_key_generator_and_server/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "zksync_verification_key_generator_and_server" -version = "0.1.0" -edition = "2018" -license = "MIT OR Apache-2.0" - -[lib] -name = "zksync_verification_key_server" -path = "src/lib.rs" - -[[bin]] -name = "zksync_verification_key_generator" -path = "src/main.rs" - -[[bin]] -name = "zksync_json_to_binary_vk_converter" -path = "src/json_to_binary_vk_converter.rs" - -[[bin]] -name = "zksync_commitment_generator" -path = "src/commitment_generator.rs" - -[dependencies] -zksync_types = { path = "../../lib/types" } -zksync_prover_utils = { path = "../../lib/prover_utils" } -vlog = { path = "../../lib/vlog" } -circuit_testing = { git = "https://github.com/matter-labs/era-circuit_testing.git", branch = "main" } -itertools = "0.10.5" -bincode = "1.3.3" - -anyhow = "1.0" -serde_json = "1.0.85" -hex = "0.4.3" -structopt = "0.3.26" -ff = { package = "ff_ce", version = "0.14.1" } -once_cell = "1.8.0" -tracing = "0.1" diff --git a/core/bin/verification_key_generator_and_server/README.md b/core/bin/verification_key_generator_and_server/README.md deleted file mode 100644 index efe7d3f99a4e..000000000000 --- a/core/bin/verification_key_generator_and_server/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Verification keys - -We currently have around 20 different circuits like: Scheduler, Leaf, KeccakPrecompile etc (for the full list - look at -CircuitType enum in sync_vm repo). - -Each such circuit requires a separate verification key. - -This crate fulfills 2 roles: - -- it has the binaries that can generate the updated versions of the keys (for example if VM code changes) -- it provides the libraries that can be used by other components that need to use these keys (for example provers) - - behaving like a key server. - -Moreover, all these keys are submitted as code within the repo in `verification_XX_key.json` files. - -## zksync_verification_key_server - -This is the library that can be used by other components to fetch the verification key for a given circuit (using -`get_vk_for_circuit_type` function). - -## zksync_verification_key_generator - -The main binary that generates verification key for given circuits. Most of the heavy lifting is done by the -`create_vk_for_padding_size_log_2` method from circuit_testing repo. - -The results are written to the `verification_XX_key.json` files in the current repository. - -## zksync_json_to_binary_vk_converter - -Converts the local json verification keys into the binary format (and stores them in the output directory). - -## zksync_commitment_generator - -This tool takes the 3 commitments (one for all the basic circuits, one for node and one for leaf), computed based on the -current verification keys - and updates the contract.toml config file (which is located in etc/env/base/contracts.toml). - -These commitments are later used in one of the circuit breakers - to compare their values to the commitments that L1 -contract holds (so that we can 'panic' properly - if we notice that our server's commitments differ from the L1 -contracts - which would result in failed L1 transactions). diff --git a/core/bin/verification_key_generator_and_server/data/verification_0_key.json b/core/bin/verification_key_generator_and_server/data/verification_0_key.json deleted file mode 100644 index c3262193a4fd..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_0_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 14745348174000482855, - 2839037062185937123, - 3369862715588854899, - 1495909583940713128 - ], - "y": [ - 6859454683840363585, - 11340551061368171664, - 9528805406487149561, - 3414144677220223705 - ], - "infinity": false - }, - { - "x": [ - 9215749870136224396, - 18418669114332753377, - 13140219601461030180, - 2381098845928447331 - ], - "y": [ - 8834765081837029169, - 4424842234296363904, - 13294547557836067005, - 414624398145171890 - ], - "infinity": false - }, - { - "x": [ - 2148575411987453084, - 16730180692461995258, - 12423475767707134837, - 3014264170083149730 - ], - "y": [ - 10870860158804422503, - 14060279526953529989, - 2266257082861680293, - 22356173050560284 - ], - "infinity": false - }, - { - "x": [ - 17803008042411335770, - 5713064950476621403, - 17979342410816871746, - 491265656076548841 - ], - "y": [ - 9823492080506672630, - 3637386621225409615, - 8776978043600973097, - 2514196809208915768 - ], - "infinity": false - }, - { - "x": [ - 3768479078383323179, - 16153057542709544671, - 10578964798085613273, - 2831188075764800753 - ], - "y": [ - 2387514805820590694, - 15085489652142686165, - 8141513931186597223, - 1582376980242699819 - ], - "infinity": false - }, - { - "x": [ - 5395455814671474247, - 5013790368139874617, - 8671649443504728767, - 839142828943885970 - ], - "y": [ - 11231626069154926735, - 5078347962234771017, - 17373886182204596447, - 513647957075879347 - ], - "infinity": false - }, - { - "x": [ - 8940485327950054531, - 9156997542069636576, - 14316753178152000598, - 3357551869664255582 - ], - "y": [ - 14102490706504125272, - 4494991810930729808, - 15532318871086968466, - 1537365238286274178 - ], - "infinity": false - }, - { - "x": [ - 13914906478277300859, - 6213896071228541481, - 4364409818367302306, - 659097390118096039 - ], - "y": [ - 7328372274594390887, - 2650332638498669615, - 15455628473476960005, - 3119379427019958230 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 9438200511694036157, - 11094162170960057340, - 9123678872696723713, - 2950597355117190054 - ], - "y": [ - 6153972960518016517, - 8045683598100955864, - 13410633858416643489, - 988361678931464913 - ], - "infinity": false - }, - { - "x": [ - 805964423710846142, - 13603470797942296854, - 11292123377140077447, - 1455913517812009773 - ], - "y": [ - 4541622738043214385, - 8186357170000535775, - 4765839113294831637, - 3026863977499737494 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 1851039213129741497, - 11907960788190413713, - 2882727828085561070, - 1451278944954982956 - ], - "y": [ - 15245785050592773860, - 1774295027236395480, - 3373069120056880915, - 1080245109458702174 - ], - "infinity": false - }, - { - "x": [ - 9366052859968548005, - 12275028918364559591, - 2472023927159177225, - 1052535074027277666 - ], - "y": [ - 2428574557555628629, - 15067392861858369528, - 16949255188095910778, - 2297925771936569168 - ], - "infinity": false - }, - { - "x": [ - 17016009610362956206, - 4047659663396753591, - 1832464593155416403, - 2725142957049914767 - ], - "y": [ - 12447928856414787240, - 3072280375285720285, - 12294239288643819494, - 613511140380288958 - ], - "infinity": false - }, - { - "x": [ - 6312774245791141720, - 496150993329472460, - 12773767122915456934, - 3404402910494500531 - ], - "y": [ - 13852578578747731084, - 9030931732410275304, - 17159996848865265705, - 1696956882146098553 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 1073530, - "lookup_selector_commitment": { - "x": [ - 4441974708940861232, - 11325614820129407652, - 7273013871150456559, - 2270181644629652201 - ], - "y": [ - 3070631142979677922, - 15247189094202672776, - 12651459662740804392, - 1832216259472686694 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 7312875299592476003, - 313526216906044060, - 13914875394436353152, - 3424388477700656316 - ], - "y": [ - 2572062173996296044, - 5984767625164919974, - 12005537293370417131, - 616463121946800406 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_10_key.json b/core/bin/verification_key_generator_and_server/data/verification_10_key.json deleted file mode 100644 index ec9d3727bff9..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_10_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 4364720487844379181, - 17010766725144227333, - 1022678199111276314, - 1146578362772127376 - ], - "y": [ - 10340654727439455072, - 12691578856596245032, - 837883495763401146, - 2135776887902289239 - ], - "infinity": false - }, - { - "x": [ - 14564870240038241482, - 16001391704613609683, - 16397364612792898214, - 1316914335235774452 - ], - "y": [ - 2386942353392090183, - 4642131766714508143, - 16789479723446408276, - 2261353401184907401 - ], - "infinity": false - }, - { - "x": [ - 6081056006818109026, - 14051483412950926523, - 8605392534710099348, - 1527183574619010123 - ], - "y": [ - 3896696527234063839, - 12862398541231039501, - 1005646628007936886, - 3479645512156004366 - ], - "infinity": false - }, - { - "x": [ - 11266242489999219523, - 8100856016495224488, - 6788749864393617587, - 482299081118345826 - ], - "y": [ - 225211373180020785, - 6498635074385582091, - 4274055525472487569, - 2578651815252093838 - ], - "infinity": false - }, - { - "x": [ - 10378455392293934375, - 13391940670290769236, - 10463014668466536299, - 472544008986099462 - ], - "y": [ - 1502016714118108544, - 14252801754530793876, - 2203844491975584716, - 1116114255465135672 - ], - "infinity": false - }, - { - "x": [ - 9703616742074407567, - 9691703077434834222, - 7366620887865105973, - 36165572355418066 - ], - "y": [ - 7430304832706471782, - 5173267152399523091, - 14416699599905226230, - 2681204653630184824 - ], - "infinity": false - }, - { - "x": [ - 9347312215430913530, - 13606433894103359668, - 14013475178334262360, - 2947181048682744075 - ], - "y": [ - 4001199390012145932, - 4622813642635649819, - 16433672063298879053, - 1247842462976799965 - ], - "infinity": false - }, - { - "x": [ - 1639425503718708209, - 8242804754724970899, - 11043260258533730377, - 2245145560504199089 - ], - "y": [ - 14202551139064230506, - 4307109380979442947, - 13141687433511141087, - 1913204959448290015 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 17540836040216578409, - 14577118461028955096, - 2300935836423716880, - 427649651480863044 - ], - "y": [ - 13066723755606073272, - 17324941433857131282, - 1679499122173566851, - 3298750515604566671 - ], - "infinity": false - }, - { - "x": [ - 14709152157752642079, - 13510549649315108277, - 3019440420162710858, - 627188607991231846 - ], - "y": [ - 16615706301470133997, - 915024441316023047, - 13798541787831785917, - 3340602253234308653 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 12626704863583094704, - 3308474372162220296, - 16088806788444947642, - 636430705662147361 - ], - "y": [ - 17052785040105865748, - 11203395113497209978, - 2939609765212411460, - 3167290643533167611 - ], - "infinity": false - }, - { - "x": [ - 3075146465184418179, - 11559452521956513155, - 1656597085428845901, - 1618447062156730856 - ], - "y": [ - 2010693621773175313, - 2977509893150409878, - 9431891659616951962, - 1776222288355278384 - ], - "infinity": false - }, - { - "x": [ - 6408318860212838666, - 9847136022608767026, - 18080834927350013528, - 3306285138140631107 - ], - "y": [ - 16064928058583899597, - 461689523483649779, - 13572099112445223829, - 1563453638232968523 - ], - "infinity": false - }, - { - "x": [ - 327171445663828020, - 12706053900720413614, - 9237483585964880752, - 1960293149538216528 - ], - "y": [ - 11030775691809003651, - 11089052388657955457, - 3209890793790993499, - 1198867574642866523 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 5202052, - "lookup_selector_commitment": { - "x": [ - 781239045644769777, - 14316527640474633593, - 2443643435827373112, - 3049372365263474427 - ], - "y": [ - 4073012743593667819, - 16009537994875540924, - 11173412503242869179, - 1513208421597995174 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 697552212563769686, - 7709943502535418760, - 15019345407325619175, - 3433081085078580257 - ], - "y": [ - 8668947019840357731, - 14698901351824712883, - 15088598879190660424, - 2873081208166433946 - ], - "infinity": false - }, - { - "x": [ - 7893133928909060673, - 7064922516930129957, - 3592836702741304814, - 2239702595710114437 - ], - "y": [ - 7691360541875191519, - 11379321785127235277, - 6653616064071569031, - 2555434628517540774 - ], - "infinity": false - }, - { - "x": [ - 6243944238013052821, - 7908243182210136125, - 17178099109525791299, - 2553622184721264566 - ], - "y": [ - 736121280088239428, - 6158073429758170526, - 11217302997977204117, - 2594798912020899417 - ], - "infinity": false - }, - { - "x": [ - 2064240298596094591, - 16917726764104887991, - 11042784977532408536, - 3377647228930170830 - ], - "y": [ - 10635525052494768819, - 387400048616497096, - 9379200582543310995, - 1571766153703296253 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 7603211811706190713, - 2486982239745271096, - 11528266448545919500, - 3080741880407152411 - ], - "y": [ - 7967754771633653173, - 6016822892450616749, - 9688696792558711613, - 2682562048141398047 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_11_key.json b/core/bin/verification_key_generator_and_server/data/verification_11_key.json deleted file mode 100644 index ec60b1b5c70c..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_11_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 6404793958941109752, - 600086648940026770, - 17621036346050218167, - 648286585825030202 - ], - "y": [ - 15536368541166505022, - 13874331483468128999, - 15299774519724050181, - 694528839710637549 - ], - "infinity": false - }, - { - "x": [ - 8437895530551083583, - 9515418928119648176, - 13043255827139294721, - 2995712510038409810 - ], - "y": [ - 2599666661350767554, - 5213004864468121936, - 3448071048439343925, - 3372727479169634860 - ], - "infinity": false - }, - { - "x": [ - 4949545806128010634, - 7991544258837652527, - 13984289231122041826, - 435264553263929947 - ], - "y": [ - 5315155210033461895, - 5269954775753247626, - 8365554241810378947, - 3038338810517586456 - ], - "infinity": false - }, - { - "x": [ - 10765735847634894938, - 996016141851615448, - 17905928073714218280, - 1382306444325686451 - ], - "y": [ - 2138154197587423296, - 10332772886666867909, - 18365120064743353477, - 3036329558617382049 - ], - "infinity": false - }, - { - "x": [ - 10826908009799408310, - 17008417534705779156, - 6763973494549063072, - 2085829964414931488 - ], - "y": [ - 8778528796073273991, - 3575354418973385595, - 7700555759899743641, - 2991788183234680231 - ], - "infinity": false - }, - { - "x": [ - 4838537981048085423, - 17733460364049897496, - 2406410363431464143, - 317979983533551325 - ], - "y": [ - 1063783130085451648, - 17468950496650586998, - 1638492556781126884, - 2655791721465286744 - ], - "infinity": false - }, - { - "x": [ - 9900079822056413611, - 2971494295919434281, - 3851188096409515874, - 1674965457600938162 - ], - "y": [ - 278026997091552202, - 4169606578927284200, - 4285297176993939496, - 1835673146863992148 - ], - "infinity": false - }, - { - "x": [ - 14972922803706426724, - 1950002897609593521, - 14885502244328862256, - 2711533695106895845 - ], - "y": [ - 6445273103061253271, - 13093783937225622775, - 16913300898726970338, - 3338984185497324237 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 7023363902839996761, - 10470701207992157969, - 15655647820064667897, - 1574806151825297776 - ], - "y": [ - 5374465760860613169, - 17808737811039085287, - 9497881147171478776, - 2496973717640690197 - ], - "infinity": false - }, - { - "x": [ - 11667333913021610767, - 981513539224109240, - 906325130343873228, - 2938085706999497365 - ], - "y": [ - 12114685726509803851, - 8176447551157079615, - 4677211732718215770, - 612959750791398009 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 5178916486603003859, - 12440762249350081718, - 17531240512375127539, - 562979322442547791 - ], - "y": [ - 13269831614205338393, - 14075713698585784838, - 5009519510530479124, - 346033861980045408 - ], - "infinity": false - }, - { - "x": [ - 9815443577325313677, - 10727907015331332054, - 7582395371050260833, - 1746872659838481572 - ], - "y": [ - 3973552805135639320, - 14426732004648741961, - 8133164322153358522, - 2668541869556858228 - ], - "infinity": false - }, - { - "x": [ - 4868257934818957423, - 11529848268525929099, - 7089666284160764141, - 796901367628793969 - ], - "y": [ - 991195814042705325, - 1559922382138761102, - 15616159453482282503, - 1031107741111093289 - ], - "infinity": false - }, - { - "x": [ - 17936772813090339705, - 10208762457499980701, - 14796710996322725970, - 638550977107438851 - ], - "y": [ - 5073905611192321777, - 2956648407808816974, - 7778989780119416172, - 2955106321082932072 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 7960377, - "lookup_selector_commitment": { - "x": [ - 1083743271968869166, - 3134203175755215736, - 5835502497758804469, - 3010956977291777466 - ], - "y": [ - 3645612220088813035, - 32844736552579976, - 5426466326302260857, - 1489565191618899261 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 5825422128268478267, - 9219263846299851036, - 3879231702557190566, - 1702488722758880769 - ], - "y": [ - 18311881100262470992, - 5742998199368802392, - 18106865487471159417, - 502191980176920012 - ], - "infinity": false - }, - { - "x": [ - 17195892082859417081, - 7890531942603584793, - 2381805632820057528, - 3173232410464566465 - ], - "y": [ - 16359614627947132075, - 3459600273035137079, - 4550762061432972122, - 3394559699318358224 - ], - "infinity": false - }, - { - "x": [ - 1716103379277390185, - 18097936269579187542, - 16357329729761063450, - 1508640059338197502 - ], - "y": [ - 11014806739603983364, - 4396503314588777389, - 9397245609635151055, - 1703957955248411380 - ], - "infinity": false - }, - { - "x": [ - 4770171350693477354, - 17110558673192292253, - 9799800677557311408, - 761984875463445481 - ], - "y": [ - 1560561403388310063, - 31331275310848146, - 287152055803835484, - 457826332542037277 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 11327495732840772606, - 7407664417001729515, - 9486600059857658309, - 3060296564241189838 - ], - "y": [ - 7624492872489320847, - 18248981556039704277, - 3877205757853252152, - 939885486002612376 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_12_key.json b/core/bin/verification_key_generator_and_server/data/verification_12_key.json deleted file mode 100644 index fec076f39eda..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_12_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 456514006020943025, - 9595480195714948127, - 12254096252487404245, - 1742692690750856358 - ], - "y": [ - 16294223586064957217, - 3958270970168887906, - 11264067544872898258, - 1692817687935973108 - ], - "infinity": false - }, - { - "x": [ - 1359655052308122459, - 13840124148496555776, - 1774237333490664500, - 2964872651584750318 - ], - "y": [ - 11907598503482948769, - 8700506041798646988, - 15081040576888859990, - 3096802642049924528 - ], - "infinity": false - }, - { - "x": [ - 2884314851670818573, - 13442465544210396156, - 5937955495868181363, - 2486997439179977778 - ], - "y": [ - 9309776793338098458, - 14492906371677122697, - 8837309186596588911, - 1081143755093508499 - ], - "infinity": false - }, - { - "x": [ - 2655654413304275855, - 4244723109566147837, - 12150359360501203194, - 3338981627918702615 - ], - "y": [ - 2522870072161287404, - 17341373219317210182, - 13058930363994599297, - 210373422168410518 - ], - "infinity": false - }, - { - "x": [ - 16728834675380740056, - 2139390496020366235, - 9480389182940223467, - 2279560291896695719 - ], - "y": [ - 12461418813218976432, - 357566005384566098, - 5295578385080568808, - 1801243085576438875 - ], - "infinity": false - }, - { - "x": [ - 8716201428771436123, - 3392394702404760386, - 9990956922582058945, - 1388317411153212399 - ], - "y": [ - 11666415392681680155, - 10553517485129490455, - 16061047708722635939, - 2386622646140901822 - ], - "infinity": false - }, - { - "x": [ - 16162432560623854812, - 15537581062716888632, - 12927223782958923606, - 2800634589869451227 - ], - "y": [ - 5345141365329635916, - 2224393250977631865, - 396527108738048188, - 2298318725146167177 - ], - "infinity": false - }, - { - "x": [ - 18372685954785469756, - 10436523365152935441, - 15509622927999798123, - 2050428620045833325 - ], - "y": [ - 4996265985148335658, - 6073112270434155721, - 4873288683270752338, - 503179567393027927 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 4986139828502830074, - 8644425445976253042, - 4851433922656693398, - 1419574698085640872 - ], - "y": [ - 16192186537521161947, - 16183885683582261905, - 1655718756619164666, - 3420236094426390604 - ], - "infinity": false - }, - { - "x": [ - 10727231722644915889, - 13777116005624794169, - 1422623412369619026, - 1701279717637612575 - ], - "y": [ - 6503647097427010249, - 6381043883853023011, - 15391366286376907281, - 1261207976874708261 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 11852073725466955067, - 179170887563176222, - 17529899074897279348, - 2496783194148289461 - ], - "y": [ - 15490041181991978284, - 6745436372504113852, - 7017978386715410058, - 3482556315200370895 - ], - "infinity": false - }, - { - "x": [ - 1330152738947291505, - 1668990644246591877, - 6805443255260621096, - 1309987766073890626 - ], - "y": [ - 18322300356676620444, - 8225233874302527542, - 5744327785164342590, - 410571567010522636 - ], - "infinity": false - }, - { - "x": [ - 13968210937929584911, - 17067601391996082961, - 4861463652254416951, - 2147834012714370408 - ], - "y": [ - 9012483356698219484, - 8660929519763525826, - 17744882010750642463, - 331423342438323189 - ], - "infinity": false - }, - { - "x": [ - 1352282553299127274, - 8587971715415488300, - 2471024479841756772, - 1239586065229072559 - ], - "y": [ - 1597792022909153930, - 5020991346876715357, - 5622801511814109910, - 1916460940163680567 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 46287674, - "lookup_selector_commitment": { - "x": [ - 11573469000684493293, - 15304040816406013002, - 9206902553183544808, - 2597693769113957036 - ], - "y": [ - 10538181061926273477, - 5239567589495426242, - 3627181047901924882, - 302644994241575377 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 5134795695995115566, - 12287750992060803275, - 3112021177339560487, - 2737779104829043419 - ], - "y": [ - 12960786984497012138, - 17246059378047870426, - 11486754204718893642, - 46104506716724806 - ], - "infinity": false - }, - { - "x": [ - 148472607159578301, - 1393814398025790148, - 13651878286378332448, - 3460878321325997474 - ], - "y": [ - 10791022888598424744, - 1931353219232076143, - 12342018346439101174, - 23632989633122111 - ], - "infinity": false - }, - { - "x": [ - 1355031833403957875, - 10754997913401276231, - 8672292473740482178, - 3014145653612856517 - ], - "y": [ - 3728402825933673134, - 16492594359417243041, - 14619929139939206930, - 2894280666048705144 - ], - "infinity": false - }, - { - "x": [ - 11362104917939269301, - 3050269804312222606, - 17884269955997757593, - 2804911625130359365 - ], - "y": [ - 9563576475625880180, - 9736108320914226650, - 11545696954602328389, - 1108440262014676246 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 5367643753678334453, - 18149093736372716410, - 1335188566370936146, - 668596617655217713 - ], - "y": [ - 9984652217894703540, - 16253861114794085212, - 2139268495406835151, - 710303505771002735 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_13_key.json b/core/bin/verification_key_generator_and_server/data/verification_13_key.json deleted file mode 100644 index 73ffbd212002..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_13_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 17551054392858982554, - 6093238351564742844, - 9461983640740135929, - 665917981733823732 - ], - "y": [ - 5039211542045701927, - 14102316155129161178, - 7599318237652648682, - 1484263542771007309 - ], - "infinity": false - }, - { - "x": [ - 14015566113565304739, - 12895182424777444911, - 5150482782915031712, - 3280776276671330755 - ], - "y": [ - 5503211683737487414, - 5857977821275887356, - 1294122171191120577, - 2917900236095606783 - ], - "infinity": false - }, - { - "x": [ - 11180353512945796758, - 5467792637578213396, - 14862660111090994534, - 1678570344676416345 - ], - "y": [ - 16496106534540891926, - 4355829424666415263, - 8379906815867503783, - 2141225531456729878 - ], - "infinity": false - }, - { - "x": [ - 10512618919562577175, - 8909238001556772501, - 8669074760108324520, - 3259590816167766101 - ], - "y": [ - 15477336671232249792, - 10209451912771766896, - 13672268903388741173, - 682487251336397201 - ], - "infinity": false - }, - { - "x": [ - 14233534177298597555, - 14428793231398751908, - 18070433438826750034, - 1176819688107481869 - ], - "y": [ - 9251234182098356520, - 17131606126090989402, - 17185633762130361526, - 70013401388751862 - ], - "infinity": false - }, - { - "x": [ - 14148566925658671094, - 812517577375883951, - 5030512299767107864, - 44275794325016754 - ], - "y": [ - 3275438385460491589, - 12366768737850140720, - 10754478223029148744, - 64366431004577735 - ], - "infinity": false - }, - { - "x": [ - 5646513434714516506, - 12578668031398681290, - 6956692825033783810, - 536471110695536326 - ], - "y": [ - 876079378616587621, - 9787032999740439668, - 14965634813605966164, - 367083452910738472 - ], - "infinity": false - }, - { - "x": [ - 10902302115259229513, - 14044271471332330954, - 14571826360674828773, - 733766328575554031 - ], - "y": [ - 8186695183963076514, - 621472878958955881, - 14756382569165412398, - 3165780226323675661 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 17780673306296332984, - 10355922416617009060, - 5077451999006954761, - 2644291606399153501 - ], - "y": [ - 884498752701137122, - 731399349168706916, - 4286165746592754883, - 3279732117855760703 - ], - "infinity": false - }, - { - "x": [ - 11012802284910829398, - 7859388231941271159, - 17586341808458361180, - 1386364899721133297 - ], - "y": [ - 15634369655108108777, - 3858480397682251762, - 17706291110507066608, - 1663421415693803071 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 18134041530736321349, - 4345724579806003155, - 2324407857452293002, - 2319164124977213120 - ], - "y": [ - 14302129084811449335, - 8588677756442252515, - 3323846949783670865, - 2109729211841784387 - ], - "infinity": false - }, - { - "x": [ - 14486843004985564085, - 10799247040254992370, - 7658639806933647132, - 2215292564171027727 - ], - "y": [ - 14258341133968554193, - 11685656973533320944, - 14111972937744219524, - 1172604679688980794 - ], - "infinity": false - }, - { - "x": [ - 12872375111956991701, - 14049784009914403066, - 15325016171856456312, - 2811875539960405333 - ], - "y": [ - 5711194902040443430, - 13827091592207472460, - 17950028361571343192, - 1672758585097311581 - ], - "infinity": false - }, - { - "x": [ - 11717525586585736911, - 730672019767199816, - 3010255132348992613, - 2780587454575324896 - ], - "y": [ - 1473124157542628664, - 1573646910034288561, - 10026766074599473146, - 563223750818543582 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 42547753, - "lookup_selector_commitment": { - "x": [ - 4539928924349895484, - 2792770915461027618, - 11611697420465472575, - 1384307956752801018 - ], - "y": [ - 8840366360901511807, - 8892919985613263102, - 11941090149541110830, - 1930352681887390920 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 4121704254446914578, - 13863658665929861884, - 15362282368839162345, - 2762703036966024619 - ], - "y": [ - 102846692212239082, - 14904466746900448136, - 16872429770359000841, - 1687152581020907098 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_14_key.json b/core/bin/verification_key_generator_and_server/data/verification_14_key.json deleted file mode 100644 index e8c42d407e35..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_14_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 6916434521451934576, - 614815553772638285, - 3742595993843812033, - 2823214088432624432 - ], - "y": [ - 11642815096362884283, - 18063950820723921281, - 6353943092001719992, - 3201898419478369298 - ], - "infinity": false - }, - { - "x": [ - 10647237757917239762, - 1269177049592707998, - 2650053775033150725, - 582198744757304104 - ], - "y": [ - 9804667267596536998, - 493663115027956828, - 13953159385227792767, - 1568248765042207679 - ], - "infinity": false - }, - { - "x": [ - 7910659438561833906, - 12456422925439856914, - 10869604528749370003, - 1213616301038416610 - ], - "y": [ - 2606202790862698157, - 6809934263763206210, - 17472080335242458272, - 2884639755368519501 - ], - "infinity": false - }, - { - "x": [ - 14211325859682683183, - 11018598407116786751, - 10064425366978091674, - 2748595948091261209 - ], - "y": [ - 13960202853590116423, - 1211975538022172568, - 16303435518817750320, - 1634234707214097860 - ], - "infinity": false - }, - { - "x": [ - 4528591178982443847, - 16310104707629911601, - 5532120103079323919, - 1347877820087040669 - ], - "y": [ - 17983603511717948746, - 9529659424488112452, - 7820918413906679254, - 1819855238351369466 - ], - "infinity": false - }, - { - "x": [ - 14415562798118912210, - 6550719056383417327, - 424281724891761932, - 1264340531903932141 - ], - "y": [ - 7768057951329404686, - 15024442753889769568, - 9676935351692818899, - 1492251668690310932 - ], - "infinity": false - }, - { - "x": [ - 2619366878850208112, - 12150914745315976156, - 8375197026043390274, - 1935272977563031501 - ], - "y": [ - 5381369692389055354, - 17978011500330472972, - 17420193441326928998, - 479187691463910357 - ], - "infinity": false - }, - { - "x": [ - 8720830951139717797, - 15985700059986022675, - 11876530273787337931, - 421322430672290976 - ], - "y": [ - 9700690437922183179, - 1976785701667862157, - 16634886936358874061, - 3002178567925406588 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 8284083154661042764, - 11776500066398184343, - 868620904897679124, - 2988582549909766892 - ], - "y": [ - 10794129605563176627, - 15487634480061313925, - 17194646451372113884, - 2087686927573540537 - ], - "infinity": false - }, - { - "x": [ - 7916190330285050096, - 11731220788334102406, - 6221883233572429550, - 2552280229203107267 - ], - "y": [ - 10510502959728300366, - 14682539966609739595, - 8275243146917870162, - 164811532254637923 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 195850038587200624, - 10136289160450054078, - 4386512701252721226, - 219366815902177323 - ], - "y": [ - 12042545079209848932, - 599057886584676736, - 14545610403811537682, - 498958995843318019 - ], - "infinity": false - }, - { - "x": [ - 4721932753701441297, - 1676671918244393403, - 6943597542294442696, - 50994782040503038 - ], - "y": [ - 8321420884695240511, - 10606883887907326697, - 11471075822795411018, - 1311422627151559437 - ], - "infinity": false - }, - { - "x": [ - 85448132386017640, - 13016912343020112485, - 11647418800345296605, - 1741562939125330787 - ], - "y": [ - 10753835454658443286, - 8646325836340244979, - 7348777908140142985, - 2196062626460604424 - ], - "infinity": false - }, - { - "x": [ - 2125624295892265840, - 12754141819506101591, - 8789168208880604752, - 947087620272222934 - ], - "y": [ - 12566258871261234263, - 12307504590191426495, - 6700589767183706452, - 1828704371386663334 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 42212029, - "lookup_selector_commitment": { - "x": [ - 7709849601046260359, - 6836713108454667472, - 17360769186231334246, - 2348971634881039863 - ], - "y": [ - 13380830060569421804, - 15446653016734774164, - 17884501636917484387, - 1386904567459265970 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 6960699536013090594, - 2075384204892265266, - 12053931571725248687, - 1371193846897305849 - ], - "y": [ - 8904850119058507432, - 10465598889525773001, - 16159541505228012497, - 1982452464017823539 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_15_key.json b/core/bin/verification_key_generator_and_server/data/verification_15_key.json deleted file mode 100644 index 356dbb3c531a..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_15_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 3227382513538635502, - 10189582412003011525, - 1928710987967879299, - 1641062823248805930 - ], - "y": [ - 3271795224553087841, - 14036363906521936156, - 10253705337161624780, - 3091191233208402889 - ], - "infinity": false - }, - { - "x": [ - 3541471743181642086, - 8117051273006688414, - 685909872467163024, - 2614724468827209722 - ], - "y": [ - 1096952120887201428, - 8197980407203032569, - 3949713006885563085, - 2838982585728277197 - ], - "infinity": false - }, - { - "x": [ - 12432945880074879560, - 13444859845042471186, - 16599097070979057001, - 3064039790213026567 - ], - "y": [ - 3745088406100356357, - 11715355314289478148, - 2282946417129489745, - 1619614407449915711 - ], - "infinity": false - }, - { - "x": [ - 6864310053920223866, - 11095455024311706186, - 12229748247000682102, - 2475016349586561501 - ], - "y": [ - 2946781066962542712, - 14275500021265062654, - 7624481756022778467, - 1439658776940615826 - ], - "infinity": false - }, - { - "x": [ - 13589273139905087785, - 10411035015021574213, - 7322465558208873130, - 1805943743448229826 - ], - "y": [ - 13035238946064559886, - 8309482746549063820, - 14229757515324464781, - 1676135665275665956 - ], - "infinity": false - }, - { - "x": [ - 84006308859404982, - 13783127238980064918, - 14101945786439708601, - 3343881426944938693 - ], - "y": [ - 11959320721291234482, - 7288504259378326725, - 9638777183731403514, - 1648453409181088010 - ], - "infinity": false - }, - { - "x": [ - 10987163680360734145, - 3374907765066907489, - 14421201974855570464, - 3148542489906320493 - ], - "y": [ - 17180031485000081847, - 1609372527008367113, - 6050341427989573858, - 477684541505306009 - ], - "infinity": false - }, - { - "x": [ - 2257028353691713628, - 6330174784373016532, - 1686021628649718039, - 2159927805963705967 - ], - "y": [ - 10814125155819336479, - 9673780307204445954, - 7995606758095566598, - 2252251279727988680 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 12209724104183572477, - 11631007075974892904, - 18407423517909669447, - 1123848354500646471 - ], - "y": [ - 4749227851055533192, - 16918951234067984229, - 5345146076707243019, - 2836719468222132526 - ], - "infinity": false - }, - { - "x": [ - 7250866110466496804, - 16022969863388101391, - 16334300930347324147, - 2232272485807431638 - ], - "y": [ - 257675104580526310, - 8044331403028603186, - 2070174268860891010, - 412313474208091695 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 6736882681315025594, - 13400430183084617843, - 17182588928882896917, - 413858188107207402 - ], - "y": [ - 11944170108613027081, - 10598841640624895850, - 9086311820289524704, - 994240611047161478 - ], - "infinity": false - }, - { - "x": [ - 9500318283622871785, - 5480449932874899465, - 13224510306395939252, - 1891329668301281157 - ], - "y": [ - 7314078756040350933, - 1023294602177498218, - 16475078688698425911, - 1793945182112302214 - ], - "infinity": false - }, - { - "x": [ - 17207548058425781429, - 2519222249126358251, - 16087595361924038018, - 3470846273906312296 - ], - "y": [ - 7578361094884620755, - 7082109151721400218, - 13675372677342046523, - 3204472226310685459 - ], - "infinity": false - }, - { - "x": [ - 7036282717341939568, - 3035419720331773758, - 6765191455902729185, - 1301973211946290083 - ], - "y": [ - 697377419426635450, - 14612037890797520515, - 11746079616766057625, - 1031190413179598818 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 6391155, - "lookup_selector_commitment": { - "x": [ - 17111915492430945419, - 17971275185478677346, - 14211391044159602918, - 2381455978713737016 - ], - "y": [ - 13971515893527127207, - 7078722574057096191, - 6337080743811431820, - 757015217034494132 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 5825422128268478267, - 9219263846299851036, - 3879231702557190566, - 1702488722758880769 - ], - "y": [ - 18311881100262470992, - 5742998199368802392, - 18106865487471159417, - 502191980176920012 - ], - "infinity": false - }, - { - "x": [ - 17195892082859417081, - 7890531942603584793, - 2381805632820057528, - 3173232410464566465 - ], - "y": [ - 16359614627947132075, - 3459600273035137079, - 4550762061432972122, - 3394559699318358224 - ], - "infinity": false - }, - { - "x": [ - 1716103379277390185, - 18097936269579187542, - 16357329729761063450, - 1508640059338197502 - ], - "y": [ - 11014806739603983364, - 4396503314588777389, - 9397245609635151055, - 1703957955248411380 - ], - "infinity": false - }, - { - "x": [ - 4770171350693477354, - 17110558673192292253, - 9799800677557311408, - 761984875463445481 - ], - "y": [ - 1560561403388310063, - 31331275310848146, - 287152055803835484, - 457826332542037277 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 12452920133699897102, - 6896642231513345496, - 4655495116895575043, - 1453525729114564853 - ], - "y": [ - 3574087764464303986, - 10141819911397868785, - 2342639320036978232, - 556196027732983028 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_16_key.json b/core/bin/verification_key_generator_and_server/data/verification_16_key.json deleted file mode 100644 index 356dbb3c531a..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_16_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 3227382513538635502, - 10189582412003011525, - 1928710987967879299, - 1641062823248805930 - ], - "y": [ - 3271795224553087841, - 14036363906521936156, - 10253705337161624780, - 3091191233208402889 - ], - "infinity": false - }, - { - "x": [ - 3541471743181642086, - 8117051273006688414, - 685909872467163024, - 2614724468827209722 - ], - "y": [ - 1096952120887201428, - 8197980407203032569, - 3949713006885563085, - 2838982585728277197 - ], - "infinity": false - }, - { - "x": [ - 12432945880074879560, - 13444859845042471186, - 16599097070979057001, - 3064039790213026567 - ], - "y": [ - 3745088406100356357, - 11715355314289478148, - 2282946417129489745, - 1619614407449915711 - ], - "infinity": false - }, - { - "x": [ - 6864310053920223866, - 11095455024311706186, - 12229748247000682102, - 2475016349586561501 - ], - "y": [ - 2946781066962542712, - 14275500021265062654, - 7624481756022778467, - 1439658776940615826 - ], - "infinity": false - }, - { - "x": [ - 13589273139905087785, - 10411035015021574213, - 7322465558208873130, - 1805943743448229826 - ], - "y": [ - 13035238946064559886, - 8309482746549063820, - 14229757515324464781, - 1676135665275665956 - ], - "infinity": false - }, - { - "x": [ - 84006308859404982, - 13783127238980064918, - 14101945786439708601, - 3343881426944938693 - ], - "y": [ - 11959320721291234482, - 7288504259378326725, - 9638777183731403514, - 1648453409181088010 - ], - "infinity": false - }, - { - "x": [ - 10987163680360734145, - 3374907765066907489, - 14421201974855570464, - 3148542489906320493 - ], - "y": [ - 17180031485000081847, - 1609372527008367113, - 6050341427989573858, - 477684541505306009 - ], - "infinity": false - }, - { - "x": [ - 2257028353691713628, - 6330174784373016532, - 1686021628649718039, - 2159927805963705967 - ], - "y": [ - 10814125155819336479, - 9673780307204445954, - 7995606758095566598, - 2252251279727988680 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 12209724104183572477, - 11631007075974892904, - 18407423517909669447, - 1123848354500646471 - ], - "y": [ - 4749227851055533192, - 16918951234067984229, - 5345146076707243019, - 2836719468222132526 - ], - "infinity": false - }, - { - "x": [ - 7250866110466496804, - 16022969863388101391, - 16334300930347324147, - 2232272485807431638 - ], - "y": [ - 257675104580526310, - 8044331403028603186, - 2070174268860891010, - 412313474208091695 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 6736882681315025594, - 13400430183084617843, - 17182588928882896917, - 413858188107207402 - ], - "y": [ - 11944170108613027081, - 10598841640624895850, - 9086311820289524704, - 994240611047161478 - ], - "infinity": false - }, - { - "x": [ - 9500318283622871785, - 5480449932874899465, - 13224510306395939252, - 1891329668301281157 - ], - "y": [ - 7314078756040350933, - 1023294602177498218, - 16475078688698425911, - 1793945182112302214 - ], - "infinity": false - }, - { - "x": [ - 17207548058425781429, - 2519222249126358251, - 16087595361924038018, - 3470846273906312296 - ], - "y": [ - 7578361094884620755, - 7082109151721400218, - 13675372677342046523, - 3204472226310685459 - ], - "infinity": false - }, - { - "x": [ - 7036282717341939568, - 3035419720331773758, - 6765191455902729185, - 1301973211946290083 - ], - "y": [ - 697377419426635450, - 14612037890797520515, - 11746079616766057625, - 1031190413179598818 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 6391155, - "lookup_selector_commitment": { - "x": [ - 17111915492430945419, - 17971275185478677346, - 14211391044159602918, - 2381455978713737016 - ], - "y": [ - 13971515893527127207, - 7078722574057096191, - 6337080743811431820, - 757015217034494132 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 5825422128268478267, - 9219263846299851036, - 3879231702557190566, - 1702488722758880769 - ], - "y": [ - 18311881100262470992, - 5742998199368802392, - 18106865487471159417, - 502191980176920012 - ], - "infinity": false - }, - { - "x": [ - 17195892082859417081, - 7890531942603584793, - 2381805632820057528, - 3173232410464566465 - ], - "y": [ - 16359614627947132075, - 3459600273035137079, - 4550762061432972122, - 3394559699318358224 - ], - "infinity": false - }, - { - "x": [ - 1716103379277390185, - 18097936269579187542, - 16357329729761063450, - 1508640059338197502 - ], - "y": [ - 11014806739603983364, - 4396503314588777389, - 9397245609635151055, - 1703957955248411380 - ], - "infinity": false - }, - { - "x": [ - 4770171350693477354, - 17110558673192292253, - 9799800677557311408, - 761984875463445481 - ], - "y": [ - 1560561403388310063, - 31331275310848146, - 287152055803835484, - 457826332542037277 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 12452920133699897102, - 6896642231513345496, - 4655495116895575043, - 1453525729114564853 - ], - "y": [ - 3574087764464303986, - 10141819911397868785, - 2342639320036978232, - 556196027732983028 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_17_key.json b/core/bin/verification_key_generator_and_server/data/verification_17_key.json deleted file mode 100644 index 4886f501712e..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_17_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 17914331890341023175, - 5200903915088916638, - 7417971632353510341, - 989671567770015891 - ], - "y": [ - 2927207345798721401, - 12686845373576710402, - 977520799157489114, - 1882223742569339495 - ], - "infinity": false - }, - { - "x": [ - 17162848902278956536, - 16169550484471334725, - 10830640611178609260, - 1347016616567630867 - ], - "y": [ - 6224316231648682710, - 10518372790293065661, - 4887066336660303630, - 703109868065750569 - ], - "infinity": false - }, - { - "x": [ - 15783141083967762454, - 16153855592853073081, - 5667838393811413602, - 1552498518850981979 - ], - "y": [ - 4220445586486275972, - 13196202402039716924, - 17506868028821343237, - 2718319833724164541 - ], - "infinity": false - }, - { - "x": [ - 4896615254637588846, - 5804270398165250639, - 10274952983674590649, - 1937027782721476561 - ], - "y": [ - 14180244016629518742, - 1376497406583367686, - 11268467489552574214, - 2331396669725958189 - ], - "infinity": false - }, - { - "x": [ - 191294939748295885, - 2804205121966814820, - 3897841028303648224, - 3406986167359695085 - ], - "y": [ - 6000542982074572633, - 1697448874567677325, - 10313504031977824294, - 320347014349001728 - ], - "infinity": false - }, - { - "x": [ - 6817435454105168413, - 15823888625999007373, - 9766931118761036330, - 3392959293697897728 - ], - "y": [ - 3549039265311512008, - 4758653036115592629, - 219467419355603781, - 83059544477934848 - ], - "infinity": false - }, - { - "x": [ - 5038171725639341807, - 6859992384823395611, - 15284967171349293554, - 16807092603996758 - ], - "y": [ - 16504201956683368367, - 12931995037356002803, - 16812826192957092842, - 3169839139097845275 - ], - "infinity": false - }, - { - "x": [ - 7140480682142203727, - 9518528852331365100, - 6189914959408603471, - 535939568308325781 - ], - "y": [ - 5944679084532939174, - 17280810090456322382, - 3743919877743496107, - 1235924204609568068 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 1929812895882850703, - 10386198218814398503, - 17007521659662498274, - 1093092717342753672 - ], - "y": [ - 14834187133095267171, - 15506032964234961178, - 7626816120460943443, - 871778379365004315 - ], - "infinity": false - }, - { - "x": [ - 15660406110329165813, - 8146521122567923995, - 2421739551937359002, - 3037598346026174089 - ], - "y": [ - 526124545966722472, - 1168331442853419483, - 4128095883471549051, - 2951909971734725955 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 6206240620508019400, - 3690935139087147193, - 15230272164329216928, - 2140680869789406894 - ], - "y": [ - 14967331981004447304, - 1624146052760537503, - 8986435052862626311, - 334011853307313390 - ], - "infinity": false - }, - { - "x": [ - 4342223064246074020, - 2037946044543710684, - 9057698479075332373, - 1955362957846693345 - ], - "y": [ - 13253375713250043938, - 6754658208742468331, - 9339617748652368850, - 3066524060291544175 - ], - "infinity": false - }, - { - "x": [ - 17765629723696241082, - 14243015821582305127, - 922013493526048847, - 186830516636733479 - ], - "y": [ - 14465184942185208224, - 11235596895177038197, - 5490682932088517686, - 1253279069662324930 - ], - "infinity": false - }, - { - "x": [ - 9369367805867402420, - 12663806522952881709, - 10184609326459106945, - 1664572000409921348 - ], - "y": [ - 4383960972942823390, - 6526609131568596717, - 1343118583674917141, - 113408414321095416 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 6306340, - "lookup_selector_commitment": { - "x": [ - 8662938005624859815, - 9126108646717466191, - 14321121874090966307, - 2777446762308933634 - ], - "y": [ - 12555265159079607081, - 9054928862248682392, - 2784170007581120117, - 1769718192676345815 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 12644448349947379666, - 16345179309557779118, - 10854030671875297787, - 1358228639202695992 - ], - "y": [ - 2673142241557152443, - 11674634738064487673, - 12992693662201776412, - 1888958170754620568 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_18_key.json b/core/bin/verification_key_generator_and_server/data/verification_18_key.json deleted file mode 100644 index 0987039dd1fa..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_18_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 8828437332483635107, - 13777915698231175292, - 11504510351588004199, - 2516385517175522236 - ], - "y": [ - 1530453459325046685, - 2126477283125660971, - 6874073688275717548, - 2971751478402184988 - ], - "infinity": false - }, - { - "x": [ - 3490885152333630169, - 4123320877294819459, - 5138828731030738163, - 3039569146695764058 - ], - "y": [ - 10725322881860790776, - 1512262420257872325, - 10563843054743673205, - 447776577449487981 - ], - "infinity": false - }, - { - "x": [ - 14957646468235752771, - 6216555943494703122, - 7827110015048654177, - 2702223139144227095 - ], - "y": [ - 505353369980003046, - 9687811614109626117, - 5346740791392836415, - 1340467989233731971 - ], - "infinity": false - }, - { - "x": [ - 3201028595190213325, - 9659059230246338206, - 901122635500995415, - 765851963674764103 - ], - "y": [ - 10609226610841230792, - 8145519080052709505, - 17851750066177581293, - 362176586681460505 - ], - "infinity": false - }, - { - "x": [ - 13374935211181268625, - 1347742735582506393, - 4588995338963087243, - 94453217016201562 - ], - "y": [ - 4077548225372117006, - 11859845367084549583, - 2736752177668563039, - 1134818940315684409 - ], - "infinity": false - }, - { - "x": [ - 9467178015658262369, - 10545965721679492606, - 5726831550010619228, - 2051827871593168334 - ], - "y": [ - 6169140154733194545, - 5574043976386236933, - 12140759986363309479, - 1521273866181786590 - ], - "infinity": false - }, - { - "x": [ - 9642818207174528085, - 15617465062711953088, - 11263174413902929450, - 639683138088730423 - ], - "y": [ - 15150652293369779803, - 11338278639695990684, - 12204993260723588081, - 2039902155290309382 - ], - "infinity": false - }, - { - "x": [ - 7292405600450693833, - 573142590034645775, - 1583019100043676600, - 1978695840953226358 - ], - "y": [ - 5154489367309996043, - 8763740977657654022, - 9821219773990064941, - 2636875463267519559 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 2075450237700219880, - 2920304484074114568, - 8294843245052708759, - 555293007149161182 - ], - "y": [ - 6360019558055677441, - 7673047654179899818, - 10263007591992092214, - 2148859098846651643 - ], - "infinity": false - }, - { - "x": [ - 3970783323754285443, - 13019363829879217592, - 18197490676081603277, - 630296172623407012 - ], - "y": [ - 7987745494904024640, - 9631048689610078757, - 1592818072678520163, - 2678374240960081558 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 3055966415338102721, - 18231075292903695376, - 9187400351012014001, - 2311743062653684305 - ], - "y": [ - 2553578246375478674, - 930511927228692161, - 2271826946385879571, - 3124263363559878329 - ], - "infinity": false - }, - { - "x": [ - 6936812562216228782, - 15195638439305648290, - 17827467578192758430, - 2674740411261002393 - ], - "y": [ - 9738743088557108685, - 17225541903460577384, - 16627013813461429872, - 494410407050490065 - ], - "infinity": false - }, - { - "x": [ - 10570962909758341245, - 18167360144953681397, - 2744925075742623060, - 736412139310579435 - ], - "y": [ - 13849279071386536985, - 10093748777935480433, - 904764951143479286, - 138814932031469939 - ], - "infinity": false - }, - { - "x": [ - 4533871929444677010, - 10106157783629999301, - 4178648893377901718, - 3164693318611048089 - ], - "y": [ - 12699039702383686311, - 4388078229442418460, - 8961813905523894854, - 570254591975307765 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 18884644, - "lookup_selector_commitment": { - "x": [ - 15022814412717317376, - 17444332185630324119, - 14685665421775887958, - 906494215348891007 - ], - "y": [ - 9833778905776399360, - 1648124311168457783, - 3500435402371619753, - 2370413643071351216 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 8321950609730151216, - 18010887235457883784, - 17038267498493175776, - 1380842840607309871 - ], - "y": [ - 3264160671000273944, - 16611917363401804468, - 8505391859632632917, - 2149881676646664319 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_1_key.json b/core/bin/verification_key_generator_and_server/data/verification_1_key.json deleted file mode 100644 index 0310303d2a53..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_1_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 7601801432079276288, - 15201863322122857773, - 8806193975262404580, - 2590787273683229105 - ], - "y": [ - 16702527967956763728, - 6181870639994435984, - 1867123357108619315, - 2767403024411663364 - ], - "infinity": false - }, - { - "x": [ - 2455316591212726341, - 2027771240685247927, - 10685588854446154162, - 3030775657966372875 - ], - "y": [ - 18300009037843703356, - 1612973442135305251, - 10693350009422283513, - 1442590213691840716 - ], - "infinity": false - }, - { - "x": [ - 12311884457715965312, - 10390638194798557018, - 11306832124741148566, - 300716765354847473 - ], - "y": [ - 9707964220031061231, - 14753080439380196493, - 5717535245627190368, - 702219636062983319 - ], - "infinity": false - }, - { - "x": [ - 7758453297146426337, - 1673770484163252092, - 14607544807007157753, - 857313958429629763 - ], - "y": [ - 14921629410308576937, - 15298335487420996140, - 2704982045392946878, - 2611590721009022852 - ], - "infinity": false - }, - { - "x": [ - 14311011031579784592, - 15625526098906078640, - 1319146597092063841, - 774276845418764858 - ], - "y": [ - 3893523842912943845, - 18146056093503974553, - 11030513442747849089, - 389965813625175232 - ], - "infinity": false - }, - { - "x": [ - 7007915445081129178, - 2401922490835966325, - 418720827124106725, - 2770268368066902308 - ], - "y": [ - 12116308634970006696, - 14528630571959109449, - 9950799281726780069, - 724152027617190422 - ], - "infinity": false - }, - { - "x": [ - 2442021019274420960, - 16295185893380203674, - 2439146651414642189, - 2243335375830582173 - ], - "y": [ - 3782090054162740071, - 4704457281172608987, - 4410900061257118309, - 764611777065564766 - ], - "infinity": false - }, - { - "x": [ - 17964884224938230037, - 7876675311267561320, - 16762398450655445790, - 1210707988542142007 - ], - "y": [ - 10470358785861361347, - 9485656365593190672, - 6046378362748740079, - 2457285875935475197 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 17157526827088368172, - 11284084393440625999, - 9351565798611728109, - 3234841809825307363 - ], - "y": [ - 8319704714678793930, - 4159327153032521498, - 15356346081767327573, - 3239913585027348493 - ], - "infinity": false - }, - { - "x": [ - 15456321646261647359, - 15891438700803416959, - 3317730603133051465, - 2641175705943818316 - ], - "y": [ - 1411951218052246200, - 1661720531643832913, - 13537400120511760371, - 2292851110898807736 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 10328956753700766823, - 2827084848292920926, - 6753362467616392790, - 3266354497443915853 - ], - "y": [ - 4786671171082888838, - 11071539213550223285, - 3886224490311829958, - 1435384580945051012 - ], - "infinity": false - }, - { - "x": [ - 6970901872301032061, - 11845499850875638451, - 12523013241874863158, - 564589203700245768 - ], - "y": [ - 9149991346853645253, - 10833082414663634622, - 10032445307744641248, - 3184550747076826571 - ], - "infinity": false - }, - { - "x": [ - 2899501934612768796, - 7289832407727333580, - 15398305180487198919, - 2955735241334744486 - ], - "y": [ - 4963499698281910643, - 5723522390488208800, - 3637467607919864741, - 339118267031086794 - ], - "infinity": false - }, - { - "x": [ - 16561673014946600686, - 6893642268089467710, - 11554023210615815565, - 122477375056362239 - ], - "y": [ - 15978560303000591303, - 6087766803442805629, - 6114779478264008006, - 2753348573959524636 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 30899639, - "lookup_selector_commitment": { - "x": [ - 4819118611809066421, - 16205075690681881406, - 8088108199972047891, - 2462381205202312681 - ], - "y": [ - 9403235417076804812, - 11746452954984920263, - 5479393366572364588, - 2168476120537571525 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 1589280911861251894, - 2000192568988587993, - 18399902493387281635, - 1843483375839232315 - ], - "y": [ - 14712825033319581746, - 11500494123399487569, - 4370642671010258701, - 567620704393396341 - ], - "infinity": false - }, - { - "x": [ - 0, - 0, - 0, - 0 - ], - "y": [ - 1, - 0, - 0, - 0 - ], - "infinity": true - }, - { - "x": [ - 0, - 0, - 0, - 0 - ], - "y": [ - 1, - 0, - 0, - 0 - ], - "infinity": true - }, - { - "x": [ - 5989740765536181742, - 7510673671757970234, - 7988398980529338112, - 2047433943537325290 - ], - "y": [ - 14952889876146512965, - 17141012675484923048, - 328206788961236528, - 866564802795139 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 4824978155651454377, - 12191454623887257586, - 12973919510878979890, - 52932438992466171 - ], - "y": [ - 17857145998747603901, - 2092039184434926372, - 11018504664231591204, - 1321736242331612854 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_2_key.json b/core/bin/verification_key_generator_and_server/data/verification_2_key.json deleted file mode 100644 index 79b16257213f..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_2_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 5518783475412319303, - 13900056820557691891, - 3293972357974626054, - 2215936931279678502 - ], - "y": [ - 7955917949806788616, - 13341003959544330056, - 2090626280536970058, - 340565138339520735 - ], - "infinity": false - }, - { - "x": [ - 14185170917510557830, - 8046892618400404954, - 16599645397148333553, - 2994187418830549588 - ], - "y": [ - 7234254448777026502, - 8445782435526889669, - 14116370103157060862, - 2248206929083565209 - ], - "infinity": false - }, - { - "x": [ - 11154659552703848544, - 12941656139895069323, - 17062140236305086427, - 722110816848028084 - ], - "y": [ - 5009717036998782771, - 827592822749515890, - 15966856850732642654, - 618036931564479654 - ], - "infinity": false - }, - { - "x": [ - 5157594213696692987, - 15014090155482426422, - 706425002062263449, - 3203486979181293219 - ], - "y": [ - 14363949081622225749, - 9001876918808042476, - 1615414451418136701, - 444697301726425121 - ], - "infinity": false - }, - { - "x": [ - 9176460251336839321, - 17295305184785757140, - 7831134341003191604, - 2666806971657364559 - ], - "y": [ - 2598277252699259004, - 11916936738177575234, - 2912317122505195338, - 2404138220482962548 - ], - "infinity": false - }, - { - "x": [ - 11575910134534349159, - 14192914809594698195, - 18267718409201448839, - 142641722814285206 - ], - "y": [ - 5883506329268908990, - 2832339585209792351, - 14642260147093833347, - 392817691249359885 - ], - "infinity": false - }, - { - "x": [ - 12908012748245269010, - 6525727331816152736, - 16979431824428028279, - 2845131870310951239 - ], - "y": [ - 1571963770034876851, - 17602700402136611105, - 13310928253737079884, - 3347891464097055062 - ], - "infinity": false - }, - { - "x": [ - 832167803175150309, - 11457734167413059640, - 13250442890410377059, - 2814079984479722654 - ], - "y": [ - 1463471541691279258, - 1744973157713476297, - 1204969522442685286, - 1269233371856967282 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 10352656458395970023, - 3995520406692994966, - 13084432248093257522, - 2302839365715839904 - ], - "y": [ - 8225034751786073151, - 16771047952615636124, - 616708265068224682, - 186403683175385821 - ], - "infinity": false - }, - { - "x": [ - 4270731028924703792, - 3128341040439802084, - 15083522049785140229, - 2261189689222904761 - ], - "y": [ - 8781157350107493893, - 14766318733918494793, - 9428422381369337621, - 419743052593117743 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 11112968480130414212, - 11913364106966677596, - 36671493864905181, - 496058283903160224 - ], - "y": [ - 9691136012048916590, - 12909186572206021308, - 1700657689434945171, - 3072265811815532764 - ], - "infinity": false - }, - { - "x": [ - 11360744654540534278, - 9830357778413675465, - 5192069313646589173, - 113131628631742646 - ], - "y": [ - 5515513518975242303, - 323890392099446701, - 2255482865429449468, - 2322464724330067577 - ], - "infinity": false - }, - { - "x": [ - 3414259545645111239, - 5416149397109634837, - 12993204506510556426, - 2894091844446687144 - ], - "y": [ - 4731949297479191167, - 1043460441127916951, - 16890401788673829290, - 1356564712828723527 - ], - "infinity": false - }, - { - "x": [ - 8993182433738017869, - 11441314659459910136, - 8181494681500166120, - 1591321336872387140 - ], - "y": [ - 5278254820002084488, - 17932571960593236295, - 7626453034762681225, - 3463596506399756742 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 30783671, - "lookup_selector_commitment": { - "x": [ - 1336161834228740427, - 15823221750660268452, - 13689567356831376139, - 1839611883700311389 - ], - "y": [ - 14875759795137726191, - 20318096045504920, - 8816565555629805366, - 75556627728969178 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 1589280911861251894, - 2000192568988587993, - 18399902493387281635, - 1843483375839232315 - ], - "y": [ - 14712825033319581746, - 11500494123399487569, - 4370642671010258701, - 567620704393396341 - ], - "infinity": false - }, - { - "x": [ - 0, - 0, - 0, - 0 - ], - "y": [ - 1, - 0, - 0, - 0 - ], - "infinity": true - }, - { - "x": [ - 0, - 0, - 0, - 0 - ], - "y": [ - 1, - 0, - 0, - 0 - ], - "infinity": true - }, - { - "x": [ - 5989740765536181742, - 7510673671757970234, - 7988398980529338112, - 2047433943537325290 - ], - "y": [ - 14952889876146512965, - 17141012675484923048, - 328206788961236528, - 866564802795139 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 3408213281770836085, - 15382444791373914560, - 16110552627056571461, - 1161688479331593061 - ], - "y": [ - 13379188756114722390, - 12926267823879081751, - 14282599792449107495, - 3244837013658545871 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_3_key.json b/core/bin/verification_key_generator_and_server/data/verification_3_key.json deleted file mode 100644 index 613c65dec32a..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_3_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 4247884029119603815, - 14048318895702359089, - 1617022869923646571, - 1004300266779052296 - ], - "y": [ - 17868528514201987465, - 4244261302597587354, - 10221573892940475912, - 2482382880446840010 - ], - "infinity": false - }, - { - "x": [ - 6238506840459074871, - 18254983327500098151, - 12976360180164130634, - 1219856697105853614 - ], - "y": [ - 1359994609126438238, - 17827470346804056210, - 16773833510918183872, - 2604619773311417557 - ], - "infinity": false - }, - { - "x": [ - 5480908979724966765, - 3393255975447524652, - 10371160681199271551, - 3483125449532424455 - ], - "y": [ - 6910224697959110691, - 8190986918875328214, - 18233342390114194740, - 371038657258361111 - ], - "infinity": false - }, - { - "x": [ - 1589636458242554884, - 17321835409586313003, - 13993520794641679178, - 1266542986497561712 - ], - "y": [ - 5397891169353072140, - 5878548729835574296, - 15706893227817678651, - 1769961527856953483 - ], - "infinity": false - }, - { - "x": [ - 17541435070606794744, - 2655627213950653916, - 11216216944579921605, - 1313780180047509779 - ], - "y": [ - 16950319453735037870, - 1632204383055288188, - 15201163922365522932, - 2864472556240937346 - ], - "infinity": false - }, - { - "x": [ - 11997977223945303553, - 14325590013978700522, - 15557533141347230729, - 3289139360100222484 - ], - "y": [ - 2276406350677881932, - 12276125258173429823, - 6135372778488654786, - 2960027660870022236 - ], - "infinity": false - }, - { - "x": [ - 8889079782908651911, - 9444258938063781000, - 6152157289837951831, - 2046144251434758098 - ], - "y": [ - 3506685845878604982, - 480610274681523215, - 17898829927408725055, - 478373452366390807 - ], - "infinity": false - }, - { - "x": [ - 9543795530837745598, - 5641706788025454992, - 2058665597673045347, - 3199980849578540913 - ], - "y": [ - 2134420461745303677, - 11079036403297001210, - 13973590059437528369, - 2236186172656440899 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 17082763384512425754, - 5415974525679408765, - 2982831717715582652, - 2185533346241584143 - ], - "y": [ - 889517497459248510, - 11305258809453581163, - 14785916458686019285, - 712045239932611417 - ], - "infinity": false - }, - { - "x": [ - 1486326951928055275, - 17648143945822975405, - 8789056175543467342, - 1582641302957127155 - ], - "y": [ - 16130216435506275947, - 186882025793811656, - 5333388052689527168, - 2555185016165074595 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 6775436174991417687, - 1962133343483010121, - 3639644700285584252, - 2751431324201714590 - ], - "y": [ - 16721581791017871189, - 2572212631009994187, - 12263629829130796245, - 1194783809693078725 - ], - "infinity": false - }, - { - "x": [ - 9781583375044732502, - 17099127122236789849, - 15683598159868779227, - 2137916464125382410 - ], - "y": [ - 11971077938028623721, - 14460546631248863771, - 3674726360546135290, - 2587006282919627488 - ], - "infinity": false - }, - { - "x": [ - 2258960665841769264, - 11476106728738999555, - 2154715457718708453, - 1652460267728538717 - ], - "y": [ - 591013691648424928, - 2747643213972148016, - 4382285331965077793, - 700518369290275435 - ], - "infinity": false - }, - { - "x": [ - 17029386353507514799, - 12736838109975824615, - 17948233540620781856, - 1661567367117856229 - ], - "y": [ - 5088293739561490025, - 257269786506894093, - 7029871828271960168, - 2982592857123453815 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 15390957, - "lookup_selector_commitment": { - "x": [ - 3143229288506876352, - 14398478555351850494, - 17971061391349533728, - 2397240458539623423 - ], - "y": [ - 2507720097747632492, - 4897824016944146490, - 8535810669426357324, - 2617442440174156771 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 12925597216490182210, - 13030942092034120135, - 17733316148446765999, - 112547709703624791 - ], - "y": [ - 13293415162200038331, - 13010565234555563811, - 15476251035925496743, - 2588541998389664114 - ], - "infinity": false - }, - { - "x": [ - 11118240121224901946, - 9394562257959111170, - 9026436993514314918, - 1751747619588842429 - ], - "y": [ - 6039590802345873394, - 17531716309156986038, - 1711770599161550805, - 1941094644175870288 - ], - "infinity": false - }, - { - "x": [ - 17999903301086933877, - 10468070608989378923, - 3479353092436121335, - 607756992244480908 - ], - "y": [ - 10863079642303790364, - 4737012301447477097, - 4605789209164294308, - 1430572887755557386 - ], - "infinity": false - }, - { - "x": [ - 4609762018249049814, - 4113097757442144437, - 4725434011535510809, - 2977599521231955696 - ], - "y": [ - 14636094180551257630, - 8819447661702130886, - 1091706295519429215, - 56675985696303183 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 7406705046881629689, - 13550366909312172285, - 11707241152492715411, - 1951231993396003315 - ], - "y": [ - 649840467305243342, - 10916062129580101841, - 7643158916474300887, - 1216418901317802861 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_4_key.json b/core/bin/verification_key_generator_and_server/data/verification_4_key.json deleted file mode 100644 index 8d42dcd66a75..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_4_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 15923176050075197, - 8963905519117333456, - 5333091548039957996, - 1660697180439834807 - ], - "y": [ - 13105864494044341635, - 10079874572012628853, - 4164109084931753781, - 1860950003357484648 - ], - "infinity": false - }, - { - "x": [ - 8216018177730810417, - 13660800917029254431, - 2933384097067755755, - 2823425599268575868 - ], - "y": [ - 8768863192718196559, - 10146282684570870426, - 8275806247588563419, - 605489936306033583 - ], - "infinity": false - }, - { - "x": [ - 4277344855257545209, - 11172040917478096607, - 4489086903928758598, - 289283798032159440 - ], - "y": [ - 10444137083253378550, - 12133212848977612596, - 6748791972701343485, - 286274227999569844 - ], - "infinity": false - }, - { - "x": [ - 8861797510071553254, - 12734094237204882518, - 13692967202881086499, - 641906135411222522 - ], - "y": [ - 6831762763487302461, - 11965405347371646114, - 6218256502970252800, - 3201462388136754725 - ], - "infinity": false - }, - { - "x": [ - 12385743015818134054, - 16282219738575446638, - 3256359841301423419, - 505673042938576760 - ], - "y": [ - 6744956686738207932, - 8994291190634790001, - 16789606231722015883, - 2027930268272962928 - ], - "infinity": false - }, - { - "x": [ - 13671822069226357541, - 818021157447551159, - 10542481209144358852, - 2459295197762128786 - ], - "y": [ - 1072649761929447549, - 6089126583512618706, - 1178131210084507361, - 1066836948212725576 - ], - "infinity": false - }, - { - "x": [ - 16878956366815094090, - 364977461173568122, - 5439594588743996145, - 1265442855735725449 - ], - "y": [ - 11461704536083653156, - 660278441271820299, - 4314245569905306892, - 1438663846765259508 - ], - "infinity": false - }, - { - "x": [ - 9038539654045396650, - 539827912679485452, - 15399544523862100757, - 1256406598444490417 - ], - "y": [ - 5422113905848106255, - 4943961807853536385, - 10022409325033689104, - 3200702511424842211 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 7750990741566547331, - 12040155777441846781, - 3000981333322867315, - 2393292192734976436 - ], - "y": [ - 3394853839941291504, - 944019051205640111, - 1104911864338577098, - 2127308956089601096 - ], - "infinity": false - }, - { - "x": [ - 4735140124663926465, - 16935779121597983173, - 17111626619540374574, - 2327973550601526140 - ], - "y": [ - 8990848735371189388, - 4589751206662798166, - 7575424772436241307, - 2798852347400154642 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 4765077060699177749, - 15235935045874519477, - 2022237788491579392, - 354385727984957703 - ], - "y": [ - 11620113321350620961, - 2521830680983779826, - 14047226057605943635, - 2718701882953208503 - ], - "infinity": false - }, - { - "x": [ - 12967015398643083015, - 1100660813730542482, - 7835181433213557652, - 803165211156388599 - ], - "y": [ - 8557385569712401227, - 535900682745452035, - 16083571717847325979, - 396765644246918860 - ], - "infinity": false - }, - { - "x": [ - 6868107733370365435, - 17106601841261210672, - 12219407605084986215, - 2345246684976405066 - ], - "y": [ - 17532412968783851743, - 9996315626158111485, - 17970945522106166231, - 1003764081419207606 - ], - "infinity": false - }, - { - "x": [ - 7011201477832405407, - 8818123127103997131, - 2979445003396953339, - 318603240233076406 - ], - "y": [ - 11712108043964996282, - 3474989587891133574, - 3983451673298542860, - 1181581919257021598 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 8484642, - "lookup_selector_commitment": { - "x": [ - 27459247093738343, - 1785927757103538268, - 14972116880195568621, - 1034224917068963325 - ], - "y": [ - 17453858127001596558, - 6200103235089742197, - 16245568162666829501, - 651193715230511441 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 697552212563769686, - 7709943502535418760, - 15019345407325619175, - 3433081085078580257 - ], - "y": [ - 8668947019840357731, - 14698901351824712883, - 15088598879190660424, - 2873081208166433946 - ], - "infinity": false - }, - { - "x": [ - 7893133928909060673, - 7064922516930129957, - 3592836702741304814, - 2239702595710114437 - ], - "y": [ - 7691360541875191519, - 11379321785127235277, - 6653616064071569031, - 2555434628517540774 - ], - "infinity": false - }, - { - "x": [ - 6243944238013052821, - 7908243182210136125, - 17178099109525791299, - 2553622184721264566 - ], - "y": [ - 736121280088239428, - 6158073429758170526, - 11217302997977204117, - 2594798912020899417 - ], - "infinity": false - }, - { - "x": [ - 2064240298596094591, - 16917726764104887991, - 11042784977532408536, - 3377647228930170830 - ], - "y": [ - 10635525052494768819, - 387400048616497096, - 9379200582543310995, - 1571766153703296253 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 14868101692362122308, - 8135288013508071846, - 9460482611527381887, - 512823635961282598 - ], - "y": [ - 8358211286664762188, - 3532634521932288534, - 5862145521507736138, - 1807935137626658536 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_5_key.json b/core/bin/verification_key_generator_and_server/data/verification_5_key.json deleted file mode 100644 index b9a31b919f1c..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_5_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 12322129650547620518, - 4320033807979823995, - 4503809593276792861, - 630958448551597950 - ], - "y": [ - 4947307957322067889, - 1897773243457379956, - 1563584362302565484, - 802109862761172056 - ], - "infinity": false - }, - { - "x": [ - 5860641327684713918, - 16885915425353665713, - 7037370194263044401, - 1837438863045303696 - ], - "y": [ - 13386292219804271609, - 4960073609197619993, - 7328379249582994262, - 191728769121948464 - ], - "infinity": false - }, - { - "x": [ - 9390502900121613993, - 17218409610830310329, - 4830832371938391322, - 1805131323553685028 - ], - "y": [ - 15707040961083920686, - 16216062707384374953, - 16957058843586642758, - 1341814870249072628 - ], - "infinity": false - }, - { - "x": [ - 969252611989285232, - 181405773082212747, - 11110666465356509832, - 1888802363524687207 - ], - "y": [ - 5293477339288357424, - 12076391347720360980, - 11422893229655154394, - 3165450734777404812 - ], - "infinity": false - }, - { - "x": [ - 642192487369089358, - 9585449571929647331, - 3847960352134961209, - 984199510163128792 - ], - "y": [ - 13950390676065893881, - 975256099594703300, - 253120832016214204, - 1860679841584192219 - ], - "infinity": false - }, - { - "x": [ - 3564548447861991296, - 6278944799487206913, - 1163701992635366786, - 3214877162977671335 - ], - "y": [ - 13131873482361140204, - 14012120801722220187, - 13254371011592477950, - 1082108070640175604 - ], - "infinity": false - }, - { - "x": [ - 14190764189814537607, - 18412181832598818289, - 17213387738194113336, - 1662783623959823461 - ], - "y": [ - 7987199081435644988, - 17119136750046780209, - 8770669323846078492, - 3183489396270587333 - ], - "infinity": false - }, - { - "x": [ - 14638218826597535389, - 16409988612234258347, - 5025411344133541245, - 603088654230685360 - ], - "y": [ - 12538363432956258836, - 6558875956959901550, - 2415879426147965883, - 750702584304895055 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 2599908293582905760, - 13534206398743622493, - 15926090086034346074, - 467418127379229858 - ], - "y": [ - 9529512934078774185, - 1459270552041127965, - 13418846370362665102, - 2270996612016337371 - ], - "infinity": false - }, - { - "x": [ - 7264275706530137047, - 5590205367072257545, - 17891440127697345143, - 360638857846382524 - ], - "y": [ - 17983779934218975397, - 1625779403076670241, - 1474025795387210129, - 1716171421120825643 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 9354841115000244260, - 12887310615208346489, - 1120617137774653400, - 424227936372254439 - ], - "y": [ - 3626714025954019309, - 4480975902927818206, - 10093567956580931634, - 2779897825000836477 - ], - "infinity": false - }, - { - "x": [ - 1864884782104066211, - 1247154271168453374, - 9982166936353409582, - 1177339527115773898 - ], - "y": [ - 9932597332303163060, - 1888682277213109000, - 11684220277443154622, - 3062389133489783806 - ], - "infinity": false - }, - { - "x": [ - 9943021177878836437, - 9004866876172522532, - 14085451328492136137, - 1567186274425392936 - ], - "y": [ - 7148906168793986389, - 4780330524752436486, - 10067456648871712650, - 179752856567560382 - ], - "infinity": false - }, - { - "x": [ - 14745822832390509907, - 13862030626549782961, - 10000268356302875837, - 705042314567833799 - ], - "y": [ - 11091254259539384938, - 11733968109785394056, - 11099103738494585500, - 1527456782567955191 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 35330543, - "lookup_selector_commitment": { - "x": [ - 12333191731462980214, - 17841370099698959347, - 12878670991018181621, - 2894319630687016858 - ], - "y": [ - 76816727314643395, - 3214684791046221459, - 878301108738499830, - 126016925902987736 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 911668445361375614, - 12752365066512000136, - 11550232015863976467, - 2053619216798992367 - ], - "y": [ - 4194339833917391280, - 1643071887467668153, - 3377480965202592691, - 1664272901450533719 - ], - "infinity": false - }, - { - "x": [ - 2999316735203966181, - 5189676006781764591, - 14324679313847304783, - 1264086978509739587 - ], - "y": [ - 8714172036038650967, - 10907167170124829028, - 8950970593162102458, - 1596853051185997037 - ], - "infinity": false - }, - { - "x": [ - 1146500486770850326, - 13562754408872334896, - 14063471769392190265, - 3387351506820193517 - ], - "y": [ - 6677788829230735422, - 15425668102208730571, - 5341291772716012975, - 539156410041791428 - ], - "infinity": false - }, - { - "x": [ - 18159886519320172405, - 4286826840324377773, - 16364826089434525345, - 228697666397725767 - ], - "y": [ - 4850633487261444791, - 6327421534074497160, - 12883776034588695446, - 1510314148471267214 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 18245233954308230592, - 8193493714287610439, - 6521078295132558240, - 861511081336275611 - ], - "y": [ - 4275834222266292944, - 13179071278128968874, - 5943013356852335765, - 2456639561657053045 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_6_key.json b/core/bin/verification_key_generator_and_server/data/verification_6_key.json deleted file mode 100644 index 34419df17702..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_6_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 11033020679838791108, - 14920056278440370765, - 8156477685651219112, - 2935096142913695825 - ], - "y": [ - 12780055516709256833, - 966513406268819160, - 9584266886886532866, - 892347068344972829 - ], - "infinity": false - }, - { - "x": [ - 4044870432040348042, - 10630300946926732771, - 3143480015080245177, - 323917785885883620 - ], - "y": [ - 2297905282612888789, - 8206728682979815807, - 10628767928228215441, - 3062326525278498604 - ], - "infinity": false - }, - { - "x": [ - 14760731158538087565, - 9176522400170689419, - 9855180338242634009, - 2456568616568530201 - ], - "y": [ - 5168103953295979961, - 397013651969935557, - 13864468728668213717, - 2925074735515169158 - ], - "infinity": false - }, - { - "x": [ - 13613691592548742743, - 11339389230513898784, - 4864282628000142183, - 2568915564796772962 - ], - "y": [ - 13074021698952750513, - 14891339562597317806, - 6145754680491802845, - 913243322463864468 - ], - "infinity": false - }, - { - "x": [ - 9607983563343027008, - 1604609357347728263, - 6735137627175405143, - 91305611485454778 - ], - "y": [ - 2068449139446365265, - 6171753015906067998, - 16290186276604645197, - 420889087081901603 - ], - "infinity": false - }, - { - "x": [ - 15994614598808477960, - 5137738490508028659, - 6599503545391493738, - 3293094250487745346 - ], - "y": [ - 3246688300070721763, - 8836841286539929132, - 1231014124908407748, - 3042941126579517307 - ], - "infinity": false - }, - { - "x": [ - 12550390789117808745, - 14001030013656521177, - 16383284077678821701, - 1815317458772356897 - ], - "y": [ - 10125044837604978181, - 7468984969058409331, - 592554137766258541, - 2877688586321491725 - ], - "infinity": false - }, - { - "x": [ - 12238091769471133989, - 184716847866634800, - 5888077423956723698, - 609118759536864800 - ], - "y": [ - 7725369615076384544, - 7561073323636510559, - 10473734750023783127, - 861766554781597742 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 1206127807467530207, - 3510053718168412786, - 7933459343694333819, - 3179950874373950282 - ], - "y": [ - 5784856107466398982, - 395767970566909293, - 11244200096534021583, - 2068407511544404377 - ], - "infinity": false - }, - { - "x": [ - 4044617248058764838, - 11957266999135308674, - 17621747993137866783, - 990156155955733134 - ], - "y": [ - 17234504892477991728, - 17558826298225495489, - 9349531438753716103, - 2656409262947709594 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 4308597000331285311, - 12130199317436319902, - 3842336010209461436, - 191866453597778475 - ], - "y": [ - 2144400171783010971, - 13016087318985913183, - 7166370365336301922, - 2216888390030560212 - ], - "infinity": false - }, - { - "x": [ - 4661184458541745063, - 12423889401726065791, - 11959346001895915074, - 779668716585305501 - ], - "y": [ - 16401363790535442499, - 7367694133722005848, - 8015837005184593399, - 454166987511489961 - ], - "infinity": false - }, - { - "x": [ - 858215262803403659, - 1405268530667707386, - 7763962169005921611, - 2845435536097215865 - ], - "y": [ - 10639490331338262540, - 6397733211512468794, - 968161689973799899, - 2054756257253905633 - ], - "infinity": false - }, - { - "x": [ - 17338818659525246480, - 13318488425310212471, - 10548319374858973842, - 87084958643052105 - ], - "y": [ - 2279840344577984658, - 15197280761751903251, - 16019225334594459873, - 149925650787595538 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 3054916, - "lookup_selector_commitment": { - "x": [ - 4844230422625825285, - 956290027823441223, - 763010695794739308, - 2426170829255106638 - ], - "y": [ - 13850520521470006763, - 9003994589054655373, - 10310690204425503422, - 3012516431885755457 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 5825422128268478267, - 9219263846299851036, - 3879231702557190566, - 1702488722758880769 - ], - "y": [ - 18311881100262470992, - 5742998199368802392, - 18106865487471159417, - 502191980176920012 - ], - "infinity": false - }, - { - "x": [ - 17195892082859417081, - 7890531942603584793, - 2381805632820057528, - 3173232410464566465 - ], - "y": [ - 16359614627947132075, - 3459600273035137079, - 4550762061432972122, - 3394559699318358224 - ], - "infinity": false - }, - { - "x": [ - 1716103379277390185, - 18097936269579187542, - 16357329729761063450, - 1508640059338197502 - ], - "y": [ - 11014806739603983364, - 4396503314588777389, - 9397245609635151055, - 1703957955248411380 - ], - "infinity": false - }, - { - "x": [ - 4770171350693477354, - 17110558673192292253, - 9799800677557311408, - 761984875463445481 - ], - "y": [ - 1560561403388310063, - 31331275310848146, - 287152055803835484, - 457826332542037277 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 16775586915653722908, - 9787338077086882544, - 8381721730521821042, - 2974660093975661578 - ], - "y": [ - 3011389235487891234, - 15409507493813096391, - 17416460976276029026, - 324418288749844627 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_7_key.json b/core/bin/verification_key_generator_and_server/data/verification_7_key.json deleted file mode 100644 index 406afcf4f0fe..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_7_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 14104278525941001335, - 6652111379088654370, - 12369045377338511525, - 969809670184836151 - ], - "y": [ - 10111598525423302991, - 15018239425425696172, - 3683372413830991953, - 1023765059890131543 - ], - "infinity": false - }, - { - "x": [ - 11576486884237685781, - 16315823052257401029, - 9860864515877414033, - 3179959598270002012 - ], - "y": [ - 487035971539979311, - 5573003039451484772, - 15711637819381564577, - 1904127920269177012 - ], - "infinity": false - }, - { - "x": [ - 18299921128106602792, - 211731469708793711, - 17645028854462121436, - 675870769139913517 - ], - "y": [ - 15146647508675165454, - 18353083579110652488, - 12704645658780892142, - 2929235299763077823 - ], - "infinity": false - }, - { - "x": [ - 11570586127780196277, - 2363872676317471379, - 7386811009552915084, - 959006902628416514 - ], - "y": [ - 17455735716787098890, - 14879699386306994564, - 5628100821420984321, - 2862659911936763739 - ], - "infinity": false - }, - { - "x": [ - 8746328571248006135, - 17089435014355939378, - 8764506524471462449, - 1810135458362589443 - ], - "y": [ - 14070512019208911265, - 8756287737315170424, - 14821473955626613, - 1559545289765661890 - ], - "infinity": false - }, - { - "x": [ - 2113591086436573082, - 12629483649401688389, - 11845953673798951216, - 3081238281103628853 - ], - "y": [ - 727696133406005469, - 14413827745813557208, - 6425035421156126073, - 291513487083052109 - ], - "infinity": false - }, - { - "x": [ - 15346257923988607256, - 10403316660718504706, - 7158515894996917286, - 2702098910103276762 - ], - "y": [ - 16559143492878738107, - 12716298061927369795, - 12296985344891017351, - 2814996798832983835 - ], - "infinity": false - }, - { - "x": [ - 2213195001372039295, - 8878300942582564036, - 10524986226191936528, - 1815326540993196034 - ], - "y": [ - 11397120982692424098, - 4455537142488107627, - 14205354993332845055, - 2313809587433567240 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 14849046431510808003, - 11699893139960418168, - 6000246307731364190, - 3362832011707902866 - ], - "y": [ - 3242560497217933852, - 11672398501106836413, - 987926723326096281, - 2451226739475091625 - ], - "infinity": false - }, - { - "x": [ - 9272095445402359796, - 1201046264826394411, - 7424934554242366462, - 1125893484262333608 - ], - "y": [ - 15903920299684884420, - 17703294385387204708, - 2256937129195345942, - 1905295733884217610 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 7591926766688292250, - 10457199375342460747, - 3214976192729961314, - 1412860682249358355 - ], - "y": [ - 16894260140402496006, - 3666374878391815131, - 15124268261678582348, - 1340579262756129480 - ], - "infinity": false - }, - { - "x": [ - 2963934507934439034, - 17415763666461861018, - 6331792462137338053, - 3122358526111186727 - ], - "y": [ - 15040784043381591388, - 7188410244350767315, - 14077554108063383431, - 1704329843327300001 - ], - "infinity": false - }, - { - "x": [ - 7967507884960122293, - 13509230570773443525, - 11125712791473385552, - 2241808950326876268 - ], - "y": [ - 10594180941877323940, - 17179032413109513856, - 17941607623778808075, - 646138820984886096 - ], - "infinity": false - }, - { - "x": [ - 4729534828155895283, - 15489050734511381239, - 4847364931161261393, - 2461584260035042491 - ], - "y": [ - 15255817542606978857, - 6517429187947361297, - 17127878630247240853, - 3389541567226838859 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 40724289, - "lookup_selector_commitment": { - "x": [ - 5449769839889646584, - 2072406321611922291, - 9391796773218391195, - 2377769168011090955 - ], - "y": [ - 1789189431152658324, - 2639430755172378798, - 136577695530283091, - 3045539535973502646 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 12639039925867405095, - 9606685454938605275, - 7802675863289639223, - 1948831418843225802 - ], - "y": [ - 11059150608777595761, - 10458812733010634961, - 16772660325487078311, - 340608886692078192 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_8_key.json b/core/bin/verification_key_generator_and_server/data/verification_8_key.json deleted file mode 100644 index b8511e17b755..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_8_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 1834112096176967541, - 5137529514715617427, - 6540843391881340212, - 3033401888759110412 - ], - "y": [ - 8910602970094475216, - 13169513767982514776, - 5761530093694221441, - 2733318557350866268 - ], - "infinity": false - }, - { - "x": [ - 4701064149158432365, - 5425087325981406309, - 7911131985858828309, - 1683257627049186617 - ], - "y": [ - 13565328904521460918, - 17013189171844282257, - 4897087111183007258, - 2345861178674095559 - ], - "infinity": false - }, - { - "x": [ - 17285353863442654170, - 17787410547699779811, - 4803131526909484890, - 1607731426619418092 - ], - "y": [ - 3219378920021652314, - 11046862703797106703, - 10595836629242151972, - 2970963661532337787 - ], - "infinity": false - }, - { - "x": [ - 6619857367954187649, - 8023974497004524989, - 10088058961892288757, - 938018804109053807 - ], - "y": [ - 15549411064757453720, - 1776820811429478220, - 8222111141823917842, - 290593315633281086 - ], - "infinity": false - }, - { - "x": [ - 3338931670632164423, - 11330459786926502111, - 13560408114559586439, - 233279858410037466 - ], - "y": [ - 9757980615881472290, - 6475296714459436577, - 15954545788543926629, - 2522580407814024231 - ], - "infinity": false - }, - { - "x": [ - 2168501453409628158, - 16417992951888116942, - 1994813140597965849, - 1938552030580060698 - ], - "y": [ - 2393885012813093493, - 5109365147685051030, - 4449898145078443978, - 996506294158321126 - ], - "infinity": false - }, - { - "x": [ - 8163446935422765754, - 17127634458571165785, - 18101155318188210010, - 1502677094108070955 - ], - "y": [ - 4184320355428455210, - 15479528531137595907, - 8455846016430686855, - 2570922865513301289 - ], - "infinity": false - }, - { - "x": [ - 407579941387952352, - 17088458915370169940, - 16892753644011369852, - 2421666516533613805 - ], - "y": [ - 597435837737447683, - 18122233368438707442, - 4844832744563923839, - 396103093107107006 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 16242434178832819081, - 2218928756172422054, - 5871927983870638422, - 810020555846721779 - ], - "y": [ - 9387856576677982883, - 5119490172321159350, - 14295435318421985120, - 1325809191818871673 - ], - "infinity": false - }, - { - "x": [ - 5933965238687071287, - 10681704800081225943, - 14555731010498897395, - 959799154476325145 - ], - "y": [ - 1501632601560034962, - 9401704677918783964, - 12292111854761501889, - 858616662661742045 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 12841507457971520539, - 6525486152471484441, - 3744486588589217686, - 2769451038405535407 - ], - "y": [ - 14145668232228974364, - 9864097401535863500, - 12665512227995054273, - 1710776254334161256 - ], - "infinity": false - }, - { - "x": [ - 12108157388466567796, - 12008825937320240484, - 11228446795405478904, - 1520424921904150640 - ], - "y": [ - 18157047055378899649, - 10836823561088895074, - 583613418617515639, - 2570085764232471205 - ], - "infinity": false - }, - { - "x": [ - 3117226099128838157, - 10181632193024509490, - 1215328570209780930, - 1536961491401844084 - ], - "y": [ - 11646905141441654681, - 6168936708987385450, - 14459621573162108487, - 2047975568887748173 - ], - "infinity": false - }, - { - "x": [ - 12034664246790330785, - 12032082546920592595, - 12002839514296456095, - 3009479689157977152 - ], - "y": [ - 180421277197569955, - 5815678523367268562, - 11718416396488597085, - 408186057258055191 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 34384753, - "lookup_selector_commitment": { - "x": [ - 3872970821419373956, - 13556503327407661223, - 12832313376327677595, - 211677646774476601 - ], - "y": [ - 17281673428499585093, - 235933066531227024, - 17890327653152417391, - 2551853991532334733 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 14943975734974680929, - 9516136771242606543, - 6695719565456036638, - 3449077049666620393 - ], - "y": [ - 11678209093898264827, - 4499447145490933412, - 6317798459829178953, - 1439219764789809864 - ], - "infinity": false - }, - { - "x": [ - 13501290183905491407, - 17914451638435951710, - 5188762915201956497, - 1220375585898114161 - ], - "y": [ - 14519533874806433487, - 409100046306023, - 2203176115240501563, - 3105700623762337563 - ], - "infinity": false - }, - { - "x": [ - 13968159480895722732, - 6973568812120893251, - 6250254745096478587, - 2299355969860561070 - ], - "y": [ - 7695944005480078577, - 12009671787784557856, - 13727042561077817002, - 219052945806305675 - ], - "infinity": false - }, - { - "x": [ - 4871629130106420314, - 4091595855728790015, - 1851744390500340594, - 3123168382710331270 - ], - "y": [ - 9703969956757970162, - 1215036492891076659, - 11876727836856213678, - 2640893636590396388 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 10299044894603982393, - 4664166516779563250, - 13124827128688646542, - 3361599897730972314 - ], - "y": [ - 18259946931458798404, - 10145479316480429602, - 15446978899103328376, - 265382288883021070 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/data/verification_9_key.json b/core/bin/verification_key_generator_and_server/data/verification_9_key.json deleted file mode 100644 index 75de5f75c78d..000000000000 --- a/core/bin/verification_key_generator_and_server/data/verification_9_key.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "n": 67108863, - "num_inputs": 1, - "state_width": 4, - "num_witness_polys": 0, - "gate_setup_commitments": [ - { - "x": [ - 15041888416700822899, - 15908701850433687369, - 6928173929840686173, - 501601364708497325 - ], - "y": [ - 9443860646360881208, - 15174745959183347299, - 3341918218952258763, - 1470216750942469587 - ], - "infinity": false - }, - { - "x": [ - 1713492202424532619, - 5921868784153327820, - 3919870428680620477, - 2459274846398943915 - ], - "y": [ - 8012717129874416534, - 13032363221581987781, - 9462161206147300944, - 1151760065513271967 - ], - "infinity": false - }, - { - "x": [ - 6636128327108235840, - 9362733145474272574, - 7779132015244601843, - 474802631021936400 - ], - "y": [ - 3900992471196218787, - 113851245079995197, - 7493904056590361535, - 3140468871801097229 - ], - "infinity": false - }, - { - "x": [ - 4340102674797800902, - 8715432707094353745, - 4331145745081713603, - 45456583984841487 - ], - "y": [ - 18326546742044058782, - 15443239165658185296, - 9765917874876721196, - 687859761729374839 - ], - "infinity": false - }, - { - "x": [ - 10804694580890857975, - 10550068287306981825, - 14956274043654722561, - 3060589920124935341 - ], - "y": [ - 17010223672048359580, - 263749806111642373, - 8349695975133446526, - 2826070525773268002 - ], - "infinity": false - }, - { - "x": [ - 16133249269780245267, - 4275571784340824698, - 6262619645627758753, - 3231281899173719188 - ], - "y": [ - 11839616617849449709, - 7142633755989890055, - 10840735473548209733, - 2847350786075278882 - ], - "infinity": false - }, - { - "x": [ - 16258572583186965203, - 1354691125575792689, - 17235265854934968790, - 1252220109588505888 - ], - "y": [ - 9336541637487074271, - 18402912967310224930, - 13223187653117829136, - 2979297976786733465 - ], - "infinity": false - }, - { - "x": [ - 8525686695522099028, - 4103157564078645049, - 18392570749492199187, - 2911539491816599180 - ], - "y": [ - 114653447583918953, - 10470307038453386601, - 11189850644566793538, - 1298227034210846592 - ], - "infinity": false - } - ], - "gate_selectors_commitments": [ - { - "x": [ - 2069700145549311928, - 4250782333685017927, - 14207216715687122978, - 1145927286048477791 - ], - "y": [ - 9341202692364554712, - 12346939747104737180, - 2826478533799125818, - 2279570556437452275 - ], - "infinity": false - }, - { - "x": [ - 12388902775325386546, - 1277383964095999647, - 10535796018183893831, - 3359866702323175506 - ], - "y": [ - 16500893366957272235, - 2806147688388338314, - 8233156072220488773, - 2867848844627212711 - ], - "infinity": false - } - ], - "permutation_commitments": [ - { - "x": [ - 17521183961631816299, - 18327810537117645266, - 16586212795163003556, - 3052771534158410452 - ], - "y": [ - 8441310283734453731, - 14146088755801181801, - 17480253356603213989, - 3217948944323396651 - ], - "infinity": false - }, - { - "x": [ - 16076801532842923524, - 7514743296775639295, - 2571323986448120255, - 184367540214459973 - ], - "y": [ - 13389643967183613114, - 17108261756464256828, - 11145735340309739417, - 2142196980030893874 - ], - "infinity": false - }, - { - "x": [ - 8034683328666433725, - 5436036566901194392, - 18053257213361014053, - 2821377847227509494 - ], - "y": [ - 14471305228212723444, - 8894846184648865892, - 7047725473055235530, - 2413388400332075493 - ], - "infinity": false - }, - { - "x": [ - 14026981588443304814, - 14671946927765496183, - 13387079215022495926, - 2554705188091675830 - ], - "y": [ - 440116222237740520, - 1630168477189852269, - 17833425794232523381, - 908824471705597078 - ], - "infinity": false - } - ], - "total_lookup_entries_length": 41494904, - "lookup_selector_commitment": { - "x": [ - 13889323383351416990, - 17887386740570674124, - 5463612855590268091, - 2434255340534820869 - ], - "y": [ - 2436699678434218349, - 11251365794004058995, - 11023509005141034197, - 2867854671852170604 - ], - "infinity": false - }, - "lookup_tables_commitments": [ - { - "x": [ - 631990924006796604, - 16139625628991115157, - 13331739325995827711, - 1062301837743594995 - ], - "y": [ - 15303054606290800139, - 15906872095881647437, - 7093896572295020249, - 1342952934989901142 - ], - "infinity": false - }, - { - "x": [ - 7983921919542246393, - 13296544189644416678, - 17081022784392007697, - 1980832835348244027 - ], - "y": [ - 10874958134865200330, - 7702740658637630534, - 14052057929798961943, - 3193353539419869016 - ], - "infinity": false - }, - { - "x": [ - 1114587284824996932, - 4636906500482867924, - 15328247172597030456, - 87946895873973686 - ], - "y": [ - 15573033830207915877, - 5194694185599035278, - 2562407345425607214, - 2782078999306862675 - ], - "infinity": false - }, - { - "x": [ - 18225112781127431982, - 18048613958187123807, - 7325490730844456621, - 1953409020724855888 - ], - "y": [ - 7577000130125917198, - 6193701449695751861, - 4102082927677054717, - 395350071385269650 - ], - "infinity": false - } - ], - "lookup_table_type_commitment": { - "x": [ - 3832160677272803715, - 2122279734318217808, - 811690144328522684, - 1416829483108546006 - ], - "y": [ - 10041279311991435550, - 14702496983143623186, - 4419862575487552747, - 1429817244630465543 - ], - "infinity": false - }, - "non_residues": [ - [ - 5, - 0, - 0, - 0 - ], - [ - 7, - 0, - 0, - 0 - ], - [ - 10, - 0, - 0, - 0 - ] - ], - "g2_elements": [ - { - "x": { - "c0": [ - 5106727233969649389, - 7440829307424791261, - 4785637993704342649, - 1729627375292849782 - ], - "c1": [ - 10945020018377822914, - 17413811393473931026, - 8241798111626485029, - 1841571559660931130 - ] - }, - "y": { - "c0": [ - 5541340697920699818, - 16416156555105522555, - 5380518976772849807, - 1353435754470862315 - ], - "c1": [ - 6173549831154472795, - 13567992399387660019, - 17050234209342075797, - 650358724130500725 - ] - }, - "infinity": false - }, - { - "x": { - "c0": [ - 9089143573911733168, - 11482283522806384523, - 13585589533905622862, - 79029415676722370 - ], - "c1": [ - 5692040832573735873, - 16884514497384809355, - 16717166481813659368, - 2742131088506155463 - ] - }, - "y": { - "c0": [ - 9604638503594647125, - 1289961608472612514, - 6217038149984805214, - 2521661352385209130 - ], - "c1": [ - 17168069778630926308, - 11309277837895768996, - 15154989611154567813, - 359271377050603491 - ] - }, - "infinity": false - } - ] -} \ No newline at end of file diff --git a/core/bin/verification_key_generator_and_server/src/commitment_generator.rs b/core/bin/verification_key_generator_and_server/src/commitment_generator.rs deleted file mode 100644 index ed859bcb4366..000000000000 --- a/core/bin/verification_key_generator_and_server/src/commitment_generator.rs +++ /dev/null @@ -1,37 +0,0 @@ -use anyhow::Context as _; -use zksync_prover_utils::vk_commitment_helper::{ - get_toml_formatted_value, read_contract_toml, write_contract_toml, -}; -use zksync_verification_key_server::generate_commitments; - -fn main() -> anyhow::Result<()> { - tracing::info!("Starting commitment generation!"); - read_and_update_contract_toml() -} - -fn read_and_update_contract_toml() -> anyhow::Result<()> { - let mut contract_doc = read_contract_toml().context("read_contract_toml()")?; - let ( - basic_circuit_commitment_hex, - leaf_aggregation_commitment_hex, - node_aggregation_commitment_hex, - ) = generate_commitments(); - contract_doc["contracts"]["RECURSION_CIRCUITS_SET_VKS_HASH"] = - get_toml_formatted_value(basic_circuit_commitment_hex); - contract_doc["contracts"]["RECURSION_LEAF_LEVEL_VK_HASH"] = - get_toml_formatted_value(leaf_aggregation_commitment_hex); - contract_doc["contracts"]["RECURSION_NODE_LEVEL_VK_HASH"] = - get_toml_formatted_value(node_aggregation_commitment_hex); - tracing::info!("Updated toml content: {:?}", contract_doc.to_string()); - write_contract_toml(contract_doc).context("write_contract_toml") -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_read_and_update_contract_toml() { - read_and_update_contract_toml().unwrap(); - } -} diff --git a/core/bin/verification_key_generator_and_server/src/json_to_binary_vk_converter.rs b/core/bin/verification_key_generator_and_server/src/json_to_binary_vk_converter.rs deleted file mode 100644 index c04a67128334..000000000000 --- a/core/bin/verification_key_generator_and_server/src/json_to_binary_vk_converter.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::{fs::File, io::BufWriter}; - -use bincode::serialize_into; -use structopt::StructOpt; -use zksync_verification_key_server::get_vk_for_circuit_type; - -#[derive(Debug, StructOpt)] -#[structopt( - name = "json existing json VK's to binary vk", - about = "converter tool" -)] -struct Opt { - /// Binary output path of verification keys. - #[structopt(short)] - output_bin_path: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("Converting existing json keys to binary"); - generate_bin_vks(opt.output_bin_path); -} - -fn generate_bin_vks(output_path: String) { - for circuit_type in 1..=18 { - let filename = format!("{}/verification_{}.key", output_path, circuit_type); - let vk = get_vk_for_circuit_type(circuit_type); - let mut f = BufWriter::new(File::create(filename).unwrap()); - serialize_into(&mut f, &vk).unwrap(); - } -} diff --git a/core/bin/verification_key_generator_and_server/src/lib.rs b/core/bin/verification_key_generator_and_server/src/lib.rs deleted file mode 100644 index 20260a30b20b..000000000000 --- a/core/bin/verification_key_generator_and_server/src/lib.rs +++ /dev/null @@ -1,188 +0,0 @@ -use std::{collections::HashMap, path::Path, str::FromStr}; - -use ff::to_hex; -use itertools::Itertools; -use once_cell::sync::Lazy; -use structopt::lazy_static::lazy_static; -use zksync_types::{ - circuit::{ - GEOMETRY_CONFIG, LEAF_CIRCUIT_INDEX, LEAF_SPLITTING_FACTOR, NODE_CIRCUIT_INDEX, - NODE_SPLITTING_FACTOR, SCHEDULER_CIRCUIT_INDEX, SCHEDULER_UPPER_BOUND, - }, - protocol_version::{L1VerifierConfig, VerifierParams}, - vk_transform::generate_vk_commitment, - zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit, - bellman::{bn256::Bn256, plonk::better_better_cs::setup::VerificationKey}, - witness, - witness::{ - full_block_artifact::BlockBasicCircuits, - oracle::VmWitnessOracle, - recursive_aggregation::{erase_vk_type, padding_aggregations}, - vk_set_generator::circuits_for_vk_generation, - }, - }, - H256, -}; - -#[cfg(test)] -mod tests; - -lazy_static! { - static ref COMMITMENTS: Lazy = Lazy::new(|| { circuit_commitments() }); -} - -pub fn get_vks_for_basic_circuits( -) -> HashMap>>> { - // 3-17 are the ids of basic circuits - (3..=18) - .map(|circuit_type| (circuit_type, get_vk_for_circuit_type(circuit_type))) - .collect() -} - -pub fn get_vk_for_circuit_type( - circuit_type: u8, -) -> VerificationKey>> { - let filepath = get_file_path(circuit_type); - tracing::info!("Fetching verification key from path: {}", filepath); - let text = std::fs::read_to_string(&filepath) - .unwrap_or_else(|_| panic!("Failed reading verification key from path: {}", filepath)); - serde_json::from_str::>>>( - &text, - ) - .unwrap_or_else(|_| { - panic!( - "Failed deserializing verification key from path: {}", - filepath - ) - }) -} - -pub fn save_vk_for_circuit_type( - circuit_type: u8, - vk: VerificationKey>>, -) { - let filepath = get_file_path(circuit_type); - tracing::info!("saving verification key to: {}", filepath); - std::fs::write(filepath, serde_json::to_string_pretty(&vk).unwrap()).unwrap(); -} - -pub fn get_ordered_vks_for_basic_circuits( - circuits: &BlockBasicCircuits, - verification_keys: &HashMap< - u8, - VerificationKey>>, - >, -) -> Vec>>> { - circuits - .clone() - .into_flattened_set() - .iter() - .map(|circuit| { - let circuit_id = circuit.numeric_circuit_type(); - verification_keys - .get(&circuit_id) - .unwrap_or_else(|| { - panic!("no VK for circuit number {:?}", circuit.short_description()) - }) - .clone() - }) - .collect() -} - -pub fn get_vks_for_commitment( - verification_keys: HashMap< - u8, - VerificationKey>>, - >, -) -> Vec>>> { - // We need all the vks sorted by their respective circuit ids - verification_keys - .into_iter() - .sorted_by_key(|(id, _)| *id) - .map(|(_, val)| val) - .collect() -} - -pub fn get_circuits_for_vk() -> Vec>> { - ensure_setup_key_exist(); - let padding_aggregations = padding_aggregations(NODE_SPLITTING_FACTOR); - circuits_for_vk_generation( - GEOMETRY_CONFIG, - LEAF_SPLITTING_FACTOR, - NODE_SPLITTING_FACTOR, - SCHEDULER_UPPER_BOUND, - padding_aggregations, - ) -} - -fn ensure_setup_key_exist() { - if !Path::new("setup_2^26.key").exists() { - panic!("File setup_2^26.key is required to be present in current directory for verification keys generation. \ndownload from https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^26.key"); - } -} -fn get_file_path(circuit_type: u8) -> String { - let zksync_home = std::env::var("ZKSYNC_HOME").unwrap_or_else(|_| "/".into()); - format!( - "{}/core/bin/verification_key_generator_and_server/data/verification_{}_key.json", - zksync_home, circuit_type - ) -} - -pub fn generate_commitments() -> (String, String, String) { - let (_, basic_circuit_commitment, _) = - witness::recursive_aggregation::form_base_circuits_committment(get_vks_for_commitment( - get_vks_for_basic_circuits(), - )); - - let leaf_aggregation_vk = get_vk_for_circuit_type(LEAF_CIRCUIT_INDEX); - let node_aggregation_vk = get_vk_for_circuit_type(NODE_CIRCUIT_INDEX); - - let (_, leaf_aggregation_vk_commitment) = - witness::recursive_aggregation::compute_vk_encoding_and_committment(erase_vk_type( - leaf_aggregation_vk, - )); - - let (_, node_aggregation_vk_commitment) = - witness::recursive_aggregation::compute_vk_encoding_and_committment(erase_vk_type( - node_aggregation_vk, - )); - let basic_circuit_commitment_hex = format!("0x{}", to_hex(&basic_circuit_commitment)); - let leaf_aggregation_commitment_hex = format!("0x{}", to_hex(&leaf_aggregation_vk_commitment)); - let node_aggregation_commitment_hex = format!("0x{}", to_hex(&node_aggregation_vk_commitment)); - tracing::info!( - "basic circuit commitment {:?}", - basic_circuit_commitment_hex - ); - tracing::info!( - "leaf aggregation commitment {:?}", - leaf_aggregation_commitment_hex - ); - tracing::info!( - "node aggregation commitment {:?}", - node_aggregation_commitment_hex - ); - ( - basic_circuit_commitment_hex, - leaf_aggregation_commitment_hex, - node_aggregation_commitment_hex, - ) -} - -fn circuit_commitments() -> L1VerifierConfig { - let (basic, leaf, node) = generate_commitments(); - let scheduler = generate_vk_commitment(get_vk_for_circuit_type(SCHEDULER_CIRCUIT_INDEX)); - L1VerifierConfig { - params: VerifierParams { - recursion_node_level_vk_hash: H256::from_str(&node).expect("invalid node commitment"), - recursion_leaf_level_vk_hash: H256::from_str(&leaf).expect("invalid leaf commitment"), - recursion_circuits_set_vks_hash: H256::from_str(&basic) - .expect("invalid basic commitment"), - }, - recursion_scheduler_level_vk_hash: scheduler, - } -} - -pub fn get_cached_commitments() -> L1VerifierConfig { - **COMMITMENTS -} diff --git a/core/bin/verification_key_generator_and_server/src/main.rs b/core/bin/verification_key_generator_and_server/src/main.rs deleted file mode 100644 index b64e5757fceb..000000000000 --- a/core/bin/verification_key_generator_and_server/src/main.rs +++ /dev/null @@ -1,48 +0,0 @@ -use std::{collections::HashSet, env}; - -use zksync_types::zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit, - bellman::{ - bn256::Bn256, plonk::better_better_cs::cs::PlonkCsWidth4WithNextStepAndCustomGatesParams, - }, - witness::oracle::VmWitnessOracle, -}; -use zksync_verification_key_server::{get_circuits_for_vk, save_vk_for_circuit_type}; - -/// Creates verification keys for the given circuit. -fn main() { - let args: Vec = env::args().collect(); - - let circuit_types: HashSet = if args.len() > 1 { - [get_and_ensure_valid_circuit_type(args[1].clone())].into() - } else { - (3..17).collect() - }; - tracing::info!("Starting verification key generation!"); - get_circuits_for_vk() - .into_iter() - .filter(|c| circuit_types.contains(&c.numeric_circuit_type())) - .for_each(generate_verification_key); -} - -fn get_and_ensure_valid_circuit_type(circuit_type: String) -> u8 { - tracing::info!("Received circuit_type: {:?}", circuit_type); - circuit_type - .parse::() - .expect("Please specify a circuit type in range [1, 17]") -} - -fn generate_verification_key(circuit: ZkSyncCircuit>) { - let res = circuit_testing::create_vk_for_padding_size_log_2::< - Bn256, - _, - PlonkCsWidth4WithNextStepAndCustomGatesParams, - >(circuit.clone(), 26) - .unwrap(); - save_vk_for_circuit_type(circuit.numeric_circuit_type(), res); - tracing::info!( - "Finished VK generation for circuit {:?} (id {:?})", - circuit.short_description(), - circuit.numeric_circuit_type() - ); -} diff --git a/core/bin/verification_key_generator_and_server/src/tests.rs b/core/bin/verification_key_generator_and_server/src/tests.rs deleted file mode 100644 index f0fea866de6d..000000000000 --- a/core/bin/verification_key_generator_and_server/src/tests.rs +++ /dev/null @@ -1,68 +0,0 @@ -use std::collections::HashMap; - -use itertools::Itertools; -use serde_json::Value; -use zksync_types::zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit, - bellman::{bn256::Bn256, plonk::better_better_cs::setup::VerificationKey}, - witness::oracle::VmWitnessOracle, -}; - -use crate::{get_vk_for_circuit_type, get_vks_for_basic_circuits, get_vks_for_commitment}; - -#[test] -fn test_get_vk_for_circuit_type() { - for circuit_type in 1..=18 { - get_vk_for_circuit_type(circuit_type); - } -} - -#[test] -fn test_get_vks_for_basic_circuits() { - let circuit_type_to_vk = get_vks_for_basic_circuits(); - let circuit_types: Vec = circuit_type_to_vk.into_keys().sorted().collect::>(); - let expected: Vec = (3..=18).collect(); - assert_eq!( - expected, circuit_types, - "circuit types must be in the range [3, 17]" - ); -} - -#[test] -fn test_get_vks_for_commitment() { - let vk_5 = get_vk_for_circuit_type(5); - let vk_2 = get_vk_for_circuit_type(2); - let vk_3 = get_vk_for_circuit_type(3); - let map = HashMap::from([ - (5u8, vk_5.clone()), - (2u8, vk_2.clone()), - (3u8, vk_3.clone()), - ]); - let vks = get_vks_for_commitment(map); - let expected = vec![vk_2, vk_3, vk_5]; - compare_vks( - expected, - vks, - "expected verification key to be in order 2, 3, 5", - ); -} - -fn get_vk_json(vk: &VerificationKey>>) -> Value { - serde_json::to_value(vk).unwrap() -} - -fn get_vk_jsons( - vks: Vec>>>, -) -> Vec { - vks.into_iter().map(|vk| get_vk_json(&vk)).collect() -} - -fn compare_vks( - first: Vec>>>, - second: Vec>>>, - error_message: &str, -) { - let first_json = get_vk_jsons(first); - let second_json = get_vk_jsons(second); - assert_eq!(first_json, second_json, "{:?}", error_message); -} diff --git a/core/bin/zksync_server/src/main.rs b/core/bin/zksync_server/src/main.rs index a7825da919a2..ffaa08ea090d 100644 --- a/core/bin/zksync_server/src/main.rs +++ b/core/bin/zksync_server/src/main.rs @@ -12,10 +12,10 @@ use zksync_config::{ fri_prover_group::FriProverGroupConfig, house_keeper::HouseKeeperConfig, FriProofCompressorConfig, FriProverConfig, FriWitnessGeneratorConfig, PrometheusConfig, - ProofDataHandlerConfig, ProverGroupConfig, WitnessGeneratorConfig, + ProofDataHandlerConfig, WitnessGeneratorConfig, }, ApiConfig, ContractsConfig, DBConfig, ETHClientConfig, ETHSenderConfig, ETHWatchConfig, - GasAdjusterConfig, ObjectStoreConfig, PostgresConfig, ProverConfigs, + GasAdjusterConfig, ObjectStoreConfig, PostgresConfig, }; use zksync_core::{ genesis_init, initialize_components, is_genesis_needed, setup_sigint_handler, @@ -110,7 +110,6 @@ async fn main() -> anyhow::Result<()> { fri_witness_generator_config: FriWitnessGeneratorConfig::from_env().ok(), prometheus_config: PrometheusConfig::from_env().ok(), proof_data_handler_config: ProofDataHandlerConfig::from_env().ok(), - prover_group_config: ProverGroupConfig::from_env().ok(), witness_generator_config: WitnessGeneratorConfig::from_env().ok(), api_config: ApiConfig::from_env().ok(), contracts_config: ContractsConfig::from_env().ok(), @@ -119,7 +118,6 @@ async fn main() -> anyhow::Result<()> { eth_sender_config: ETHSenderConfig::from_env().ok(), eth_watch_config: ETHWatchConfig::from_env().ok(), gas_adjuster_config: GasAdjusterConfig::from_env().ok(), - prover_configs: ProverConfigs::from_env().ok(), object_store_config: ObjectStoreConfig::from_env().ok(), }; diff --git a/core/lib/config/src/configs/fri_prover.rs b/core/lib/config/src/configs/fri_prover.rs index 44521ee36576..a5e99a407374 100644 --- a/core/lib/config/src/configs/fri_prover.rs +++ b/core/lib/config/src/configs/fri_prover.rs @@ -22,6 +22,7 @@ pub struct FriProverConfig { pub witness_vector_generator_thread_count: Option, pub queue_capacity: usize, pub witness_vector_receiver_port: u16, + pub zone_read_url: String, // whether to write to public GCS bucket for https://github.com/matter-labs/era-boojum-validator-cli pub shall_save_to_public_bucket: bool, diff --git a/core/lib/config/src/configs/mod.rs b/core/lib/config/src/configs/mod.rs index f6f58f012388..3066ee5d5c69 100644 --- a/core/lib/config/src/configs/mod.rs +++ b/core/lib/config/src/configs/mod.rs @@ -16,8 +16,6 @@ pub use self::{ fri_witness_vector_generator::FriWitnessVectorGeneratorConfig, object_store::ObjectStoreConfig, proof_data_handler::ProofDataHandlerConfig, - prover::{ProverConfig, ProverConfigs}, - prover_group::ProverGroupConfig, snapshots_creator::SnapshotsCreatorConfig, utils::PrometheusConfig, witness_generator::WitnessGeneratorConfig, @@ -41,8 +39,6 @@ pub mod fri_witness_vector_generator; pub mod house_keeper; pub mod object_store; pub mod proof_data_handler; -pub mod prover; -pub mod prover_group; pub mod snapshots_creator; pub mod utils; pub mod witness_generator; diff --git a/core/lib/config/src/configs/prover.rs b/core/lib/config/src/configs/prover.rs deleted file mode 100644 index 45ed7100f9f4..000000000000 --- a/core/lib/config/src/configs/prover.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::time::Duration; - -use serde::Deserialize; - -/// Configuration for the prover application -#[derive(Debug, Deserialize, Clone, PartialEq)] -pub struct ProverConfig { - /// Port to which the Prometheus exporter server is listening. - pub prometheus_port: u16, - /// Currently only a single (largest) key is supported. We'll support different ones in the future - pub initial_setup_key_path: String, - /// https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key - pub key_download_url: String, - /// Max time for proof to be generated - pub generation_timeout_in_secs: u16, - /// Number of threads to be used concurrent proof generation. - pub number_of_threads: u16, - /// Max attempts for generating proof - pub max_attempts: u32, - // Polling time in mill-seconds. - pub polling_duration_in_millis: u64, - // Path to setup keys for individual circuit. - pub setup_keys_path: String, - // Group id for this prover, provers running the same circuit types shall have same group id. - pub specialized_prover_group_id: u8, - // Number of setup-keys kept in memory without swapping - // number_of_setup_slots = (R-C*A-4)/S - // R is available ram - // C is the number of parallel synth - // A is the size of Assembly that is 12gb - // S is the size of the Setup that is 20gb - // constant 4 is for the data copy with gpu - pub number_of_setup_slots: u8, - /// Port at which server would be listening to receive incoming assembly - pub assembly_receiver_port: u16, - /// Socket polling time for receiving incoming assembly - pub assembly_receiver_poll_time_in_millis: u64, - /// maximum number of assemblies that are kept in memory, - pub assembly_queue_capacity: usize, -} - -/// Prover configs for different machine types that are currently supported. -#[derive(Debug, Deserialize, Clone, PartialEq)] -pub struct ProverConfigs { - // used by witness-generator - pub non_gpu: ProverConfig, - // https://gcloud-compute.com/a2-highgpu-2g.html - pub two_gpu_forty_gb_mem: ProverConfig, - // https://gcloud-compute.com/a2-ultragpu-1g.html - pub one_gpu_eighty_gb_mem: ProverConfig, - // https://gcloud-compute.com/a2-ultragpu-2g.html - pub two_gpu_eighty_gb_mem: ProverConfig, - // https://gcloud-compute.com/a2-ultragpu-4g.html - pub four_gpu_eighty_gb_mem: ProverConfig, -} - -impl ProverConfig { - pub fn proof_generation_timeout(&self) -> Duration { - Duration::from_secs(self.generation_timeout_in_secs as u64) - } -} diff --git a/core/lib/config/src/configs/prover_group.rs b/core/lib/config/src/configs/prover_group.rs deleted file mode 100644 index 2d40d47ba8c1..000000000000 --- a/core/lib/config/src/configs/prover_group.rs +++ /dev/null @@ -1,66 +0,0 @@ -use serde::Deserialize; - -/// Configuration for the grouping of specialized provers. -/// This config would be used by circuit-synthesizer and provers. -#[derive(Debug, Deserialize, Clone, PartialEq)] -pub struct ProverGroupConfig { - pub group_0_circuit_ids: Vec, - pub group_1_circuit_ids: Vec, - pub group_2_circuit_ids: Vec, - pub group_3_circuit_ids: Vec, - pub group_4_circuit_ids: Vec, - pub group_5_circuit_ids: Vec, - pub group_6_circuit_ids: Vec, - pub group_7_circuit_ids: Vec, - pub group_8_circuit_ids: Vec, - pub group_9_circuit_ids: Vec, - pub region_read_url: String, - // This is used while running the provers/synthesizer in non-gcp cloud env. - pub region_override: Option, - pub zone_read_url: String, - // This is used while running the provers/synthesizer in non-gcp cloud env. - pub zone_override: Option, - pub synthesizer_per_gpu: u16, -} - -impl ProverGroupConfig { - pub fn get_circuit_ids_for_group_id(&self, group_id: u8) -> Option> { - match group_id { - 0 => Some(self.group_0_circuit_ids.clone()), - 1 => Some(self.group_1_circuit_ids.clone()), - 2 => Some(self.group_2_circuit_ids.clone()), - 3 => Some(self.group_3_circuit_ids.clone()), - 4 => Some(self.group_4_circuit_ids.clone()), - 5 => Some(self.group_5_circuit_ids.clone()), - 6 => Some(self.group_6_circuit_ids.clone()), - 7 => Some(self.group_7_circuit_ids.clone()), - 8 => Some(self.group_8_circuit_ids.clone()), - 9 => Some(self.group_9_circuit_ids.clone()), - _ => None, - } - } - - pub fn is_specialized_group_id(&self, group_id: u8) -> bool { - group_id <= 9 - } - - pub fn get_group_id_for_circuit_id(&self, circuit_id: u8) -> Option { - let configs = [ - &self.group_0_circuit_ids, - &self.group_1_circuit_ids, - &self.group_2_circuit_ids, - &self.group_3_circuit_ids, - &self.group_4_circuit_ids, - &self.group_5_circuit_ids, - &self.group_6_circuit_ids, - &self.group_7_circuit_ids, - &self.group_8_circuit_ids, - &self.group_9_circuit_ids, - ]; - configs - .iter() - .enumerate() - .find(|(_, group)| group.contains(&circuit_id)) - .map(|(group_id, _)| group_id as u8) - } -} diff --git a/core/lib/config/src/lib.rs b/core/lib/config/src/lib.rs index edb596be4984..f329fbf4f4b4 100644 --- a/core/lib/config/src/lib.rs +++ b/core/lib/config/src/lib.rs @@ -3,7 +3,7 @@ pub use crate::configs::{ ApiConfig, ChainConfig, ContractVerifierConfig, ContractsConfig, DBConfig, ETHClientConfig, ETHSenderConfig, ETHWatchConfig, GasAdjusterConfig, ObjectStoreConfig, PostgresConfig, - ProverConfig, ProverConfigs, SnapshotsCreatorConfig, + SnapshotsCreatorConfig, }; pub mod configs; diff --git a/core/lib/dal/sqlx-data.json b/core/lib/dal/sqlx-data.json index 36b8bad5787f..1caa9f54a1e8 100644 --- a/core/lib/dal/sqlx-data.json +++ b/core/lib/dal/sqlx-data.json @@ -391,19 +391,6 @@ }, "query": "\n SELECT\n *\n FROM\n call_traces\n WHERE\n tx_hash IN (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number = $1\n )\n " }, - "0587fadb4f7a014caddf9e540cd2a1ece830de8777d945d48bd9c796fefb3253": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - } - }, - "query": "\n UPDATE prover_jobs\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n id = $2\n " - }, "07310d96fc7e258154ad510684e33d196907ebd599e926d305e5ef9f26afa2fa": { "describe": { "columns": [ @@ -426,24 +413,6 @@ }, "query": "INSERT INTO eth_txs_history (eth_tx_id, base_fee_per_gas, priority_fee_per_gas, tx_hash, signed_raw_tx, created_at, updated_at, confirmed_at) VALUES ($1, 0, 0, $2, '\\x00', now(), now(), $3) RETURNING id" }, - "08024b2ba970d2fdac2a71c9c7c73be42a289d034670ca4e644f5df1e4614ddf": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Int4", - "Bytea", - "Int4", - "Text", - "Int4" - ] - } - }, - "query": "\n INSERT INTO\n prover_jobs (\n l1_batch_number,\n circuit_type,\n sequence_number,\n prover_input,\n aggregation_round,\n circuit_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, 'queued', NOW(), NOW())\n ON CONFLICT (l1_batch_number, aggregation_round, sequence_number) DO NOTHING\n " - }, "083991abb3f1c2183d1bd1fb2ad4710daa723e2d9a23317c347f6081465c3643": { "describe": { "columns": [ @@ -982,30 +951,6 @@ }, "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n " }, - "0e1317c908de3d9b9b87b51802cbe545198d7debecd65dc2165731c8a0c0f508": { - "describe": { - "columns": [ - { - "name": "l1_batch_number!", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "circuit_type", - "ordinal": 1, - "type_info": "Text" - } - ], - "nullable": [ - null, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_type\n FROM\n prover_jobs\n WHERE\n aggregation_round = 0\n AND (\n status = 'queued'\n OR status = 'in_progress'\n OR status = 'in_gpu_proof'\n OR status = 'failed'\n )\n GROUP BY\n circuit_type\n " - }, "10959c91f01ce0da196f4c6eaf0661a097308d9f81024fdfef24a14418202730": { "describe": { "columns": [ @@ -3654,32 +3599,6 @@ }, "query": "\n UPDATE l1_batches\n SET\n commitment = $2,\n aux_data_hash = $3,\n updated_at = NOW()\n WHERE\n number = $1\n " }, - "3263423b6097fac01eadd978b826b831321c10f91b87cea38dc8a7377da9385e": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "circuit_input_blob_url", - "ordinal": 1, - "type_info": "Text" - } - ], - "nullable": [ - false, - true - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n id,\n circuit_input_blob_url\n FROM\n prover_jobs\n WHERE\n status = 'successful'\n AND circuit_input_blob_url IS NOT NULL\n AND updated_at < NOW() - INTERVAL '30 days'\n LIMIT\n $1;\n " - }, "32792c6aee69cb8c8b928a209a3b04ba5868d1897553df85aac15b169ebb0732": { "describe": { "columns": [], @@ -3762,21 +3681,6 @@ }, "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1::bytea[])\n " }, - "3502a673e04b57bfde096303d7643092702c835069cc055e01f382bc56681401": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Time", - "Bytea", - "Text", - "Int8" - ] - } - }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n result = $2,\n proccesed_by = $3\n WHERE\n id = $4\n " - }, "35b87a3b7db0af87c6a95e9fe7ef9044ae85b579c7051301b40bd5f94df1f530": { "describe": { "columns": [], @@ -4066,26 +3970,6 @@ }, "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n miniblocks\n WHERE\n number = $1\n AND consensus IS NOT NULL\n " }, - "373f6339a61c6ac74080f855fcc25dab33355eefdce69255bc7106675b0e5641": { - "describe": { - "columns": [ - { - "name": "count!", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n prover_protocol_versions\n WHERE\n id = $1\n " - }, "38a8b00e320b16e99f6ea0e5954e2f7e49cd6600bd3d56cf41795c2c9e082e4c": { "describe": { "columns": [ @@ -4235,24 +4119,6 @@ }, "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n " }, - "40c82325e05572db9c3a4ca8cc347617ed18495ef147b3ecfacdd89f54957b6a": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bytea" - ] - } - }, - "query": "\n INSERT INTO\n prover_protocol_versions (\n id,\n timestamp,\n recursion_scheduler_level_vk_hash,\n recursion_node_level_vk_hash,\n recursion_leaf_level_vk_hash,\n recursion_circuits_set_vks_hash,\n verifier_address,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, NOW())\n " - }, "41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151": { "describe": { "columns": [ @@ -4739,30 +4605,6 @@ }, "query": "\n SELECT\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n FROM\n snapshots\n " }, - "4f9b84e4ee54902edb3738ec111268d1266a05f4d931dd874baceedf5444efa4": { - "describe": { - "columns": [ - { - "name": "l1_batch_number!", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "aggregation_round", - "ordinal": 1, - "type_info": "Int4" - } - ], - "nullable": [ - null, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n MAX(l1_batch_number) AS \"l1_batch_number!\",\n aggregation_round\n FROM\n prover_jobs\n WHERE\n status = 'successful'\n GROUP BY\n aggregation_round\n " - }, "525123d4ec2b427f1c171f30d0937d8d542b4f14cf560972c005ab3cc13d1f63": { "describe": { "columns": [ @@ -5724,30 +5566,37 @@ }, "query": "\n INSERT INTO\n eth_txs (\n raw_tx,\n nonce,\n tx_type,\n contract_address,\n predicted_gas_cost,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW())\n RETURNING\n *\n " }, - "684775aaed3d7f3f5580363e5180a04e7a1af1057995805cb6fd35d0b810e734": { + "68936a53e5b80576f3f341523e6843eb48b5e26ee92cd8476f50251e8c32610d": { "describe": { - "columns": [], - "nullable": [], + "columns": [ + { + "name": "count!", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + null + ], "parameters": { "Left": [ - "Text", - "Text", - "Int4", - "Int4", - "Text", - "Text" + "Int8", + "Bytea", + "Bytea", + "Bytea", + "Bytea" ] } }, - "query": "\n UPDATE gpu_prover_queue\n SET\n instance_status = $1,\n updated_at = NOW(),\n queue_free_slots = $4\n WHERE\n instance_host = $2::TEXT::inet\n AND instance_port = $3\n AND region = $5\n AND zone = $6\n " + "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n l1_batches\n WHERE\n number = $1\n AND hash = $2\n AND merkle_root_hash = $3\n AND parent_hash = $4\n AND l2_l1_merkle_root = $5\n " }, - "68936a53e5b80576f3f341523e6843eb48b5e26ee92cd8476f50251e8c32610d": { + "68c891ee9d71cffe709731f2804b734d5d255e36e48668b3bfc25a0f86ea52e7": { "describe": { "columns": [ { - "name": "count!", + "name": "is_replaced!", "ordinal": 0, - "type_info": "Int8" + "type_info": "Bool" } ], "nullable": [ @@ -5755,255 +5604,109 @@ ], "parameters": { "Left": [ + "Bytea", + "Bytea", "Int8", "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Numeric", + "Bytea", + "Jsonb", + "Int4", + "Bytea", + "Numeric", "Bytea", "Bytea", - "Bytea" + "Int8", + "Int4", + "Int4", + "Timestamp" ] } }, - "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n l1_batches\n WHERE\n number = $1\n AND hash = $2\n AND merkle_root_hash = $3\n AND parent_hash = $4\n AND l2_l1_merkle_root = $5\n " + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n " + }, + "6ae2ed34230beae0e86c584e293e7ee767e4c98706246eb113498c0f817f5f38": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Int2", + "Text" + ] + } + }, + "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW())\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW()\n " + }, + "6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [] + } + }, + "query": "\n DELETE FROM eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n " + }, + "6bd3094be764e6378fe52b5bb533260b49ce42daaf9dbe8075daf0a8e0ad9914": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [] + } + }, + "query": "\n DELETE FROM basic_witness_input_producer_jobs\n " }, - "68a937c42e280690a7a63eeec6883d30eeb6e614ca75edf582b44378c0a698ed": { + "6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int4" + ] + } + }, + "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n " + }, + "6ccb3beec0624153ef2e7bff61ba896e34b757421fca9682aecb3a98b54695a6": { "describe": { "columns": [ { - "name": "id", + "name": "number", "ordinal": 0, "type_info": "Int8" }, { - "name": "l1_batch_number", + "name": "timestamp", "ordinal": 1, "type_info": "Int8" }, { - "name": "circuit_type", + "name": "hash", "ordinal": 2, - "type_info": "Text" + "type_info": "Bytea" }, { - "name": "prover_input", + "name": "l1_tx_count", "ordinal": 3, - "type_info": "Bytea" + "type_info": "Int4" }, { - "name": "status", + "name": "l2_tx_count", "ordinal": 4, - "type_info": "Text" + "type_info": "Int4" }, { - "name": "error", + "name": "base_fee_per_gas", "ordinal": 5, - "type_info": "Text" - }, - { - "name": "processing_started_at", - "ordinal": 6, - "type_info": "Timestamp" - }, - { - "name": "created_at", - "ordinal": 7, - "type_info": "Timestamp" - }, - { - "name": "updated_at", - "ordinal": 8, - "type_info": "Timestamp" - }, - { - "name": "time_taken", - "ordinal": 9, - "type_info": "Time" - }, - { - "name": "aggregation_round", - "ordinal": 10, - "type_info": "Int4" - }, - { - "name": "result", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "sequence_number", - "ordinal": 12, - "type_info": "Int4" - }, - { - "name": "attempts", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "circuit_input_blob_url", - "ordinal": 14, - "type_info": "Text" - }, - { - "name": "proccesed_by", - "ordinal": 15, - "type_info": "Text" - }, - { - "name": "is_blob_cleaned", - "ordinal": 16, - "type_info": "Bool" - }, - { - "name": "protocol_version", - "ordinal": 17, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - true, - true, - false, - false, - false, - false, - true, - false, - false, - true, - true, - false, - true - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n *\n FROM\n prover_jobs\n WHERE\n id = $1\n " - }, - "68c891ee9d71cffe709731f2804b734d5d255e36e48668b3bfc25a0f86ea52e7": { - "describe": { - "columns": [ - { - "name": "is_replaced!", - "ordinal": 0, - "type_info": "Bool" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Int8", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Numeric", - "Bytea", - "Jsonb", - "Int4", - "Bytea", - "Numeric", - "Bytea", - "Bytea", - "Int8", - "Int4", - "Int4", - "Timestamp" - ] - } - }, - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n " - }, - "6ae2ed34230beae0e86c584e293e7ee767e4c98706246eb113498c0f817f5f38": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int2", - "Text" - ] - } - }, - "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW())\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW()\n " - }, - "6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [] - } - }, - "query": "\n DELETE FROM eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n " - }, - "6bd3094be764e6378fe52b5bb533260b49ce42daaf9dbe8075daf0a8e0ad9914": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [] - } - }, - "query": "\n DELETE FROM basic_witness_input_producer_jobs\n " - }, - "6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n " - }, - "6ccb3beec0624153ef2e7bff61ba896e34b757421fca9682aecb3a98b54695a6": { - "describe": { - "columns": [ - { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "timestamp", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "hash", - "ordinal": 2, - "type_info": "Bytea" - }, - { - "name": "l1_tx_count", - "ordinal": 3, - "type_info": "Int4" - }, - { - "name": "l2_tx_count", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "base_fee_per_gas", - "ordinal": 5, - "type_info": "Numeric" + "type_info": "Numeric" }, { "name": "l1_gas_price", @@ -6031,98 +5734,9 @@ "type_info": "Int4" }, { - "name": "virtual_blocks", - "ordinal": 11, - "type_info": "Int8" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks\n FROM\n miniblocks\n ORDER BY\n number DESC\n LIMIT\n 1\n " - }, - "6f6f60e7139fc789ca420d8610985a918e90b4e7087a98356ab19e22783c88cd": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "instance_host", - "ordinal": 1, - "type_info": "Inet" - }, - { - "name": "instance_port", - "ordinal": 2, - "type_info": "Int4" - }, - { - "name": "instance_status", - "ordinal": 3, - "type_info": "Text" - }, - { - "name": "created_at", - "ordinal": 4, - "type_info": "Timestamp" - }, - { - "name": "updated_at", - "ordinal": 5, - "type_info": "Timestamp" - }, - { - "name": "processing_started_at", - "ordinal": 6, - "type_info": "Timestamp" - }, - { - "name": "queue_free_slots", - "ordinal": 7, - "type_info": "Int4" - }, - { - "name": "queue_capacity", - "ordinal": 8, - "type_info": "Int4" - }, - { - "name": "specialized_prover_group_id", - "ordinal": 9, - "type_info": "Int2" - }, - { - "name": "region", - "ordinal": 10, - "type_info": "Text" - }, - { - "name": "zone", - "ordinal": 11, - "type_info": "Text" - }, - { - "name": "num_gpu", - "ordinal": 12, - "type_info": "Int2" + "name": "virtual_blocks", + "ordinal": 11, + "type_info": "Int8" } ], "nullable": [ @@ -6132,24 +5746,18 @@ false, false, false, + false, + false, true, true, true, - true, - false, - false, - true + false ], "parameters": { - "Left": [ - "Interval", - "Int2", - "Text", - "Text" - ] + "Left": [] } }, - "query": "\n UPDATE gpu_prover_queue\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue\n WHERE\n specialized_prover_group_id = $2\n AND region = $3\n AND zone = $4\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue.*\n " + "query": "\n SELECT\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks\n FROM\n miniblocks\n ORDER BY\n number DESC\n LIMIT\n 1\n " }, "708b2b3e40887e6d8d2d7aa20448a58479487686d774e6b2b1391347bdafe06d": { "describe": { @@ -7130,24 +6738,6 @@ }, "query": "\n INSERT INTO\n snapshots (\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n " }, - "831f7bec105541bd3ff9bcf6940d6b6b9d558224ad2d8ed079a68c7e339ded6b": { - "describe": { - "columns": [ - { - "name": "l1_batch_number?", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number?\"\n FROM\n (\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number\"\n FROM\n prover_jobs\n WHERE\n status = 'successful'\n OR aggregation_round < 3\n GROUP BY\n l1_batch_number\n HAVING\n MAX(aggregation_round) < 3\n ) AS inn\n " - }, "83a931ceddf34e1c760649d613f534014b9ab9ca7725e14fb17aa050d9f35eb8": { "describe": { "columns": [ @@ -7785,36 +7375,6 @@ }, "query": "\n SELECT\n protocol_version\n FROM\n miniblocks\n WHERE\n number = $1\n " }, - "8a773618c9df11217467222c9117d6868fbf88ee21d8868a7d133e7cebb3d20e": { - "describe": { - "columns": [ - { - "name": "successful_limit!", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "queued_limit!", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "max_block!", - "ordinal": 2, - "type_info": "Int8" - } - ], - "nullable": [ - null, - null, - null - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n (\n SELECT\n l1_batch_number\n FROM\n prover_jobs\n WHERE\n status NOT IN ('successful', 'skipped')\n ORDER BY\n l1_batch_number\n LIMIT\n 1\n ) AS \"successful_limit!\",\n (\n SELECT\n l1_batch_number\n FROM\n prover_jobs\n WHERE\n status <> 'queued'\n ORDER BY\n l1_batch_number DESC\n LIMIT\n 1\n ) AS \"queued_limit!\",\n (\n SELECT\n MAX(l1_batch_number) AS \"max!\"\n FROM\n prover_jobs\n ) AS \"max_block!\"\n " - }, "8a7a57ca3d4d65da3e0877c003902c690c33686c889d318b1d64bdd7fa6374db": { "describe": { "columns": [ @@ -8187,36 +7747,6 @@ }, "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n merkle_tree_paths_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n " }, - "9c0c3e5edce083804f49137eb3b01c0b73dfb30bdb9e11fcbf370d599344f20e": { - "describe": { - "columns": [ - { - "name": "count!", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "circuit_type!", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "status!", - "ordinal": 2, - "type_info": "Text" - } - ], - "nullable": [ - null, - false, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n COUNT(*) AS \"count!\",\n circuit_type AS \"circuit_type!\",\n status AS \"status!\"\n FROM\n prover_jobs\n WHERE\n status <> 'skipped'\n AND status <> 'successful'\n GROUP BY\n circuit_type,\n status\n " - }, "9c2a5f32c627d3a5c6f1e87b31ce3b0fd67aa1f5f7ea0de673a2fbe1f742db86": { "describe": { "columns": [ @@ -8585,22 +8115,6 @@ }, "query": "\n SELECT\n (\n SELECT\n l1_batch_number\n FROM\n miniblocks\n WHERE\n number = $1\n ) AS \"block_batch?\",\n (\n SELECT\n MAX(number) + 1\n FROM\n l1_batches\n ) AS \"max_batch?\"\n " }, - "ad53e912e68d81628089ae68aaa4154b988ce8ed67af02f4254717a1cdd3da7e": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int4", - "Text", - "Text" - ] - } - }, - "query": "\n UPDATE gpu_prover_queue\n SET\n instance_status = 'available',\n updated_at = NOW(),\n queue_free_slots = $3\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND region = $4\n AND zone = $5\n " - }, "ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2": { "describe": { "columns": [ @@ -9596,29 +9110,6 @@ }, "query": "\n SELECT\n address,\n key,\n value\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN (\n SELECT\n MIN(number)\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n ) AND (\n SELECT\n MAX(number)\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n )\n ORDER BY\n miniblock_number,\n operation_number\n " }, - "c3b76b8030d4b5266242619f091c5cffe6869add3e43c71390a9a921b8ff48c5": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int4" - } - ], - "nullable": [ - false - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Bytea", - "Bytea" - ] - } - }, - "query": "\n SELECT\n id\n FROM\n prover_protocol_versions\n WHERE\n recursion_circuits_set_vks_hash = $1\n AND recursion_leaf_level_vk_hash = $2\n AND recursion_node_level_vk_hash = $3\n AND recursion_scheduler_level_vk_hash = $4\n " - }, "c41312e01aa66897552e8be9acc8d43c31ec7441a7f6c5040e120810ebbb72f7": { "describe": { "columns": [], @@ -9698,30 +9189,6 @@ }, "query": "\n UPDATE scheduler_dependency_tracker_fri\n SET\n status = 'queuing'\n WHERE\n l1_batch_number IN (\n SELECT\n l1_batch_number\n FROM\n scheduler_dependency_tracker_fri\n WHERE\n status != 'queued'\n AND circuit_1_final_prover_job_id IS NOT NULL\n AND circuit_2_final_prover_job_id IS NOT NULL\n AND circuit_3_final_prover_job_id IS NOT NULL\n AND circuit_4_final_prover_job_id IS NOT NULL\n AND circuit_5_final_prover_job_id IS NOT NULL\n AND circuit_6_final_prover_job_id IS NOT NULL\n AND circuit_7_final_prover_job_id IS NOT NULL\n AND circuit_8_final_prover_job_id IS NOT NULL\n AND circuit_9_final_prover_job_id IS NOT NULL\n AND circuit_10_final_prover_job_id IS NOT NULL\n AND circuit_11_final_prover_job_id IS NOT NULL\n AND circuit_12_final_prover_job_id IS NOT NULL\n AND circuit_13_final_prover_job_id IS NOT NULL\n )\n RETURNING\n l1_batch_number;\n " }, - "c689a86a40c882a0d990a17ecc32290b2a47043fc88d4a2232461434a3f4a57d": { - "describe": { - "columns": [ - { - "name": "count!", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "status!", - "ordinal": 1, - "type_info": "Text" - } - ], - "nullable": [ - null, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n COUNT(*) AS \"count!\",\n status AS \"status!\"\n FROM\n prover_jobs\n GROUP BY\n status\n " - }, "c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355": { "describe": { "columns": [ @@ -9788,162 +9255,39 @@ } ], "nullable": [ - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status <> 'successful'\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n " - }, - "cb98d84fc34af1e4a4c2f427c5bb4afd384063ae394a847b26304dd18d490ab4": { - "describe": { - "columns": [ - { - "name": "timestamp", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "hash", - "ordinal": 1, - "type_info": "Bytea" - } - ], - "nullable": [ - false, - true - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n timestamp,\n hash\n FROM\n l1_batches\n WHERE\n number = $1\n " - }, - "cd76f54e1b9b4c0cf3044d3b767714e290f88ea1f20092a0278718fecda63caf": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_batch_number", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "circuit_type", - "ordinal": 2, - "type_info": "Text" - }, - { - "name": "prover_input", - "ordinal": 3, - "type_info": "Bytea" - }, - { - "name": "status", - "ordinal": 4, - "type_info": "Text" - }, - { - "name": "error", - "ordinal": 5, - "type_info": "Text" - }, - { - "name": "processing_started_at", - "ordinal": 6, - "type_info": "Timestamp" - }, - { - "name": "created_at", - "ordinal": 7, - "type_info": "Timestamp" - }, - { - "name": "updated_at", - "ordinal": 8, - "type_info": "Timestamp" - }, - { - "name": "time_taken", - "ordinal": 9, - "type_info": "Time" - }, - { - "name": "aggregation_round", - "ordinal": 10, - "type_info": "Int4" - }, - { - "name": "result", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "sequence_number", - "ordinal": 12, - "type_info": "Int4" - }, - { - "name": "attempts", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "circuit_input_blob_url", - "ordinal": 14, - "type_info": "Text" - }, - { - "name": "proccesed_by", - "ordinal": 15, - "type_info": "Text" - }, + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status <> 'successful'\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n " + }, + "cb98d84fc34af1e4a4c2f427c5bb4afd384063ae394a847b26304dd18d490ab4": { + "describe": { + "columns": [ { - "name": "is_blob_cleaned", - "ordinal": 16, - "type_info": "Bool" + "name": "timestamp", + "ordinal": 0, + "type_info": "Int8" }, { - "name": "protocol_version", - "ordinal": 17, - "type_info": "Int4" + "name": "hash", + "ordinal": 1, + "type_info": "Bytea" } ], "nullable": [ - false, - false, - false, - false, - false, - true, - true, - false, - false, - false, - false, - true, - false, - false, - true, - true, false, true ], "parameters": { "Left": [ - "TextArray", - "Int4Array" + "Int8" ] } }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs\n WHERE\n circuit_type = ANY ($1)\n AND status = 'queued'\n AND protocol_version = ANY ($2)\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs.*\n " + "query": "\n SELECT\n timestamp,\n hash\n FROM\n l1_batches\n WHERE\n number = $1\n " }, "cddf48514aa2aa249d0530d44c741368993009bb4bd90c2ad177ce56317aa04c": { "describe": { @@ -10275,128 +9619,6 @@ }, "query": "\n SELECT\n timestamp\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id IS NULL\n AND number > 0\n ORDER BY\n number\n LIMIT\n 1\n " }, - "d17221312e645b0287ff9238954512b528e7928087351a32c96b44d538dfb9ee": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_batch_number", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "circuit_type", - "ordinal": 2, - "type_info": "Text" - }, - { - "name": "prover_input", - "ordinal": 3, - "type_info": "Bytea" - }, - { - "name": "status", - "ordinal": 4, - "type_info": "Text" - }, - { - "name": "error", - "ordinal": 5, - "type_info": "Text" - }, - { - "name": "processing_started_at", - "ordinal": 6, - "type_info": "Timestamp" - }, - { - "name": "created_at", - "ordinal": 7, - "type_info": "Timestamp" - }, - { - "name": "updated_at", - "ordinal": 8, - "type_info": "Timestamp" - }, - { - "name": "time_taken", - "ordinal": 9, - "type_info": "Time" - }, - { - "name": "aggregation_round", - "ordinal": 10, - "type_info": "Int4" - }, - { - "name": "result", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "sequence_number", - "ordinal": 12, - "type_info": "Int4" - }, - { - "name": "attempts", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "circuit_input_blob_url", - "ordinal": 14, - "type_info": "Text" - }, - { - "name": "proccesed_by", - "ordinal": 15, - "type_info": "Text" - }, - { - "name": "is_blob_cleaned", - "ordinal": 16, - "type_info": "Bool" - }, - { - "name": "protocol_version", - "ordinal": 17, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - true, - true, - false, - false, - false, - false, - true, - false, - false, - true, - true, - false, - true - ], - "parameters": { - "Left": [ - "Int4Array" - ] - } - }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs\n WHERE\n status = 'queued'\n AND protocol_version = ANY ($1)\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs.*\n " - }, "d1b261f4057e4113b96eb87c9e20015eeb3ef2643ceda3024504a471b24d1283": { "describe": { "columns": [ @@ -11360,33 +10582,6 @@ }, "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n " }, - "e6a3efeffe1b3520cc9b1751e2c842c27546b3fd41f7d8a784ca58579856621b": { - "describe": { - "columns": [ - { - "name": "l1_batch_number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "attempts", - "ordinal": 1, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false - ], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - } - }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n RETURNING\n l1_batch_number,\n attempts\n " - }, "e71c39b93ceba5416ff3d988290cb35d4d07d47f33fe1a5b9e9fe1f0ae09b705": { "describe": { "columns": [ @@ -11715,24 +10910,6 @@ }, "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, fri_proof_blob_url, status, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n " }, - "efe2a4ce4ba09e40ac7401f19ac5a42a0d521ffa33594c7861d786741d303f30": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int4", - "Int2", - "Text", - "Text", - "Int2" - ] - } - }, - "query": "\n INSERT INTO\n gpu_prover_queue (\n instance_host,\n instance_port,\n queue_capacity,\n queue_free_slots,\n instance_status,\n specialized_prover_group_id,\n region,\n zone,\n num_gpu,\n created_at,\n updated_at\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, $3, $3, 'available', $4, $5, $6, $7, NOW(), NOW())\n ON CONFLICT (instance_host, instance_port, region, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n queue_capacity = $3,\n queue_free_slots = $3,\n specialized_prover_group_id = $4,\n region = $5,\n zone = $6,\n num_gpu = $7,\n updated_at = NOW()\n " - }, "f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66": { "describe": { "columns": [ @@ -11767,36 +10944,6 @@ }, "query": "\n WITH\n sl AS (\n SELECT\n (\n SELECT\n ARRAY[hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key)\n )\n SELECT\n sl.kv[1] AS \"hashed_key?\",\n sl.kv[2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1]\n " }, - "f1478830e5f95cbcd0da01d3457cbb9cb8da439c7ab28fa865f53908621dc4c5": { - "describe": { - "columns": [ - { - "name": "region", - "ordinal": 0, - "type_info": "Text" - }, - { - "name": "zone", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "total_gpus", - "ordinal": 2, - "type_info": "Int8" - } - ], - "nullable": [ - false, - false, - null - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n region,\n zone,\n SUM(num_gpu) AS total_gpus\n FROM\n gpu_prover_queue\n GROUP BY\n region,\n zone\n " - }, "f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a": { "describe": { "columns": [ @@ -11837,39 +10984,6 @@ }, "query": "\n SELECT\n l1_address\n FROM\n tokens\n WHERE\n market_volume > $1\n " }, - "f303c53843a58fac4fcdedbfe2b2b33ad609b7df8e55a0cf214ea1ec6421e57a": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "status", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "attempts", - "ordinal": 2, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false, - false - ], - "parameters": { - "Left": [ - "Interval", - "Int4" - ] - } - }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'in_gpu_proof'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts\n " - }, "f39372e37160df4897f62a800694867ed765dcb9dc60754df9df8700d4244bfb": { "describe": { "columns": [ diff --git a/core/lib/dal/src/gpu_prover_queue_dal.rs b/core/lib/dal/src/gpu_prover_queue_dal.rs deleted file mode 100644 index b424edd57456..000000000000 --- a/core/lib/dal/src/gpu_prover_queue_dal.rs +++ /dev/null @@ -1,218 +0,0 @@ -use std::{collections::HashMap, time::Duration}; - -use zksync_types::proofs::{GpuProverInstanceStatus, SocketAddress}; - -use crate::{time_utils::pg_interval_from_duration, StorageProcessor}; - -#[derive(Debug)] -pub struct GpuProverQueueDal<'a, 'c> { - pub(crate) storage: &'a mut StorageProcessor<'c>, -} - -impl GpuProverQueueDal<'_, '_> { - pub async fn lock_available_prover( - &mut self, - processing_timeout: Duration, - specialized_prover_group_id: u8, - region: String, - zone: String, - ) -> Option { - { - let processing_timeout = pg_interval_from_duration(processing_timeout); - let result: Option = sqlx::query!( - r#" - UPDATE gpu_prover_queue - SET - instance_status = 'reserved', - updated_at = NOW(), - processing_started_at = NOW() - WHERE - id IN ( - SELECT - id - FROM - gpu_prover_queue - WHERE - specialized_prover_group_id = $2 - AND region = $3 - AND zone = $4 - AND ( - instance_status = 'available' - OR ( - instance_status = 'reserved' - AND processing_started_at < NOW() - $1::INTERVAL - ) - ) - ORDER BY - updated_at ASC - LIMIT - 1 - FOR UPDATE - SKIP LOCKED - ) - RETURNING - gpu_prover_queue.* - "#, - &processing_timeout, - specialized_prover_group_id as i16, - region, - zone - ) - .fetch_optional(self.storage.conn()) - .await - .unwrap() - .map(|row| SocketAddress { - host: row.instance_host.network(), - port: row.instance_port as u16, - }); - - result - } - } - - pub async fn insert_prover_instance( - &mut self, - address: SocketAddress, - queue_capacity: usize, - specialized_prover_group_id: u8, - region: String, - zone: String, - num_gpu: u8, - ) { - { - sqlx::query!( - r#" - INSERT INTO - gpu_prover_queue ( - instance_host, - instance_port, - queue_capacity, - queue_free_slots, - instance_status, - specialized_prover_group_id, - region, - zone, - num_gpu, - created_at, - updated_at - ) - VALUES - (CAST($1::TEXT AS inet), $2, $3, $3, 'available', $4, $5, $6, $7, NOW(), NOW()) - ON CONFLICT (instance_host, instance_port, region, zone) DO - UPDATE - SET - instance_status = 'available', - queue_capacity = $3, - queue_free_slots = $3, - specialized_prover_group_id = $4, - region = $5, - zone = $6, - num_gpu = $7, - updated_at = NOW() - "#, - format!("{}",address.host), - address.port as i32, - queue_capacity as i32, - specialized_prover_group_id as i16, - region, - zone, - num_gpu as i16) - .execute(self.storage.conn()) - .await - .unwrap(); - } - } - - pub async fn update_prover_instance_status( - &mut self, - address: SocketAddress, - status: GpuProverInstanceStatus, - queue_free_slots: usize, - region: String, - zone: String, - ) { - { - sqlx::query!( - r#" - UPDATE gpu_prover_queue - SET - instance_status = $1, - updated_at = NOW(), - queue_free_slots = $4 - WHERE - instance_host = $2::TEXT::inet - AND instance_port = $3 - AND region = $5 - AND zone = $6 - "#, - format!("{:?}", status).to_lowercase(), - format!("{}", address.host), - address.port as i32, - queue_free_slots as i32, - region, - zone - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - } - - pub async fn update_prover_instance_from_full_to_available( - &mut self, - address: SocketAddress, - queue_free_slots: usize, - region: String, - zone: String, - ) { - { - sqlx::query!( - r#" - UPDATE gpu_prover_queue - SET - instance_status = 'available', - updated_at = NOW(), - queue_free_slots = $3 - WHERE - instance_host = $1::TEXT::inet - AND instance_port = $2 - AND instance_status = 'full' - AND region = $4 - AND zone = $5 - "#, - format!("{}", address.host), - address.port as i32, - queue_free_slots as i32, - region, - zone - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - } - - pub async fn get_prover_gpu_count_per_region_zone(&mut self) -> HashMap<(String, String), u64> { - { - sqlx::query!( - r#" - SELECT - region, - zone, - SUM(num_gpu) AS total_gpus - FROM - gpu_prover_queue - GROUP BY - region, - zone - "#, - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| ((row.region, row.zone), row.total_gpus.unwrap() as u64)) - .collect() - } - } -} diff --git a/core/lib/dal/src/lib.rs b/core/lib/dal/src/lib.rs index d2e37230a373..3a5691a1c93e 100644 --- a/core/lib/dal/src/lib.rs +++ b/core/lib/dal/src/lib.rs @@ -13,9 +13,9 @@ use crate::{ fri_proof_compressor_dal::FriProofCompressorDal, fri_protocol_versions_dal::FriProtocolVersionsDal, fri_prover_dal::FriProverDal, fri_scheduler_dependency_tracker_dal::FriSchedulerDependencyTrackerDal, - fri_witness_generator_dal::FriWitnessGeneratorDal, gpu_prover_queue_dal::GpuProverQueueDal, - proof_generation_dal::ProofGenerationDal, protocol_versions_dal::ProtocolVersionsDal, - protocol_versions_web3_dal::ProtocolVersionsWeb3Dal, prover_dal::ProverDal, + fri_witness_generator_dal::FriWitnessGeneratorDal, proof_generation_dal::ProofGenerationDal, + protocol_versions_dal::ProtocolVersionsDal, + protocol_versions_web3_dal::ProtocolVersionsWeb3Dal, snapshot_recovery_dal::SnapshotRecoveryDal, snapshots_creator_dal::SnapshotsCreatorDal, snapshots_dal::SnapshotsDal, storage_dal::StorageDal, storage_logs_dal::StorageLogsDal, storage_logs_dedup_dal::StorageLogsDedupDal, storage_web3_dal::StorageWeb3Dal, @@ -42,7 +42,6 @@ pub mod fri_protocol_versions_dal; pub mod fri_prover_dal; pub mod fri_scheduler_dependency_tracker_dal; pub mod fri_witness_generator_dal; -pub mod gpu_prover_queue_dal; pub mod healthcheck; mod instrument; mod metrics; @@ -50,7 +49,6 @@ mod models; pub mod proof_generation_dal; pub mod protocol_versions_dal; pub mod protocol_versions_web3_dal; -pub mod prover_dal; pub mod snapshot_recovery_dal; pub mod snapshots_creator_dal; pub mod snapshots_dal; @@ -187,18 +185,10 @@ impl<'a> StorageProcessor<'a> { TokensWeb3Dal { storage: self } } - pub fn prover_dal(&mut self) -> ProverDal<'_, 'a> { - ProverDal { storage: self } - } - pub fn contract_verification_dal(&mut self) -> ContractVerificationDal<'_, 'a> { ContractVerificationDal { storage: self } } - pub fn gpu_prover_queue_dal(&mut self) -> GpuProverQueueDal<'_, 'a> { - GpuProverQueueDal { storage: self } - } - pub fn protocol_versions_dal(&mut self) -> ProtocolVersionsDal<'_, 'a> { ProtocolVersionsDal { storage: self } } diff --git a/core/lib/dal/src/protocol_versions_dal.rs b/core/lib/dal/src/protocol_versions_dal.rs index 0f4818864dfe..8aad040221c4 100644 --- a/core/lib/dal/src/protocol_versions_dal.rs +++ b/core/lib/dal/src/protocol_versions_dal.rs @@ -1,4 +1,4 @@ -use std::convert::{TryFrom, TryInto}; +use std::convert::TryInto; use zksync_contracts::{BaseSystemContracts, BaseSystemContractsHashes}; use zksync_types::{ @@ -98,51 +98,6 @@ impl ProtocolVersionsDal<'_, '_> { db_transaction.commit().await.unwrap(); } - pub async fn save_prover_protocol_version(&mut self, version: ProtocolVersion) { - sqlx::query!( - r#" - INSERT INTO - prover_protocol_versions ( - id, - timestamp, - recursion_scheduler_level_vk_hash, - recursion_node_level_vk_hash, - recursion_leaf_level_vk_hash, - recursion_circuits_set_vks_hash, - verifier_address, - created_at - ) - VALUES - ($1, $2, $3, $4, $5, $6, $7, NOW()) - "#, - version.id as i32, - version.timestamp as i64, - version - .l1_verifier_config - .recursion_scheduler_level_vk_hash - .as_bytes(), - version - .l1_verifier_config - .params - .recursion_node_level_vk_hash - .as_bytes(), - version - .l1_verifier_config - .params - .recursion_leaf_level_vk_hash - .as_bytes(), - version - .l1_verifier_config - .params - .recursion_circuits_set_vks_hash - .as_bytes(), - version.verifier_address.as_bytes(), - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - pub async fn base_system_contracts_by_timestamp( &mut self, current_timestamp: u64, @@ -392,61 +347,4 @@ impl ProtocolVersionsDal<'_, '_> { None } } - - pub async fn protocol_version_for( - &mut self, - vk_commitments: &L1VerifierConfig, - ) -> Vec { - sqlx::query!( - r#" - SELECT - id - FROM - prover_protocol_versions - WHERE - recursion_circuits_set_vks_hash = $1 - AND recursion_leaf_level_vk_hash = $2 - AND recursion_node_level_vk_hash = $3 - AND recursion_scheduler_level_vk_hash = $4 - "#, - vk_commitments - .params - .recursion_circuits_set_vks_hash - .as_bytes(), - vk_commitments - .params - .recursion_leaf_level_vk_hash - .as_bytes(), - vk_commitments - .params - .recursion_node_level_vk_hash - .as_bytes(), - vk_commitments.recursion_scheduler_level_vk_hash.as_bytes(), - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| ProtocolVersionId::try_from(row.id as u16).unwrap()) - .collect() - } - - pub async fn prover_protocol_version_exists(&mut self, id: ProtocolVersionId) -> bool { - sqlx::query!( - r#" - SELECT - COUNT(*) AS "count!" - FROM - prover_protocol_versions - WHERE - id = $1 - "#, - id as i32 - ) - .fetch_one(self.storage.conn()) - .await - .unwrap() - .count - > 0 - } } diff --git a/core/lib/dal/src/prover_dal.rs b/core/lib/dal/src/prover_dal.rs deleted file mode 100644 index c0a767531af3..000000000000 --- a/core/lib/dal/src/prover_dal.rs +++ /dev/null @@ -1,724 +0,0 @@ -use std::{ - collections::HashMap, - convert::{TryFrom, TryInto}, - ops::Range, - time::Duration, -}; - -use sqlx::Error; -use zksync_types::{ - proofs::{ - AggregationRound, JobCountStatistics, JobExtendedStatistics, ProverJobInfo, - ProverJobMetadata, - }, - L1BatchNumber, ProtocolVersionId, -}; - -use crate::{ - instrument::InstrumentExt, - models::storage_prover_job_info::StorageProverJobInfo, - time_utils::{duration_to_naive_time, pg_interval_from_duration}, - StorageProcessor, -}; - -#[derive(Debug)] -pub struct ProverDal<'a, 'c> { - pub(crate) storage: &'a mut StorageProcessor<'c>, -} - -impl ProverDal<'_, '_> { - pub async fn get_next_prover_job( - &mut self, - protocol_versions: &[ProtocolVersionId], - ) -> Option { - let protocol_versions: Vec = protocol_versions.iter().map(|&id| id as i32).collect(); - let result: Option = sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = 'in_progress', - attempts = attempts + 1, - updated_at = NOW(), - processing_started_at = NOW() - WHERE - id = ( - SELECT - id - FROM - prover_jobs - WHERE - status = 'queued' - AND protocol_version = ANY ($1) - ORDER BY - aggregation_round DESC, - l1_batch_number ASC, - id ASC - LIMIT - 1 - FOR UPDATE - SKIP LOCKED - ) - RETURNING - prover_jobs.* - "#, - &protocol_versions[..] - ) - .fetch_optional(self.storage.conn()) - .await - .unwrap() - .map(|row| ProverJobMetadata { - id: row.id as u32, - block_number: L1BatchNumber(row.l1_batch_number as u32), - circuit_type: row.circuit_type, - aggregation_round: AggregationRound::try_from(row.aggregation_round).unwrap(), - sequence_number: row.sequence_number as usize, - }); - result - } - - pub async fn get_proven_l1_batches(&mut self) -> Vec<(L1BatchNumber, AggregationRound)> { - { - sqlx::query!( - r#" - SELECT - MAX(l1_batch_number) AS "l1_batch_number!", - aggregation_round - FROM - prover_jobs - WHERE - status = 'successful' - GROUP BY - aggregation_round - "# - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|record| { - ( - L1BatchNumber(record.l1_batch_number as u32), - record.aggregation_round.try_into().unwrap(), - ) - }) - .collect() - } - } - - pub async fn get_next_prover_job_by_circuit_types( - &mut self, - circuit_types: Vec, - protocol_versions: &[ProtocolVersionId], - ) -> Option { - { - let protocol_versions: Vec = - protocol_versions.iter().map(|&id| id as i32).collect(); - let result: Option = sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = 'in_progress', - attempts = attempts + 1, - updated_at = NOW(), - processing_started_at = NOW() - WHERE - id = ( - SELECT - id - FROM - prover_jobs - WHERE - circuit_type = ANY ($1) - AND status = 'queued' - AND protocol_version = ANY ($2) - ORDER BY - aggregation_round DESC, - l1_batch_number ASC, - id ASC - LIMIT - 1 - FOR UPDATE - SKIP LOCKED - ) - RETURNING - prover_jobs.* - "#, - &circuit_types[..], - &protocol_versions[..] - ) - .fetch_optional(self.storage.conn()) - .await - .unwrap() - .map(|row| ProverJobMetadata { - id: row.id as u32, - block_number: L1BatchNumber(row.l1_batch_number as u32), - circuit_type: row.circuit_type, - aggregation_round: AggregationRound::try_from(row.aggregation_round).unwrap(), - sequence_number: row.sequence_number as usize, - }); - - result - } - } - - // If making changes to this method, consider moving the serialization logic to the DAL layer. - pub async fn insert_prover_jobs( - &mut self, - l1_batch_number: L1BatchNumber, - circuit_types_and_urls: Vec<(&'static str, String)>, - aggregation_round: AggregationRound, - protocol_version: i32, - ) { - { - let it = circuit_types_and_urls.into_iter().enumerate(); - for (sequence_number, (circuit, circuit_input_blob_url)) in it { - sqlx::query!( - r#" - INSERT INTO - prover_jobs ( - l1_batch_number, - circuit_type, - sequence_number, - prover_input, - aggregation_round, - circuit_input_blob_url, - protocol_version, - status, - created_at, - updated_at - ) - VALUES - ($1, $2, $3, $4, $5, $6, $7, 'queued', NOW(), NOW()) - ON CONFLICT (l1_batch_number, aggregation_round, sequence_number) DO NOTHING - "#, - l1_batch_number.0 as i64, - circuit, - sequence_number as i64, - &[] as &[u8], - aggregation_round as i64, - circuit_input_blob_url, - protocol_version - ) - .instrument("save_witness") - .report_latency() - .with_arg("l1_batch_number", &l1_batch_number) - .with_arg("circuit", &circuit) - .with_arg("circuit_input_blob_url", &circuit_input_blob_url) - .execute(self.storage.conn()) - .await - .unwrap(); - } - } - } - - pub async fn save_proof( - &mut self, - id: u32, - time_taken: Duration, - proof: Vec, - proccesed_by: &str, - ) -> Result<(), Error> { - { - sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = 'successful', - updated_at = NOW(), - time_taken = $1, - result = $2, - proccesed_by = $3 - WHERE - id = $4 - "#, - duration_to_naive_time(time_taken), - &proof, - proccesed_by, - id as i64, - ) - .instrument("save_proof") - .report_latency() - .with_arg("id", &id) - .with_arg("proof.len", &proof.len()) - .execute(self.storage.conn()) - .await?; - } - Ok(()) - } - - pub async fn save_proof_error( - &mut self, - id: u32, - error: String, - max_attempts: u32, - ) -> Result<(), Error> { - { - let mut transaction = self.storage.start_transaction().await.unwrap(); - - let row = sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = 'failed', - error = $1, - updated_at = NOW() - WHERE - id = $2 - RETURNING - l1_batch_number, - attempts - "#, - error, - id as i64, - ) - .fetch_one(transaction.conn()) - .await?; - - if row.attempts as u32 >= max_attempts { - transaction - .blocks_dal() - .set_skip_proof_for_l1_batch(L1BatchNumber(row.l1_batch_number as u32)) - .await - .unwrap(); - } - - transaction.commit().await.unwrap(); - Ok(()) - } - } - - pub async fn requeue_stuck_jobs( - &mut self, - processing_timeout: Duration, - max_attempts: u32, - ) -> Vec { - let processing_timeout = pg_interval_from_duration(processing_timeout); - { - sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = 'queued', - updated_at = NOW(), - processing_started_at = NOW() - WHERE - ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL - AND attempts < $2 - ) - OR ( - status = 'in_gpu_proof' - AND processing_started_at <= NOW() - $1::INTERVAL - AND attempts < $2 - ) - OR ( - status = 'failed' - AND attempts < $2 - ) - RETURNING - id, - status, - attempts - "#, - &processing_timeout, - max_attempts as i32, - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| StuckProverJobs { - id: row.id as u64, - status: row.status, - attempts: row.attempts as u64, - }) - .collect() - } - } - - pub async fn get_prover_jobs_stats_per_circuit( - &mut self, - ) -> HashMap { - { - sqlx::query!( - r#" - SELECT - COUNT(*) AS "count!", - circuit_type AS "circuit_type!", - status AS "status!" - FROM - prover_jobs - WHERE - status <> 'skipped' - AND status <> 'successful' - GROUP BY - circuit_type, - status - "# - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| (row.circuit_type, row.status, row.count as usize)) - .fold(HashMap::new(), |mut acc, (circuit_type, status, value)| { - let stats = acc.entry(circuit_type).or_insert(JobCountStatistics { - queued: 0, - in_progress: 0, - failed: 0, - successful: 0, - }); - match status.as_ref() { - "queued" => stats.queued = value, - "in_progress" => stats.in_progress = value, - "failed" => stats.failed = value, - "successful" => stats.successful = value, - _ => (), - } - acc - }) - } - } - - pub async fn get_prover_jobs_stats(&mut self) -> JobCountStatistics { - { - let mut results: HashMap = sqlx::query!( - r#" - SELECT - COUNT(*) AS "count!", - status AS "status!" - FROM - prover_jobs - GROUP BY - status - "# - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| (row.status, row.count as usize)) - .collect::>(); - JobCountStatistics { - queued: results.remove("queued").unwrap_or(0usize), - in_progress: results.remove("in_progress").unwrap_or(0usize), - failed: results.remove("failed").unwrap_or(0usize), - successful: results.remove("successful").unwrap_or(0usize), - } - } - } - - pub async fn min_unproved_l1_batch_number(&mut self) -> Option { - { - sqlx::query!( - r#" - SELECT - MIN(l1_batch_number) AS "l1_batch_number?" - FROM - ( - SELECT - MIN(l1_batch_number) AS "l1_batch_number" - FROM - prover_jobs - WHERE - status = 'successful' - OR aggregation_round < 3 - GROUP BY - l1_batch_number - HAVING - MAX(aggregation_round) < 3 - ) AS inn - "# - ) - .fetch_one(self.storage.conn()) - .await - .unwrap() - .l1_batch_number - .map(|n| L1BatchNumber(n as u32)) - } - } - - pub async fn min_unproved_l1_batch_number_by_basic_circuit_type( - &mut self, - ) -> Vec<(String, L1BatchNumber)> { - { - sqlx::query!( - r#" - SELECT - MIN(l1_batch_number) AS "l1_batch_number!", - circuit_type - FROM - prover_jobs - WHERE - aggregation_round = 0 - AND ( - status = 'queued' - OR status = 'in_progress' - OR status = 'in_gpu_proof' - OR status = 'failed' - ) - GROUP BY - circuit_type - "# - ) - .fetch_all(self.storage.conn()) - .await - .unwrap() - .into_iter() - .map(|row| (row.circuit_type, L1BatchNumber(row.l1_batch_number as u32))) - .collect() - } - } - - pub async fn get_extended_stats(&mut self) -> anyhow::Result { - { - let limits = sqlx::query!( - r#" - SELECT - ( - SELECT - l1_batch_number - FROM - prover_jobs - WHERE - status NOT IN ('successful', 'skipped') - ORDER BY - l1_batch_number - LIMIT - 1 - ) AS "successful_limit!", - ( - SELECT - l1_batch_number - FROM - prover_jobs - WHERE - status <> 'queued' - ORDER BY - l1_batch_number DESC - LIMIT - 1 - ) AS "queued_limit!", - ( - SELECT - MAX(l1_batch_number) AS "max!" - FROM - prover_jobs - ) AS "max_block!" - "# - ) - .fetch_one(self.storage.conn()) - .await?; - - let active_area = self - .get_jobs(GetProverJobsParams::blocks( - L1BatchNumber(limits.successful_limit as u32) - ..L1BatchNumber(limits.queued_limit as u32), - )) - .await?; - - Ok(JobExtendedStatistics { - successful_padding: L1BatchNumber(limits.successful_limit as u32 - 1), - queued_padding: L1BatchNumber(limits.queued_limit as u32 + 1), - queued_padding_len: (limits.max_block - limits.queued_limit) as u32, - active_area, - }) - } - } - - pub async fn get_jobs( - &mut self, - opts: GetProverJobsParams, - ) -> Result, sqlx::Error> { - let statuses = opts - .statuses - .map(|ss| { - { - // Until statuses are enums - let whitelist = ["queued", "in_progress", "successful", "failed"]; - if !ss.iter().all(|x| whitelist.contains(&x.as_str())) { - panic!("Forbidden value in statuses list.") - } - } - - format!( - "AND status IN ({})", - ss.iter() - .map(|x| format!("'{}'", x)) - .collect::>() - .join(",") - ) - }) - .unwrap_or_default(); - - let block_range = opts - .blocks - .as_ref() - .map(|range| { - format!( - "AND l1_batch_number >= {} - AND l1_batch_number <= {}", - range.start.0, range.end.0 - ) - }) - .unwrap_or_default(); - - let round = opts - .round - .map(|round| format!("AND aggregation_round = {}", round as u32)) - .unwrap_or_default(); - - let order = match opts.desc { - true => "DESC", - false => "ASC", - }; - - let limit = opts - .limit - .map(|limit| format!("LIMIT {}", limit)) - .unwrap_or_default(); - - let sql = format!( - r#" - SELECT - id, - circuit_type, - l1_batch_number, - status, - aggregation_round, - sequence_number, - length(prover_input) as input_length, - attempts, - created_at, - updated_at, - processing_started_at, - time_taken, - error - FROM prover_jobs - WHERE 1 = 1 -- Where clause can't be empty - {statuses} - {block_range} - {round} - ORDER BY "id" {order} - {limit} - "# - ); - - let query = sqlx::query_as(&sql); - - Ok(query - .fetch_all(self.storage.conn()) - .await? - .into_iter() - .map(|x: StorageProverJobInfo| x.into()) - .collect::>()) - } - - pub async fn get_prover_job_by_id( - &mut self, - job_id: u32, - ) -> Result, Error> { - { - let row = sqlx::query!( - r#" - SELECT - * - FROM - prover_jobs - WHERE - id = $1 - "#, - job_id as i64 - ) - .fetch_optional(self.storage.conn()) - .await?; - - Ok(row.map(|row| ProverJobMetadata { - id: row.id as u32, - block_number: L1BatchNumber(row.l1_batch_number as u32), - circuit_type: row.circuit_type, - aggregation_round: AggregationRound::try_from(row.aggregation_round).unwrap(), - sequence_number: row.sequence_number as usize, - })) - } - } - - pub async fn get_circuit_input_blob_urls_to_be_cleaned( - &mut self, - limit: u8, - ) -> Vec<(i64, String)> { - { - let job_ids = sqlx::query!( - r#" - SELECT - id, - circuit_input_blob_url - FROM - prover_jobs - WHERE - status = 'successful' - AND circuit_input_blob_url IS NOT NULL - AND updated_at < NOW() - INTERVAL '30 days' - LIMIT - $1; - "#, - limit as i32 - ) - .fetch_all(self.storage.conn()) - .await - .unwrap(); - job_ids - .into_iter() - .map(|row| (row.id, row.circuit_input_blob_url.unwrap())) - .collect() - } - } - - pub async fn update_status(&mut self, id: u32, status: &str) { - { - sqlx::query!( - r#" - UPDATE prover_jobs - SET - status = $1, - updated_at = NOW() - WHERE - id = $2 - "#, - status, - id as i64, - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - } -} - -pub struct GetProverJobsParams { - pub statuses: Option>, - pub blocks: Option>, - pub limit: Option, - pub desc: bool, - pub round: Option, -} - -impl GetProverJobsParams { - pub fn blocks(range: Range) -> GetProverJobsParams { - GetProverJobsParams { - blocks: Some(range), - statuses: None, - limit: None, - desc: false, - round: None, - } - } -} - -#[derive(Debug)] -pub struct StuckProverJobs { - pub id: u64, - pub status: String, - pub attempts: u64, -} diff --git a/core/lib/dal/src/tests/mod.rs b/core/lib/dal/src/tests/mod.rs index 6b8ae6090f9c..7a4a85b5edb3 100644 --- a/core/lib/dal/src/tests/mod.rs +++ b/core/lib/dal/src/tests/mod.rs @@ -2,22 +2,20 @@ use std::time::Duration; use zksync_contracts::BaseSystemContractsHashes; use zksync_types::{ - block::{L1BatchHeader, MiniblockHasher, MiniblockHeader}, + block::{MiniblockHasher, MiniblockHeader}, fee::{Fee, TransactionExecutionMetrics}, helpers::unix_timestamp_ms, l1::{L1Tx, OpProcessingType, PriorityQueueType}, l2::L2Tx, - proofs::AggregationRound, tx::{tx_execution_info::TxExecutionStatus, ExecutionMetrics, TransactionExecutionResult}, - Address, Execute, L1BatchNumber, L1BlockNumber, L1TxCommonData, L2ChainId, MiniblockNumber, - PriorityOpId, ProtocolVersion, ProtocolVersionId, H160, H256, MAX_GAS_PER_PUBDATA_BYTE, U256, + Address, Execute, L1BlockNumber, L1TxCommonData, L2ChainId, MiniblockNumber, PriorityOpId, + ProtocolVersionId, H160, H256, MAX_GAS_PER_PUBDATA_BYTE, U256, }; use crate::{ blocks_dal::BlocksDal, connection::ConnectionPool, protocol_versions_dal::ProtocolVersionsDal, - prover_dal::{GetProverJobsParams, ProverDal}, transactions_dal::{L2TxSubmissionResult, TransactionsDal}, transactions_web3_dal::TransactionsWeb3Dal, }; @@ -256,144 +254,3 @@ async fn remove_stuck_txs() { .unwrap() .unwrap(); } - -fn create_circuits() -> Vec<(&'static str, String)> { - vec![ - ("Main VM", "1_0_Main VM_BasicCircuits.bin".to_owned()), - ("SHA256", "1_1_SHA256_BasicCircuits.bin".to_owned()), - ( - "Code decommitter", - "1_2_Code decommitter_BasicCircuits.bin".to_owned(), - ), - ( - "Log demuxer", - "1_3_Log demuxer_BasicCircuits.bin".to_owned(), - ), - ] -} - -#[tokio::test] -async fn test_duplicate_insert_prover_jobs() { - let connection_pool = ConnectionPool::test_pool().await; - let storage = &mut connection_pool.access_storage().await.unwrap(); - storage - .protocol_versions_dal() - .save_protocol_version_with_tx(Default::default()) - .await; - storage - .protocol_versions_dal() - .save_prover_protocol_version(Default::default()) - .await; - let block_number = 1; - let header = L1BatchHeader::new( - L1BatchNumber(block_number), - 0, - Default::default(), - Default::default(), - Default::default(), - ); - storage - .blocks_dal() - .insert_l1_batch(&header, &[], Default::default(), &[], &[]) - .await - .unwrap(); - - let mut prover_dal = ProverDal { storage }; - let circuits = create_circuits(); - let l1_batch_number = L1BatchNumber(block_number); - prover_dal - .insert_prover_jobs( - l1_batch_number, - circuits.clone(), - AggregationRound::BasicCircuits, - ProtocolVersionId::latest() as i32, - ) - .await; - - // try inserting the same jobs again to ensure it does not panic - prover_dal - .insert_prover_jobs( - l1_batch_number, - circuits.clone(), - AggregationRound::BasicCircuits, - ProtocolVersionId::latest() as i32, - ) - .await; - - let prover_jobs_params = GetProverJobsParams { - statuses: None, - blocks: Some(std::ops::Range { - start: l1_batch_number, - end: l1_batch_number + 1, - }), - limit: None, - desc: false, - round: None, - }; - let jobs = prover_dal.get_jobs(prover_jobs_params).await.unwrap(); - assert_eq!(circuits.len(), jobs.len()); -} - -#[tokio::test] -async fn test_requeue_prover_jobs() { - let connection_pool = ConnectionPool::test_pool().await; - let storage = &mut connection_pool.access_storage().await.unwrap(); - let protocol_version = ProtocolVersion::default(); - storage - .protocol_versions_dal() - .save_protocol_version_with_tx(protocol_version) - .await; - storage - .protocol_versions_dal() - .save_prover_protocol_version(Default::default()) - .await; - let block_number = 1; - let header = L1BatchHeader::new( - L1BatchNumber(block_number), - 0, - Default::default(), - Default::default(), - ProtocolVersionId::latest(), - ); - storage - .blocks_dal() - .insert_l1_batch(&header, &[], Default::default(), &[], &[]) - .await - .unwrap(); - - let mut prover_dal = ProverDal { storage }; - let circuits = create_circuits(); - let l1_batch_number = L1BatchNumber(block_number); - prover_dal - .insert_prover_jobs( - l1_batch_number, - circuits, - AggregationRound::BasicCircuits, - ProtocolVersionId::latest() as i32, - ) - .await; - - // take all jobs from prover_job table - for _ in 1..=4 { - let job = prover_dal - .get_next_prover_job(&[ProtocolVersionId::latest()]) - .await; - assert!(job.is_some()); - } - let job = prover_dal - .get_next_prover_job(&[ProtocolVersionId::latest()]) - .await; - assert!(job.is_none()); - // re-queue jobs - let stuck_jobs = prover_dal - .requeue_stuck_jobs(Duration::from_secs(0), 10) - .await; - assert_eq!(4, stuck_jobs.len()); - // re-check that all jobs can be taken again - for _ in 1..=4 { - let job = prover_dal - .get_next_prover_job(&[ProtocolVersionId::latest()]) - .await; - assert!(job.is_some()); - } -} diff --git a/core/lib/env_config/src/fri_prover.rs b/core/lib/env_config/src/fri_prover.rs index 200f22d89b7e..7b97df50374b 100644 --- a/core/lib/env_config/src/fri_prover.rs +++ b/core/lib/env_config/src/fri_prover.rs @@ -30,6 +30,8 @@ mod tests { witness_vector_generator_thread_count: Some(5), queue_capacity: 10, witness_vector_receiver_port: 3316, + zone_read_url: "http://metadata.google.internal/computeMetadata/v1/instance/zone" + .to_string(), shall_save_to_public_bucket: true, } } @@ -49,6 +51,7 @@ mod tests { FRI_PROVER_WITNESS_VECTOR_GENERATOR_THREAD_COUNT="5" FRI_PROVER_QUEUE_CAPACITY="10" FRI_PROVER_WITNESS_VECTOR_RECEIVER_PORT="3316" + FRI_PROVER_ZONE_READ_URL="http://metadata.google.internal/computeMetadata/v1/instance/zone" FRI_PROVER_SHALL_SAVE_TO_PUBLIC_BUCKET=true "#; lock.set_env(config); diff --git a/core/lib/env_config/src/lib.rs b/core/lib/env_config/src/lib.rs index 48f55e51e7c6..fa2bb2371917 100644 --- a/core/lib/env_config/src/lib.rs +++ b/core/lib/env_config/src/lib.rs @@ -19,8 +19,6 @@ mod fri_witness_vector_generator; mod house_keeper; pub mod object_store; mod proof_data_handler; -mod prover; -mod prover_group; mod snapshots_creator; mod utils; mod witness_generator; diff --git a/core/lib/env_config/src/prover.rs b/core/lib/env_config/src/prover.rs deleted file mode 100644 index 700f0fffb96a..000000000000 --- a/core/lib/env_config/src/prover.rs +++ /dev/null @@ -1,197 +0,0 @@ -use zksync_config::ProverConfigs; - -use crate::{envy_load, FromEnv}; - -impl FromEnv for ProverConfigs { - fn from_env() -> anyhow::Result { - Ok(Self { - non_gpu: envy_load("non_gpu", "PROVER_NON_GPU_")?, - two_gpu_forty_gb_mem: envy_load( - "two_gpu_forty_gb_mem", - "PROVER_TWO_GPU_FORTY_GB_MEM_", - )?, - one_gpu_eighty_gb_mem: envy_load( - "one_gpu_eighty_gb_mem", - "PROVER_ONE_GPU_EIGHTY_GB_MEM_", - )?, - two_gpu_eighty_gb_mem: envy_load( - "two_gpu_eighty_gb_mem", - "PROVER_TWO_GPU_EIGHTY_GB_MEM_", - )?, - four_gpu_eighty_gb_mem: envy_load( - "four_gpu_eighty_gb_mem", - "PROVER_FOUR_GPU_EIGHTY_GB_MEM_", - )?, - }) - } -} - -#[cfg(test)] -mod tests { - use zksync_config::ProverConfig; - - use super::*; - use crate::test_utils::EnvMutex; - - static MUTEX: EnvMutex = EnvMutex::new(); - - fn expected_config() -> ProverConfigs { - ProverConfigs { - non_gpu: ProverConfig { - prometheus_port: 3313, - initial_setup_key_path: "key".to_owned(), - key_download_url: "value".to_owned(), - generation_timeout_in_secs: 2700u16, - number_of_threads: 2, - max_attempts: 4, - polling_duration_in_millis: 5, - setup_keys_path: "/usr/src/setup-keys".to_string(), - specialized_prover_group_id: 0, - number_of_setup_slots: 2, - assembly_receiver_port: 17791, - assembly_receiver_poll_time_in_millis: 250, - assembly_queue_capacity: 5, - }, - two_gpu_forty_gb_mem: ProverConfig { - prometheus_port: 3313, - initial_setup_key_path: "key".to_owned(), - key_download_url: "value".to_owned(), - generation_timeout_in_secs: 2700u16, - number_of_threads: 2, - max_attempts: 4, - polling_duration_in_millis: 5, - setup_keys_path: "/usr/src/setup-keys".to_string(), - specialized_prover_group_id: 1, - number_of_setup_slots: 5, - assembly_receiver_port: 17791, - assembly_receiver_poll_time_in_millis: 250, - assembly_queue_capacity: 5, - }, - one_gpu_eighty_gb_mem: ProverConfig { - prometheus_port: 3313, - initial_setup_key_path: "key".to_owned(), - key_download_url: "value".to_owned(), - generation_timeout_in_secs: 2700u16, - number_of_threads: 4, - max_attempts: 4, - polling_duration_in_millis: 5, - setup_keys_path: "/usr/src/setup-keys".to_string(), - specialized_prover_group_id: 2, - number_of_setup_slots: 5, - assembly_receiver_port: 17791, - assembly_receiver_poll_time_in_millis: 250, - assembly_queue_capacity: 5, - }, - two_gpu_eighty_gb_mem: ProverConfig { - prometheus_port: 3313, - initial_setup_key_path: "key".to_owned(), - key_download_url: "value".to_owned(), - generation_timeout_in_secs: 2700u16, - number_of_threads: 9, - max_attempts: 4, - polling_duration_in_millis: 5, - setup_keys_path: "/usr/src/setup-keys".to_string(), - specialized_prover_group_id: 3, - number_of_setup_slots: 9, - assembly_receiver_port: 17791, - assembly_receiver_poll_time_in_millis: 250, - assembly_queue_capacity: 5, - }, - four_gpu_eighty_gb_mem: ProverConfig { - prometheus_port: 3313, - initial_setup_key_path: "key".to_owned(), - key_download_url: "value".to_owned(), - generation_timeout_in_secs: 2700u16, - number_of_threads: 18, - max_attempts: 4, - polling_duration_in_millis: 5, - setup_keys_path: "/usr/src/setup-keys".to_string(), - specialized_prover_group_id: 4, - number_of_setup_slots: 18, - assembly_receiver_port: 17791, - assembly_receiver_poll_time_in_millis: 250, - assembly_queue_capacity: 5, - }, - } - } - - const CONFIG: &str = r#" - PROVER_NON_GPU_PROMETHEUS_PORT="3313" - PROVER_NON_GPU_INITIAL_SETUP_KEY_PATH="key" - PROVER_NON_GPU_KEY_DOWNLOAD_URL="value" - PROVER_NON_GPU_GENERATION_TIMEOUT_IN_SECS=2700 - PROVER_NON_GPU_NUMBER_OF_THREADS="2" - PROVER_NON_GPU_MAX_ATTEMPTS="4" - PROVER_NON_GPU_POLLING_DURATION_IN_MILLIS=5 - PROVER_NON_GPU_SETUP_KEYS_PATH="/usr/src/setup-keys" - PROVER_NON_GPU_NUMBER_OF_SETUP_SLOTS=2 - PROVER_NON_GPU_ASSEMBLY_RECEIVER_PORT=17791 - PROVER_NON_GPU_ASSEMBLY_RECEIVER_POLL_TIME_IN_MILLIS=250 - PROVER_NON_GPU_ASSEMBLY_QUEUE_CAPACITY=5 - PROVER_NON_GPU_SPECIALIZED_PROVER_GROUP_ID=0 - - PROVER_TWO_GPU_FORTY_GB_MEM_PROMETHEUS_PORT="3313" - PROVER_TWO_GPU_FORTY_GB_MEM_INITIAL_SETUP_KEY_PATH="key" - PROVER_TWO_GPU_FORTY_GB_MEM_KEY_DOWNLOAD_URL="value" - PROVER_TWO_GPU_FORTY_GB_MEM_GENERATION_TIMEOUT_IN_SECS=2700 - PROVER_TWO_GPU_FORTY_GB_MEM_NUMBER_OF_THREADS="2" - PROVER_TWO_GPU_FORTY_GB_MEM_MAX_ATTEMPTS="4" - PROVER_TWO_GPU_FORTY_GB_MEM_POLLING_DURATION_IN_MILLIS=5 - PROVER_TWO_GPU_FORTY_GB_MEM_SETUP_KEYS_PATH="/usr/src/setup-keys" - PROVER_TWO_GPU_FORTY_GB_MEM_NUMBER_OF_SETUP_SLOTS=5 - PROVER_TWO_GPU_FORTY_GB_MEM_ASSEMBLY_RECEIVER_PORT=17791 - PROVER_TWO_GPU_FORTY_GB_MEM_ASSEMBLY_RECEIVER_POLL_TIME_IN_MILLIS=250 - PROVER_TWO_GPU_FORTY_GB_MEM_ASSEMBLY_QUEUE_CAPACITY=5 - PROVER_TWO_GPU_FORTY_GB_MEM_SPECIALIZED_PROVER_GROUP_ID=1 - - PROVER_ONE_GPU_EIGHTY_GB_MEM_PROMETHEUS_PORT="3313" - PROVER_ONE_GPU_EIGHTY_GB_MEM_INITIAL_SETUP_KEY_PATH="key" - PROVER_ONE_GPU_EIGHTY_GB_MEM_KEY_DOWNLOAD_URL="value" - PROVER_ONE_GPU_EIGHTY_GB_MEM_GENERATION_TIMEOUT_IN_SECS=2700 - PROVER_ONE_GPU_EIGHTY_GB_MEM_NUMBER_OF_THREADS="4" - PROVER_ONE_GPU_EIGHTY_GB_MEM_MAX_ATTEMPTS="4" - PROVER_ONE_GPU_EIGHTY_GB_MEM_POLLING_DURATION_IN_MILLIS=5 - PROVER_ONE_GPU_EIGHTY_GB_MEM_SETUP_KEYS_PATH="/usr/src/setup-keys" - PROVER_ONE_GPU_EIGHTY_GB_MEM_NUMBER_OF_SETUP_SLOTS=5 - PROVER_ONE_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_PORT=17791 - PROVER_ONE_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_POLL_TIME_IN_MILLIS=250 - PROVER_ONE_GPU_EIGHTY_GB_MEM_ASSEMBLY_QUEUE_CAPACITY=5 - PROVER_ONE_GPU_EIGHTY_GB_MEM_SPECIALIZED_PROVER_GROUP_ID=2 - - PROVER_TWO_GPU_EIGHTY_GB_MEM_PROMETHEUS_PORT="3313" - PROVER_TWO_GPU_EIGHTY_GB_MEM_INITIAL_SETUP_KEY_PATH="key" - PROVER_TWO_GPU_EIGHTY_GB_MEM_KEY_DOWNLOAD_URL="value" - PROVER_TWO_GPU_EIGHTY_GB_MEM_GENERATION_TIMEOUT_IN_SECS=2700 - PROVER_TWO_GPU_EIGHTY_GB_MEM_NUMBER_OF_THREADS="9" - PROVER_TWO_GPU_EIGHTY_GB_MEM_MAX_ATTEMPTS="4" - PROVER_TWO_GPU_EIGHTY_GB_MEM_POLLING_DURATION_IN_MILLIS=5 - PROVER_TWO_GPU_EIGHTY_GB_MEM_SETUP_KEYS_PATH="/usr/src/setup-keys" - PROVER_TWO_GPU_EIGHTY_GB_MEM_NUMBER_OF_SETUP_SLOTS=9 - PROVER_TWO_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_PORT=17791 - PROVER_TWO_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_POLL_TIME_IN_MILLIS=250 - PROVER_TWO_GPU_EIGHTY_GB_MEM_ASSEMBLY_QUEUE_CAPACITY=5 - PROVER_TWO_GPU_EIGHTY_GB_MEM_SPECIALIZED_PROVER_GROUP_ID=3 - - PROVER_FOUR_GPU_EIGHTY_GB_MEM_PROMETHEUS_PORT="3313" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_INITIAL_SETUP_KEY_PATH="key" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_KEY_DOWNLOAD_URL="value" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_GENERATION_TIMEOUT_IN_SECS=2700 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_NUMBER_OF_THREADS="18" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_MAX_ATTEMPTS="4" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_POLLING_DURATION_IN_MILLIS=5 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_SETUP_KEYS_PATH="/usr/src/setup-keys" - PROVER_FOUR_GPU_EIGHTY_GB_MEM_NUMBER_OF_SETUP_SLOTS=18 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_PORT=17791 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_ASSEMBLY_RECEIVER_POLL_TIME_IN_MILLIS=250 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_ASSEMBLY_QUEUE_CAPACITY=5 - PROVER_FOUR_GPU_EIGHTY_GB_MEM_SPECIALIZED_PROVER_GROUP_ID=4 - "#; - - #[test] - fn from_env() { - let mut lock = MUTEX.lock(); - lock.set_env(CONFIG); - let actual = ProverConfigs::from_env().unwrap(); - assert_eq!(actual, expected_config()); - } -} diff --git a/core/lib/env_config/src/prover_group.rs b/core/lib/env_config/src/prover_group.rs deleted file mode 100644 index bdac82cbb9cc..000000000000 --- a/core/lib/env_config/src/prover_group.rs +++ /dev/null @@ -1,149 +0,0 @@ -use zksync_config::configs::ProverGroupConfig; - -use crate::{envy_load, FromEnv}; - -impl FromEnv for ProverGroupConfig { - fn from_env() -> anyhow::Result { - envy_load("prover_group", "PROVER_GROUP_") - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::test_utils::EnvMutex; - - static MUTEX: EnvMutex = EnvMutex::new(); - - fn expected_config() -> ProverGroupConfig { - ProverGroupConfig { - group_0_circuit_ids: vec![0, 18], - group_1_circuit_ids: vec![1, 4], - group_2_circuit_ids: vec![2, 5], - group_3_circuit_ids: vec![6, 7], - group_4_circuit_ids: vec![8, 9], - group_5_circuit_ids: vec![10, 11], - group_6_circuit_ids: vec![12, 13], - group_7_circuit_ids: vec![14, 15], - group_8_circuit_ids: vec![16, 17], - group_9_circuit_ids: vec![3], - region_read_url: "http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location".to_string(), - region_override: Some("us-central-1".to_string()), - zone_read_url: "http://metadata.google.internal/computeMetadata/v1/instance/zone".to_string(), - zone_override: Some("us-central-1-b".to_string()), - synthesizer_per_gpu: 10, - } - } - - const CONFIG: &str = r#" - PROVER_GROUP_GROUP_0_CIRCUIT_IDS="0,18" - PROVER_GROUP_GROUP_1_CIRCUIT_IDS="1,4" - PROVER_GROUP_GROUP_2_CIRCUIT_IDS="2,5" - PROVER_GROUP_GROUP_3_CIRCUIT_IDS="6,7" - PROVER_GROUP_GROUP_4_CIRCUIT_IDS="8,9" - PROVER_GROUP_GROUP_5_CIRCUIT_IDS="10,11" - PROVER_GROUP_GROUP_6_CIRCUIT_IDS="12,13" - PROVER_GROUP_GROUP_7_CIRCUIT_IDS="14,15" - PROVER_GROUP_GROUP_8_CIRCUIT_IDS="16,17" - PROVER_GROUP_GROUP_9_CIRCUIT_IDS="3" - PROVER_GROUP_REGION_READ_URL="http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location" - PROVER_GROUP_REGION_OVERRIDE="us-central-1" - PROVER_GROUP_ZONE_READ_URL="http://metadata.google.internal/computeMetadata/v1/instance/zone" - PROVER_GROUP_ZONE_OVERRIDE="us-central-1-b" - PROVER_GROUP_SYNTHESIZER_PER_GPU="10" - "#; - - #[test] - fn from_env() { - let mut lock = MUTEX.lock(); - lock.set_env(CONFIG); - let actual = ProverGroupConfig::from_env().unwrap(); - assert_eq!(actual, expected_config()); - } - - #[test] - fn get_group_id_for_circuit_id() { - let prover_group_config = expected_config(); - - assert_eq!(Some(0), prover_group_config.get_group_id_for_circuit_id(0)); - assert_eq!(Some(0), prover_group_config.get_group_id_for_circuit_id(18)); - - assert_eq!(Some(1), prover_group_config.get_group_id_for_circuit_id(1)); - assert_eq!(Some(1), prover_group_config.get_group_id_for_circuit_id(4)); - - assert_eq!(Some(2), prover_group_config.get_group_id_for_circuit_id(2)); - assert_eq!(Some(2), prover_group_config.get_group_id_for_circuit_id(5)); - - assert_eq!(Some(3), prover_group_config.get_group_id_for_circuit_id(6)); - assert_eq!(Some(3), prover_group_config.get_group_id_for_circuit_id(7)); - - assert_eq!(Some(4), prover_group_config.get_group_id_for_circuit_id(8)); - assert_eq!(Some(4), prover_group_config.get_group_id_for_circuit_id(9)); - - assert_eq!(Some(5), prover_group_config.get_group_id_for_circuit_id(10)); - assert_eq!(Some(5), prover_group_config.get_group_id_for_circuit_id(11)); - - assert_eq!(Some(6), prover_group_config.get_group_id_for_circuit_id(12)); - assert_eq!(Some(6), prover_group_config.get_group_id_for_circuit_id(13)); - - assert_eq!(Some(7), prover_group_config.get_group_id_for_circuit_id(14)); - assert_eq!(Some(7), prover_group_config.get_group_id_for_circuit_id(15)); - - assert_eq!(Some(8), prover_group_config.get_group_id_for_circuit_id(16)); - assert_eq!(Some(8), prover_group_config.get_group_id_for_circuit_id(17)); - - assert_eq!(Some(9), prover_group_config.get_group_id_for_circuit_id(3)); - assert!(prover_group_config - .get_group_id_for_circuit_id(19) - .is_none()); - } - - #[test] - fn get_circuit_ids_for_group_id() { - let prover_group_config = expected_config(); - - assert_eq!( - Some(vec![0, 18]), - prover_group_config.get_circuit_ids_for_group_id(0) - ); - assert_eq!( - Some(vec![1, 4]), - prover_group_config.get_circuit_ids_for_group_id(1) - ); - assert_eq!( - Some(vec![2, 5]), - prover_group_config.get_circuit_ids_for_group_id(2) - ); - assert_eq!( - Some(vec![6, 7]), - prover_group_config.get_circuit_ids_for_group_id(3) - ); - assert_eq!( - Some(vec![8, 9]), - prover_group_config.get_circuit_ids_for_group_id(4) - ); - assert_eq!( - Some(vec![10, 11]), - prover_group_config.get_circuit_ids_for_group_id(5) - ); - assert_eq!( - Some(vec![12, 13]), - prover_group_config.get_circuit_ids_for_group_id(6) - ); - assert_eq!( - Some(vec![14, 15]), - prover_group_config.get_circuit_ids_for_group_id(7) - ); - assert_eq!( - Some(vec![16, 17]), - prover_group_config.get_circuit_ids_for_group_id(8) - ); - assert_eq!( - Some(vec![3]), - prover_group_config.get_circuit_ids_for_group_id(9) - ); - assert!(prover_group_config - .get_circuit_ids_for_group_id(10) - .is_none()); - } -} diff --git a/core/lib/prover_utils/src/region_fetcher.rs b/core/lib/prover_utils/src/region_fetcher.rs index d2c49dd068dc..fceedd287245 100644 --- a/core/lib/prover_utils/src/region_fetcher.rs +++ b/core/lib/prover_utils/src/region_fetcher.rs @@ -4,23 +4,10 @@ use reqwest::{ header::{HeaderMap, HeaderValue}, Method, }; -use zksync_config::configs::ProverGroupConfig; use zksync_utils::http_with_retries::send_request_with_retries; -pub async fn get_region(prover_group_config: &ProverGroupConfig) -> anyhow::Result { - if let Some(region) = &prover_group_config.region_override { - return Ok(region.clone()); - } - let url = &prover_group_config.region_read_url; - fetch_from_url(url).await.context("fetch_from_url()") -} - -pub async fn get_zone(prover_group_config: &ProverGroupConfig) -> anyhow::Result { - if let Some(zone) = &prover_group_config.zone_override { - return Ok(zone.clone()); - } - let url = &prover_group_config.zone_read_url; - let data = fetch_from_url(url).await.context("fetch_from_url()")?; +pub async fn get_zone(zone_url: &str) -> anyhow::Result { + let data = fetch_from_url(zone_url).await.context("fetch_from_url()")?; parse_zone(&data).context("parse_zone") } @@ -47,9 +34,7 @@ fn parse_zone(data: &str) -> anyhow::Result { #[cfg(test)] mod tests { - use zksync_config::configs::ProverGroupConfig; - - use crate::region_fetcher::{get_region, get_zone, parse_zone}; + use crate::region_fetcher::parse_zone; #[test] fn test_parse_zone() { @@ -63,49 +48,4 @@ mod tests { let data = "invalid data"; assert!(parse_zone(data).is_err()); } - - #[tokio::test] - async fn test_get_region_with_override() { - let config = ProverGroupConfig { - group_0_circuit_ids: vec![], - group_1_circuit_ids: vec![], - group_2_circuit_ids: vec![], - group_3_circuit_ids: vec![], - group_4_circuit_ids: vec![], - group_5_circuit_ids: vec![], - group_6_circuit_ids: vec![], - group_7_circuit_ids: vec![], - group_8_circuit_ids: vec![], - group_9_circuit_ids: vec![], - region_override: Some("us-central-1".to_string()), - region_read_url: "".to_string(), - zone_override: Some("us-central-1-b".to_string()), - zone_read_url: "".to_string(), - synthesizer_per_gpu: 0, - }; - - assert_eq!("us-central-1", get_region(&config).await.unwrap()); - } - - #[tokio::test] - async fn test_get_zone_with_override() { - let config = ProverGroupConfig { - group_0_circuit_ids: vec![], - group_1_circuit_ids: vec![], - group_2_circuit_ids: vec![], - group_3_circuit_ids: vec![], - group_4_circuit_ids: vec![], - group_5_circuit_ids: vec![], - group_6_circuit_ids: vec![], - group_7_circuit_ids: vec![], - group_8_circuit_ids: vec![], - group_9_circuit_ids: vec![], - region_override: Some("us-central-1".to_string()), - region_read_url: "".to_string(), - zone_override: Some("us-central-1-b".to_string()), - zone_read_url: "".to_string(), - synthesizer_per_gpu: 0, - }; - assert_eq!("us-central-1-b", get_zone(&config).await.unwrap()); - } } diff --git a/core/lib/zksync_core/Cargo.toml b/core/lib/zksync_core/Cargo.toml index ce89e099397a..64c279ae0cf5 100644 --- a/core/lib/zksync_core/Cargo.toml +++ b/core/lib/zksync_core/Cargo.toml @@ -28,7 +28,6 @@ zksync_circuit_breaker = { path = "../circuit_breaker" } zksync_storage = { path = "../storage" } zksync_merkle_tree = { path = "../merkle_tree" } zksync_mini_merkle_tree = { path = "../mini_merkle_tree" } -zksync_verification_key_generator_and_server = { path = "../../bin/verification_key_generator_and_server" } prometheus_exporter = { path = "../prometheus_exporter" } zksync_web3_decl = { path = "../web3_decl", default-features = false, features = [ "server", diff --git a/core/lib/zksync_core/src/house_keeper/gpu_prover_queue_monitor.rs b/core/lib/zksync_core/src/house_keeper/gpu_prover_queue_monitor.rs deleted file mode 100644 index ab96b52bedc9..000000000000 --- a/core/lib/zksync_core/src/house_keeper/gpu_prover_queue_monitor.rs +++ /dev/null @@ -1,66 +0,0 @@ -use async_trait::async_trait; -use zksync_dal::ConnectionPool; -use zksync_prover_utils::periodic_job::PeriodicJob; - -#[derive(Debug)] -pub struct GpuProverQueueMonitor { - synthesizer_per_gpu: u16, - reporting_interval_ms: u64, - prover_connection_pool: ConnectionPool, -} - -impl GpuProverQueueMonitor { - pub fn new( - synthesizer_per_gpu: u16, - reporting_interval_ms: u64, - prover_connection_pool: ConnectionPool, - ) -> Self { - Self { - synthesizer_per_gpu, - reporting_interval_ms, - prover_connection_pool, - } - } -} - -/// Invoked periodically to push prover job statistics to Prometheus -/// Note: these values will be used for auto-scaling circuit-synthesizer -#[async_trait] -impl PeriodicJob for GpuProverQueueMonitor { - const SERVICE_NAME: &'static str = "GpuProverQueueMonitor"; - - async fn run_routine_task(&mut self) -> anyhow::Result<()> { - let prover_gpu_count_per_region_zone = self - .prover_connection_pool - .access_storage() - .await - .unwrap() - .gpu_prover_queue_dal() - .get_prover_gpu_count_per_region_zone() - .await; - - for ((region, zone), num_gpu) in prover_gpu_count_per_region_zone { - let synthesizers = self.synthesizer_per_gpu as u64 * num_gpu; - if synthesizers > 0 { - tracing::info!( - "Would be spawning {} circuit synthesizers in region {} zone {}", - synthesizers, - region, - zone - ); - } - metrics::gauge!( - "server.circuit_synthesizer.jobs", - synthesizers as f64, - "region" => region, - "zone" => zone, - "type" => "queued" - ); - } - Ok(()) - } - - fn polling_interval_ms(&self) -> u64 { - self.reporting_interval_ms - } -} diff --git a/core/lib/zksync_core/src/house_keeper/mod.rs b/core/lib/zksync_core/src/house_keeper/mod.rs index b4a5a3047321..fbf59642d356 100644 --- a/core/lib/zksync_core/src/house_keeper/mod.rs +++ b/core/lib/zksync_core/src/house_keeper/mod.rs @@ -6,7 +6,4 @@ pub mod fri_prover_queue_monitor; pub mod fri_scheduler_circuit_queuer; pub mod fri_witness_generator_jobs_retry_manager; pub mod fri_witness_generator_queue_monitor; -pub mod gpu_prover_queue_monitor; -pub mod prover_job_retry_manager; -pub mod prover_queue_monitor; pub mod waiting_to_queued_fri_witness_job_mover; diff --git a/core/lib/zksync_core/src/house_keeper/prover_job_retry_manager.rs b/core/lib/zksync_core/src/house_keeper/prover_job_retry_manager.rs deleted file mode 100644 index f7b630475ea0..000000000000 --- a/core/lib/zksync_core/src/house_keeper/prover_job_retry_manager.rs +++ /dev/null @@ -1,56 +0,0 @@ -use std::time::Duration; - -use async_trait::async_trait; -use zksync_dal::ConnectionPool; -use zksync_prover_utils::periodic_job::PeriodicJob; - -#[derive(Debug)] -pub struct ProverJobRetryManager { - max_attempts: u32, - processing_timeout: Duration, - retry_interval_ms: u64, - prover_connection_pool: ConnectionPool, -} - -impl ProverJobRetryManager { - pub fn new( - max_attempts: u32, - processing_timeout: Duration, - retry_interval_ms: u64, - prover_connection_pool: ConnectionPool, - ) -> Self { - Self { - max_attempts, - processing_timeout, - retry_interval_ms, - prover_connection_pool, - } - } -} - -/// Invoked periodically to re-queue stuck prover jobs. -#[async_trait] -impl PeriodicJob for ProverJobRetryManager { - const SERVICE_NAME: &'static str = "ProverJobRetryManager"; - - async fn run_routine_task(&mut self) -> anyhow::Result<()> { - let stuck_jobs = self - .prover_connection_pool - .access_storage() - .await - .unwrap() - .prover_dal() - .requeue_stuck_jobs(self.processing_timeout, self.max_attempts) - .await; - let job_len = stuck_jobs.len(); - for stuck_job in stuck_jobs { - tracing::info!("re-queuing prover job {:?}", stuck_job); - } - metrics::counter!("server.prover.requeued_jobs", job_len as u64); - Ok(()) - } - - fn polling_interval_ms(&self) -> u64 { - self.retry_interval_ms - } -} diff --git a/core/lib/zksync_core/src/house_keeper/prover_queue_monitor.rs b/core/lib/zksync_core/src/house_keeper/prover_queue_monitor.rs deleted file mode 100644 index e0f598d5a590..000000000000 --- a/core/lib/zksync_core/src/house_keeper/prover_queue_monitor.rs +++ /dev/null @@ -1,82 +0,0 @@ -use async_trait::async_trait; -use zksync_config::configs::ProverGroupConfig; -use zksync_dal::ConnectionPool; -use zksync_prover_utils::{circuit_name_to_numeric_index, periodic_job::PeriodicJob}; - -#[derive(Debug)] -pub struct ProverStatsReporter { - reporting_interval_ms: u64, - prover_connection_pool: ConnectionPool, - config: ProverGroupConfig, -} - -impl ProverStatsReporter { - pub fn new( - reporting_interval_ms: u64, - prover_connection_pool: ConnectionPool, - config: ProverGroupConfig, - ) -> Self { - Self { - reporting_interval_ms, - prover_connection_pool, - config, - } - } -} - -/// Invoked periodically to push job statistics to Prometheus -/// Note: these values will be used for manually scaling provers. -#[async_trait] -impl PeriodicJob for ProverStatsReporter { - const SERVICE_NAME: &'static str = "ProverStatsReporter"; - - async fn run_routine_task(&mut self) -> anyhow::Result<()> { - let mut conn = self.prover_connection_pool.access_storage().await.unwrap(); - let stats = conn.prover_dal().get_prover_jobs_stats_per_circuit().await; - - for (circuit_name, stats) in stats.into_iter() { - let group_id = self - .config - .get_group_id_for_circuit_id(circuit_name_to_numeric_index(&circuit_name).unwrap()) - .unwrap(); - - metrics::gauge!( - "server.prover.jobs", - stats.queued as f64, - "type" => "queued", - "prover_group_id" => group_id.to_string(), - "circuit_name" => circuit_name.clone(), - "circuit_type" => circuit_name_to_numeric_index(&circuit_name).unwrap().to_string() - ); - - metrics::gauge!( - "server.prover.jobs", - stats.in_progress as f64, - "type" => "in_progress", - "prover_group_id" => group_id.to_string(), - "circuit_name" => circuit_name.clone(), - "circuit_type" => circuit_name_to_numeric_index(&circuit_name).unwrap().to_string() - ); - } - - if let Some(min_unproved_l1_batch_number) = - conn.prover_dal().min_unproved_l1_batch_number().await - { - metrics::gauge!("server.block_number", min_unproved_l1_batch_number.0 as f64, "stage" => "circuit_aggregation") - } - - let lag_by_circuit_type = conn - .prover_dal() - .min_unproved_l1_batch_number_by_basic_circuit_type() - .await; - - for (circuit_type, l1_batch_number) in lag_by_circuit_type { - metrics::gauge!("server.block_number", l1_batch_number.0 as f64, "stage" => format!("circuit_{}", circuit_type)); - } - Ok(()) - } - - fn polling_interval_ms(&self) -> u64 { - self.reporting_interval_ms - } -} diff --git a/core/lib/zksync_core/src/house_keeper/waiting_to_queued_witness_job_mover.rs b/core/lib/zksync_core/src/house_keeper/waiting_to_queued_witness_job_mover.rs deleted file mode 100644 index 4521b4bfc47b..000000000000 --- a/core/lib/zksync_core/src/house_keeper/waiting_to_queued_witness_job_mover.rs +++ /dev/null @@ -1,95 +0,0 @@ -use async_trait::async_trait; -use zksync_dal::ConnectionPool; -use zksync_prover_utils::periodic_job::PeriodicJob; - -#[derive(Debug)] -pub struct WaitingToQueuedWitnessJobMover { - job_moving_interval_ms: u64, - prover_connection_pool: ConnectionPool, -} - -impl WaitingToQueuedWitnessJobMover { - pub fn new(job_mover_interval_ms: u64, prover_connection_pool: ConnectionPool) -> Self { - Self { - job_moving_interval_ms: job_mover_interval_ms, - prover_connection_pool, - } - } - - async fn move_jobs(&mut self) { - self.move_leaf_aggregation_jobs().await; - self.move_node_aggregation_jobs().await; - self.move_scheduler_jobs().await; - } - - async fn move_leaf_aggregation_jobs(&mut self) { - let mut conn = self.prover_connection_pool.access_storage().await.unwrap(); - let l1_batch_numbers = conn - .witness_generator_dal() - .move_leaf_aggregation_jobs_from_waiting_to_queued() - .await; - let len = l1_batch_numbers.len(); - for l1_batch_number in l1_batch_numbers { - tracing::info!( - "Marked leaf aggregation job for l1_batch {} as queued", - l1_batch_number - ); - } - metrics::counter!( - "server.leaf_witness_generator.waiting_to_queued_jobs_transitions", - len as u64 - ); - } - - async fn move_node_aggregation_jobs(&mut self) { - let mut conn = self.prover_connection_pool.access_storage().await.unwrap(); - let l1_batch_numbers = conn - .witness_generator_dal() - .move_node_aggregation_jobs_from_waiting_to_queued() - .await; - let len = l1_batch_numbers.len(); - for l1_batch_number in l1_batch_numbers { - tracing::info!( - "Marking node aggregation job for l1_batch {} as queued", - l1_batch_number - ); - } - metrics::counter!( - "server.node_witness_generator.waiting_to_queued_jobs_transitions", - len as u64 - ); - } - - async fn move_scheduler_jobs(&mut self) { - let mut conn = self.prover_connection_pool.access_storage().await.unwrap(); - let l1_batch_numbers = conn - .witness_generator_dal() - .move_scheduler_jobs_from_waiting_to_queued() - .await; - let len = l1_batch_numbers.len(); - for l1_batch_number in l1_batch_numbers { - tracing::info!( - "Marking scheduler aggregation job for l1_batch {} as queued", - l1_batch_number - ); - } - metrics::counter!( - "server.scheduler_witness_generator.waiting_to_queued_jobs_transitions", - len as u64 - ); - } -} - -#[async_trait] -impl PeriodicJob for WaitingToQueuedWitnessJobMover { - const SERVICE_NAME: &'static str = "WaitingToQueuedWitnessJobMover"; - - async fn run_routine_task(&mut self) -> anyhow::Result<()> { - self.move_jobs().await; - Ok(()) - } - - fn polling_interval_ms(&self) -> u64 { - self.job_moving_interval_ms - } -} diff --git a/core/lib/zksync_core/src/house_keeper/witness_generator_queue_monitor.rs b/core/lib/zksync_core/src/house_keeper/witness_generator_queue_monitor.rs deleted file mode 100644 index da816da3c668..000000000000 --- a/core/lib/zksync_core/src/house_keeper/witness_generator_queue_monitor.rs +++ /dev/null @@ -1,121 +0,0 @@ -use std::collections::HashMap; - -use async_trait::async_trait; -use zksync_dal::ConnectionPool; -use zksync_prover_utils::periodic_job::PeriodicJob; -use zksync_types::proofs::{AggregationRound, JobCountStatistics}; - -const WITNESS_GENERATOR_SERVICE_NAME: &str = "witness_generator"; - -#[derive(Debug)] -pub struct WitnessGeneratorStatsReporter { - reporting_interval_ms: u64, - prover_connection_pool: ConnectionPool, -} - -impl WitnessGeneratorStatsReporter { - pub fn new(reporting_interval_ms: u64, prover_connection_pool: ConnectionPool) -> Self { - Self { - reporting_interval_ms, - prover_connection_pool, - } - } - - async fn get_job_statistics( - prover_connection_pool: &ConnectionPool, - ) -> HashMap { - let mut conn = prover_connection_pool.access_storage().await.unwrap(); - HashMap::from([ - ( - AggregationRound::BasicCircuits, - conn.witness_generator_dal() - .get_witness_jobs_stats(AggregationRound::BasicCircuits) - .await, - ), - ( - AggregationRound::LeafAggregation, - conn.witness_generator_dal() - .get_witness_jobs_stats(AggregationRound::LeafAggregation) - .await, - ), - ( - AggregationRound::NodeAggregation, - conn.witness_generator_dal() - .get_witness_jobs_stats(AggregationRound::NodeAggregation) - .await, - ), - ( - AggregationRound::Scheduler, - conn.witness_generator_dal() - .get_witness_jobs_stats(AggregationRound::Scheduler) - .await, - ), - ]) - } -} - -fn emit_metrics_for_round(round: AggregationRound, stats: JobCountStatistics) { - if stats.queued > 0 || stats.in_progress > 0 { - tracing::trace!( - "Found {} free and {} in progress {:?} witness generators jobs", - stats.queued, - stats.in_progress, - round - ); - } - - metrics::gauge!( - format!("server.{}.jobs", WITNESS_GENERATOR_SERVICE_NAME), - stats.queued as f64, - "type" => "queued", - "round" => format!("{:?}", round) - ); - - metrics::gauge!( - format!("server.{}.jobs", WITNESS_GENERATOR_SERVICE_NAME), - stats.in_progress as f64, - "type" => "in_progress", - "round" => format!("{:?}", round) - ); -} - -/// Invoked periodically to push job statistics to Prometheus -/// Note: these values will be used for auto-scaling job processors -#[async_trait] -impl PeriodicJob for WitnessGeneratorStatsReporter { - const SERVICE_NAME: &'static str = "WitnessGeneratorStatsReporter"; - - async fn run_routine_task(&mut self) -> anyhow::Result<()> { - let stats_for_all_rounds = Self::get_job_statistics(&self.prover_connection_pool).await; - let mut aggregated = JobCountStatistics::default(); - for (round, stats) in stats_for_all_rounds { - emit_metrics_for_round(round, stats); - aggregated = aggregated + stats; - } - - if aggregated.queued > 0 { - tracing::trace!( - "Found {} free {} in progress witness generators jobs", - aggregated.queued, - aggregated.in_progress - ); - } - - metrics::gauge!( - format!("server.{}.jobs", WITNESS_GENERATOR_SERVICE_NAME), - aggregated.queued as f64, - "type" => "queued" - ); - - metrics::gauge!( - format!("server.{}.jobs", WITNESS_GENERATOR_SERVICE_NAME), - aggregated.in_progress as f64, - "type" => "in_progress" - ); - Ok(()) - } - - fn polling_interval_ms(&self) -> u64 { - self.reporting_interval_ms - } -} diff --git a/core/lib/zksync_core/src/lib.rs b/core/lib/zksync_core/src/lib.rs index 8269793a40b1..2132ec1cf11a 100644 --- a/core/lib/zksync_core/src/lib.rs +++ b/core/lib/zksync_core/src/lib.rs @@ -61,8 +61,6 @@ use crate::{ fri_scheduler_circuit_queuer::SchedulerCircuitQueuer, fri_witness_generator_jobs_retry_manager::FriWitnessGeneratorJobRetryManager, fri_witness_generator_queue_monitor::FriWitnessGeneratorStatsReporter, - gpu_prover_queue_monitor::GpuProverQueueMonitor, - prover_job_retry_manager::ProverJobRetryManager, prover_queue_monitor::ProverStatsReporter, waiting_to_queued_fri_witness_job_mover::WaitingToQueuedFriWitnessJobMover, }, l1_gas_price::{GasAdjusterSingleton, L1GasPriceProvider}, @@ -897,32 +895,7 @@ async fn add_house_keeper_to_task_futures( .build() .await .context("failed to build a prover_connection_pool")?; - let prover_group_config = configs - .prover_group_config - .clone() - .context("prover_group_config")?; - let prover_configs = configs.prover_configs.clone().context("prover_configs")?; - let gpu_prover_queue = GpuProverQueueMonitor::new( - prover_group_config.synthesizer_per_gpu, - house_keeper_config.gpu_prover_queue_reporting_interval_ms, - prover_connection_pool.clone(), - ); - let config = prover_configs.non_gpu.clone(); - let prover_job_retry_manager = ProverJobRetryManager::new( - config.max_attempts, - config.proof_generation_timeout(), - house_keeper_config.prover_job_retrying_interval_ms, - prover_connection_pool.clone(), - ); - let prover_stats_reporter = ProverStatsReporter::new( - house_keeper_config.prover_stats_reporting_interval_ms, - prover_connection_pool.clone(), - prover_group_config.clone(), - ); - task_futures.push(tokio::spawn(gpu_prover_queue.run())); task_futures.push(tokio::spawn(l1_batch_metrics_reporter.run())); - task_futures.push(tokio::spawn(prover_stats_reporter.run())); - task_futures.push(tokio::spawn(prover_job_retry_manager.run())); // All FRI Prover related components are configured below. let fri_prover_config = configs diff --git a/core/lib/zksync_core/src/temp_config_store.rs b/core/lib/zksync_core/src/temp_config_store.rs index 0c47f5325ac1..393cd014be82 100644 --- a/core/lib/zksync_core/src/temp_config_store.rs +++ b/core/lib/zksync_core/src/temp_config_store.rs @@ -8,10 +8,10 @@ use zksync_config::{ fri_prover_group::FriProverGroupConfig, house_keeper::HouseKeeperConfig, FriProofCompressorConfig, FriProverConfig, FriWitnessGeneratorConfig, PrometheusConfig, - ProofDataHandlerConfig, ProverGroupConfig, WitnessGeneratorConfig, + ProofDataHandlerConfig, WitnessGeneratorConfig, }, ApiConfig, ContractsConfig, DBConfig, ETHClientConfig, ETHSenderConfig, ETHWatchConfig, - GasAdjusterConfig, ObjectStoreConfig, PostgresConfig, ProverConfigs, + GasAdjusterConfig, ObjectStoreConfig, PostgresConfig, }; // TODO (QIT-22): This structure is going to be removed when components will be respnsible for their own configs. @@ -35,7 +35,6 @@ pub struct TempConfigStore { pub fri_witness_generator_config: Option, pub prometheus_config: Option, pub proof_data_handler_config: Option, - pub prover_group_config: Option, pub witness_generator_config: Option, pub api_config: Option, pub contracts_config: Option, @@ -44,6 +43,5 @@ pub struct TempConfigStore { pub eth_sender_config: Option, pub eth_watch_config: Option, pub gas_adjuster_config: Option, - pub prover_configs: Option, pub object_store_config: Option, } diff --git a/docker/prover-gar/Dockerfile b/docker/prover-gar/Dockerfile deleted file mode 100644 index 1e96e23bbbac..000000000000 --- a/docker/prover-gar/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# Will work locally only after prior universal key download and Docker login to the private registry - -ARG PROVER_IMAGE=latest -FROM us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-v2:2.0-$PROVER_IMAGE as prover - -FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04 as app - -# HACK copying to root is the only way to make Docker layer caching work for these files for some reason -COPY *.bin / -COPY setup_2\^26.key /setup_2\^26.key - -RUN apt-get update && apt-get install -y libpq5 ca-certificates openssl && rm -rf /var/lib/apt/lists/* - -COPY --from=prover contracts/system-contracts/bootloader/build/artifacts/ /contracts/system-contracts/bootloader/build/artifacts/ -COPY --from=prover contracts/system-contracts/artifacts-zk /contracts/system-contracts/artifacts-zk -COPY --from=prover contracts/l1-contracts/artifacts/ /contracts/l1-contracts/artifacts/ -COPY --from=prover contracts/l2-contracts/artifacts-zk/ /contracts/l2-contracts/artifacts-zk/ -COPY --from=prover core/bin/verification_key_generator_and_server/data/ /core/bin/verification_key_generator_and_server/data/ -COPY --from=prover /usr/bin/zksync_prover /usr/bin/ - -ENTRYPOINT ["zksync_prover"] diff --git a/docker/prover/Dockerfile b/docker/prover/Dockerfile deleted file mode 100644 index d6dc38b29873..000000000000 --- a/docker/prover/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -# Will work locally only after prior contracts build and universal setup key download - -FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 as builder - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y curl jq clang openssl libssl-dev gcc g++ \ - pkg-config build-essential libclang-dev && \ - rm -rf /var/lib/apt/lists/* - -ENV RUSTUP_HOME=/usr/local/rustup \ - CARGO_HOME=/usr/local/cargo \ - PATH=/usr/local/cargo/bin:$PATH - -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \ - rustup install nightly-2023-08-21 && \ - rustup default nightly-2023-08-21 - -WORKDIR /usr/src/zksync - -ARG ERA_BELLMAN_CUDA_RELEASE -ENV ERA_BELLMAN_CUDA_RELEASE=$ERA_BELLMAN_CUDA_RELEASE -ENV GITHUB_OWNER=matter-labs -ENV GITHUB_REPO=era-bellman-cuda - -RUN set -e; \ - if [ -z "$ERA_BELLMAN_CUDA_RELEASE" ]; then \ - ERA_BELLMAN_CUDA_RELEASE="latest"; \ - fi; \ - if [ "$ERA_BELLMAN_CUDA_RELEASE" = "latest" ]; then \ - ERA_BELLMAN_CUDA_RELEASE=$(curl --silent "https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/releases" | jq -r '.[0].tag_name'); \ - fi; \ - source_url="https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/archive/refs/tags/${ERA_BELLMAN_CUDA_RELEASE}.tar.gz"; \ - binary_url="https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/releases/download/${ERA_BELLMAN_CUDA_RELEASE}/bellman-cuda.tar.gz"; \ - curl --silent --location "$source_url" --output bellman-cuda-source.tar.gz; \ - curl --silent --location "$binary_url" --output bellman-cuda.tar.gz; \ - mkdir -p bellman-cuda; \ - tar xvfz bellman-cuda.tar.gz -C ./bellman-cuda; \ - tar xvfz bellman-cuda-source.tar.gz -C ./bellman-cuda --strip-components=1 - -ENV BELLMAN_CUDA_DIR=/usr/src/zksync/bellman-cuda - -COPY . . - -RUN cargo build --release --features gpu - -FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04 as runner - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y libpq5 ca-certificates openssl && rm -rf /var/lib/apt/lists/* - -COPY contracts/system-contracts/bootloader/build/artifacts/ /contracts/system-contracts/bootloader/build/artifacts/ -COPY contracts/system-contracts/artifacts-zk /contracts/system-contracts/artifacts-zk -COPY contracts/l1-contracts/artifacts/ /contracts/l1-contracts/artifacts/ -COPY contracts/l2-contracts/artifacts-zk/ /contracts/l2-contracts/artifacts-zk/ -COPY setup_2\^26.key /etc/ - -COPY core/bin/verification_key_generator_and_server/data/ /core/bin/verification_key_generator_and_server/data/ - -COPY --from=builder /usr/src/zksync/target/release/zksync_prover /usr/bin/ - -ENTRYPOINT ["zksync_prover"] diff --git a/docker/server-v2/Dockerfile b/docker/server-v2/Dockerfile index 90b3375b609c..a7d8fc7487fd 100644 --- a/docker/server-v2/Dockerfile +++ b/docker/server-v2/Dockerfile @@ -40,6 +40,5 @@ COPY contracts/l2-contracts/artifacts-zk/ /contracts/l2-contracts/artifacts-zk/ COPY etc/tokens/ /etc/tokens/ COPY etc/ERC20/ /etc/ERC20/ COPY etc/multivm_bootloaders/ /etc/multivm_bootloaders/ -COPY core/bin/verification_key_generator_and_server/data/ /core/bin/verification_key_generator_and_server/data/ ENTRYPOINT ["zksync_server"] diff --git a/docs/guides/launch.md b/docs/guides/launch.md index b463655719c6..6402bedc3fb7 100644 --- a/docs/guides/launch.md +++ b/docs/guides/launch.md @@ -111,29 +111,6 @@ cargo run --release --bin zksync_verification_key_generator ``` -## Running the setup key generator on machine with GPU - -- uncomment `"core/bin/setup_key_generator_and_server",` from root `Cargo.toml` file. -- ensure that the setup_2^26.key in the current directory, the file can be downloaded from - - -```shell -export BELLMAN_CUDA_DIR=$PWD -# To generate setup key for specific circuit type[0 - 17], 2 below corresponds to circuit type 2. -cargo +nightly run --features gpu --release --bin zksync_setup_key_generator -- --numeric-circuit 2 -``` - -## Running the setup key generator on machine without GPU - -- uncomment `"core/bin/setup_key_generator_and_server",` from root `Cargo.toml` file. -- ensure that the setup_2^26.key in the current directory, the file can be downloaded from - - -```shell -# To generate setup key for specific circuit type[0 - 17], 2 below corresponds to circuit type 2. -cargo +nightly run --release --bin zksync_setup_key_generator -- --numeric-circuit 2 -``` - ## Generating binary verification keys for existing json verification keys ```shell diff --git a/etc/env/base/fri_prover.toml b/etc/env/base/fri_prover.toml index e714f66ed99c..ec21e35e1f00 100644 --- a/etc/env/base/fri_prover.toml +++ b/etc/env/base/fri_prover.toml @@ -10,4 +10,5 @@ specialized_group_id=100 witness_vector_generator_thread_count=5 queue_capacity=10 witness_vector_receiver_port=4000 +zone_read_url="http://metadata.google.internal/computeMetadata/v1/instance/zone" shall_save_to_public_bucket=true diff --git a/etc/env/base/prover.toml b/etc/env/base/prover.toml deleted file mode 100644 index 3504b41343f2..000000000000 --- a/etc/env/base/prover.toml +++ /dev/null @@ -1,74 +0,0 @@ -[prover.non_gpu] -prometheus_port=3313 -initial_setup_key_path="./../../../keys/setup/setup_2^22.key" -key_download_url="https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^22.key" -generation_timeout_in_secs=2700 -number_of_threads=22 -max_attempts=1 -polling_duration_in_millis=750 -setup_keys_path="/usr/src/setup-keys" -number_of_setup_slots=2 -assembly_receiver_port=17791 -assembly_receiver_poll_time_in_millis=250 -assembly_queue_capacity=1 -specialized_prover_group_id=0 - -[prover.two_gpu_forty_gb_mem] -prometheus_port=3313 -initial_setup_key_path="./../../../keys/setup/setup_2^26.key" -key_download_url="https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^26.key" -generation_timeout_in_secs=2700 -number_of_threads=5 -max_attempts=1 -polling_duration_in_millis=750 -setup_keys_path="/usr/src/setup-keys" -number_of_setup_slots=5 -assembly_receiver_port=17791 -assembly_receiver_poll_time_in_millis=250 -assembly_queue_capacity=3 -specialized_prover_group_id=1 - -[prover.one_gpu_eighty_gb_mem] -prometheus_port=3313 -initial_setup_key_path="./../../../keys/setup/setup_2^26.key" -key_download_url="https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^26.key" -generation_timeout_in_secs=2700 -number_of_threads=5 -max_attempts=1 -polling_duration_in_millis=750 -setup_keys_path="/usr/src/setup-keys" -number_of_setup_slots=5 -assembly_receiver_port=17791 -assembly_receiver_poll_time_in_millis=250 -assembly_queue_capacity=3 -specialized_prover_group_id=2 - -[prover.two_gpu_eighty_gb_mem] -prometheus_port=3313 -initial_setup_key_path="./../../../keys/setup/setup_2^26.key" -key_download_url="https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^26.key" -generation_timeout_in_secs=2700 -number_of_threads=9 -max_attempts=1 -polling_duration_in_millis=750 -setup_keys_path="/usr/src/setup-keys" -number_of_setup_slots=11 -assembly_receiver_port=17791 -assembly_receiver_poll_time_in_millis=250 -assembly_queue_capacity=4 -specialized_prover_group_id=3 - -[prover.four_gpu_eighty_gb_mem] -prometheus_port=3313 -initial_setup_key_path="./../../../keys/setup/setup_2^26.key" -key_download_url="https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^26.key" -generation_timeout_in_secs=2700 -number_of_threads=18 -max_attempts=1 -polling_duration_in_millis=750 -setup_keys_path="/usr/src/setup-keys" -number_of_setup_slots=18 -assembly_receiver_port=17791 -assembly_receiver_poll_time_in_millis=250 -assembly_queue_capacity=20 -specialized_prover_group_id=4 diff --git a/etc/env/base/prover_group.toml b/etc/env/base/prover_group.toml deleted file mode 100644 index 7372a407f3b8..000000000000 --- a/etc/env/base/prover_group.toml +++ /dev/null @@ -1,17 +0,0 @@ -[prover_group] -group_0_circuit_ids="0,18" -group_1_circuit_ids="1,4" -group_2_circuit_ids="2,5" -group_3_circuit_ids="6,7" -group_4_circuit_ids="8,9" -group_5_circuit_ids="10,11" -group_6_circuit_ids="12,13" -group_7_circuit_ids="14,15" -group_8_circuit_ids="16,17" -group_9_circuit_ids="3" -group_100_circuit_ids="" -region_read_url="http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location" -region_override="us-central-1" -zone_read_url="http://metadata.google.internal/computeMetadata/v1/instance/zone" -zone_override="us-central-1-b" -synthesizer_per_gpu="10" diff --git a/etc/env/base/rust.toml b/etc/env/base/rust.toml index 093ba04da738..0374867630d4 100644 --- a/etc/env/base/rust.toml +++ b/etc/env/base/rust.toml @@ -7,7 +7,6 @@ RUST_LOG="""\ zksync_core=debug,\ zksync_server=debug,\ -zksync_prover=debug,\ zksync_contract_verifier=debug,\ zksync_dal=info,\ zksync_eth_client=info,\ @@ -22,9 +21,7 @@ zksync_mempool=debug,\ loadnext=info,\ vm=info,\ block_sizes_test=info,\ -zksync_verification_key_generator_and_server=info,\ zksync_object_store=info,\ -setup_key_generator_and_server=info,\ en_playground=info,\ zksync_external_node=info,\ cross_nodes_checker=debug,\ diff --git a/infrastructure/zk/src/config.ts b/infrastructure/zk/src/config.ts index dbbbc5e81fc6..6d2b722c0d25 100644 --- a/infrastructure/zk/src/config.ts +++ b/infrastructure/zk/src/config.ts @@ -16,11 +16,9 @@ const CONFIG_FILES = [ 'misc.toml', 'object_store.toml', 'nfs.toml', - 'prover.toml', 'rust.toml', 'private.toml', 'witness_generator.toml', - 'prover_group.toml', 'house_keeper.toml', 'fri_prover.toml', 'fri_witness_generator.toml', diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 8e4c1fd01d8b..c5c7d1bc7be9 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -145,18 +145,6 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "api" -version = "0.1.0" -source = "git+https://github.com/matter-labs/era-heavy-ops-service.git?branch=v1.3.3#ac6a3af6415dc12c9ae2932fa5ad906939023d82" -dependencies = [ - "bellman_ce 0.3.2 (git+https://github.com/matter-labs/bellman?branch=dev)", - "cfg-if 1.0.0", - "gpu-prover", - "num_cpus", - "serde", -] - [[package]] name = "arr_macro" version = "0.1.3" @@ -273,18 +261,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backon" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1a6197b2120bb2185a267f6515038558b019e92b832bb0320e96d66268dcf9" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "pin-project", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.69" @@ -397,29 +373,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.59.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "clap 2.34.0", - "env_logger 0.9.3", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2 1.0.69", - "quote 1.0.33", - "regex", - "rustc-hash", - "shlex", - "which", -] - [[package]] name = "bindgen" version = "0.65.1" @@ -1780,15 +1733,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -2079,17 +2023,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", - "tokio", -] - [[package]] name = "futures-macro" version = "0.3.29" @@ -2255,35 +2188,6 @@ dependencies = [ "async-trait", ] -[[package]] -name = "gpu-ffi" -version = "0.1.0" -source = "git+https://github.com/matter-labs/era-heavy-ops-service.git?branch=v1.3.3#ac6a3af6415dc12c9ae2932fa5ad906939023d82" -dependencies = [ - "bindgen 0.59.2", - "crossbeam 0.8.2", - "derivative", - "futures 0.3.29", - "futures-locks", - "num_cpus", -] - -[[package]] -name = "gpu-prover" -version = "0.1.0" -source = "git+https://github.com/matter-labs/era-heavy-ops-service.git?branch=v1.3.3#ac6a3af6415dc12c9ae2932fa5ad906939023d82" -dependencies = [ - "bit-vec", - "cfg-if 1.0.0", - "crossbeam 0.8.2", - "franklin-crypto 0.0.5 (git+https://github.com/matter-labs/franklin-crypto?branch=dev)", - "gpu-ffi", - "itertools 0.11.0", - "num_cpus", - "rand 0.4.6", - "serde", -] - [[package]] name = "group" version = "0.12.1" @@ -4204,22 +4108,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "prover-service" -version = "0.1.0" -source = "git+https://github.com/matter-labs/era-heavy-ops-service.git?branch=v1.3.3#ac6a3af6415dc12c9ae2932fa5ad906939023d82" -dependencies = [ - "api", - "bincode", - "crossbeam-utils 0.8.16", - "log", - "num_cpus", - "rand 0.4.6", - "serde", - "serde_json", - "zkevm_test_harness 1.3.3", -] - [[package]] name = "pulldown-cmark" version = "0.9.3" @@ -5192,24 +5080,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "setup_key_generator_and_server" -version = "0.1.0" -dependencies = [ - "anyhow", - "api", - "circuit_testing", - "itertools 0.10.5", - "prover-service", - "structopt", - "tracing", - "vlog", - "zkevm_test_harness 1.3.3", - "zksync_config", - "zksync_env_config", - "zksync_types", -] - [[package]] name = "sha-1" version = "0.10.1" @@ -5769,7 +5639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", "rustix", "windows-sys", @@ -6933,28 +6803,6 @@ dependencies = [ "web3", ] -[[package]] -name = "zksync_circuit_breaker" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "backon", - "convert_case 0.6.0", - "futures 0.3.29", - "hex", - "metrics", - "serde_json", - "thiserror", - "tokio", - "tracing", - "zksync_config", - "zksync_contracts", - "zksync_dal", - "zksync_eth_client", - "zksync_types", -] - [[package]] name = "zksync_concurrency" version = "0.1.0" @@ -7117,43 +6965,6 @@ dependencies = [ "zksync_config", ] -[[package]] -name = "zksync_eth_client" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "hex", - "jsonrpc-core", - "serde", - "thiserror", - "tokio", - "tracing", - "vise", - "zksync_config", - "zksync_contracts", - "zksync_eth_signer", - "zksync_types", -] - -[[package]] -name = "zksync_eth_signer" -version = "0.1.0" -dependencies = [ - "async-trait", - "hex", - "jsonrpc-core", - "parity-crypto", - "reqwest", - "rlp", - "secp256k1 0.27.0", - "serde", - "serde_derive", - "serde_json", - "thiserror", - "zksync_types", -] - [[package]] name = "zksync_health_check" version = "0.1.0" @@ -7258,44 +7069,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "zksync_prover" -version = "0.1.0" -dependencies = [ - "anyhow", - "api", - "bincode", - "chrono", - "ctrlc", - "ethabi", - "futures 0.3.29", - "hex", - "local-ip-address", - "prometheus_exporter", - "prover-service", - "queues", - "reqwest", - "serde", - "serde_json", - "setup_key_generator_and_server", - "thiserror", - "tokio", - "tracing", - "vise", - "vlog", - "zkevm_test_harness 1.3.3", - "zksync_circuit_breaker", - "zksync_config", - "zksync_dal", - "zksync_env_config", - "zksync_eth_client", - "zksync_object_store", - "zksync_prover_utils", - "zksync_types", - "zksync_utils", - "zksync_verification_key_generator_and_server", -] - [[package]] name = "zksync_prover_fri" version = "0.1.0" @@ -7505,25 +7278,6 @@ dependencies = [ "zksync_basic_types", ] -[[package]] -name = "zksync_verification_key_generator_and_server" -version = "0.1.0" -dependencies = [ - "anyhow", - "bincode", - "circuit_testing", - "ff_ce", - "hex", - "itertools 0.10.5", - "once_cell", - "serde_json", - "structopt", - "tracing", - "vlog", - "zksync_prover_utils", - "zksync_types", -] - [[package]] name = "zksync_witness_generator" version = "0.1.0" diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 4bd8af4bbddc..e450fce09c08 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -5,8 +5,6 @@ members = [ "prover_fri_types", # binaries - "prover", - "setup_key_generator_and_server", "witness_generator", "vk_setup_data_generator_server_fri", "prover_fri", diff --git a/prover/README.md b/prover/README.md index 01f1c3785f1e..5e537bf8bc0b 100644 --- a/prover/README.md +++ b/prover/README.md @@ -35,15 +35,3 @@ witness_vector_generators, that can 'share' as single gpu based prover_fri). ### proof_fri_compressor Used as a 'last step' to compress/wrap the final FRI proof into a SNARK (to make L1 verification cheaper). - -## Old proof system - -Some of the components here belong to the old proof system: - -- prover -- setup_key_generator_and_server - -Moreover old proof system is also using components from 'core' directory, like: - -- core/bin/verification_key_generator_and_server -- core/lib/zksycn_core/src/witness_generator. diff --git a/prover/prover/Cargo.toml b/prover/prover/Cargo.toml deleted file mode 100644 index aa91013f0ff6..000000000000 --- a/prover/prover/Cargo.toml +++ /dev/null @@ -1,57 +0,0 @@ -[package] -name = "zksync_prover" -version = "0.1.0" -edition = "2018" -authors = ["The Matter Labs Team "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/zksync-era" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] -publish = false # We don't want to publish our binaries. - -[dependencies] -vise = { git = "https://github.com/matter-labs/vise.git", version = "0.1.0", rev = "1c9cc500e92cf9ea052b230e114a6f9cce4fb2c1" } - -zksync_dal = { path = "../../core/lib/dal" } -zksync_config = { path = "../../core/lib/config" } -zksync_env_config = { path = "../../core/lib/env_config" } -zksync_utils = { path = "../../core/lib/utils" } -zksync_prover_utils = { path = "../../core/lib/prover_utils" } -zksync_circuit_breaker = { path = "../../core/lib/circuit_breaker" } -zksync_eth_client = { path = "../../core/lib/eth_client" } -zksync_types = { path = "../../core/lib/types" } -prometheus_exporter = { path = "../../core/lib/prometheus_exporter" } -vlog = { path = "../../core/lib/vlog" } -zksync_verification_key_generator_and_server = { path = "../../core/bin/verification_key_generator_and_server" } -zksync_object_store = { path = "../../core/lib/object_store" } - -setup_key_generator_and_server = { path = "../setup_key_generator_and_server" } -api = { git = "https://github.com/matter-labs/era-heavy-ops-service.git", branch = "v1.3.3", features = [ - "gpu", -], optional = true, default-features = false } -prover-service = { git = "https://github.com/matter-labs/era-heavy-ops-service.git", branch = "v1.3.3", features = [ - "gpu", -], optional = true, default-features = false } - -zkevm_test_harness = { git = "https://github.com/matter-labs/era-zkevm_test_harness.git", branch = "v1.3.3" } - -anyhow = "1.0" -tracing = "0.1" -tokio = { version = "1", features = ["time"] } -futures = { version = "0.3", features = ["compat"] } -ctrlc = { version = "3.1", features = ["termination"] } -thiserror = "1.0" -chrono = "0.4" -serde_json = "1.0" -ethabi = "18.0.0" -hex = "0.4" -serde = { version = "1.0", features = ["derive"] } -bincode = "1.3.2" -reqwest = { version = "0.11", features = ["blocking"] } -queues = "1.1.0" -local-ip-address = "0.5.0" - -[features] -default = [] -gpu = ["api", "prover-service", "setup_key_generator_and_server/gpu"] diff --git a/prover/prover/README.md b/prover/prover/README.md deleted file mode 100644 index 6ccb690a33f3..000000000000 --- a/prover/prover/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# OLD PROVER - OBSOLETE - -For compiling locally (no cuda) set `features=["legacy"], default-features=false` for: - -- `./Cargo.toml`: `heavy-ops-service` dependency. -- `../setup_key_generator_and_server/Cargo.toml`: `api` and `prover-service` dependencies. - -**! Don't push those changes !** diff --git a/prover/prover/src/artifact_provider.rs b/prover/prover/src/artifact_provider.rs deleted file mode 100644 index 9af365d95f40..000000000000 --- a/prover/prover/src/artifact_provider.rs +++ /dev/null @@ -1,25 +0,0 @@ -use std::io::Read; - -use anyhow::Context as _; -use prover_service::ArtifactProvider; -use zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncVerificationKey, pairing::bn256::Bn256, -}; -use zksync_setup_key_server::get_setup_for_circuit_type; -use zksync_verification_key_server::get_vk_for_circuit_type; - -#[derive(Debug)] -pub struct ProverArtifactProvider; - -impl ArtifactProvider for ProverArtifactProvider { - type ArtifactError = anyhow::Error; - - fn get_setup(&self, circuit_id: u8) -> Result, Self::ArtifactError> { - get_setup_for_circuit_type(circuit_id).context("get_setup_for_circuit_type()") - } - - fn get_vk(&self, circuit_id: u8) -> Result, Self::ArtifactError> { - let vk = get_vk_for_circuit_type(circuit_id); - Ok(ZkSyncVerificationKey::from_verification_key_and_numeric_type(circuit_id, vk)) - } -} diff --git a/prover/prover/src/main.rs b/prover/prover/src/main.rs deleted file mode 100644 index 56ac77336c24..000000000000 --- a/prover/prover/src/main.rs +++ /dev/null @@ -1,26 +0,0 @@ -#![cfg_attr(not(feature = "gpu"), allow(unused_imports))] - -#[cfg(feature = "gpu")] -mod artifact_provider; -mod metrics; -#[cfg(feature = "gpu")] -mod prover; -#[cfg(feature = "gpu")] -mod prover_params; -#[cfg(feature = "gpu")] -mod run; -#[cfg(feature = "gpu")] -mod socket_listener; -#[cfg(feature = "gpu")] -mod synthesized_circuit_provider; - -#[cfg(not(feature = "gpu"))] -fn main() { - unimplemented!("This binary is only available with `gpu` feature enabled"); -} - -#[cfg(feature = "gpu")] -#[tokio::main] -async fn main() -> anyhow::Result<()> { - run::run().await -} diff --git a/prover/prover/src/metrics.rs b/prover/prover/src/metrics.rs deleted file mode 100644 index ab18c59bcf7c..000000000000 --- a/prover/prover/src/metrics.rs +++ /dev/null @@ -1,41 +0,0 @@ -use std::time::Duration; - -use vise::{Buckets, Counter, Histogram, LabeledFamily, Metrics}; - -const PROVER_LATENCY_BUCKETS: Buckets = Buckets::values(&[ - 1.0, 10.0, 20.0, 40.0, 60.0, 120.0, 240.0, 360.0, 600.0, 1800.0, 3600.0, -]); - -#[derive(Debug, Metrics)] -#[metrics(prefix = "prover")] -pub(crate) struct ProverMetrics { - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub proof_generation_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub circuit_synthesis_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub assembly_finalize_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub assembly_encoding_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub assembly_decoding_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub assembly_transferring_time: LabeledFamily>, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["circuit_type"])] - pub setup_load_time: LabeledFamily>, - #[metrics(labels = ["circuit_type"])] - pub setup_loading_cache_miss: LabeledFamily, - #[metrics(buckets = PROVER_LATENCY_BUCKETS)] - pub prover_wait_idle_time: Histogram, - #[metrics(buckets = PROVER_LATENCY_BUCKETS)] - pub setup_load_wait_idle_time: Histogram, - #[metrics(buckets = PROVER_LATENCY_BUCKETS)] - pub scheduler_wait_idle_time: Histogram, - #[metrics(buckets = PROVER_LATENCY_BUCKETS)] - pub download_time: Histogram, - #[metrics(buckets = PROVER_LATENCY_BUCKETS, labels = ["queue_capacity"])] - pub queue_free_slots: LabeledFamily>, -} - -#[vise::register] -pub(crate) static METRICS: vise::Global = vise::Global::new(); diff --git a/prover/prover/src/prover.rs b/prover/prover/src/prover.rs deleted file mode 100644 index efb570050b57..000000000000 --- a/prover/prover/src/prover.rs +++ /dev/null @@ -1,286 +0,0 @@ -use std::{env, time::Duration}; - -use anyhow::Context as _; -use prover_service::{ - JobReporter, - JobResult::{self, Failure, ProofGenerated}, -}; -use tokio::runtime::Handle; -use zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncProof, pairing::bn256::Bn256, -}; -use zksync_config::{PostgresConfig, ProverConfig}; -use zksync_dal::{ConnectionPool, StorageProcessor}; -use zksync_object_store::{Bucket, ObjectStore, ObjectStoreFactory}; -use zksync_types::proofs::ProverJobMetadata; - -use crate::metrics::METRICS; - -#[derive(Debug)] -pub struct ProverReporter { - rt_handle: Handle, - pool: ConnectionPool, - config: ProverConfig, - processed_by: String, - object_store: Box, -} - -fn assembly_debug_blob_url(job_id: usize, circuit_id: u8) -> String { - format!("assembly_debugging_{}_{}.bin", job_id, circuit_id) -} - -impl ProverReporter { - pub(crate) fn new( - postgres_config: PostgresConfig, - config: ProverConfig, - store_factory: &ObjectStoreFactory, - rt_handle: Handle, - ) -> anyhow::Result { - let pool = rt_handle - .block_on(ConnectionPool::singleton(postgres_config.prover_url()?).build()) - .context("failed to build a connection pool")?; - Ok(Self { - pool, - config, - processed_by: env::var("POD_NAME").unwrap_or("Unknown".to_string()), - object_store: rt_handle.block_on(store_factory.create_store()), - rt_handle, - }) - } - - fn handle_successful_proof_generation( - &self, - job_id: usize, - proof: ZkSyncProof, - duration: Duration, - index: usize, - ) { - let circuit_type = self.get_circuit_type(job_id); - let serialized = bincode::serialize(&proof).expect("Failed to serialize proof"); - tracing::info!( - "Successfully generated proof with id {:?} and type: {} for index: {}. Size: {:?}KB took: {:?}", - job_id, - circuit_type, - index, - serialized.len() >> 10, - duration, - ); - - METRICS.proof_generation_time[&circuit_type].observe(duration); - - let job_id = job_id as u32; - self.rt_handle.block_on(async { - let mut connection = self.pool.access_storage().await.unwrap(); - let mut transaction = connection.start_transaction().await.unwrap(); - - // BEWARE, HERE BE DRAGONS. - // `send_report` method is called in an operating system thread, - // which is in charge of saving proof output (ok, errored, etc.). - // The code that calls it is in a thread that does not check it's status. - // If the thread panics, proofs will be generated, but their status won't be saved. - // So a prover will work like this: - // Pick task, execute task, prepare task to be saved, be restarted as nothing happens. - // The error prevents the "fake" work by killing the prover, which causes it to restart. - // A proper fix would be to have the thread signal it was dead or be watched from outside. - // Given we want to deprecate old prover, this is the quick and dirty hack I'm not proud of. - let result = transaction - .prover_dal() - .save_proof(job_id, duration, serialized, &self.processed_by) - .await; - if let Err(e) = result { - tracing::warn!("panicked inside heavy-ops thread: {e:?}; exiting..."); - std::process::exit(-1); - } - self.get_prover_job_metadata_by_id_and_exit_if_error(&mut transaction, job_id) - .await; - transaction.commit().await.unwrap(); - }); - } - - fn get_circuit_type(&self, job_id: usize) -> String { - let prover_job_metadata = self.rt_handle.block_on(async { - let mut connection = self.pool.access_storage().await.unwrap(); - self.get_prover_job_metadata_by_id_and_exit_if_error(&mut connection, job_id as u32) - .await - }); - prover_job_metadata.circuit_type - } - - async fn get_prover_job_metadata_by_id_and_exit_if_error( - &self, - connection: &mut StorageProcessor<'_>, - job_id: u32, - ) -> ProverJobMetadata { - // BEWARE, HERE BE DRAGONS. - // `send_report` method is called in an operating system thread, - // which is in charge of saving proof output (ok, errored, etc.). - // The code that calls it is in a thread that does not check it's status. - // If the thread panics, proofs will be generated, but their status won't be saved. - // So a prover will work like this: - // Pick task, execute task, prepare task to be saved, be restarted as nothing happens. - // The error prevents the "fake" work by killing the prover, which causes it to restart. - // A proper fix would be to have the thread signal it was dead or be watched from outside. - // Given we want to deprecate old prover, this is the quick and dirty hack I'm not proud of. - let result = connection.prover_dal().get_prover_job_by_id(job_id).await; - let prover_job_metadata = match result { - Ok(option) => option, - Err(e) => { - tracing::warn!("panicked inside heavy-ops thread: {e:?}; exiting..."); - std::process::exit(-1); - } - }; - match prover_job_metadata { - Some(val) => val, - None => { - tracing::error!("No job with id: {} exist; exiting...", job_id); - std::process::exit(-1); - } - } - } -} - -impl JobReporter for ProverReporter { - fn send_report(&mut self, report: JobResult) { - match report { - Failure(job_id, error) => { - tracing::error!( - "Failed to generate proof for id {:?}. error reason; {}", - job_id, - error - ); - self.rt_handle.block_on(async { - let result = self - .pool - .access_storage() - .await - .unwrap() - .prover_dal() - .save_proof_error(job_id as u32, error, self.config.max_attempts) - .await; - // BEWARE, HERE BE DRAGONS. - // `send_report` method is called in an operating system thread, - // which is in charge of saving proof output (ok, errored, etc.). - // The code that calls it is in a thread that does not check it's status. - // If the thread panics, proofs will be generated, but their status won't be saved. - // So a prover will work like this: - // Pick task, execute task, prepare task to be saved, be restarted as nothing happens. - // The error prevents the "fake" work by killing the prover, which causes it to restart. - // A proper fix would be to have the thread signal it was dead or be watched from outside. - // Given we want to deprecate old prover, this is the quick and dirty hack I'm not proud of. - if let Err(e) = result { - tracing::warn!("panicked inside heavy-ops thread: {e:?}; exiting..."); - std::process::exit(-1); - } - }); - } - - ProofGenerated(job_id, duration, proof, index) => { - self.handle_successful_proof_generation(job_id, proof, duration, index); - } - - JobResult::Synthesized(job_id, duration) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully synthesized circuit with id {:?} and type: {}. took: {:?}", - job_id, - circuit_type, - duration, - ); - METRICS.circuit_synthesis_time[&circuit_type].observe(duration); - } - - JobResult::AssemblyFinalized(job_id, duration) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully finalized assembly with id {:?} and type: {}. took: {:?}", - job_id, - circuit_type, - duration, - ); - METRICS.assembly_finalize_time[&circuit_type].observe(duration); - } - - JobResult::SetupLoaded(job_id, duration, cache_miss) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully setup loaded with id {:?} and type: {}. \ - took: {:?} and had cache_miss: {}", - job_id, - circuit_type, - duration, - cache_miss - ); - METRICS.setup_load_time[&circuit_type].observe(duration); - METRICS.setup_loading_cache_miss[&circuit_type].inc(); - } - - JobResult::AssemblyEncoded(job_id, duration) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully encoded assembly with id {:?} and type: {}. took: {:?}", - job_id, - circuit_type, - duration, - ); - METRICS.assembly_encoding_time[&circuit_type].observe(duration); - } - - JobResult::AssemblyDecoded(job_id, duration) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully decoded assembly with id {:?} and type: {}. took: {:?}", - job_id, - circuit_type, - duration, - ); - METRICS.assembly_decoding_time[&circuit_type].observe(duration); - } - - JobResult::FailureWithDebugging(job_id, circuit_id, assembly, error) => { - tracing::trace!( - "Failed assembly decoding for job-id {} and circuit-type: {}. error: {}", - job_id, - circuit_id, - error, - ); - let blob_url = assembly_debug_blob_url(job_id, circuit_id); - let put_task = self - .object_store - .put_raw(Bucket::ProverJobs, &blob_url, assembly); - self.rt_handle - .block_on(put_task) - .expect("Failed saving debug assembly to GCS"); - } - - JobResult::AssemblyTransferred(job_id, duration) => { - let circuit_type = self.get_circuit_type(job_id); - tracing::trace!( - "Successfully transferred assembly with id {:?} and type: {}. took: {:?}", - job_id, - circuit_type, - duration, - ); - METRICS.assembly_transferring_time[&circuit_type].observe(duration); - } - - JobResult::ProverWaitedIdle(prover_id, duration) => { - tracing::trace!( - "Prover wait idle time: {:?} for prover-id: {:?}", - duration, - prover_id - ); - METRICS.prover_wait_idle_time.observe(duration); - } - - JobResult::SetupLoaderWaitedIdle(duration) => { - tracing::trace!("Setup load wait idle time: {:?}", duration); - METRICS.setup_load_wait_idle_time.observe(duration); - } - - JobResult::SchedulerWaitedIdle(duration) => { - tracing::trace!("Scheduler wait idle time: {:?}", duration); - METRICS.scheduler_wait_idle_time.observe(duration); - } - } - } -} diff --git a/prover/prover/src/prover_params.rs b/prover/prover/src/prover_params.rs deleted file mode 100644 index fc59b88ddf77..000000000000 --- a/prover/prover/src/prover_params.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::time::Duration; - -use prover_service::Params; -use zksync_config::ProverConfig; - -#[derive(Debug)] -pub struct ProverParams { - number_of_threads: u8, - polling_duration: Duration, - number_of_setup_slots: u8, -} - -impl ProverParams { - pub(crate) fn new(config: &ProverConfig) -> Self { - Self { - number_of_threads: config.number_of_threads as u8, - polling_duration: Duration::from_millis(config.polling_duration_in_millis), - number_of_setup_slots: config.number_of_setup_slots, - } - } -} - -impl Params for ProverParams { - fn number_of_parallel_synthesis(&self) -> u8 { - self.number_of_threads - } - - fn number_of_setup_slots(&self) -> u8 { - self.number_of_setup_slots - } - - fn polling_duration(&self) -> Duration { - self.polling_duration - } -} diff --git a/prover/prover/src/run.rs b/prover/prover/src/run.rs deleted file mode 100644 index 9784b2f1b666..000000000000 --- a/prover/prover/src/run.rs +++ /dev/null @@ -1,255 +0,0 @@ -use std::{env, future::Future, sync::Arc, time::Instant}; - -use anyhow::Context as _; -use local_ip_address::local_ip; -use prometheus_exporter::PrometheusExporterConfig; -use queues::Buffer; -use tokio::sync::{oneshot, Mutex}; -use zksync_config::{ - configs::{ - api::PrometheusConfig, prover_group::ProverGroupConfig, AlertsConfig, ObjectStoreConfig, - }, - ApiConfig, PostgresConfig, ProverConfig, ProverConfigs, -}; -use zksync_dal::ConnectionPool; -use zksync_env_config::FromEnv; -use zksync_object_store::ObjectStoreFactory; -use zksync_prover_utils::region_fetcher::{get_region, get_zone}; -use zksync_types::proofs::{GpuProverInstanceStatus, SocketAddress}; -use zksync_utils::wait_for_tasks::wait_for_tasks; - -use crate::{ - artifact_provider::ProverArtifactProvider, metrics::METRICS, prover::ProverReporter, - prover_params::ProverParams, socket_listener::incoming_socket_listener, - synthesized_circuit_provider::SynthesizedCircuitProvider, -}; - -async fn graceful_shutdown() -> anyhow::Result> { - let postgres_config = PostgresConfig::from_env().context("PostgresConfig::from_env()")?; - let pool = ConnectionPool::singleton(postgres_config.prover_url()?) - .build() - .await - .context("failed to build a connection pool")?; - let host = local_ip().context("Failed obtaining local IP address")?; - let port = ProverConfigs::from_env() - .context("ProverConfigs")? - .non_gpu - .assembly_receiver_port; - let prover_group_config = - ProverGroupConfig::from_env().context("ProverGroupConfig::from_env()")?; - let region = get_region(&prover_group_config) - .await - .context("get_region()")?; - let zone = get_zone(&prover_group_config).await.context("get_zone()")?; - let address = SocketAddress { host, port }; - Ok(async move { - pool.access_storage() - .await - .unwrap() - .gpu_prover_queue_dal() - .update_prover_instance_status(address, GpuProverInstanceStatus::Dead, 0, region, zone) - .await - }) -} - -fn get_ram_per_gpu() -> anyhow::Result { - use api::gpu_prover::cuda_bindings; - - let device_info = - cuda_bindings::device_info(0).map_err(|err| anyhow::anyhow!("device_info(): {err:?}"))?; - let ram_in_gb: u64 = device_info.total / (1024 * 1024 * 1024); - tracing::info!("Detected RAM per GPU: {:?} GB", ram_in_gb); - Ok(ram_in_gb) -} - -fn get_prover_config_for_machine_type() -> anyhow::Result<(ProverConfig, u8)> { - use api::gpu_prover::cuda_bindings; - - let prover_configs = ProverConfigs::from_env().context("ProverConfigs::from_env()")?; - let actual_num_gpus = match cuda_bindings::devices() { - Ok(gpus) => gpus as u8, - Err(err) => { - tracing::error!("unable to get number of GPUs: {err:?}"); - anyhow::bail!("unable to get number of GPUs: {:?}", err); - } - }; - tracing::info!("detected number of gpus: {}", actual_num_gpus); - let ram_in_gb = get_ram_per_gpu().context("get_ram_per_gpu()")?; - - Ok(match actual_num_gpus { - 1 => { - tracing::info!("Detected machine type with 1 GPU and 80GB RAM"); - (prover_configs.one_gpu_eighty_gb_mem, actual_num_gpus) - } - 2 => { - if ram_in_gb > 39 { - tracing::info!("Detected machine type with 2 GPU and 80GB RAM"); - (prover_configs.two_gpu_eighty_gb_mem, actual_num_gpus) - } else { - tracing::info!("Detected machine type with 2 GPU and 40GB RAM"); - (prover_configs.two_gpu_forty_gb_mem, actual_num_gpus) - } - } - 4 => { - tracing::info!("Detected machine type with 4 GPU and 80GB RAM"); - (prover_configs.four_gpu_eighty_gb_mem, actual_num_gpus) - } - _ => anyhow::bail!("actual_num_gpus: {} not supported yet", actual_num_gpus), - }) -} - -pub async fn run() -> anyhow::Result<()> { - #[allow(deprecated)] // TODO (QIT-21): Use centralized configuration approach. - let log_format = vlog::log_format_from_env(); - #[allow(deprecated)] // TODO (QIT-21): Use centralized configuration approach. - let sentry_url = vlog::sentry_url_from_env(); - #[allow(deprecated)] // TODO (QIT-21): Use centralized configuration approach. - let environment = vlog::environment_from_env(); - - let mut builder = vlog::ObservabilityBuilder::new().with_log_format(log_format); - if let Some(sentry_url) = sentry_url { - builder = builder - .with_sentry_url(&sentry_url) - .context("Invalid Sentry URL")? - .with_sentry_environment(environment); - } - let _guard = builder.build(); - - tracing::trace!("starting prover"); - let (prover_config, num_gpu) = - get_prover_config_for_machine_type().context("get_prover_config_for_machine_type()")?; - - let prometheus_config = PrometheusConfig { - listener_port: prover_config.prometheus_port, - ..ApiConfig::from_env() - .context("ApiConfig::from_env()")? - .prometheus - }; - - let prover_group_config = - ProverGroupConfig::from_env().context("ProverGroupConfig::from_env()")?; - let region = get_region(&prover_group_config) - .await - .context("get_region()")?; - let zone = get_zone(&prover_group_config).await.context("get_zone()")?; - - let (stop_signal_sender, stop_signal_receiver) = oneshot::channel(); - let mut stop_signal_sender = Some(stop_signal_sender); - ctrlc::set_handler(move || { - if let Some(sender) = stop_signal_sender.take() { - sender.send(()).ok(); - } - }) - .expect("Error setting Ctrl+C handler"); - - let started_at = Instant::now(); - zksync_prover_utils::ensure_initial_setup_keys_present( - &prover_config.initial_setup_key_path, - &prover_config.key_download_url, - ); - METRICS.download_time.observe(started_at.elapsed()); - env::set_var("CRS_FILE", prover_config.initial_setup_key_path.clone()); - // We don't have a graceful shutdown process for the prover, so `_stop_sender` is unused. - // Though we still need to create a channel because circuit breaker expects `stop_receiver`. - let (_stop_sender, stop_receiver) = tokio::sync::watch::channel(false); - - let circuit_ids = - prover_group_config.get_circuit_ids_for_group_id(prover_config.specialized_prover_group_id); - - tracing::info!( - "Starting proof generation for circuits: {circuit_ids:?} \ - in region: {region} and zone: {zone} with group-id: {}", - prover_config.specialized_prover_group_id - ); - let mut tasks = vec![]; - - let exporter_config = PrometheusExporterConfig::pull(prometheus_config.listener_port); - tasks.push(tokio::spawn(exporter_config.run(stop_receiver.clone()))); - - let assembly_queue = Buffer::new(prover_config.assembly_queue_capacity); - let shared_assembly_queue = Arc::new(Mutex::new(assembly_queue)); - let producer = shared_assembly_queue.clone(); - let consumer = shared_assembly_queue.clone(); - let local_ip = local_ip().context("Failed obtaining local IP address")?; - let address = SocketAddress { - host: local_ip, - port: prover_config.assembly_receiver_port, - }; - tracing::info!("local IP address is: {:?}", local_ip); - - let postgres_config = PostgresConfig::from_env().context("PostgresConfig::from_env()")?; - tasks.push(tokio::task::spawn(incoming_socket_listener( - local_ip, - prover_config.assembly_receiver_port, - producer, - ConnectionPool::singleton(postgres_config.prover_url()?) - .build() - .await - .context("failed to build a connection pool")?, - prover_config.specialized_prover_group_id, - region.clone(), - zone.clone(), - num_gpu, - ))); - - let params = ProverParams::new(&prover_config); - let object_store_config = - ObjectStoreConfig::from_env().context("ObjectStoreConfig::from_env()")?; - let store_factory = ObjectStoreFactory::new(object_store_config); - - let circuit_provider_pool = ConnectionPool::singleton(postgres_config.prover_url()?) - .build() - .await - .context("failed to build circuit_provider_pool")?; - tasks.push(tokio::task::spawn_blocking(move || { - let rt_handle = tokio::runtime::Handle::current(); - let synthesized_circuit_provider = SynthesizedCircuitProvider::new( - consumer, - circuit_provider_pool, - address, - region, - zone, - rt_handle.clone(), - ); - let prover_job_reporter = - ProverReporter::new(postgres_config, prover_config, &store_factory, rt_handle) - .context("ProverReporter::new()")?; - prover_service::run_prover::run_prover_with_remote_synthesizer( - synthesized_circuit_provider, - ProverArtifactProvider, - prover_job_reporter, - circuit_ids, - params, - ); - Ok(()) - })); - - let particular_crypto_alerts = Some( - AlertsConfig::from_env() - .context("AlertsConfig::from_env()")? - .sporadic_crypto_errors_substrs, - ); - let graceful_shutdown = Some( - graceful_shutdown() - .await - .context("failed to prepare graceful shutdown future")?, - ); - let tasks_allowed_to_finish = false; - tokio::select! { - _ = wait_for_tasks(tasks, particular_crypto_alerts, graceful_shutdown, tasks_allowed_to_finish) => {}, - _ = stop_signal_receiver => { - tracing::info!("Stop signal received, shutting down"); - - // BEWARE, HERE BE DRAGONS. - // This is necessary because of blocking prover. See end of functions for more details. - std::process::exit(0); - }, - }; - - // BEWARE, HERE BE DRAGONS. - // The process hangs here if we panic outside `run_prover_with_remote_synthesizer`. - // Given the task is spawned as blocking, it's in a different thread that can't be cancelled on demand. - // See: https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html for more information - // Follow [PR](https://github.com/matter-labs/zksync-2-dev/pull/2129) for logic behind it - std::process::exit(-1); -} diff --git a/prover/prover/src/socket_listener.rs b/prover/prover/src/socket_listener.rs deleted file mode 100644 index 95a369e70786..000000000000 --- a/prover/prover/src/socket_listener.rs +++ /dev/null @@ -1,122 +0,0 @@ -use std::{ - net::{IpAddr, SocketAddr}, - time::Instant, -}; - -use anyhow::Context as _; -use queues::IsQueue; -use tokio::{ - io::copy, - net::{TcpListener, TcpStream}, -}; -use zksync_dal::ConnectionPool; -use zksync_types::proofs::{GpuProverInstanceStatus, SocketAddress}; - -use crate::synthesized_circuit_provider::SharedAssemblyQueue; - -#[allow(clippy::too_many_arguments)] -pub async fn incoming_socket_listener( - host: IpAddr, - port: u16, - queue: SharedAssemblyQueue, - pool: ConnectionPool, - specialized_prover_group_id: u8, - region: String, - zone: String, - num_gpu: u8, -) -> anyhow::Result<()> { - let listening_address = SocketAddr::new(host, port); - tracing::info!( - "Starting assembly receiver at host: {}, port: {}", - host, - port - ); - let listener = TcpListener::bind(listening_address) - .await - .with_context(|| format!("Failed binding address: {listening_address:?}"))?; - let address = SocketAddress { host, port }; - - let queue_capacity = queue.lock().await.capacity(); - pool.access_storage() - .await - .unwrap() - .gpu_prover_queue_dal() - .insert_prover_instance( - address.clone(), - queue_capacity, - specialized_prover_group_id, - region.clone(), - zone.clone(), - num_gpu, - ) - .await; - - let mut now = Instant::now(); - - loop { - let stream = listener - .accept() - .await - .context("could not accept connection")? - .0; - tracing::trace!( - "Received new assembly send connection, waited for {}ms.", - now.elapsed().as_millis() - ); - - handle_incoming_file( - stream, - queue.clone(), - pool.clone(), - address.clone(), - region.clone(), - zone.clone(), - ) - .await; - - now = Instant::now(); - } -} - -async fn handle_incoming_file( - mut stream: TcpStream, - queue: SharedAssemblyQueue, - pool: ConnectionPool, - address: SocketAddress, - region: String, - zone: String, -) { - let mut assembly: Vec = vec![]; - let started_at = Instant::now(); - copy(&mut stream, &mut assembly) - .await - .expect("Failed reading from stream"); - let file_size_in_gb = assembly.len() / (1024 * 1024 * 1024); - tracing::trace!( - "Read file of size: {}GB from stream took: {} seconds", - file_size_in_gb, - started_at.elapsed().as_secs() - ); - // acquiring lock from queue and updating db must be done atomically otherwise it results in TOCTTOU - // Time-of-Check to Time-of-Use - let mut assembly_queue = queue.lock().await; - let (queue_free_slots, status) = { - assembly_queue - .add(assembly) - .expect("Failed saving assembly to queue"); - let status = if assembly_queue.capacity() == assembly_queue.size() { - GpuProverInstanceStatus::Full - } else { - GpuProverInstanceStatus::Available - }; - let queue_free_slots = assembly_queue.capacity() - assembly_queue.size(); - (queue_free_slots, status) - }; - - pool.access_storage() - .await - .unwrap() - .gpu_prover_queue_dal() - .update_prover_instance_status(address, status, queue_free_slots, region, zone) - .await; -} diff --git a/prover/prover/src/synthesized_circuit_provider.rs b/prover/prover/src/synthesized_circuit_provider.rs deleted file mode 100644 index e1cec64162b0..000000000000 --- a/prover/prover/src/synthesized_circuit_provider.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::{ - io::{Cursor, Read}, - sync::Arc, -}; - -use prover_service::RemoteSynthesizer; -use queues::{Buffer, IsQueue}; -use tokio::{runtime::Handle, sync::Mutex}; -use zksync_dal::ConnectionPool; -use zksync_types::proofs::SocketAddress; - -use crate::metrics::METRICS; - -pub type SharedAssemblyQueue = Arc>>>; - -pub struct SynthesizedCircuitProvider { - rt_handle: Handle, - queue: SharedAssemblyQueue, - pool: ConnectionPool, - address: SocketAddress, - region: String, - zone: String, -} - -impl SynthesizedCircuitProvider { - pub fn new( - queue: SharedAssemblyQueue, - pool: ConnectionPool, - address: SocketAddress, - region: String, - zone: String, - rt_handle: Handle, - ) -> Self { - Self { - rt_handle, - queue, - pool, - address, - region, - zone, - } - } -} - -impl RemoteSynthesizer for SynthesizedCircuitProvider { - fn try_next(&mut self) -> Option> { - let mut assembly_queue = self.rt_handle.block_on(async { self.queue.lock().await }); - let is_full = assembly_queue.capacity() == assembly_queue.size(); - return match assembly_queue.remove() { - Ok(blob) => { - let queue_free_slots = assembly_queue.capacity() - assembly_queue.size(); - if is_full { - self.rt_handle.block_on(async { - self.pool - .access_storage() - .await - .unwrap() - .gpu_prover_queue_dal() - .update_prover_instance_from_full_to_available( - self.address.clone(), - queue_free_slots, - self.region.clone(), - self.zone.clone(), - ) - .await - }); - } - tracing::trace!( - "Queue free slot {} for capacity {}", - queue_free_slots, - assembly_queue.capacity() - ); - METRICS.queue_free_slots[&assembly_queue.capacity().to_string()] - .observe(queue_free_slots); - - Some(Box::new(Cursor::new(blob))) - } - Err(_) => None, - }; - } -} diff --git a/prover/prover_fri/src/main.rs b/prover/prover_fri/src/main.rs index a1f1ae0088d1..980a499f5b48 100644 --- a/prover/prover_fri/src/main.rs +++ b/prover/prover_fri/src/main.rs @@ -9,7 +9,7 @@ use tokio::{ task::JoinHandle, }; use zksync_config::configs::{ - fri_prover_group::FriProverGroupConfig, FriProverConfig, PostgresConfig, ProverGroupConfig, + fri_prover_group::FriProverGroupConfig, FriProverConfig, PostgresConfig, }; use zksync_dal::ConnectionPool; use zksync_env_config::{ @@ -39,9 +39,10 @@ async fn graceful_shutdown(port: u16) -> anyhow::Result .await .context("failed to build a connection pool")?; let host = local_ip().context("Failed obtaining local IP address")?; - let prover_group_config = - ProverGroupConfig::from_env().context("ProverGroupConfig::from_env()")?; - let zone = get_zone(&prover_group_config).await.context("get_zone()")?; + let zone_url = &FriProverConfig::from_env() + .context("FriProverConfig::from_env()")? + .zone_read_url; + let zone = get_zone(zone_url).await.context("get_zone()")?; let address = SocketAddress { host, port }; Ok(async move { pool.access_storage() @@ -221,9 +222,9 @@ async fn get_prover_tasks( let shared_witness_vector_queue = Arc::new(Mutex::new(witness_vector_queue)); let consumer = shared_witness_vector_queue.clone(); - let prover_group_config = - ProverGroupConfig::from_env().context("ProverGroupConfig::from_env()")?; - let zone = get_zone(&prover_group_config).await.context("get_zone()")?; + let zone = get_zone(&prover_config.zone_read_url) + .await + .context("get_zone()")?; let local_ip = local_ip().context("Failed obtaining local IP address")?; let address = SocketAddress { host: local_ip, diff --git a/prover/setup_key_generator_and_server/Cargo.toml b/prover/setup_key_generator_and_server/Cargo.toml deleted file mode 100644 index 22b1cef97bd6..000000000000 --- a/prover/setup_key_generator_and_server/Cargo.toml +++ /dev/null @@ -1,42 +0,0 @@ -[package] -name = "setup_key_generator_and_server" -version = "0.1.0" -edition = "2018" -authors = ["The Matter Labs Team "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/zksync-era" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] - -[lib] -name = "zksync_setup_key_server" -path = "src/lib.rs" - -[[bin]] -name = "zksync_setup_key_generator" -path = "src/main.rs" - -[dependencies] -zksync_types = { path = "../../core/lib/types" } -vlog = { path = "../../core/lib/vlog" } -zksync_config = { path = "../../core/lib/config" } -zksync_env_config = { path = "../../core/lib/env_config" } - -circuit_testing = { git = "https://github.com/matter-labs/era-circuit_testing.git", branch = "main" } -api = { git = "https://github.com/matter-labs/era-heavy-ops-service.git", branch = "v1.3.3", features = [ - "gpu", -], optional = true, default-features = false } -prover-service = { git = "https://github.com/matter-labs/era-heavy-ops-service.git", branch = "v1.3.3", features = [ - "gpu", -], optional = true, default-features = false } -zkevm_test_harness = { git = "https://github.com/matter-labs/era-zkevm_test_harness.git", branch = "v1.3.3" } - -anyhow = "1.0" -tracing = "0.1" -structopt = "0.3.26" -itertools = "0.10.5" - -[features] -default = [] -gpu = ["api", "prover-service"] diff --git a/prover/setup_key_generator_and_server/data/.gitkeep b/prover/setup_key_generator_and_server/data/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/prover/setup_key_generator_and_server/src/lib.rs b/prover/setup_key_generator_and_server/src/lib.rs deleted file mode 100644 index 34b4896cefe1..000000000000 --- a/prover/setup_key_generator_and_server/src/lib.rs +++ /dev/null @@ -1,63 +0,0 @@ -use std::{fs::File, io::Read, path::Path}; - -use anyhow::Context as _; -use zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit, - bellman::bn256::Bn256, - witness::{ - oracle::VmWitnessOracle, recursive_aggregation::padding_aggregations, - vk_set_generator::circuits_for_vk_generation, - }, -}; -use zksync_config::ProverConfigs; -use zksync_env_config::FromEnv; -use zksync_types::circuit::{ - GEOMETRY_CONFIG, LEAF_SPLITTING_FACTOR, NODE_SPLITTING_FACTOR, SCHEDULER_UPPER_BOUND, -}; - -pub fn get_setup_for_circuit_type(circuit_type: u8) -> anyhow::Result> { - let filepath = get_setup_key_file_path(circuit_type).context("get_setup_key_file_path()")?; - tracing::info!("Fetching setup key from path: {}", filepath); - let file = File::open(filepath.clone()) - .with_context(|| format!("Failed reading setup key from path: {filepath}"))?; - Ok(Box::new(file)) -} - -pub fn get_circuits_for_vk() -> anyhow::Result>>> { - ensure_setup_key_exist().context("ensure_setup_key_exists()")?; - let padding_aggregations = padding_aggregations(NODE_SPLITTING_FACTOR); - Ok(circuits_for_vk_generation( - GEOMETRY_CONFIG, - LEAF_SPLITTING_FACTOR, - NODE_SPLITTING_FACTOR, - SCHEDULER_UPPER_BOUND, - padding_aggregations, - )) -} - -fn ensure_setup_key_exist() -> anyhow::Result<()> { - if !Path::new("setup_2^26.key").exists() { - anyhow::bail!("File setup_2^26.key is required to be present in current directory."); - } - Ok(()) -} - -pub fn get_setup_key_write_file_path(circuit_type: u8) -> String { - let zksync_home = std::env::var("ZKSYNC_HOME").unwrap_or_else(|_| "/".into()); - format!("{}/{}", zksync_home, get_setup_key_filename(circuit_type)) -} - -fn get_setup_key_file_path(circuit_type: u8) -> anyhow::Result { - let prover_config = ProverConfigs::from_env() - .context("ProverConfigs::from_env()")? - .non_gpu; - Ok(format!( - "{}/{}", - prover_config.setup_keys_path, - get_setup_key_filename(circuit_type) - )) -} - -fn get_setup_key_filename(circuit_type: u8) -> String { - format!("setup_{}_key.bin", circuit_type) -} diff --git a/prover/setup_key_generator_and_server/src/main.rs b/prover/setup_key_generator_and_server/src/main.rs deleted file mode 100644 index 9eee0aa5c09e..000000000000 --- a/prover/setup_key_generator_and_server/src/main.rs +++ /dev/null @@ -1,68 +0,0 @@ -#![cfg_attr(not(feature = "gpu"), allow(unused_imports))] - -use std::{env, fs::File}; - -use anyhow::Context as _; -use structopt::StructOpt; -use zkevm_test_harness::{ - abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit, bellman::bn256::Bn256, - witness::oracle::VmWitnessOracle, -}; -use zksync_setup_key_server::{get_circuits_for_vk, get_setup_key_write_file_path}; - -#[cfg(feature = "gpu")] -#[derive(Debug, StructOpt)] -#[structopt( - name = "Generate setup keys for individual circuit", - about = "Tool for generating setup key for individual circuit" -)] -struct Opt { - /// Numeric circuit type valid value from [0-17]. - #[structopt(long)] - numeric_circuit: u8, -} - -#[cfg(not(feature = "gpu"))] -fn main() { - unimplemented!("This binary is only available with `gpu` feature enabled"); -} - -#[cfg(feature = "gpu")] -fn main() -> anyhow::Result<()> { - let opt = Opt::from_args(); - env::set_var("CRS_FILE", "setup_2^26.key"); - tracing::info!("Starting setup key generation!"); - get_circuits_for_vk() - .context("get_circuits_for_vk()")? - .into_iter() - .filter(|c| c.numeric_circuit_type() == opt.numeric_circuit) - .for_each(generate_setup_key_for_circuit); - Ok(()) -} - -#[cfg(feature = "gpu")] -fn generate_setup_key_for_circuit(circuit: ZkSyncCircuit>) { - use prover_service::utils::generate_setup_for_circuit; - - let mut prover = api::Prover::new(); - let setup = generate_setup_for_circuit(&mut prover, &circuit); - save_setup_for_circuit_type(circuit.numeric_circuit_type(), setup); - tracing::info!( - "Finished setup key generation for circuit {:?} (id {:?})", - circuit.short_description(), - circuit.numeric_circuit_type() - ); -} - -#[cfg(feature = "gpu")] -fn save_setup_for_circuit_type(circuit_type: u8, setup: prover_service::Setup) { - let filepath = get_setup_key_write_file_path(circuit_type); - tracing::info!("saving setup key to: {}", filepath); - let setup_file = File::create(&filepath).unwrap(); - setup - .write(setup_file) - .expect("Failed saving setup key to file."); - let setup_file = File::open(filepath).expect("Unable to open file"); - let size = setup_file.metadata().unwrap().len() as f64 / (1024.0 * 1024.0); - println!("Saved file size: {:?}MB", size); -} diff --git a/prover/witness_vector_generator/src/main.rs b/prover/witness_vector_generator/src/main.rs index 79faa17c39cc..552644782c0c 100644 --- a/prover/witness_vector_generator/src/main.rs +++ b/prover/witness_vector_generator/src/main.rs @@ -6,7 +6,7 @@ use structopt::StructOpt; use tokio::sync::{oneshot, watch}; use zksync_config::configs::{ fri_prover_group::FriProverGroupConfig, FriProverConfig, FriWitnessVectorGeneratorConfig, - PostgresConfig, ProverGroupConfig, + PostgresConfig, }; use zksync_dal::ConnectionPool; use zksync_env_config::{object_store::ProverObjectStoreConfig, FromEnv}; @@ -73,11 +73,10 @@ async fn main() -> anyhow::Result<()> { .unwrap_or_default(); let circuit_ids_for_round_to_be_proven = get_all_circuit_id_round_tuples_for(circuit_ids_for_round_to_be_proven); - let prover_group_config = - ProverGroupConfig::from_env().context("ProverGroupConfig::from_env()")?; - let zone = get_zone(&prover_group_config).await.context("get_zone()")?; - let vk_commitments = get_cached_commitments(); let fri_prover_config = FriProverConfig::from_env().context("FriProverConfig::from_env()")?; + let zone_url = &fri_prover_config.zone_read_url; + let zone = get_zone(zone_url).await.context("get_zone()")?; + let vk_commitments = get_cached_commitments(); let witness_vector_generator = WitnessVectorGenerator::new( blob_store, pool,