diff --git a/.github/workflows/build-proof-fri-gpu-compressor-gar.yml b/.github/workflows/build-proof-fri-gpu-compressor-gar.yml index e11a49640369..c9a99c8cabf7 100644 --- a/.github/workflows/build-proof-fri-gpu-compressor-gar.yml +++ b/.github/workflows/build-proof-fri-gpu-compressor-gar.yml @@ -28,7 +28,7 @@ jobs: - name: Download FFLONK key and setup data run: | gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/proof-fri-gpu-compressor-gar - gsutil -m cp -r gs://matterlabs-setup-keys-us/setup-keys/setup_fflonk_compact.key docker/proof-fri-gpu-compressor-gar + gsutil -m cp -r gs://matterlabs-setup-keys-us/setup-keys/setup_compact.key docker/proof-fri-gpu-compressor-gar - name: Login to us-central1 GAR run: | diff --git a/Cargo.lock b/Cargo.lock index 4744b424cea0..9183a9b8c553 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1289,9 +1289,9 @@ dependencies = [ [[package]] name = "boojum" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14bd053feb7173130679a2119e105b5e78af7eb6b0e752de6793e4ee63d8e899" +checksum = "d689807d79092f8f7cfcb72a2313a43da77d56314e41324810566f385875c185" dependencies = [ "arrayvec 0.7.6", "bincode", @@ -1690,9 +1690,9 @@ dependencies = [ [[package]] name = "circuit_definitions" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ebc81d5c2f6ee8de436c242f6466fb315fe25afcbc81aa1c47dfca39a55403" +checksum = "1f04f9c7c6b39255199aaba49802c5f40f95bcff24f5a456446a912d254f4bb1" dependencies = [ "circuit_encodings", "crossbeam", @@ -1704,26 +1704,26 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33375d2448a78c1aed9b8755f7939a6b6f19e2fa80f44f4930a5b4c2bb7cbb44" +checksum = "fc3399f1981164c3c687ea15b1eedd35a16f28069c845a24530de21f996f3fdd" dependencies = [ "derivative", "serde", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zkevm_circuits", ] [[package]] name = "circuit_sequencer_api" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2fec5c28e5a9f085279e70e13b2eebb63a95ee0bfb99d58095ac01c1c7b256" +checksum = "b5583037ec61607ac481b0c887b7fb4f860e65c92c6f3f7be74f6bab7c40c3ce" dependencies = [ "derivative", "rayon", "serde", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_bellman", ] @@ -2983,9 +2983,9 @@ dependencies = [ [[package]] name = "fflonk" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63d70f1cbf9e572ccaf22ca1dfce4b93ff48b9a5e8dd70de50d87edb960d173" +checksum = "b36c5fa909ab71b7eb4b8f7fd092f72ed83b93f2615e42f245ca808d8f308917" dependencies = [ "bincode", "byteorder", @@ -3272,9 +3272,9 @@ dependencies = [ [[package]] name = "franklin-crypto" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d7b8e5864df7f3747e5e64a5b87b4a57aa2a4a20c55c9e96a3a305a8143c45" +checksum = "8309d8fc22fc389d831390473b0ee9fe94e85f19a8b9229b9aec8aa73f5bcee3" dependencies = [ "arr_macro", "bit-vec", @@ -7258,9 +7258,9 @@ dependencies = [ [[package]] name = "rescue_poseidon" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c250446885c257bee70bc0f2600229ce72f03073b87fb8f5dd278dba16b11f30" +checksum = "5e631fd184b6d2f2c04f9dc75405289d99fd0d6612d8dfbb478c01bfbab648fb" dependencies = [ "addchain", "arrayvec 0.7.6", @@ -8665,9 +8665,9 @@ dependencies = [ [[package]] name = "snark_wrapper" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f361c2c47b71ee43f62954ce69f7730e14acb7fb3b0f2c697da02f97327c569" +checksum = "eddb498315057210abd25e2fbe2ea30ab69a07ca0c166406a3e7c056ec8fbbfd" dependencies = [ "derivative", "rand 0.4.6", @@ -11160,9 +11160,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ee848aa90ae045457795b1c0afeb388fbd9fa1e57aa0e8791b28f405e7cc2c" +checksum = "f11d0310228af78e804e5e7deccd1ad6797fce1c44c3b8016722ab78dc183c4a" dependencies = [ "anyhow", "lazy_static", @@ -11170,7 +11170,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.19", + "zk_evm_abstractions 0.150.20", ] [[package]] @@ -11201,22 +11201,22 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f08feaa3e3d99e1e57234fe6ba2aa062609492c6499b2344121c4a699292ab7" +checksum = "d7616edbdeeeb214211e9bdc4346b6a62c6c6118c3d2b83b7db24c01f65f6e25" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.19", + "zkevm_opcode_defs 0.150.20", ] [[package]] name = "zkevm_circuits" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760cfbbce18f42bbecd2565de9bf658234cac2431cce9b0c1df08e9df645d467" +checksum = "6f36004572f5086c513715e11f38230e2538c159d4f5d90dc518833c6fc78293" dependencies = [ "arrayvec 0.7.6", "boojum", @@ -11228,7 +11228,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.19", + "zkevm_opcode_defs 0.150.20", "zksync_cs_derive", ] @@ -11276,9 +11276,9 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2bd8ef52c8f9911dd034b91d29f087ab52f80a80f9d996deb881abbb953793" +checksum = "ce6b4a47c0e7f95b51d29ca336821321cec4bbba0acdd412c3a209270a0d37fe" dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", @@ -11337,9 +11337,9 @@ dependencies = [ [[package]] name = "zksync_bellman" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06d424f7e3862d7a6715179bafffbe7a5dce17129f95ac4124502ab9f1edfb8" +checksum = "78fc3c598daf718b6fc791bfbb01c4634199e479ea9b2c82d06cd108b967d441" dependencies = [ "arrayvec 0.7.6", "bit-vec", @@ -11411,7 +11411,7 @@ dependencies = [ "tokio", "tracing", "vise", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_contracts", "zksync_dal", "zksync_eth_client", @@ -11756,9 +11756,9 @@ dependencies = [ [[package]] name = "zksync_cs_derive" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23237b019a469bfa59c11108beff84a63a43f52fa3afbf1b461527031fc47644" +checksum = "97ab7469afcd9e1cb220fe17b3c9f2abe031648b94add97da37065c58be08554" dependencies = [ "proc-macro-error", "proc-macro2 1.0.92", @@ -12087,9 +12087,9 @@ dependencies = [ [[package]] name = "zksync_ff" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5aa518ed0ea7ef737d50de02025f5a593dbb11104b3c1bf5a00f39581b47dc" +checksum = "6583c2db6dc787600879d27ec98d2eb628a757ee41831e54f8be1dae4acc599f" dependencies = [ "byteorder", "hex", @@ -12100,9 +12100,9 @@ dependencies = [ [[package]] name = "zksync_ff_derive" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b43100a1278e2f64820368db8751c2441860ea74ab5749074cf8f864647af" +checksum = "8f62e93dde881d8dd44d1864c7682394dde6d18e582fc5af78768221a1766fdf" dependencies = [ "num-bigint 0.4.6", "num-integer", @@ -12145,9 +12145,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9da880b8282a97d9dfd6ac9f0189d310c0602059a8de20aa66a883979d6adba" +checksum = "174f82592590901cbcf2b298059c89f817b404299ffbd050a3915ea72357f545" dependencies = [ "boojum", "derivative", @@ -12295,7 +12295,7 @@ dependencies = [ "zk_evm 0.133.0", "zk_evm 0.140.0", "zk_evm 0.141.0", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_contracts", "zksync_eth_signer", "zksync_mini_merkle_tree", @@ -12335,7 +12335,7 @@ dependencies = [ "tower-http 0.5.2", "tracing", "vise", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_config", "zksync_consensus_roles", "zksync_contracts", @@ -12634,9 +12634,9 @@ dependencies = [ [[package]] name = "zksync_pairing" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f0d96f3e386f3b4c76a614d73b71714d6712e917d462bf8053b8af352da0b3" +checksum = "baafdd03ca7a48dc9b6808be3630f2d8a003aa425d71946e9158d8c0aeb1cc79" dependencies = [ "byteorder", "cfg-if", @@ -12741,6 +12741,7 @@ dependencies = [ "serde_with", "strum", "tokio", + "zksync_bellman", "zksync_object_store", "zksync_types", "zksync_vm_interface", @@ -12845,9 +12846,9 @@ dependencies = [ [[package]] name = "zksync_solidity_vk_codegen" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb10f377dcc24fe2268cc5f530c16af1c879a791570d8fe64064b58ba143c7cc" +checksum = "bb05a12f5552d7947427f755e29f548ce94733851f1fa16edaf8b75c28033e73" dependencies = [ "ethereum-types", "franklin-crypto", @@ -13088,8 +13089,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=457d8a7eea9093af9440662 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.19", - "zkevm_opcode_defs 0.150.19", + "zk_evm_abstractions 0.150.20", + "zkevm_opcode_defs 0.150.20", "zksync_vm2_interface", ] diff --git a/Cargo.toml b/Cargo.toml index 21a1a342f1ab..59d5f2052e1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -228,18 +228,19 @@ tokio-stream = "0.1.16" # We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. # However, for the historical version of protocol crates, we have lax requirements. Otherwise, # Bumping a crypto dependency like `boojum` would require us to republish all the historical packages. -circuit_encodings = "=0.150.19" -circuit_sequencer_api = "=0.150.19" -circuit_definitions = "=0.150.19" -crypto_codegen = { package = "zksync_solidity_vk_codegen",version = "=0.30.12" } -kzg = { package = "zksync_kzg", version = "=0.150.19" } +circuit_encodings = "=0.150.20" +circuit_sequencer_api = "=0.150.20" +circuit_definitions = "=0.150.20" +crypto_codegen = { package = "zksync_solidity_vk_codegen",version = "=0.30.13" } +kzg = { package = "zksync_kzg", version = "=0.150.20" } zk_evm = { version = "=0.133.0" } zk_evm_1_3_1 = { package = "zk_evm", version = "0.131.0-rc.2" } zk_evm_1_3_3 = { package = "zk_evm", version = "0.133" } zk_evm_1_4_0 = { package = "zk_evm", version = "0.140" } zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" } -zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.19" } -fflonk = "=0.30.12" +zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.20" } +fflonk = "=0.30.13" +bellman = {package = "zksync_bellman", version = "=0.30.13"} # New VM; pinned to a specific commit because of instability zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "457d8a7eea9093af9440662e33e598c13ba41633" } diff --git a/core/lib/prover_interface/Cargo.toml b/core/lib/prover_interface/Cargo.toml index 533e3bc1296a..dfa860c5aa6b 100644 --- a/core/lib/prover_interface/Cargo.toml +++ b/core/lib/prover_interface/Cargo.toml @@ -18,6 +18,7 @@ zksync_types.workspace = true # We can use the newest api to send proofs to L1. circuit_definitions.workspace = true fflonk.workspace = true +bellman.workspace = true circuit_sequencer_api.workspace = true serde.workspace = true diff --git a/core/lib/prover_interface/src/outputs.rs b/core/lib/prover_interface/src/outputs.rs index b536c39778a5..099963dae7a2 100644 --- a/core/lib/prover_interface/src/outputs.rs +++ b/core/lib/prover_interface/src/outputs.rs @@ -1,10 +1,12 @@ use core::fmt; +use bellman::plonk::better_better_cs::proof::Proof as PlonkProof; use circuit_definitions::{ boojum::pairing::bn256::Bn256, - circuit_definitions::aux_layer::ZkSyncSnarkWrapperCircuitNoLookupCustomGate, + circuit_definitions::aux_layer::{ + ZkSyncSnarkWrapperCircuit, ZkSyncSnarkWrapperCircuitNoLookupCustomGate, + }, }; -use circuit_sequencer_api::proof::FinalProof; use fflonk::FflonkProof; use serde::{Deserialize, Serialize}; use serde_with::{hex::Hex, serde_as}; @@ -45,7 +47,7 @@ pub struct FflonkL1BatchProofForL1 { #[derive(Clone, Serialize, Deserialize)] pub struct PlonkL1BatchProofForL1 { pub aggregation_result_coords: [[u8; 32]; 4], - pub scheduler_proof: FinalProof, + pub scheduler_proof: PlonkProof, pub protocol_version: ProtocolSemanticVersion, } diff --git a/docker/proof-fri-gpu-compressor-gar/Dockerfile b/docker/proof-fri-gpu-compressor-gar/Dockerfile index 42127ea6126c..d74440bd009b 100644 --- a/docker/proof-fri-gpu-compressor-gar/Dockerfile +++ b/docker/proof-fri-gpu-compressor-gar/Dockerfile @@ -4,18 +4,15 @@ FROM nvidia/cuda:12.4.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_fflonk_compact.key /setup_fflonk_compact.key +COPY ./setup_compact.key /setup_compact.key RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/* - # copy finalization hints required for assembly generation -COPY --from=proof_fri_gpu /setup_2\^24.key /setup_2\^24.key COPY --from=proof_fri_gpu /prover/data/keys/ /prover/data/keys/ COPY --from=proof_fri_gpu /usr/bin/zksync_proof_fri_compressor /usr/bin/ -ENV CRS_FILE=/setup_2\^24.key -ENV COMPACT_CRS_FILE=/setup_fflonk_compact.key +ENV COMPACT_CRS_FILE=/setup_compact.key ENTRYPOINT ["zksync_proof_fri_compressor"] diff --git a/etc/env/base/contracts.toml b/etc/env/base/contracts.toml index 1cb22440e33c..d3eaabf92bd8 100644 --- a/etc/env/base/contracts.toml +++ b/etc/env/base/contracts.toml @@ -39,7 +39,7 @@ BLOB_VERSIONED_HASH_RETRIEVER_ADDR = "0x0000000000000000000000000000000000000000 GENESIS_ROOT = "0x09e68951458b18c24ae5f4100160b53c4888c9b3c3c1859cc674bc02236675ad" GENESIS_BATCH_COMMITMENT = "0x7238eab6a0e9f5bb84421feae6b6b9ae80816d490c875d29ff3ded375a3e078f" -GENESIS_ROLLUP_LEAF_INDEX = "64" +GENESIS_ROLLUP_LEAF_INDEX = "64" # Ecosystem-wide params L1_ROLLUP_DA_VALIDATOR = "0x0000000000000000000000000000000000000000" @@ -67,7 +67,7 @@ L1_NATIVE_TOKEN_VAULT_IMPL_ADDR ="0xFC073319977e314F251EAE6ae6bE76B0B3BAeeCF" L1_NATIVE_TOKEN_VAULT_PROXY_ADDR ="0xFC073319977e314F251EAE6ae6bE76B0B3BAeeCF" L2_NATIVE_TOKEN_VAULT_IMPL_ADDR = "0x0000000000000000000000000000000000010004" L2_NATIVE_TOKEN_VAULT_PROXY_ADDR = "0x0000000000000000000000000000000000010004" -L2_SHARED_BRIDGE_IMPL_ADDR = "0x0000000000000000000000000000000000010003" +L2_SHARED_BRIDGE_IMPL_ADDR = "0x0000000000000000000000000000000000010003" L2_SHARED_BRIDGE_ADDR = "0x0000000000000000000000000000000000010003" L2_ERC20_BRIDGE_ADDR = "0x0000000000000000000000000000000000010003" CTM_DEPLOYMENT_TRACKER_IMPL_ADDR ="0xFC073319977e314F251EAE6ae6bE76B0B3BAeeCF" diff --git a/etc/env/base/fri_proof_compressor.toml b/etc/env/base/fri_proof_compressor.toml index a8825ca98613..c8855d6b2a48 100644 --- a/etc/env/base/fri_proof_compressor.toml +++ b/etc/env/base/fri_proof_compressor.toml @@ -5,8 +5,8 @@ prometheus_pushgateway_url = "http://127.0.0.1:9091" prometheus_push_interval_ms = 100 generation_timeout_in_secs = 3600 max_attempts = 5 -universal_setup_path = "../keys/setup/setup_2^24.key" -universal_setup_download_url = "https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^24.key" +universal_setup_path = "../keys/setup/setup_compact.key" +universal_setup_download_url = "https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_compact.key" verify_wrapper_proof = true universal_fflonk_setup_path = "../keys/setup/setup_fflonk_compact.key" universal_fflonk_setup_download_url = "https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_fflonk_compact.key" diff --git a/etc/env/file_based/general.yaml b/etc/env/file_based/general.yaml index f15b63a757f7..ece5a1156c5f 100644 --- a/etc/env/file_based/general.yaml +++ b/etc/env/file_based/general.yaml @@ -182,8 +182,8 @@ proof_compressor: prometheus_push_interval_ms: 100 generation_timeout_in_secs: 3600 max_attempts: 5 - universal_setup_path: keys/setup/setup_2^24.key - universal_setup_download_url: https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2^24.key + universal_setup_path: keys/setup/setup_compact.key + universal_setup_download_url: https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_compact.key verify_wrapper_proof: true universal_fflonk_setup_path: keys/setup/setup_fflonk_compact.key universal_fflonk_setup_download_url: https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_fflonk_compact.key diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 761c9e398cb4..25aa83a2192c 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -625,9 +625,9 @@ dependencies = [ [[package]] name = "boojum" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14bd053feb7173130679a2119e105b5e78af7eb6b0e752de6793e4ee63d8e899" +checksum = "d689807d79092f8f7cfcb72a2313a43da77d56314e41324810566f385875c185" dependencies = [ "arrayvec 0.7.6", "bincode", @@ -658,8 +658,7 @@ dependencies = [ [[package]] name = "boojum-cuda" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd43bc7fc457920cb3b823e4f95ffbbf180b2c48b8d643125cd121325cdd8db" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "boojum", "cmake", @@ -805,9 +804,9 @@ dependencies = [ [[package]] name = "circuit_definitions" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ebc81d5c2f6ee8de436c242f6466fb315fe25afcbc81aa1c47dfca39a55403" +checksum = "1f04f9c7c6b39255199aaba49802c5f40f95bcff24f5a456446a912d254f4bb1" dependencies = [ "circuit_encodings", "crossbeam", @@ -819,26 +818,26 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33375d2448a78c1aed9b8755f7939a6b6f19e2fa80f44f4930a5b4c2bb7cbb44" +checksum = "fc3399f1981164c3c687ea15b1eedd35a16f28069c845a24530de21f996f3fdd" dependencies = [ "derivative", "serde", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zkevm_circuits", ] [[package]] name = "circuit_sequencer_api" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2fec5c28e5a9f085279e70e13b2eebb63a95ee0bfb99d58095ac01c1c7b256" +checksum = "b5583037ec61607ac481b0c887b7fb4f860e65c92c6f3f7be74f6bab7c40c3ce" dependencies = [ "derivative", "rayon", "serde", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_bellman", ] @@ -1707,8 +1706,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_cudart" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f881cf689ba889bb0fa04c0e71aba701acd7fafd3fa545e3f2782f2a8c0ba0" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "bitflags 2.6.0", "era_cudart_sys", @@ -1718,8 +1716,7 @@ dependencies = [ [[package]] name = "era_cudart_sys" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f29cbd9e6d97fc1f05b484f960e921fe69548b4773a361b2e403e4cb9d6d575" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "serde_json", ] @@ -1838,9 +1835,9 @@ dependencies = [ [[package]] name = "fflonk" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63d70f1cbf9e572ccaf22ca1dfce4b93ff48b9a5e8dd70de50d87edb960d173" +checksum = "b36c5fa909ab71b7eb4b8f7fd092f72ed83b93f2615e42f245ca808d8f308917" dependencies = [ "bincode", "byteorder", @@ -1856,8 +1853,7 @@ dependencies = [ [[package]] name = "fflonk-cuda" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b008e6158c95747b3b135adbd7f6d563c406849a10c00abfef109b4d0442a589" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "bincode", "byteorder", @@ -1975,9 +1971,9 @@ dependencies = [ [[package]] name = "franklin-crypto" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d7b8e5864df7f3747e5e64a5b87b4a57aa2a4a20c55c9e96a3a305a8143c45" +checksum = "8309d8fc22fc389d831390473b0ee9fe94e85f19a8b9229b9aec8aa73f5bcee3" dependencies = [ "arr_macro", "bit-vec 0.6.3", @@ -4551,8 +4547,7 @@ dependencies = [ [[package]] name = "proof-compression" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40624617ed1535349cf31671a7091703d3a31e64d6a7760a5e952c68ee1f4f0e" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "bincode", "byteorder", @@ -4562,6 +4557,7 @@ dependencies = [ "serde", "serde_json", "shivini", + "zksync-gpu-prover", ] [[package]] @@ -5070,9 +5066,9 @@ dependencies = [ [[package]] name = "rescue_poseidon" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c250446885c257bee70bc0f2600229ce72f03073b87fb8f5dd278dba16b11f30" +checksum = "5e631fd184b6d2f2c04f9dc75405289d99fd0d6612d8dfbb478c01bfbab648fb" dependencies = [ "addchain", "arrayvec 0.7.6", @@ -5861,8 +5857,7 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shivini" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c336213e4ec7651d2984e892326d09c195ee166493c192b0d8aad36288e5c5f" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "bincode", "boojum", @@ -5951,9 +5946,9 @@ dependencies = [ [[package]] name = "snark_wrapper" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f361c2c47b71ee43f62954ce69f7730e14acb7fb3b0f2c697da02f97327c569" +checksum = "eddb498315057210abd25e2fbe2ea30ab69a07ca0c166406a3e7c056ec8fbbfd" dependencies = [ "derivative", "rand 0.4.6", @@ -7839,9 +7834,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ee848aa90ae045457795b1c0afeb388fbd9fa1e57aa0e8791b28f405e7cc2c" +checksum = "f11d0310228af78e804e5e7deccd1ad6797fce1c44c3b8016722ab78dc183c4a" dependencies = [ "anyhow", "lazy_static", @@ -7849,7 +7844,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.19", + "zk_evm_abstractions 0.150.20", ] [[package]] @@ -7880,22 +7875,22 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f08feaa3e3d99e1e57234fe6ba2aa062609492c6499b2344121c4a699292ab7" +checksum = "d7616edbdeeeb214211e9bdc4346b6a62c6c6118c3d2b83b7db24c01f65f6e25" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.19", + "zkevm_opcode_defs 0.150.20", ] [[package]] name = "zkevm-assembly" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd4bc83f3a711d820829dccce24fa59ab4c588c2745203ec6a6ad8c871362b7" +checksum = "c2dc9539ce7f550231934e6b1faae23387fd132f1ac053b8e674d30968158bff" dependencies = [ "env_logger 0.9.3", "hex", @@ -7908,14 +7903,14 @@ dependencies = [ "smallvec", "structopt", "thiserror 1.0.69", - "zkevm_opcode_defs 0.150.19", + "zkevm_opcode_defs 0.150.20", ] [[package]] name = "zkevm_circuits" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760cfbbce18f42bbecd2565de9bf658234cac2431cce9b0c1df08e9df645d467" +checksum = "6f36004572f5086c513715e11f38230e2538c159d4f5d90dc518833c6fc78293" dependencies = [ "arrayvec 0.7.6", "boojum", @@ -7927,7 +7922,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.19", + "zkevm_opcode_defs 0.150.20", "zksync_cs_derive", ] @@ -7975,9 +7970,9 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2bd8ef52c8f9911dd034b91d29f087ab52f80a80f9d996deb881abbb953793" +checksum = "ce6b4a47c0e7f95b51d29ca336821321cec4bbba0acdd412c3a209270a0d37fe" dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", @@ -7992,9 +7987,9 @@ dependencies = [ [[package]] name = "zkevm_test_harness" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24b28c5b855e4e28d85455b48f346e9d46a00c6af84d5bbc38e5b5f7410b5cb" +checksum = "36ed8dd80455d90a51a6618a5bc07685beaad582cabca71ccef25866cd73993b" dependencies = [ "bincode", "circuit_definitions", @@ -8021,8 +8016,7 @@ dependencies = [ [[package]] name = "zksync-gpu-ffi" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f6a84e4e361977a2dc5dbe783e3856e40b1050dc1b9bb3e9833a5e59c20697" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "cmake", "crossbeam", @@ -8036,8 +8030,7 @@ dependencies = [ [[package]] name = "zksync-gpu-prover" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba58bbaf4920c635553d3dfb7796636223f55e75ae6512eb9c98f48f0a03215" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "bit-vec 0.6.3", "cfg-if", @@ -8053,8 +8046,7 @@ dependencies = [ [[package]] name = "zksync-wrapper-prover" version = "0.152.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4bcf41946f95a1e64ce99cde1d54966a04c5ef2c89d9a87f0fa61e39987510b" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=si/better-proof-compression#cdf0c2fb320021e111ee1fdfc3d9ca403613fdee" dependencies = [ "circuit_definitions", "zkevm_test_harness", @@ -8084,9 +8076,9 @@ dependencies = [ [[package]] name = "zksync_bellman" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06d424f7e3862d7a6715179bafffbe7a5dce17129f95ac4124502ab9f1edfb8" +checksum = "78fc3c598daf718b6fc791bfbb01c4634199e479ea9b2c82d06cd108b967d441" dependencies = [ "arrayvec 0.7.6", "bit-vec 0.6.3", @@ -8310,9 +8302,9 @@ dependencies = [ [[package]] name = "zksync_cs_derive" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23237b019a469bfa59c11108beff84a63a43f52fa3afbf1b461527031fc47644" +checksum = "97ab7469afcd9e1cb220fe17b3c9f2abe031648b94add97da37065c58be08554" dependencies = [ "proc-macro-error", "proc-macro2 1.0.92", @@ -8412,9 +8404,9 @@ dependencies = [ [[package]] name = "zksync_ff" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5aa518ed0ea7ef737d50de02025f5a593dbb11104b3c1bf5a00f39581b47dc" +checksum = "6583c2db6dc787600879d27ec98d2eb628a757ee41831e54f8be1dae4acc599f" dependencies = [ "byteorder", "hex", @@ -8425,9 +8417,9 @@ dependencies = [ [[package]] name = "zksync_ff_derive" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b43100a1278e2f64820368db8751c2441860ea74ab5749074cf8f864647af" +checksum = "8f62e93dde881d8dd44d1864c7682394dde6d18e582fc5af78768221a1766fdf" dependencies = [ "num-bigint 0.4.6", "num-integer", @@ -8440,9 +8432,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.150.19" +version = "0.150.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9da880b8282a97d9dfd6ac9f0189d310c0602059a8de20aa66a883979d6adba" +checksum = "174f82592590901cbcf2b298059c89f817b404299ffbd050a3915ea72357f545" dependencies = [ "boojum", "derivative", @@ -8498,7 +8490,7 @@ dependencies = [ "zk_evm 0.133.0", "zk_evm 0.140.0", "zk_evm 0.141.0", - "zk_evm 0.150.19", + "zk_evm 0.150.20", "zksync_contracts", "zksync_mini_merkle_tree", "zksync_system_constants", @@ -8532,9 +8524,9 @@ dependencies = [ [[package]] name = "zksync_pairing" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f0d96f3e386f3b4c76a614d73b71714d6712e917d462bf8053b8af352da0b3" +checksum = "baafdd03ca7a48dc9b6808be3630f2d8a003aa425d71946e9158d8c0aeb1cc79" dependencies = [ "byteorder", "cfg-if", @@ -8784,6 +8776,7 @@ dependencies = [ "serde", "serde_with", "strum", + "zksync_bellman", "zksync_object_store", "zksync_types", "zksync_vm_interface", @@ -8841,6 +8834,7 @@ dependencies = [ "hex", "md5", "once_cell", + "proof-compression", "serde", "serde_json", "sha3 0.10.8", @@ -8867,9 +8861,9 @@ dependencies = [ [[package]] name = "zksync_solidity_vk_codegen" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb10f377dcc24fe2268cc5f530c16af1c879a791570d8fe64064b58ba143c7cc" +checksum = "bb05a12f5552d7947427f755e29f548ce94733851f1fa16edaf8b75c28033e73" dependencies = [ "ethereum-types", "franklin-crypto", @@ -8993,8 +8987,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=457d8a7eea9093af9440662 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.19", - "zkevm_opcode_defs 0.150.19", + "zk_evm_abstractions 0.150.20", + "zkevm_opcode_defs 0.150.20", "zksync_vm2_interface", ] diff --git a/prover/Cargo.toml b/prover/Cargo.toml index aed8cbfdc723..7a5b9d13c561 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -68,18 +68,24 @@ url = "2.5.2" vise = "0.2.0" # Proving dependencies -circuit_definitions = "=0.150.19" -circuit_sequencer_api = "=0.150.19" -zkevm_test_harness = "=0.150.19" -proof-compression-gpu = { package = "proof-compression", version = "=0.152.10"} -fflonk-gpu = { package = "fflonk-cuda", version = "=0.152.10"} -fflonk = "=0.30.12" -franklin-crypto = "=0.30.12" +circuit_definitions = "=0.150.20" +circuit_sequencer_api = "=0.150.20" +zkevm_test_harness = "=0.150.20" +fflonk = "=0.30.13" +franklin-crypto = "=0.30.13" # GPU proving dependencies -wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.152.10"} -shivini = "=0.152.10" -boojum-cuda = "=0.152.10" +# proof-compression-gpu = { package = "proof-compression", version = "=0.152.10"} +# fflonk-gpu = { package = "fflonk-cuda", version = "=0.152.10"} +# wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.152.10"} +# shivini = "=0.152.10" +# boojum-cuda = "=0.152.10" + +proof-compression-gpu = { package = "proof-compression", git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch = "si/better-proof-compression"} +fflonk-gpu = { package = "fflonk-cuda", git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch = "si/better-proof-compression"} +wrapper_prover = { package = "zksync-wrapper-prover", git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch = "si/better-proof-compression"} +shivini = { version = "=0.152.10", git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch = "si/better-proof-compression" } +boojum-cuda = { version = "=0.152.10", git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch = "si/better-proof-compression" } # Core workspace dependencies zksync_multivm = { path = "../core/lib/multivm", version = "0.1.0" } diff --git a/prover/crates/bin/proof_fri_compressor/src/compressor.rs b/prover/crates/bin/proof_fri_compressor/src/compressor.rs index 3671fa183b5d..34848e35caf8 100644 --- a/prover/crates/bin/proof_fri_compressor/src/compressor.rs +++ b/prover/crates/bin/proof_fri_compressor/src/compressor.rs @@ -4,6 +4,10 @@ use anyhow::Context as _; use async_trait::async_trait; use circuit_sequencer_api::proof::FinalProof; use fflonk_gpu::{FflonkSnarkVerifierCircuit, FflonkSnarkVerifierCircuitProof}; +use proof_compression_gpu::{ + run_proof_chain, ProofStorage, SchedulerProof, SimpleProofStorage, SnarkWrapper, + SnarkWrapperProof, +}; use tokio::task::JoinHandle; use wrapper_prover::{GPUWrapperConfigs, WrapperProver}; use zkevm_test_harness::proof_wrapper_utils::{get_trusted_setup, DEFAULT_WRAPPER_CONFIG}; @@ -15,7 +19,8 @@ use zksync_prover_fri_types::{ circuit_definitions::{ aux_layer::{ wrapper::ZkSyncCompressionWrapper, ZkSyncCompressionForWrapperCircuit, - ZkSyncCompressionLayerCircuit, ZkSyncCompressionProof, + ZkSyncCompressionForWrapperProof, ZkSyncCompressionLayerCircuit, + ZkSyncCompressionLayerProof, ZkSyncCompressionProof, ZkSyncCompressionProofForWrapper, ZkSyncCompressionVerificationKeyForWrapper, }, recursion_layer::{ @@ -32,7 +37,9 @@ use zksync_prover_interface::outputs::{ }; use zksync_prover_keystore::keystore::Keystore; use zksync_queued_job_processor::JobProcessor; -use zksync_types::{protocol_version::ProtocolSemanticVersion, L1BatchNumber}; +use zksync_types::{ + basic_fri_types::Blob, protocol_version::ProtocolSemanticVersion, L1BatchNumber, +}; use crate::metrics::METRICS; @@ -46,11 +53,6 @@ pub struct ProofCompressor { is_fflonk: bool, } -pub enum Proof { - Plonk(Box), - Fflonk(FflonkSnarkVerifierCircuitProof), -} - impl ProofCompressor { pub fn new( blob_store: Arc, @@ -85,151 +87,6 @@ impl ProofCompressor { } array } - - #[tracing::instrument(skip(proof, _compression_mode))] - pub fn generate_plonk_proof( - proof: ZkSyncRecursionLayerProof, - _compression_mode: u8, - keystore: Keystore, - ) -> anyhow::Result { - let scheduler_vk = keystore - .load_recursive_layer_verification_key( - ZkSyncRecursionLayerStorageType::SchedulerCircuit as u8, - ) - .context("get_recursiver_layer_vk_for_circuit_type()")?; - - let wrapper_proof = { - let crs = get_trusted_setup(); - let wrapper_config = DEFAULT_WRAPPER_CONFIG; - let mut prover = WrapperProver::::new(&crs, wrapper_config).unwrap(); - - prover - .generate_setup_data(scheduler_vk.into_inner()) - .unwrap(); - prover.generate_proofs(proof.into_inner()).unwrap(); - - prover.get_wrapper_proof().unwrap() - }; - - // (Re)serialization should always succeed. - let serialized = bincode::serialize(&wrapper_proof) - .expect("Failed to serialize proof with ZkSyncSnarkWrapperCircuit"); - - // For sending to L1, we can use the `FinalProof` type, that has a generic circuit inside, that is not used for serialization. - // So `FinalProof` and `Proof>>` are compatible on serialization bytecode level. - let final_proof: FinalProof = - bincode::deserialize(&serialized).expect("Failed to deserialize final proof"); - Ok(final_proof) - } - - #[tracing::instrument(skip(proof, compression_mode, keystore))] - pub fn generate_fflonk_proof( - proof: ZkSyncRecursionLayerProof, - compression_mode: u8, - keystore: Keystore, - ) -> anyhow::Result { - let scheduler_vk = keystore - .load_recursive_layer_verification_key( - ZkSyncRecursionLayerStorageType::SchedulerCircuit as u8, - ) - .context("get_recursiver_layer_vk_for_circuit_type()")?; - - // compress proof step by step: 1 -> 2 -> 3 -> 4 -> 5(wrapper) - let (compression_wrapper_proof, compression_wrapper_vk) = Self::compress_proof( - &keystore, - proof.into_inner(), - scheduler_vk.into_inner(), - compression_mode, - )?; - - // construct fflonk snark verifier circuit - let wrapper_function = - ZkSyncCompressionWrapper::from_numeric_circuit_type(compression_mode); - let fixed_parameters = compression_wrapper_vk.fixed_parameters.clone(); - let circuit = FflonkSnarkVerifierCircuit { - witness: Some(compression_wrapper_proof), - vk: compression_wrapper_vk, - fixed_parameters, - transcript_params: (), - wrapper_function, - }; - - tracing::info!("Proving FFLONK snark verifier"); - - let setup = keystore.load_fflonk_snark_verifier_setup_data()?; - - tracing::info!("Loaded setup data for FFLONK verification"); - - let proof = fflonk_gpu::gpu_prove_fflonk_snark_verifier_circuit_with_precomputation( - &circuit, - &setup, - &setup.get_verification_key(), - ); - tracing::info!("Finished proof generation"); - Ok(proof) - } - - pub fn compress_proof( - keystore: &Keystore, - proof: ZkSyncCompressionProof, - vk: ZkSyncRecursionVerificationKey, - compression_steps: u8, - ) -> anyhow::Result<( - ZkSyncCompressionProofForWrapper, - ZkSyncCompressionVerificationKeyForWrapper, - )> { - let worker = franklin_crypto::boojum::worker::Worker::new(); - let mut compression_circuit = - ZkSyncCompressionLayerCircuit::from_witness_and_vk(Some(proof), vk.clone(), 1); - let mut compression_wrapper_circuit = None; - - for step_idx in 1..compression_steps { - tracing::info!("Proving compression {:?}", step_idx); - let setup_data = keystore.load_compression_setup_data(step_idx)?; - let (proof, vk) = - proof_compression_gpu::prove_compression_layer_circuit_with_precomputations( - compression_circuit.clone(), - &setup_data.setup, - setup_data.finalization_hint, - setup_data.vk, - &worker, - ); - tracing::info!("Proof for compression {:?} is generated!", step_idx); - - if step_idx + 1 == compression_steps { - compression_wrapper_circuit = - Some(ZkSyncCompressionForWrapperCircuit::from_witness_and_vk( - Some(proof), - vk, - compression_steps, - )); - } else { - compression_circuit = ZkSyncCompressionLayerCircuit::from_witness_and_vk( - Some(proof), - vk, - step_idx + 1, - ); - } - } - - // last wrapping step - tracing::info!("Proving compression {} for wrapper", compression_steps); - - let setup_data = keystore.load_compression_wrapper_setup_data(compression_steps)?; - let (proof, vk) = - proof_compression_gpu::prove_compression_wrapper_circuit_with_precomputations( - compression_wrapper_circuit.unwrap(), - &setup_data.setup, - setup_data.finalization_hint, - setup_data.vk, - &worker, - ); - tracing::info!( - "Proof for compression wrapper {} is generated!", - compression_steps - ); - Ok((proof, vk)) - } } #[async_trait] @@ -237,7 +94,7 @@ impl JobProcessor for ProofCompressor { type Job = ZkSyncRecursionLayerProof; type JobId = L1BatchNumber; - type JobArtifacts = Proof; + type JobArtifacts = SnarkWrapperProof; const SERVICE_NAME: &'static str = "ProofCompressor"; @@ -292,23 +149,19 @@ impl JobProcessor for ProofCompressor { job: ZkSyncRecursionLayerProof, _started_at: Instant, ) -> JoinHandle> { - let compression_mode = self.compression_mode; let keystore = self.keystore.clone(); - let is_fflonk = self.is_fflonk; + let snark_wrapper_mode = if self.is_fflonk { + SnarkWrapper::FFfonk + } else { + SnarkWrapper::Plonk + }; + tokio::task::spawn_blocking(move || { - if !is_fflonk { - Ok(Proof::Plonk(Box::new(Self::generate_plonk_proof( - job, - compression_mode, - keystore, - )?))) - } else { - Ok(Proof::Fflonk(Self::generate_fflonk_proof( - job, - compression_mode, - keystore, - )?)) - } + Ok(run_proof_chain( + snark_wrapper_mode, + &keystore, + job.into_inner(), + )) }) } @@ -333,16 +186,18 @@ impl JobProcessor for ProofCompressor { Self::aux_output_witness_to_array(aux_output_witness_wrapper.0); let l1_batch_proof = match artifacts { - Proof::Plonk(proof) => L1BatchProofForL1::Plonk(PlonkL1BatchProofForL1 { - aggregation_result_coords, - scheduler_proof: *proof, - protocol_version: self.protocol_version, - }), - Proof::Fflonk(proof) => L1BatchProofForL1::Fflonk(FflonkL1BatchProofForL1 { + SnarkWrapperProof::Plonk(proof) => L1BatchProofForL1::Plonk(PlonkL1BatchProofForL1 { aggregation_result_coords, scheduler_proof: proof, protocol_version: self.protocol_version, }), + SnarkWrapperProof::FFfonk(proof) => { + L1BatchProofForL1::Fflonk(FflonkL1BatchProofForL1 { + aggregation_result_coords, + scheduler_proof: proof, + protocol_version: self.protocol_version, + }) + } }; let blob_save_started_at = Instant::now(); diff --git a/prover/crates/bin/proof_fri_compressor/src/main.rs b/prover/crates/bin/proof_fri_compressor/src/main.rs index dae03ab41465..835a009324f8 100644 --- a/prover/crates/bin/proof_fri_compressor/src/main.rs +++ b/prover/crates/bin/proof_fri_compressor/src/main.rs @@ -1,7 +1,7 @@ #![allow(incomplete_features)] // We have to use generic const exprs. #![feature(generic_const_exprs)] -use std::{env, time::Duration}; +use std::{env, path::PathBuf, time::Duration}; use anyhow::Context as _; use clap::Parser; @@ -114,7 +114,7 @@ async fn main() -> anyhow::Result<()> { }) .expect("Error setting Ctrl+C handler"); // Setting handler should always succeed. - setup_crs_keys(&config, is_fflonk); + setup_crs_keys(&config); tracing::info!("Starting proof compressor"); @@ -139,20 +139,10 @@ async fn main() -> anyhow::Result<()> { Ok(()) } -fn setup_crs_keys(config: &FriProofCompressorConfig, is_fflonk: bool) { - if is_fflonk { - download_initial_setup_keys_if_not_present( - &config.universal_fflonk_setup_path, - &config.universal_fflonk_setup_download_url, - ); - - env::set_var("COMPACT_CRS_FILE", &config.universal_fflonk_setup_path); - return; - } - +fn setup_crs_keys(config: &FriProofCompressorConfig) { download_initial_setup_keys_if_not_present( &config.universal_setup_path, &config.universal_setup_download_url, ); - env::set_var("CRS_FILE", &config.universal_setup_path); + env::set_var("COMPACT_CRS_FILE", &config.universal_setup_path); } diff --git a/prover/crates/bin/vk_setup_data_generator_server_fri/Cargo.toml b/prover/crates/bin/vk_setup_data_generator_server_fri/Cargo.toml index f385c33dd6ad..895d43ae42b7 100644 --- a/prover/crates/bin/vk_setup_data_generator_server_fri/Cargo.toml +++ b/prover/crates/bin/vk_setup_data_generator_server_fri/Cargo.toml @@ -40,4 +40,4 @@ proptest.workspace = true [features] default = [] -gpu = ["zksync_prover_keystore/gpu", "proof-compression-gpu", "shivini"] +gpu = ["zksync_prover_keystore/gpu", "proof-compression-gpu/allocator", "shivini"] diff --git a/prover/crates/bin/vk_setup_data_generator_server_fri/src/main.rs b/prover/crates/bin/vk_setup_data_generator_server_fri/src/main.rs index edd88846d1bc..1ecc90c4be8b 100644 --- a/prover/crates/bin/vk_setup_data_generator_server_fri/src/main.rs +++ b/prover/crates/bin/vk_setup_data_generator_server_fri/src/main.rs @@ -1,6 +1,4 @@ -#![feature(allocator_api)] -#![allow(dead_code)] // todo: remove after setup is generated -#![allow(unused_imports)] // todo: remove after setup is generated +#![feature(allocator_api, generic_const_exprs)] //! Tool to generate different types of keys used by the proving system. //! @@ -11,6 +9,9 @@ use anyhow::Context as _; use clap::{Parser, Subcommand}; use commitment_generator::read_and_update_contract_toml; use indicatif::{ProgressBar, ProgressStyle}; +use proof_compression_gpu::{ + precompute_proof_chain_with_fflonk, precompute_proof_chain_with_plonk, BlobStorageExt, +}; #[cfg(feature = "gpu")] use shivini::ProverContext; use tracing::level_filters::LevelFilter; @@ -30,8 +31,6 @@ use zksync_prover_fri_types::{ circuit_definitions::circuit_definitions::recursion_layer::ZkSyncRecursionLayerStorageType, ProverServiceDataKey, }; -#[cfg(feature = "gpu")] -use zksync_prover_keystore::setup_data_generator::get_fflonk_snark_verifier_setup_and_vk; use zksync_prover_keystore::{ keystore::Keystore, setup_data_generator::{CPUSetupDataGenerator, GPUSetupDataGenerator, SetupDataGenerator}, @@ -49,6 +48,7 @@ mod vk_commitment_helper; #[cfg(test)] mod tests; + /// Generates new verification keys, and stores them in `keystore`. /// Jobs describe how many generators can run in parallel (each one is around 30 GB). /// If quiet is true, it doesn't display any progress bar. @@ -64,8 +64,8 @@ fn generate_vks(keystore: &Keystore, jobs: usize, quiet: bool) -> anyhow::Result let count = basic_vk_count() + recursive_layer_vk_count() + 2; let progress_bar = ProgressBar::new(count as u64); progress_bar.set_style(ProgressStyle::default_bar() - .template("{spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {pos:>7}/{len:7} ({eta})") - .progress_chars("#>-")); + .template("{spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {pos:>7}/{len:7} ({eta})") + .progress_chars("#>-")); Some(progress_bar) }; @@ -89,66 +89,7 @@ fn generate_vks(keystore: &Keystore, jobs: usize, quiet: bool) -> anyhow::Result }) .map_err(|err| anyhow::anyhow!("Failed generating recursive vk's: {err}"))?; - #[cfg(feature = "gpu")] - { - let config = WrapperConfig::new(5); - let worker = Worker::new(); - - tracing::info!("Creating prover context"); - - let _context = ProverContext::create().context("failed initializing gpu prover context")?; - tracing::info!("Generating verification keys for compression layers."); - generate_compression_vks(config, &mut in_memory_source, &worker); - - tracing::info!("Generating verification keys for compression for wrapper."); - - generate_compression_for_wrapper_vks(config, &mut in_memory_source, &worker); - - tracing::info!("Saving keys & hints"); - } - - keystore.save_keys_from_data_source(&in_memory_source)?; - - // Generate snark VK - let scheduler_vk = in_memory_source - .get_recursion_layer_vk(ZkSyncRecursionLayerStorageType::SchedulerCircuit as u8) - .map_err(|err| anyhow::anyhow!("Failed to get scheduler vk: {err}"))?; - - tracing::info!("Generating PLONK verification keys for snark wrapper."); - - let (_, plonk_vk) = - get_wrapper_setup_and_vk_from_scheduler_vk(scheduler_vk.clone(), WrapperConfig::new(1)); - - keystore - .save_snark_verification_key(plonk_vk) - .context("save_plonk_snark_vk")?; - - if let Some(p) = pb.lock().unwrap().as_ref() { - p.inc(1) - } - - tracing::info!("PLONK vk is generated"); - - #[cfg(feature = "gpu")] - { - tracing::info!("Generating FFLONK verification keys for snark wrapper."); - - let (_, fflonk_vk) = get_fflonk_snark_verifier_setup_and_vk(&mut in_memory_source); - - keystore - .save_fflonk_snark_verification_key(fflonk_vk) - .context("save_fflonk_snark_vk")?; - - if let Some(p) = pb.lock().unwrap().as_ref() { - p.inc(1) - } - - tracing::info!("FFLONK vk is generated"); - } - - // Let's also update the commitments file. - let commitments = keystore.generate_commitments()?; - keystore.save_commitments(&commitments) + keystore.save_keys_from_data_source(&in_memory_source) } #[derive(Debug, Parser)] @@ -171,9 +112,6 @@ enum CircuitSelector { Recursive, /// Select circuits from basic group. Basic, - Compression, - CompressionWrapper, - Snark, } #[derive(Debug, Parser)] @@ -215,6 +153,10 @@ enum Command { #[arg(long)] quiet: bool, }, + #[command(name = "generate-compressor-data")] + GenerateCompressorPrecomputations, + #[command(name = "generate-crs")] + GenerateCompactCrs, /// Generates setup keys (used by the CPU prover). #[command(name = "generate-sk")] GenerateSetupKeys { @@ -280,17 +222,6 @@ fn generate_setup_keys( .numeric_circuit .expect("--numeric-circuit must be provided"), ), - CircuitSelector::Compression => ProverServiceDataKey::new_compression( - options - .numeric_circuit - .expect("--numeric-circuit must be provided"), - ), - CircuitSelector::CompressionWrapper => ProverServiceDataKey::new_compression_wrapper( - options - .numeric_circuit - .expect("--numeric-circuit must be provided"), - ), - CircuitSelector::Snark => ProverServiceDataKey::snark(), }; let digest = generator @@ -325,7 +256,6 @@ fn main() -> anyhow::Result<()> { read_and_update_contract_toml(&keystore, dryrun) } - Command::GenerateSetupKeys { options } => { let generator = CPUSetupDataGenerator { keystore: keystore_from_optional_path( @@ -344,5 +274,32 @@ fn main() -> anyhow::Result<()> { }; generate_setup_keys(&generator, &options) } + Command::GenerateCompressorPrecomputations => { + let keystore = Keystore::locate(); + precompute_proof_chain_with_plonk(&keystore); + precompute_proof_chain_with_fflonk(&keystore); + + let commitments = keystore.generate_commitments()?; + keystore.save_commitments(&commitments) + } + Command::GenerateCompactCrs => { + let keystore = Keystore::locate(); + + if std::env::var("COMPACT_CRS_FILE").is_err() { + return Err(anyhow::anyhow!("COMPACT_CRS_FILE env variable is not set")); + } + + if std::env::var("IGNITION_TRANSCRIPT_PATH").is_err() { + return Err(anyhow::anyhow!( + "IGNITION_TRANSCRIPT_PATH env variable is not set" + )); + } + + Ok(proof_compression_gpu::create_compact_raw_crs( + keystore.write_compact_raw_crs(), + )) + } } } + +// COMPACT_CRS_FILE=/home/afo/test/zksync-era/prover/keys/setup/setup_fflonk_compact.key IGNITION_TRANSCRIPT_PATH=/home/afo/zksync-crypto-gpu/crates/proof-compression/scripts BELLMAN_CUDA_DIR=/home/afo/test/era-bellman-cuda cargo run --release --features gpu generate-crs diff --git a/prover/crates/lib/keystore/Cargo.toml b/prover/crates/lib/keystore/Cargo.toml index a247a24bdd8b..2c21067f2428 100644 --- a/prover/crates/lib/keystore/Cargo.toml +++ b/prover/crates/lib/keystore/Cargo.toml @@ -17,6 +17,7 @@ zkevm_test_harness.workspace = true circuit_definitions = { workspace = true, features = ["log_tracing"] } shivini = { workspace = true, optional = true } fflonk-gpu = { workspace = true, optional = true } +proof-compression-gpu = { workspace = true, optional = true } fflonk.workspace = true boojum-cuda = { workspace = true, optional = true } @@ -37,4 +38,4 @@ futures = { workspace = true, features = ["compat"] } default = [] # feature to not compile era-bellman-cuda, but to be able to use GPU features gpu-light = ["dep:shivini", "dep:boojum-cuda"] -gpu = ["dep:shivini", "dep:fflonk-gpu", "dep:boojum-cuda"] +gpu = ["dep:shivini", "dep:fflonk-gpu", "dep:boojum-cuda", "dep:proof-compression-gpu"] diff --git a/prover/crates/lib/keystore/src/compressor.rs b/prover/crates/lib/keystore/src/compressor.rs new file mode 100644 index 000000000000..435b2157ac5f --- /dev/null +++ b/prover/crates/lib/keystore/src/compressor.rs @@ -0,0 +1,225 @@ +use std::{ + fs::File, + io::{Read, Write}, +}; + +use circuit_definitions::circuit_definitions::recursion_layer::ZkSyncRecursionLayerStorageType; +use zksync_prover_fri_types::ProverServiceDataKey; + +use crate::keystore::{Keystore, ProverServiceDataType}; + +const COMPACT_CRS_ENV_VAR: &str = "COMPACT_CRS_FILE"; + +impl proof_compression_gpu::BlobStorage for Keystore { + fn read_scheduler_vk(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_recursive( + ZkSyncRecursionLayerStorageType::SchedulerCircuit as u8, + ), + ProverServiceDataType::VerificationKey, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_layer_finalization_hint(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::FinalizationHints, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_layer_vk(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::VerificationKey, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_layer_precomputation(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::SetupData, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_wrapper_finalization_hint(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::FinalizationHints, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_wrapper_vk(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::VerificationKey, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compression_wrapper_precomputation( + &self, + circuit_id: u8, + ) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::SetupData, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_fflonk_vk(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::FflonkSnarkVerificationKey, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_fflonk_precomputation(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::FflonkSetupData, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_plonk_vk(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::SnarkVerificationKey, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_plonk_precomputation(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::PlonkSetupData, + ); + + Box::new(File::open(filepath).unwrap()) + } + + fn read_compact_raw_crs(&self) -> Box { + if let Some(filepath) = std::env::var(COMPACT_CRS_ENV_VAR).ok() { + Box::new(File::open(filepath).unwrap()) + } else { + panic!("No compact CRS file path provided"); + } + } +} + +impl proof_compression_gpu::BlobStorageExt for Keystore { + fn write_compression_layer_finalization_hint(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::FinalizationHints, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compression_layer_vk(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::VerificationKey, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compression_layer_precomputation(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression(circuit_id), + ProverServiceDataType::SetupData, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compression_wrapper_finalization_hint(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::FinalizationHints, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compression_wrapper_vk(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::VerificationKey, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compression_wrapper_precomputation(&self, circuit_id: u8) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::new_compression_wrapper(circuit_id), + ProverServiceDataType::SetupData, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_fflonk_vk(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::FflonkSnarkVerificationKey, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_fflonk_precomputation(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::FflonkSetupData, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_plonk_vk(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::SnarkVerificationKey, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_plonk_precomputation(&self) -> Box { + let filepath = self.get_file_path( + ProverServiceDataKey::snark(), + ProverServiceDataType::PlonkSetupData, + ); + + Box::new(File::create(filepath).unwrap()) + } + + fn write_compact_raw_crs(&self) -> Box { + if let Some(filepath) = std::env::var(COMPACT_CRS_ENV_VAR).ok() { + Box::new(File::create(filepath).unwrap()) + } else { + panic!("No compact CRS file path provided"); + } + } +} diff --git a/prover/crates/lib/keystore/src/keystore.rs b/prover/crates/lib/keystore/src/keystore.rs index fb84436916e7..d0acf10599ea 100644 --- a/prover/crates/lib/keystore/src/keystore.rs +++ b/prover/crates/lib/keystore/src/keystore.rs @@ -1,7 +1,7 @@ use std::{ collections::HashMap, fs::{self, File}, - io::Read, + io::{Read, Write}, path::{Path, PathBuf}, sync::Arc, }; @@ -41,6 +41,8 @@ pub enum ProverServiceDataType { VerificationKey, SetupData, FinalizationHints, + PlonkSetupData, + FflonkSetupData, SnarkVerificationKey, FflonkSnarkVerificationKey, } @@ -114,7 +116,7 @@ impl Keystore { &self.basedir } - fn get_file_path( + pub(crate) fn get_file_path( &self, key: ProverServiceDataKey, service_data_type: ProverServiceDataType, @@ -130,6 +132,12 @@ impl Keystore { ProverServiceDataType::FinalizationHints => self .basedir .join(format!("finalization_hints_{}.bin", name)), + ProverServiceDataType::PlonkSetupData => { + self.basedir.join(format!("plonk_setup_{}_data.bin", name)) + } + ProverServiceDataType::FflonkSetupData => { + self.basedir.join(format!("fflonk_setup_{}_data.bin", name)) + } ProverServiceDataType::SnarkVerificationKey => { self.basedir.join(format!("verification_{}_key.json", name)) } @@ -187,6 +195,14 @@ impl Keystore { &self, circuit_type: u8, ) -> anyhow::Result { + if circuit_type == ZkSyncRecursionLayerStorageType::SchedulerCircuit as u8 { + let vk = Self::load_json_from_file(self.get_file_path( + ProverServiceDataKey::new_recursive(circuit_type), + ProverServiceDataType::VerificationKey, + ))?; + return Ok(ZkSyncRecursionLayerVerificationKey::SchedulerCircuit(vk)); + } + Self::load_json_from_file(self.get_file_path( ProverServiceDataKey::new_recursive(circuit_type), ProverServiceDataType::VerificationKey, @@ -233,6 +249,12 @@ impl Keystore { ProverServiceDataKey::new_recursive(vk.numeric_circuit_type()), ProverServiceDataType::VerificationKey, ); + + if let ZkSyncRecursionLayerVerificationKey::SchedulerCircuit(key) = vk { + tracing::info!("saving recursive layer verification key to: {:?}", filepath); + return Self::save_json_pretty(filepath, &key); + } + tracing::info!("saving recursive layer verification key to: {:?}", filepath); Self::save_json_pretty(filepath, &vk) } @@ -645,45 +667,6 @@ impl Keystore { ) .context("save_finalization_hints()")?; - // Compression - // todo: don't use hardcoded values - for circuit in 1..5 { - let vk = source - .get_compression_vk(circuit as u8) - .map_err(|err| anyhow::anyhow!("No vk exist for circuit type: {circuit}: {err}"))?; - - self.save_compression_vk(vk) - .context("save_compression_vk()")?; - - let hint = source.get_compression_hint(circuit as u8).map_err(|err| { - anyhow::anyhow!("No finalization hint exist for circuit type: {circuit}: {err}") - })?; - - self.save_finalization_hints( - ProverServiceDataKey::new_compression(circuit as u8), - &hint.into_inner(), - ) - .context("save_finalization_hints()")?; - } - - // Compression wrapper - let vk = source - .get_compression_for_wrapper_vk(5) - .map_err(|err| anyhow::anyhow!("No vk exist for circuit type: 5: {err}"))?; - - self.save_compression_for_wrapper_vk(vk) - .context("save_compression_wrapper_vk()")?; - - let hint = source.get_compression_for_wrapper_hint(5).map_err(|err| { - anyhow::anyhow!("No finalization hint exist for circuit type: 5: {err}") - })?; - - self.save_finalization_hints( - ProverServiceDataKey::new_compression_wrapper(5), - &hint.into_inner(), - ) - .context("save_finalization_hints()")?; - Ok(()) } diff --git a/prover/crates/lib/keystore/src/lib.rs b/prover/crates/lib/keystore/src/lib.rs index e5f00fd307ba..bc8bbdcd992c 100644 --- a/prover/crates/lib/keystore/src/lib.rs +++ b/prover/crates/lib/keystore/src/lib.rs @@ -28,6 +28,9 @@ pub mod keystore; pub mod setup_data_generator; pub mod utils; +#[cfg(feature = "gpu")] +pub mod compressor; + #[derive(Debug, Serialize, Deserialize)] #[serde( bound = "F: serde::Serialize + serde::de::DeserializeOwned, P: serde::Serialize + serde::de::DeserializeOwned" diff --git a/prover/crates/lib/keystore/src/setup_data_generator.rs b/prover/crates/lib/keystore/src/setup_data_generator.rs index 162d94ced6dd..1d5b16862fc5 100644 --- a/prover/crates/lib/keystore/src/setup_data_generator.rs +++ b/prover/crates/lib/keystore/src/setup_data_generator.rs @@ -55,10 +55,10 @@ pub fn generate_setup_data_common( .into_inner(), ), ProvingStage::Compression => { - unreachable!("Compression stage should not be generated with CPU.") + unreachable!("Compression stage setup data should be generated with a generate-compressor-data command") } ProvingStage::CompressionWrapper => { - unreachable!("CompressionWrapper stage should not be generated with CPU.") + unreachable!("CompressionWrapper stage setup data should be generated with a generate-compressor-data command") } _ => ( Some(keystore.load_finalization_hints(circuit)?), @@ -108,23 +108,9 @@ pub trait SetupDataGenerator { } if circuit == ProverServiceDataKey::snark() { - #[cfg(not(feature = "gpu"))] - { - anyhow::bail!("Must compile with --gpu feature to use this option."); - } - #[cfg(feature = "gpu")] - { - let mut data_source = self.keystore().load_keys_to_data_source()?; - let (setup, _) = get_fflonk_snark_verifier_setup_and_vk(&mut data_source); - if !dry_run { - self.keystore() - .save_fflonk_snark_setup_data(setup) - .context("save_setup_data()")?; - } - return Ok(String::from( - "FFLONK is serialized differently, skipping hashing.", - )); - } + unreachable!( + "Snark setup data should be generated with generate-compressor-data command" + ) } let serialized = self.generate_setup_data(circuit)?; @@ -206,44 +192,10 @@ impl SetupDataGenerator for GPUSetupDataGenerator { let worker = Worker::new(); match circuit.stage { - ProvingStage::CompressionWrapper => { - let (gpu_setup_data, verification_key) = - gpu_setup_and_vk_from_base_setup_vk_params_and_hints::< - CompressionProofsTreeHasherForWrapper, - _, - >( - circuit_setup_data.setup_base, - circuit_setup_data.vk_geometry, - circuit_setup_data.vars_hint.clone(), - circuit_setup_data.wits_hint, - &worker, - ) - .context("failed creating GPU base layer setup data")?; - - let gpu_prover_setup_data = GpuProverSetupData { - setup: gpu_setup_data, - vk: verification_key.clone(), - finalization_hint: circuit_setup_data.finalization_hint, - }; - - let serialized_vk = get_vk_by_circuit(self.keystore.clone(), circuit)?; - - assert_eq!( - bincode::serialize(&verification_key) - .expect("Failed serializing setup data"), - serialized_vk, - "Verification key mismatch for circuit: {:?}", - circuit.name() - ); - - // Serialization should always succeed. - Ok(bincode::serialize(&gpu_prover_setup_data) - .expect("Failed serializing setup data")) - } - ProvingStage::Snark => { - unreachable!( - "We cannot serialize Fflonk data with bincode, it is done separately" - ) + ProvingStage::CompressionWrapper + | ProvingStage::Snark + | ProvingStage::Compression => { + unreachable!("Setup data for compression, compression-wrapper and snark stages should be generated with generate-compressor-data command") } _ => { let (gpu_setup_data, verification_key) = @@ -320,31 +272,3 @@ fn get_vk_by_circuit(keystore: Keystore, circuit: ProverServiceDataKey) -> anyho } } } - -#[cfg(feature = "gpu")] -pub fn get_fflonk_snark_verifier_setup_and_vk( - data_source: &mut InMemoryDataSource, -) -> ( - FflonkSnarkVerifierCircuitDeviceSetup, - FflonkSnarkVerifierCircuitVK, -) { - let vk = data_source - .get_compression_for_wrapper_vk(5) - .unwrap() - .into_inner(); - let fixed_parameters = vk.fixed_parameters.clone(); - // todo: do not hardcode this value - let wrapper_function = ZkSyncCompressionWrapper::from_numeric_circuit_type(5); - - let circuit = FflonkSnarkVerifierCircuit { - witness: None, - vk, - fixed_parameters, - transcript_params: (), - wrapper_function, - }; - let setup = FflonkDeviceSetup::<_, _, _>::create_setup_on_device(&circuit).unwrap(); - let snark_vk = setup.get_verification_key(); - - (setup, snark_vk) -} diff --git a/prover/crates/lib/prover_fri_types/src/lib.rs b/prover/crates/lib/prover_fri_types/src/lib.rs index 9d7c32c21d73..d89fa9dc1010 100644 --- a/prover/crates/lib/prover_fri_types/src/lib.rs +++ b/prover/crates/lib/prover_fri_types/src/lib.rs @@ -313,7 +313,6 @@ impl ProverServiceDataKey { pub fn all() -> Vec { let mut keys = Self::all_boojum(); - keys.push(Self::snark()); keys } diff --git a/prover/data/keys/finalization_hints_compression_1.bin b/prover/data/keys/finalization_hints_compression_1.bin index 8f5cadc55c57..d71029042a99 100644 Binary files a/prover/data/keys/finalization_hints_compression_1.bin and b/prover/data/keys/finalization_hints_compression_1.bin differ diff --git a/prover/data/keys/finalization_hints_compression_2.bin b/prover/data/keys/finalization_hints_compression_2.bin index c6a4253d81e6..5dc0776779f4 100644 Binary files a/prover/data/keys/finalization_hints_compression_2.bin and b/prover/data/keys/finalization_hints_compression_2.bin differ diff --git a/prover/data/keys/finalization_hints_compression_3.bin b/prover/data/keys/finalization_hints_compression_3.bin index ef3f24e18c23..f8148a2cb2ee 100644 Binary files a/prover/data/keys/finalization_hints_compression_3.bin and b/prover/data/keys/finalization_hints_compression_3.bin differ diff --git a/prover/data/keys/finalization_hints_compression_4.bin b/prover/data/keys/finalization_hints_compression_4.bin index ca6c08bab1f1..02794b6453df 100644 Binary files a/prover/data/keys/finalization_hints_compression_4.bin and b/prover/data/keys/finalization_hints_compression_4.bin differ diff --git a/prover/data/keys/finalization_hints_compression_wrapper_1.bin b/prover/data/keys/finalization_hints_compression_wrapper_1.bin new file mode 100644 index 000000000000..d71029042a99 --- /dev/null +++ b/prover/data/keys/finalization_hints_compression_wrapper_1.bin @@ -0,0 +1,35 @@ +{ + "row_finalization_hints": [ + [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "column_finalization_hints": [], + "nop_gates_to_add": 22419, + "final_trace_len": 65536, + "public_inputs": [ + [ + 0, + 43116 + ], + [ + 1, + 43116 + ], + [ + 2, + 43116 + ], + [ + 3, + 43116 + ] + ] +} \ No newline at end of file diff --git a/prover/data/keys/finalization_hints_compression_wrapper_5.bin b/prover/data/keys/finalization_hints_compression_wrapper_5.bin index cb61da940e2a..40f2db737ff5 100644 Binary files a/prover/data/keys/finalization_hints_compression_wrapper_5.bin and b/prover/data/keys/finalization_hints_compression_wrapper_5.bin differ diff --git a/prover/data/keys/verification_compression_1_key.json b/prover/data/keys/verification_compression_1_key.json index 3de9e823d17b..87ba550c1858 100644 --- a/prover/data/keys/verification_compression_1_key.json +++ b/prover/data/keys/verification_compression_1_key.json @@ -1,262 +1,260 @@ { - "CompressionMode1Circuit": { - "fixed_parameters": { - "parameters": { - "num_columns_under_copy_permutation": 52, - "num_witness_columns": 78, - "num_constant_columns": 4, - "max_allowed_constraint_degree": 8 - }, - "lookup_parameters": "NoLookup", - "domain_size": 65536, - "total_tables_len": 0, - "public_inputs_locations": [ - [ - 0, - 43116 - ], - [ - 1, - 43116 - ], - [ - 2, - 43116 - ], - [ - 3, - 43116 - ] + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 52, + "num_witness_columns": 78, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 8 + }, + "lookup_parameters": "NoLookup", + "domain_size": 65536, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 43116 ], - "extra_constant_polys_for_selectors": 4, - "table_ids_column_idxes": [], - "quotient_degree": 8, - "selectors_placement": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 1, - "num_constants": 0, - "degree": 7, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 4, - "num_constants": 4, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 2, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 6, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + [ + 1, + 43116 + ], + [ + 2, + 43116 + ], + [ + 3, + 43116 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 5, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 7, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 9, - "num_constants": 4, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 0, - "num_constants": 4, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 3, - "num_constants": 2, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 8, - "num_constants": 0, - "degree": 0, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "fri_lde_factor": 32, - "cap_size": 16 + } }, - "setup_merkle_tree_cap": [ - [ - 18429053439012828355, - 13569717100398864647, - 5674934326174107161, - 17602965228088658523 - ], - [ - 1853596005538808278, - 4863986522266180298, - 1446747858708973345, - 6556557904065432671 - ], - [ - 15389763462077761347, - 347990863686799186, - 9600431685918762723, - 18230110007683373373 - ], - [ - 4488979291903240149, - 15827713959121695389, - 5212372431509901484, - 15330056117710268303 - ], - [ - 2154621009093329369, - 2697922564969508975, - 8553713447457143603, - 11909287098676194610 - ], - [ - 17675899931204043754, - 1900641380227488316, - 13799770936458315711, - 16155696965522802314 - ], - [ - 4325071727231912895, - 15495124842543512517, - 7693387508183911518, - 2229191662604882855 - ], - [ - 12528623798638620709, - 7099783078856962509, - 1026199882135084179, - 7487829827063298337 - ], - [ - 17775767559834649815, - 11648203906640999220, - 18372230812591541111, - 2380029132644171876 - ], - [ - 17282415096853816692, - 7048528242178291549, - 1168458073834679094, - 4050365242852861872 - ], - [ - 12458945294827240519, - 9750085849866836452, - 10571283035096727478, - 296889776702427073 - ], - [ - 3087401981646414061, - 5145016559209358338, - 198041048326501493, - 16681321004258095323 - ], - [ - 15873896825395209700, - 17464513449028297769, - 6391802199611869536, - 24117562251396832 - ], - [ - 5930377685985813311, - 11344757707146885659, - 17036003029203547492, - 15372566160771512018 - ], - [ - 3165044285750289057, - 15764455157826377125, - 729334742516289605, - 8335221493745507200 - ], - [ - 318679242859206967, - 16131519447675179661, - 1921616860721123326, - 9785286945407043240 - ] + "fri_lde_factor": 32, + "cap_size": 16 + }, + "setup_merkle_tree_cap": [ + [ + 18429053439012828355, + 13569717100398864647, + 5674934326174107161, + 17602965228088658523 + ], + [ + 1853596005538808278, + 4863986522266180298, + 1446747858708973345, + 6556557904065432671 + ], + [ + 15389763462077761347, + 347990863686799186, + 9600431685918762723, + 18230110007683373373 + ], + [ + 4488979291903240149, + 15827713959121695389, + 5212372431509901484, + 15330056117710268303 + ], + [ + 2154621009093329369, + 2697922564969508975, + 8553713447457143603, + 11909287098676194610 + ], + [ + 17675899931204043754, + 1900641380227488316, + 13799770936458315711, + 16155696965522802314 + ], + [ + 4325071727231912895, + 15495124842543512517, + 7693387508183911518, + 2229191662604882855 + ], + [ + 12528623798638620709, + 7099783078856962509, + 1026199882135084179, + 7487829827063298337 + ], + [ + 17775767559834649815, + 11648203906640999220, + 18372230812591541111, + 2380029132644171876 + ], + [ + 17282415096853816692, + 7048528242178291549, + 1168458073834679094, + 4050365242852861872 + ], + [ + 12458945294827240519, + 9750085849866836452, + 10571283035096727478, + 296889776702427073 + ], + [ + 3087401981646414061, + 5145016559209358338, + 198041048326501493, + 16681321004258095323 + ], + [ + 15873896825395209700, + 17464513449028297769, + 6391802199611869536, + 24117562251396832 + ], + [ + 5930377685985813311, + 11344757707146885659, + 17036003029203547492, + 15372566160771512018 + ], + [ + 3165044285750289057, + 15764455157826377125, + 729334742516289605, + 8335221493745507200 + ], + [ + 318679242859206967, + 16131519447675179661, + 1921616860721123326, + 9785286945407043240 ] - } + ] } \ No newline at end of file diff --git a/prover/data/keys/verification_compression_2_key.json b/prover/data/keys/verification_compression_2_key.json index 6110bba910d2..d0ee06b55fa2 100644 --- a/prover/data/keys/verification_compression_2_key.json +++ b/prover/data/keys/verification_compression_2_key.json @@ -1,275 +1,273 @@ { - "CompressionMode2Circuit": { - "fixed_parameters": { - "parameters": { - "num_columns_under_copy_permutation": 56, - "num_witness_columns": 74, - "num_constant_columns": 4, - "max_allowed_constraint_degree": 8 - }, - "lookup_parameters": "NoLookup", - "domain_size": 8192, - "total_tables_len": 0, - "public_inputs_locations": [ - [ - 0, - 6733 - ], - [ - 1, - 6733 - ], - [ - 2, - 6733 - ], - [ - 3, - 6733 - ] + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 56, + "num_witness_columns": 74, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 8 + }, + "lookup_parameters": "NoLookup", + "domain_size": 8192, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 6733 ], - "extra_constant_polys_for_selectors": 4, - "table_ids_column_idxes": [], - "quotient_degree": 8, - "selectors_placement": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 2, - "num_constants": 0, - "degree": 7, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 5, - "num_constants": 4, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 1, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 6, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + [ + 1, + 6733 + ], + [ + 2, + 6733 + ], + [ + 3, + 6733 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 3, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 7, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 10, - "num_constants": 4, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 8, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 9, - "num_constants": 0, - "degree": 0, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 10, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 4, - "num_constants": 2, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 0, - "num_constants": 4, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "fri_lde_factor": 512, - "cap_size": 16 + } }, - "setup_merkle_tree_cap": [ - [ - 547951636004245258, - 2067145936569319297, - 17315326678965070615, - 9012275275825325303 - ], - [ - 2486396189205338767, - 5385179748876990489, - 12789897155193748843, - 7497933664242847399 - ], - [ - 13702746436389342903, - 9589251880490084074, - 13207771356722054410, - 18277427829245158207 - ], - [ - 4132253692687914984, - 18227617432180132982, - 15881065677296839946, - 1403286368390823633 - ], - [ - 10537224762035068222, - 6013042199447780632, - 4527978597574086909, - 3232268373890188602 - ], - [ - 2586162944092407317, - 10215063509965051427, - 2471146708845362031, - 2843440288814318700 - ], - [ - 13819482850499157207, - 16859612470974380629, - 12731935288150853121, - 2902152945695153589 - ], - [ - 9392752661572461801, - 18377486933710861607, - 16200620130393023183, - 8365721844043961790 - ], - [ - 13954020715669265948, - 16716522360195023699, - 5205834515171426098, - 956788140632831896 - ], - [ - 3827733001679131898, - 17013298671136301019, - 3148453751188517867, - 16820158206874288178 - ], - [ - 2520856291381872645, - 4479900374678830382, - 13546063785562157656, - 3382667115615401371 - ], - [ - 15571586947246471933, - 17916455524698235528, - 4478607733734426679, - 12215920239082917056 - ], - [ - 12759564984587008435, - 5665565051416464627, - 4275508608287240845, - 7137116798231081511 - ], - [ - 5980650793630714101, - 9419587808931370936, - 7668041611691340219, - 1071524060976592787 - ], - [ - 8785315220105920748, - 14191148990050265889, - 8665763888918223523, - 10691214928896807830 - ], - [ - 16389667087475658615, - 7098223971082400278, - 3821718345101781981, - 17410025916491040451 - ] + "fri_lde_factor": 512, + "cap_size": 16 + }, + "setup_merkle_tree_cap": [ + [ + 547951636004245258, + 2067145936569319297, + 17315326678965070615, + 9012275275825325303 + ], + [ + 2486396189205338767, + 5385179748876990489, + 12789897155193748843, + 7497933664242847399 + ], + [ + 13702746436389342903, + 9589251880490084074, + 13207771356722054410, + 18277427829245158207 + ], + [ + 4132253692687914984, + 18227617432180132982, + 15881065677296839946, + 1403286368390823633 + ], + [ + 10537224762035068222, + 6013042199447780632, + 4527978597574086909, + 3232268373890188602 + ], + [ + 2586162944092407317, + 10215063509965051427, + 2471146708845362031, + 2843440288814318700 + ], + [ + 13819482850499157207, + 16859612470974380629, + 12731935288150853121, + 2902152945695153589 + ], + [ + 9392752661572461801, + 18377486933710861607, + 16200620130393023183, + 8365721844043961790 + ], + [ + 13954020715669265948, + 16716522360195023699, + 5205834515171426098, + 956788140632831896 + ], + [ + 3827733001679131898, + 17013298671136301019, + 3148453751188517867, + 16820158206874288178 + ], + [ + 2520856291381872645, + 4479900374678830382, + 13546063785562157656, + 3382667115615401371 + ], + [ + 15571586947246471933, + 17916455524698235528, + 4478607733734426679, + 12215920239082917056 + ], + [ + 12759564984587008435, + 5665565051416464627, + 4275508608287240845, + 7137116798231081511 + ], + [ + 5980650793630714101, + 9419587808931370936, + 7668041611691340219, + 1071524060976592787 + ], + [ + 8785315220105920748, + 14191148990050265889, + 8665763888918223523, + 10691214928896807830 + ], + [ + 16389667087475658615, + 7098223971082400278, + 3821718345101781981, + 17410025916491040451 ] - } + ] } \ No newline at end of file diff --git a/prover/data/keys/verification_compression_3_key.json b/prover/data/keys/verification_compression_3_key.json index 63bcbca918d1..12ee585e2aa2 100644 --- a/prover/data/keys/verification_compression_3_key.json +++ b/prover/data/keys/verification_compression_3_key.json @@ -1,275 +1,273 @@ { - "CompressionMode3Circuit": { - "fixed_parameters": { - "parameters": { - "num_columns_under_copy_permutation": 68, - "num_witness_columns": 62, - "num_constant_columns": 4, - "max_allowed_constraint_degree": 8 - }, - "lookup_parameters": "NoLookup", - "domain_size": 4096, - "total_tables_len": 0, - "public_inputs_locations": [ - [ - 0, - 3921 - ], - [ - 1, - 3921 - ], - [ - 2, - 3921 - ], - [ - 3, - 3921 - ] + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 68, + "num_witness_columns": 62, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 8 + }, + "lookup_parameters": "NoLookup", + "domain_size": 4096, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 3921 ], - "extra_constant_polys_for_selectors": 4, - "table_ids_column_idxes": [], - "quotient_degree": 8, - "selectors_placement": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 2, - "num_constants": 0, - "degree": 7, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 5, - "num_constants": 4, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 1, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 6, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + [ + 1, + 3921 + ], + [ + 2, + 3921 + ], + [ + 3, + 3921 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 3, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 7, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 10, - "num_constants": 4, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 8, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 9, - "num_constants": 0, - "degree": 0, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 10, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 4, - "num_constants": 2, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 0, - "num_constants": 4, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "fri_lde_factor": 1024, - "cap_size": 16 + } }, - "setup_merkle_tree_cap": [ - [ - 10641025459109778062, - 11883023202620503830, - 1683460580494782039, - 519148484945527748 - ], - [ - 16854836347499347615, - 303914895048281273, - 8827365744032766288, - 7504886056916538809 - ], - [ - 18314198719448317357, - 10244100031050759980, - 9715483427672900470, - 13743747809877920521 - ], - [ - 1369713858293079339, - 2549296113044324317, - 10668787197724003505, - 13374818625902068059 - ], - [ - 11103822364554965998, - 1026596418533733662, - 11884006841460801711, - 16731940920918762822 - ], - [ - 8630324660886613970, - 15367922833873963141, - 538631244507362153, - 7257912375828853679 - ], - [ - 9919593341926293968, - 3835923795731948402, - 11747327108631657899, - 16458305757432722328 - ], - [ - 2324222966121258034, - 7413735041546781516, - 3485204485068670103, - 13438812829186206067 - ], - [ - 14474408113900929346, - 18061817840123336299, - 13649805566841328142, - 7129805169327250752 - ], - [ - 7300284926102090815, - 9725670656634972183, - 8151388754725946636, - 16128844202426193104 - ], - [ - 14707729241338825087, - 3836468945858242082, - 16768198593546824923, - 14062570092263697929 - ], - [ - 14327921344401839882, - 6479671009164937102, - 13089063982746955768, - 2683374136101896185 - ], - [ - 14787507835189907449, - 6738567890582174761, - 16728637974735308667, - 537766695323716501 - ], - [ - 8795483109816567655, - 14842674875555441461, - 11332449659964817297, - 4865859390541196365 - ], - [ - 11192585970910716125, - 3048970808099494060, - 7684470944992674010, - 9304044469675055850 - ], - [ - 5655924464102745207, - 8506077190272738679, - 8512156535337592685, - 15415747564657306809 - ] + "fri_lde_factor": 1024, + "cap_size": 16 + }, + "setup_merkle_tree_cap": [ + [ + 10641025459109778062, + 11883023202620503830, + 1683460580494782039, + 519148484945527748 + ], + [ + 16854836347499347615, + 303914895048281273, + 8827365744032766288, + 7504886056916538809 + ], + [ + 18314198719448317357, + 10244100031050759980, + 9715483427672900470, + 13743747809877920521 + ], + [ + 1369713858293079339, + 2549296113044324317, + 10668787197724003505, + 13374818625902068059 + ], + [ + 11103822364554965998, + 1026596418533733662, + 11884006841460801711, + 16731940920918762822 + ], + [ + 8630324660886613970, + 15367922833873963141, + 538631244507362153, + 7257912375828853679 + ], + [ + 9919593341926293968, + 3835923795731948402, + 11747327108631657899, + 16458305757432722328 + ], + [ + 2324222966121258034, + 7413735041546781516, + 3485204485068670103, + 13438812829186206067 + ], + [ + 14474408113900929346, + 18061817840123336299, + 13649805566841328142, + 7129805169327250752 + ], + [ + 7300284926102090815, + 9725670656634972183, + 8151388754725946636, + 16128844202426193104 + ], + [ + 14707729241338825087, + 3836468945858242082, + 16768198593546824923, + 14062570092263697929 + ], + [ + 14327921344401839882, + 6479671009164937102, + 13089063982746955768, + 2683374136101896185 + ], + [ + 14787507835189907449, + 6738567890582174761, + 16728637974735308667, + 537766695323716501 + ], + [ + 8795483109816567655, + 14842674875555441461, + 11332449659964817297, + 4865859390541196365 + ], + [ + 11192585970910716125, + 3048970808099494060, + 7684470944992674010, + 9304044469675055850 + ], + [ + 5655924464102745207, + 8506077190272738679, + 8512156535337592685, + 15415747564657306809 ] - } + ] } \ No newline at end of file diff --git a/prover/data/keys/verification_compression_4_key.json b/prover/data/keys/verification_compression_4_key.json index 5bd28e4d6d6b..821fb25d4048 100644 --- a/prover/data/keys/verification_compression_4_key.json +++ b/prover/data/keys/verification_compression_4_key.json @@ -1,1741 +1,1739 @@ { - "CompressionMode4Circuit": { - "fixed_parameters": { - "parameters": { - "num_columns_under_copy_permutation": 48, - "num_witness_columns": 0, - "num_constant_columns": 4, - "max_allowed_constraint_degree": 8 - }, - "lookup_parameters": "NoLookup", - "domain_size": 32768, - "total_tables_len": 0, - "public_inputs_locations": [ - [ - 0, - 31025 - ], - [ - 1, - 31025 - ], - [ - 2, - 31025 - ], - [ - 3, - 31025 - ] + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 48, + "num_witness_columns": 0, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 8 + }, + "lookup_parameters": "NoLookup", + "domain_size": 32768, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 31025 ], - "extra_constant_polys_for_selectors": 4, - "table_ids_column_idxes": [], - "quotient_degree": 8, - "selectors_placement": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 4, - "num_constants": 1, - "degree": 7, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 7, - "num_constants": 4, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 1, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 8, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + [ + 1, + 31025 + ], + [ + 2, + 31025 + ], + [ + 3, + 31025 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 1, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 5, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 9, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 12, - "num_constants": 4, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 10, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 3, - "num_constants": 0, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 11, - "num_constants": 0, - "degree": 0, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 12, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 10, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 0, + "degree": 1, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 11, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false } } } } - }, - "right": { - "GateOnly": { - "gate_idx": 2, - "num_constants": 0, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 6, - "num_constants": 2, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 0, - "num_constants": 4, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "fri_lde_factor": 1024, - "cap_size": 256 + } }, - "setup_merkle_tree_cap": [ - [ - 4079970138244939135, - 8104423815789893989, - 13632023733358255593, - 13346032064987220184 - ], - [ - 12809474467971181399, - 17625072709782170540, - 6594064732490183681, - 8714625183861721175 - ], - [ - 7171332554251640845, - 18284102552959382973, - 3637671217742590741, - 16765711635591410580 - ], - [ - 763060458426938791, - 16159161330183244037, - 2533596966746622429, - 13441156130846388257 - ], - [ - 5525639466278377590, - 11073269405581050439, - 4833809564449931762, - 9314656237570540457 - ], - [ - 1137979745697828455, - 14966651582384421379, - 13384164937770371175, - 14074716572336098280 - ], - [ - 11906323633157650458, - 1175046947414337453, - 4283188400738641426, - 13792950671402095073 - ], - [ - 9310952691940114113, - 4820182619662404377, - 9479969369442954044, - 8512369778696933060 - ], - [ - 16946138649176650488, - 9475913097060757863, - 6608972026504748865, - 7215353463715689998 - ], - [ - 349222139041408316, - 1507489261015035841, - 7596560681014222842, - 8808235055298411214 - ], - [ - 8007370340350072341, - 2549612240734498963, - 105233771877650291, - 8758305155554767568 - ], - [ - 17190433766023179459, - 1755290160765045579, - 5619893747453895498, - 9139477571875211116 - ], - [ - 15755591792726495281, - 17501027650687476798, - 5579351800673089158, - 5931628352091930640 - ], - [ - 7269556889579729096, - 8636006399519326592, - 15556402257631967994, - 12423945489648480054 - ], - [ - 6411602498376025591, - 16377643789139599240, - 1264958035077382258, - 16706608130239118866 - ], - [ - 14246313207191082462, - 2201136836754342130, - 12301078636732201867, - 10991169525653220176 - ], - [ - 2101214821629968022, - 11996351959015322539, - 15461759537099893272, - 5820786797852667153 - ], - [ - 10546547765646585412, - 16670337245061195679, - 14026017154393171841, - 15865302123450709636 - ], - [ - 14546229884213013754, - 1736742091912698149, - 9563343697509131991, - 15957923614096898715 - ], - [ - 10053685874691243725, - 4837706724113512400, - 2806343138575002644, - 1217140278849814125 - ], - [ - 1445801437405723985, - 16370378782744105412, - 14937074551650631907, - 9349528097788576916 - ], - [ - 313624596753562026, - 2737902703720676400, - 1491628534561577719, - 4958865646973460786 - ], - [ - 4749220647213961766, - 1523283588343260013, - 14435216093380418825, - 12058673416937256217 - ], - [ - 12221430523773573392, - 2119312783391782040, - 113666136908336034, - 5557001496562966971 - ], - [ - 8943540790257615175, - 15963411684352909178, - 12833466372967679781, - 16755820399299554647 - ], - [ - 10568513175105063273, - 8152439411055527457, - 13191469024927433668, - 16583335250317103083 - ], - [ - 8728976170665901948, - 12047344511237318236, - 2665537844838432218, - 17220904479682973198 - ], - [ - 9924606303320583729, - 15168541434821629608, - 15267127988736394576, - 4612730729137963542 - ], - [ - 15187295020445613202, - 10979580190616738578, - 2487576517666265788, - 7799526392944971411 - ], - [ - 14001553124798608592, - 983427750240831173, - 10498633617369923042, - 15506856636873354247 - ], - [ - 9695584132680310661, - 15058940491468263542, - 16902767176197422459, - 4307070711535476522 - ], - [ - 16170129192711277380, - 15594325905653564554, - 8589261531750893019, - 16380506012444184509 - ], - [ - 1298482137029698068, - 7046350962355653091, - 4851290198964994943, - 9583994567704854822 - ], - [ - 12002196043506075596, - 6568364019768992619, - 2982180816490272604, - 11005221893883916442 - ], - [ - 11195444762924129211, - 4080035169749061493, - 12552903944803877103, - 1737834024116304977 - ], - [ - 14989371064091658414, - 7021573041416327989, - 10313274026717983047, - 12022812057768375145 - ], - [ - 4605818886224729183, - 1445887803225464457, - 10940822604464014966, - 9884898953608657154 - ], - [ - 16595525430044003662, - 4052207436631314262, - 10293047811043558578, - 12338411972889057265 - ], - [ - 17022547446139753073, - 10651710177937554340, - 6940830771318907626, - 6641453047926556761 - ], - [ - 10509711725088536487, - 4962100381463002257, - 770256729671337313, - 5857473086438310769 - ], - [ - 13267845343537121240, - 12321261427265206453, - 7120567552214639265, - 17302478469072029437 - ], - [ - 15157833123384882226, - 8158551777234184706, - 12348570826200339644, - 14734791159756873167 - ], - [ - 3385809684799950973, - 12900259269431347094, - 17672545490781962423, - 8013657472810936941 - ], - [ - 9546288143416776531, - 8356139039634733121, - 17477514712681213981, - 9515108802170635886 - ], - [ - 15455406291521834876, - 18083571768045422071, - 2009769659787731673, - 7263333966403015872 - ], - [ - 61130843037975416, - 18121830552682131571, - 9667884638217866764, - 6932529860678316702 - ], - [ - 15509823136620654552, - 6676934950708893059, - 13351533805402596549, - 14340984679679191575 - ], - [ - 15880919573481609124, - 14836853565796210968, - 15058034487233879726, - 11000215022533975317 - ], - [ - 10611445668418674805, - 9013654201900818768, - 1617123938865368568, - 16484766808972651318 - ], - [ - 13652743593752436493, - 13843264938563223779, - 10417182020840583510, - 16106479734523413326 - ], - [ - 17003899699844258217, - 17283344455088140068, - 17379245612757089745, - 1779134255761065541 - ], - [ - 11263035503709897880, - 1042839549428969974, - 6638626002246118718, - 1733549590874866310 - ], - [ - 13054247239013491523, - 14047141927303128296, - 2417752406294216107, - 5255181314162279551 - ], - [ - 1784021430104795099, - 3912913366054617723, - 8208877227749479136, - 4259205675774136108 - ], - [ - 801501735568309733, - 3220301656144181340, - 6144806934797449899, - 10479314068206076631 - ], - [ - 864619228795552444, - 2705960387071331097, - 15702747436396598972, - 14131926486457006694 - ], - [ - 15349058561965444062, - 16738574548455051915, - 4609208407223910426, - 11352062762791244662 - ], - [ - 16513285945090237658, - 6443875617703638442, - 17271016792575259072, - 426511686464611712 - ], - [ - 13863640462921288570, - 3362196992389213358, - 3576502768827883720, - 49219399301262346 - ], - [ - 14852014958673205840, - 11855705779815876870, - 8141476064801289266, - 15234506534160954104 - ], - [ - 6292328028167907211, - 6280576736728723621, - 1814915348986377963, - 3167789754322444841 - ], - [ - 6093870088272451581, - 12912333461662707605, - 16038365026642624017, - 10037265733136426182 - ], - [ - 5658473063427008398, - 18194712009700816671, - 3316188885192160812, - 15032222957557455487 - ], - [ - 10746739009272326386, - 4381896503060636995, - 13390900032103397758, - 11290296227744685851 - ], - [ - 7946268274905655961, - 12464655577446728520, - 3476152367809517039, - 3103729420470642525 - ], - [ - 15652670185218353632, - 17922284652588341925, - 3502474425690015164, - 3577240886292713575 - ], - [ - 13130871911189865405, - 2598654314674217849, - 6130707868677033708, - 11318789126458218054 - ], - [ - 14442525432094720658, - 10861520212227307580, - 10308956417568414174, - 101391938116250123 - ], - [ - 8015353735581004985, - 11791356411393233202, - 15134704188872104026, - 2916434958525680154 - ], - [ - 17776268955107890735, - 3978578384988358930, - 7512482176825678493, - 4207030036138354730 - ], - [ - 4778990000266723258, - 12646326430153649418, - 15602744563429649630, - 13225673449752707138 - ], - [ - 9874615904187846642, - 785813436574501824, - 7422887093860615814, - 12575067740028803899 - ], - [ - 2168314129068013776, - 5876170257821873353, - 6574425448964925595, - 13006818379253162445 - ], - [ - 18203396842093379784, - 1637929000957737331, - 16472903772026963266, - 10222221849709050007 - ], - [ - 8175241234035594021, - 11131701218615583700, - 2590544239124773213, - 13103205380700956240 - ], - [ - 10265760611171832222, - 10772001381712818941, - 9769892419500727073, - 3757944212165946207 - ], - [ - 12890674101364520820, - 17436315026775313277, - 17685632275460283213, - 11597862884205200021 - ], - [ - 6541476428026208530, - 1572664979326233234, - 7220008363221767753, - 5030515443926464143 - ], - [ - 1736392533925503753, - 4028348047388923757, - 1322644146499193870, - 7899110541856172042 - ], - [ - 824249951832333568, - 3650442342240934725, - 9551872020421810878, - 4459093260544332906 - ], - [ - 4897538583957298940, - 9763535759998548001, - 17962120881583547780, - 16423532894596203353 - ], - [ - 15621981029420175013, - 12716027808121583594, - 5698997410684688521, - 14893034348453337964 - ], - [ - 57123003983559085, - 1764189019842202487, - 12021079431755992353, - 4611397927843211028 - ], - [ - 11271204071286517021, - 11016763947620063917, - 10240257375147160558, - 6936015967868091242 - ], - [ - 13263159746058683924, - 2115544844352440396, - 17037308825725243672, - 15392971905394245550 - ], - [ - 3040132672294734369, - 8799577028392802142, - 4698252977355096983, - 12029143421110018733 - ], - [ - 3367138533962530706, - 11052858577054708144, - 13777717310915519372, - 1118835749836496249 - ], - [ - 18247935773305597594, - 4791613470261596504, - 2831278673598556804, - 13054754323096013606 - ], - [ - 16660028838922677973, - 9396606308613201784, - 10417460426584440111, - 8380249813777095858 - ], - [ - 8666375557464313815, - 6304275044317841466, - 17005733772133350822, - 14343984316653970581 - ], - [ - 6123226050306352446, - 17155936354664339685, - 8617663439980301335, - 15168460408431057703 - ], - [ - 4711490317757564870, - 4007952793500570494, - 1619724888362180342, - 135640370275358583 - ], - [ - 3568489405188009952, - 10063008786740635782, - 3645030669998184283, - 11251876386972219611 - ], - [ - 8493411482257270591, - 2420069605766207080, - 4319637578909518850, - 7366398383772225801 - ], - [ - 10514279907222008963, - 4576784878418470993, - 13703409256143697610, - 12595458216589602418 - ], - [ - 6518196967791403281, - 6267315352755318878, - 17017845178414282191, - 6219869337455185408 - ], - [ - 9419176152740350408, - 7255025946876060056, - 13692775553690785222, - 6482964045212267647 - ], - [ - 10371771524251272238, - 7264554963155886115, - 11851596230763322123, - 9644034659422561803 - ], - [ - 16478128758974022864, - 10586973455001136017, - 10940854718906381238, - 4322569144361190672 - ], - [ - 1408324526595066767, - 8225966379387133915, - 575234437450946120, - 4532159296152332514 - ], - [ - 14713730919085929141, - 8299030584912591200, - 12653081274697230155, - 7281510145820913452 - ], - [ - 13065256168386635886, - 11725981090441231815, - 9241488846717901227, - 2660860847185625194 - ], - [ - 17344786539017984359, - 16667262327893622443, - 2245517842543022928, - 5289295469095289187 - ], - [ - 7712996453163241402, - 13291387059438293554, - 15475873660461985862, - 421113001330390910 - ], - [ - 6600556276994686684, - 15236925279661890975, - 9085425445873596043, - 13489979627098239874 - ], - [ - 16522817509787049424, - 7880119001244729499, - 2065132977854154043, - 13961595284131100852 - ], - [ - 10136466656472241068, - 7462847284592418995, - 5211060891495522982, - 3429812446680794228 - ], - [ - 1290650595638649346, - 13577818566931833714, - 2388552128026682549, - 13062451014076475307 - ], - [ - 6070278064232182539, - 12399409837026713208, - 7006572737093555522, - 15229533042676039053 - ], - [ - 4546934482854074283, - 12178466512696871783, - 1691876649621188863, - 11473100481876466355 - ], - [ - 1236556729692669368, - 5549499687074217624, - 5958432331744161923, - 17960851426383425726 - ], - [ - 11313384441935481196, - 506230122531558484, - 17480105233549292653, - 3497216050489019068 - ], - [ - 14180330000703954943, - 17537654316605413864, - 13893109338811179145, - 12773435230801104558 - ], - [ - 1789329554161917105, - 3821166735342421302, - 492899993274707886, - 12499398353307226422 - ], - [ - 3089012429777109607, - 10341877957962585240, - 7745611914889843192, - 7156440096296115871 - ], - [ - 14047653524331542619, - 14986552290847971271, - 8344707263938736217, - 5768162811052933747 - ], - [ - 3282503115484594392, - 3455102204735354908, - 6152707383721113591, - 17881334209336571790 - ], - [ - 6895592993382091339, - 14944664838702526606, - 14158277091240311047, - 13527182248087302901 - ], - [ - 3709694612749923839, - 2612160447494745836, - 1406956200130224054, - 1366284088614500522 - ], - [ - 9948565747047514924, - 7052268914527763961, - 18019747825808196928, - 14284818641981927036 - ], - [ - 3586214080877747437, - 18259935751422321449, - 7615481956713457290, - 14815795422370035012 - ], - [ - 127402153735286355, - 14056365981282611643, - 13874770993027970720, - 619630456240824192 - ], - [ - 14160230678035047748, - 5889480608083619036, - 7255863117098942211, - 15199656156616971091 - ], - [ - 3095946492180700178, - 4006392168790405864, - 6879209997262175243, - 299198988833119182 - ], - [ - 7324876720724904977, - 16163169761447383767, - 12506750534396872240, - 2471214392724636123 - ], - [ - 9097827375986012190, - 14565705700237004602, - 14313871429102448506, - 11871591868576605558 - ], - [ - 9799079875206163527, - 16651435323107739422, - 12479220145998529239, - 3293893419326195678 - ], - [ - 10308258292354323463, - 12348814193023657478, - 7617037745166680507, - 4395321161975898727 - ], - [ - 5350571522462508856, - 13168312859432101164, - 16051585591307343397, - 14229124174436500603 - ], - [ - 7166265506509230502, - 7161154874163920078, - 8397077088165043439, - 11599821267858973994 - ], - [ - 7480649953471058826, - 10095090134750662786, - 10564643199160392009, - 13520621355659318250 - ], - [ - 10857779123272725120, - 15686674254635154618, - 8867730228951457290, - 10801878621148582310 - ], - [ - 15060256657026761959, - 9661131710054923901, - 672914961534049680, - 12834176932586128630 - ], - [ - 949448556211506716, - 15381404281513795275, - 11155631745566842701, - 2704703395424058389 - ], - [ - 9515248836992226419, - 8107063249314601218, - 7169007343668853680, - 4398533039543530267 - ], - [ - 5048521287079394266, - 469091126174822039, - 15224036421670482877, - 2109812614761568090 - ], - [ - 16374381239073062350, - 1415659237932604676, - 15755278916993952324, - 4477381067900828660 - ], - [ - 5908643369108814128, - 16993840892601214320, - 9745154490046936812, - 12675544964328790510 - ], - [ - 13069705042519055121, - 114347527485448732, - 13607966080279761362, - 3198027414138631154 - ], - [ - 2126201229935790021, - 11762486874095747924, - 4405447136645256490, - 4546150485765128281 - ], - [ - 11517522298498019347, - 9683562397139382420, - 17997189851623366056, - 15075626419278367114 - ], - [ - 17300749044902256514, - 13180322067670835054, - 13510754977375972746, - 16789287824862069583 - ], - [ - 12482184120647536152, - 6673581288163589602, - 12763923036507066435, - 14094147320392535720 - ], - [ - 14259634259170511729, - 4875730172347810212, - 84468584086030163, - 8303744294867418687 - ], - [ - 12134644548742181831, - 8520649738990136053, - 16059641390155564470, - 5416979754786543764 - ], - [ - 2092318536537973522, - 11767101658840205425, - 6426865564773940591, - 14647807617379392454 - ], - [ - 450267335414320409, - 9743488482513949727, - 60939637019009091, - 17766639401038188429 - ], - [ - 10940698167282175513, - 14751185897733548414, - 12951179730146965260, - 10875205992060835228 - ], - [ - 13364210655207872649, - 6433202412249539021, - 9336639704508334838, - 13505754981533474450 - ], - [ - 13696994814871272283, - 4490009507613100808, - 13804331039068475494, - 5468505803402562249 - ], - [ - 4777271447313491592, - 9940020440702119485, - 1101181637482946058, - 644606693604161858 - ], - [ - 15097959041405784257, - 12307130809829041484, - 17258499521253983865, - 10749514694060779271 - ], - [ - 10190208760039486310, - 4226050742652743727, - 8941293745652956008, - 16590522505585423775 - ], - [ - 345192297192706835, - 446809322130030426, - 14301758245246751976, - 9719056934946360728 - ], - [ - 12881116110058824616, - 9527685388634025534, - 11091584611747550280, - 17824266919172201804 - ], - [ - 1574239507079237453, - 8582461342969153012, - 12264251495254783586, - 17637680562426650364 - ], - [ - 10192143269632239849, - 13007991288866360616, - 15140175217087410009, - 12752906480866993968 - ], - [ - 1870988781431107523, - 12976682012942521853, - 16429062848935476734, - 5798003006437035985 - ], - [ - 14584766751103981854, - 17047930049374537599, - 16615811923791215213, - 4382675641211926136 - ], - [ - 2714557854446349417, - 7104188094330759435, - 4252584297915226480, - 8214575447584991866 - ], - [ - 11055975993893155083, - 4263965260378501220, - 14890629048371839452, - 12114106467257211085 - ], - [ - 1696215674801501046, - 2266423673248165355, - 17663731467117251495, - 3131727223950690444 - ], - [ - 9538270027605424981, - 14695627410990929758, - 1100103051852107643, - 7780696685697285282 - ], - [ - 3640909033400638252, - 4685184407249885115, - 1159593584695683466, - 5810155451150284456 - ], - [ - 2142365296746734893, - 15072293834204351367, - 10906328353503930623, - 567086761313849045 - ], - [ - 16792244974449676806, - 5281042885555694958, - 803668749758477336, - 9632569928427671141 - ], - [ - 11458024915503659884, - 12163640565717382175, - 5426693528062973190, - 5318451835514658298 - ], - [ - 17468129298890753615, - 16365877952312079431, - 4255216049796249864, - 17519162521801620751 - ], - [ - 16881958987441626136, - 5348165195536725074, - 1110205049250373278, - 3270960662287149636 - ], - [ - 1226689297335858879, - 5569006707448968175, - 12862213669554513549, - 13476251685033412618 - ], - [ - 17469709307599228055, - 10239286546577328519, - 11089348310818650527, - 16456908862000481769 - ], - [ - 1488822551903623063, - 1027724056630207939, - 17697306299429716060, - 16855149560650760331 - ], - [ - 6973362373999440967, - 10660889882557485296, - 10425405668156759777, - 6301066711999204638 - ], - [ - 414734469595850357, - 14255487988571755338, - 8593074929345797359, - 16605827151888774599 - ], - [ - 16875797800314241514, - 12421815564591930411, - 2652019482537730851, - 6038511721575984408 - ], - [ - 5083130506118840282, - 10236076700696608757, - 89798661707215807, - 11047945556430945234 - ], - [ - 9052849932438286930, - 766869919370273028, - 9513938692410545262, - 9325822678740812785 - ], - [ - 12214954222172122496, - 2137993706327729295, - 9068121284446752470, - 16719368474204358065 - ], - [ - 12846496216910539260, - 14961944612175511231, - 4871177192578157967, - 871092876547424272 - ], - [ - 8432570778385641968, - 16742266319428376459, - 5202631662503988626, - 9179077767480984950 - ], - [ - 6907086971366422845, - 3630230185711868320, - 6363326632303072661, - 2155376917773117715 - ], - [ - 7260111458604834720, - 15869987976273960274, - 5471864801301693834, - 6186332987204233992 - ], - [ - 7579472070725254127, - 4175627325036864033, - 2726864388901619006, - 17182366690618521544 - ], - [ - 10366850615209571638, - 594983328964439422, - 5708701194817491298, - 8320252948121397632 - ], - [ - 7681701787398279771, - 8922827186766353002, - 16390646056989747875, - 16861016347708202354 - ], - [ - 18349539097929417681, - 11011444774390028397, - 14929165998832565332, - 4785028369071377058 - ], - [ - 12474665121325276393, - 6203136048752329670, - 8857782650797383532, - 1205842604249274162 - ], - [ - 4986065786927816995, - 16774907198741044886, - 3781179129421387661, - 10415439284245950953 - ], - [ - 11574881136629381449, - 12379735189792408408, - 16543138864606381298, - 2352837174543239308 - ], - [ - 2755808935111250351, - 11413691641496289631, - 7433067894962399074, - 9263092778396333619 - ], - [ - 510815690565069916, - 1326078112306964442, - 2280931398968953373, - 16372347667232436246 - ], - [ - 13049250986319352420, - 1312888884206484061, - 5191125907416704942, - 12910692959434040696 - ], - [ - 12641131533859353693, - 806990755667531292, - 8339582499246533062, - 15459494525405539126 - ], - [ - 5334506198163160487, - 12788298331318017466, - 3878039519170214619, - 14733573925349283487 - ], - [ - 5190557862976962645, - 13714749928322729293, - 10374841881342744627, - 15288181470367912639 - ], - [ - 16231478233162755783, - 12802076246758748329, - 14761367109514758527, - 14411193599867587859 - ], - [ - 8198731374774297764, - 3230920736551397516, - 11406632512199098782, - 10984385724696684374 - ], - [ - 2230082119129443391, - 15626857176238648658, - 10525636546408036753, - 713830293126230928 - ], - [ - 4947353515945045110, - 14890750024678328507, - 11992121003625623155, - 9247439145474008589 - ], - [ - 2476255618728017726, - 12423839440278091466, - 11131574346213868564, - 15878857548422208415 - ], - [ - 14063080495591128251, - 17832973426635180302, - 16234044432643152520, - 3790040177800561340 - ], - [ - 17654367747593125286, - 14771556851404254590, - 7054247606189603403, - 16389491650139306501 - ], - [ - 16945878684828151504, - 3218677612764542854, - 4129066622553533042, - 12411143505986390453 - ], - [ - 18139421373310678346, - 12565918292252415379, - 15834446535016534449, - 6148063108469358612 - ], - [ - 12292679265601130740, - 13386299384345137465, - 13364501573803460934, - 8733289102497600737 - ], - [ - 6160628888236701076, - 812243480588759160, - 13247424403141713486, - 10099500208290322254 - ], - [ - 10969580462260030094, - 16960852675866882693, - 14194600920049272873, - 2806447904271636378 - ], - [ - 5308612537476412691, - 2017232117327961782, - 4894043882170046108, - 7279530397891640384 - ], - [ - 4144733560007592583, - 5771344498053405563, - 15232642512723560772, - 17432794023851843115 - ], - [ - 13083133801966421336, - 6640909047775641455, - 7780326336877273740, - 3087015496142074629 - ], - [ - 4093431377560277258, - 11212918479165511440, - 8471957796338043904, - 10134266515436065987 - ], - [ - 7717602192687906239, - 16498238127262085325, - 2796866393834457756, - 6080730252731365434 - ], - [ - 15198975112515001105, - 3427384774999580491, - 9100144446909554927, - 12939101842468805683 - ], - [ - 3513270711153070627, - 6760090775854266850, - 2266114679123970134, - 2453164217927145379 - ], - [ - 8454909244339253322, - 3937159550392777548, - 17092850706817714179, - 14355781411083550660 - ], - [ - 14878805576521609961, - 14710363931287834639, - 3026158727470434848, - 664513313042659381 - ], - [ - 8491751794767535837, - 13990906406579930747, - 10128524312616192734, - 11329057191619161908 - ], - [ - 14453858867510385195, - 7990714203132759977, - 5706371533563158927, - 4128865490009717707 - ], - [ - 7793399965923611298, - 13429890700846305668, - 6463577189314693043, - 1403793223780405881 - ], - [ - 14506683092001193039, - 2676502583153744002, - 432387115071868059, - 5324230977146090619 - ], - [ - 5163412501615965388, - 13723489526376938207, - 13122017355634831416, - 9867447233188068220 - ], - [ - 2169005641163984550, - 9186165665928554404, - 17910278673295197365, - 11381918494994166306 - ], - [ - 5758488670302072688, - 18181832326798847807, - 10253561012448568621, - 6796662601196927726 - ], - [ - 15384372095875884299, - 15758325895562962606, - 979979951038690002, - 4884709252008623452 - ], - [ - 9658033725016409161, - 11061216333798295999, - 10656853269529126466, - 10494481123210514991 - ], - [ - 10565302142069456280, - 4482395191206056917, - 1026499487185603956, - 7313927946426328835 - ], - [ - 914075172237814299, - 4712333083011398137, - 5903513285138462152, - 27234332817070790 - ], - [ - 6165097805071238615, - 12405114942064306895, - 644764352603959519, - 9890780672007958877 - ], - [ - 15139300154181340570, - 3763515407393500498, - 747278468332165545, - 12401993133389174873 - ], - [ - 1560524376846745097, - 4692895970840561536, - 8733218268882211058, - 11050746819680980390 - ], - [ - 2481724169828996194, - 13708290945708520871, - 4344699263192501279, - 7140288180697285542 - ], - [ - 296768972336373070, - 10813546555235346490, - 16170115378690748299, - 12802703395795280191 - ], - [ - 14251656741089442088, - 4214370918062569580, - 10032045984805229135, - 10373930023291015419 - ], - [ - 17093829866009459220, - 12859940170163163826, - 18210851741109329458, - 16336121553624015019 - ], - [ - 4407838941860440582, - 11854162025145257857, - 12199975997855699065, - 2502264419023857875 - ], - [ - 12466276041107521420, - 5321886014476179588, - 7215900333286173827, - 6244069735947509039 - ], - [ - 5660993473650802623, - 11420246285415070761, - 4658057095848491886, - 6674509485613885322 - ], - [ - 16443753989364975722, - 553371339109155814, - 6176240530340905521, - 5112633271096324804 - ], - [ - 17344015413911877127, - 17921285748955845167, - 472207513366524064, - 9508903352311585055 - ], - [ - 2373580342727259876, - 17626197481532596235, - 5443748763702275935, - 16239948710647217063 - ], - [ - 1893590215294085348, - 16922448579707654020, - 3562803535149926022, - 5008057946422210179 - ], - [ - 9528486283906265098, - 16540897732900210948, - 7987610981843235045, - 8503796247003141361 - ], - [ - 7151582572260738324, - 8798367050545135378, - 17208414855521381994, - 16950417755338618580 - ], - [ - 16098392335079248174, - 15218667139563807688, - 3579977320329860139, - 5640122365751888962 - ], - [ - 9584075531015381817, - 16275032664923657166, - 13987470479712899701, - 2201274726914907785 - ], - [ - 9927398107804295577, - 5687396867124688978, - 10639332412514046012, - 10390174472889436172 - ], - [ - 7906944927470502930, - 9629467849018808831, - 16716405557811073978, - 2687565502976952246 - ], - [ - 2357326643063601119, - 12372080030488676843, - 17862973568880540528, - 9758076484635237383 - ], - [ - 6955909340644692347, - 9788637714503672561, - 10015565612607022102, - 5622624961359105679 - ], - [ - 8476474886341847071, - 14658488683343597259, - 14961921379651609802, - 14123545985510427091 - ], - [ - 1388357604146037902, - 15713286211316016536, - 5612470285625982657, - 6487364037172184435 - ], - [ - 15189267229737199628, - 6502744762576006736, - 13803864300857374808, - 5415597147102054081 - ], - [ - 11784930967835797340, - 11401415610557072973, - 1534900691166631710, - 4724373879472771719 - ], - [ - 10801273164646452905, - 11959510535773071656, - 13440563277297614072, - 11732355214966685480 - ], - [ - 709242285317259075, - 14093566268118334778, - 17068650979174969466, - 14497803119243527377 - ], - [ - 1887862044793269490, - 8537802901513975848, - 1791222441789963991, - 9563652556460700888 - ] + "fri_lde_factor": 1024, + "cap_size": 256 + }, + "setup_merkle_tree_cap": [ + [ + 4079970138244939135, + 8104423815789893989, + 13632023733358255593, + 13346032064987220184 + ], + [ + 12809474467971181399, + 17625072709782170540, + 6594064732490183681, + 8714625183861721175 + ], + [ + 7171332554251640845, + 18284102552959382973, + 3637671217742590741, + 16765711635591410580 + ], + [ + 763060458426938791, + 16159161330183244037, + 2533596966746622429, + 13441156130846388257 + ], + [ + 5525639466278377590, + 11073269405581050439, + 4833809564449931762, + 9314656237570540457 + ], + [ + 1137979745697828455, + 14966651582384421379, + 13384164937770371175, + 14074716572336098280 + ], + [ + 11906323633157650458, + 1175046947414337453, + 4283188400738641426, + 13792950671402095073 + ], + [ + 9310952691940114113, + 4820182619662404377, + 9479969369442954044, + 8512369778696933060 + ], + [ + 16946138649176650488, + 9475913097060757863, + 6608972026504748865, + 7215353463715689998 + ], + [ + 349222139041408316, + 1507489261015035841, + 7596560681014222842, + 8808235055298411214 + ], + [ + 8007370340350072341, + 2549612240734498963, + 105233771877650291, + 8758305155554767568 + ], + [ + 17190433766023179459, + 1755290160765045579, + 5619893747453895498, + 9139477571875211116 + ], + [ + 15755591792726495281, + 17501027650687476798, + 5579351800673089158, + 5931628352091930640 + ], + [ + 7269556889579729096, + 8636006399519326592, + 15556402257631967994, + 12423945489648480054 + ], + [ + 6411602498376025591, + 16377643789139599240, + 1264958035077382258, + 16706608130239118866 + ], + [ + 14246313207191082462, + 2201136836754342130, + 12301078636732201867, + 10991169525653220176 + ], + [ + 2101214821629968022, + 11996351959015322539, + 15461759537099893272, + 5820786797852667153 + ], + [ + 10546547765646585412, + 16670337245061195679, + 14026017154393171841, + 15865302123450709636 + ], + [ + 14546229884213013754, + 1736742091912698149, + 9563343697509131991, + 15957923614096898715 + ], + [ + 10053685874691243725, + 4837706724113512400, + 2806343138575002644, + 1217140278849814125 + ], + [ + 1445801437405723985, + 16370378782744105412, + 14937074551650631907, + 9349528097788576916 + ], + [ + 313624596753562026, + 2737902703720676400, + 1491628534561577719, + 4958865646973460786 + ], + [ + 4749220647213961766, + 1523283588343260013, + 14435216093380418825, + 12058673416937256217 + ], + [ + 12221430523773573392, + 2119312783391782040, + 113666136908336034, + 5557001496562966971 + ], + [ + 8943540790257615175, + 15963411684352909178, + 12833466372967679781, + 16755820399299554647 + ], + [ + 10568513175105063273, + 8152439411055527457, + 13191469024927433668, + 16583335250317103083 + ], + [ + 8728976170665901948, + 12047344511237318236, + 2665537844838432218, + 17220904479682973198 + ], + [ + 9924606303320583729, + 15168541434821629608, + 15267127988736394576, + 4612730729137963542 + ], + [ + 15187295020445613202, + 10979580190616738578, + 2487576517666265788, + 7799526392944971411 + ], + [ + 14001553124798608592, + 983427750240831173, + 10498633617369923042, + 15506856636873354247 + ], + [ + 9695584132680310661, + 15058940491468263542, + 16902767176197422459, + 4307070711535476522 + ], + [ + 16170129192711277380, + 15594325905653564554, + 8589261531750893019, + 16380506012444184509 + ], + [ + 1298482137029698068, + 7046350962355653091, + 4851290198964994943, + 9583994567704854822 + ], + [ + 12002196043506075596, + 6568364019768992619, + 2982180816490272604, + 11005221893883916442 + ], + [ + 11195444762924129211, + 4080035169749061493, + 12552903944803877103, + 1737834024116304977 + ], + [ + 14989371064091658414, + 7021573041416327989, + 10313274026717983047, + 12022812057768375145 + ], + [ + 4605818886224729183, + 1445887803225464457, + 10940822604464014966, + 9884898953608657154 + ], + [ + 16595525430044003662, + 4052207436631314262, + 10293047811043558578, + 12338411972889057265 + ], + [ + 17022547446139753073, + 10651710177937554340, + 6940830771318907626, + 6641453047926556761 + ], + [ + 10509711725088536487, + 4962100381463002257, + 770256729671337313, + 5857473086438310769 + ], + [ + 13267845343537121240, + 12321261427265206453, + 7120567552214639265, + 17302478469072029437 + ], + [ + 15157833123384882226, + 8158551777234184706, + 12348570826200339644, + 14734791159756873167 + ], + [ + 3385809684799950973, + 12900259269431347094, + 17672545490781962423, + 8013657472810936941 + ], + [ + 9546288143416776531, + 8356139039634733121, + 17477514712681213981, + 9515108802170635886 + ], + [ + 15455406291521834876, + 18083571768045422071, + 2009769659787731673, + 7263333966403015872 + ], + [ + 61130843037975416, + 18121830552682131571, + 9667884638217866764, + 6932529860678316702 + ], + [ + 15509823136620654552, + 6676934950708893059, + 13351533805402596549, + 14340984679679191575 + ], + [ + 15880919573481609124, + 14836853565796210968, + 15058034487233879726, + 11000215022533975317 + ], + [ + 10611445668418674805, + 9013654201900818768, + 1617123938865368568, + 16484766808972651318 + ], + [ + 13652743593752436493, + 13843264938563223779, + 10417182020840583510, + 16106479734523413326 + ], + [ + 17003899699844258217, + 17283344455088140068, + 17379245612757089745, + 1779134255761065541 + ], + [ + 11263035503709897880, + 1042839549428969974, + 6638626002246118718, + 1733549590874866310 + ], + [ + 13054247239013491523, + 14047141927303128296, + 2417752406294216107, + 5255181314162279551 + ], + [ + 1784021430104795099, + 3912913366054617723, + 8208877227749479136, + 4259205675774136108 + ], + [ + 801501735568309733, + 3220301656144181340, + 6144806934797449899, + 10479314068206076631 + ], + [ + 864619228795552444, + 2705960387071331097, + 15702747436396598972, + 14131926486457006694 + ], + [ + 15349058561965444062, + 16738574548455051915, + 4609208407223910426, + 11352062762791244662 + ], + [ + 16513285945090237658, + 6443875617703638442, + 17271016792575259072, + 426511686464611712 + ], + [ + 13863640462921288570, + 3362196992389213358, + 3576502768827883720, + 49219399301262346 + ], + [ + 14852014958673205840, + 11855705779815876870, + 8141476064801289266, + 15234506534160954104 + ], + [ + 6292328028167907211, + 6280576736728723621, + 1814915348986377963, + 3167789754322444841 + ], + [ + 6093870088272451581, + 12912333461662707605, + 16038365026642624017, + 10037265733136426182 + ], + [ + 5658473063427008398, + 18194712009700816671, + 3316188885192160812, + 15032222957557455487 + ], + [ + 10746739009272326386, + 4381896503060636995, + 13390900032103397758, + 11290296227744685851 + ], + [ + 7946268274905655961, + 12464655577446728520, + 3476152367809517039, + 3103729420470642525 + ], + [ + 15652670185218353632, + 17922284652588341925, + 3502474425690015164, + 3577240886292713575 + ], + [ + 13130871911189865405, + 2598654314674217849, + 6130707868677033708, + 11318789126458218054 + ], + [ + 14442525432094720658, + 10861520212227307580, + 10308956417568414174, + 101391938116250123 + ], + [ + 8015353735581004985, + 11791356411393233202, + 15134704188872104026, + 2916434958525680154 + ], + [ + 17776268955107890735, + 3978578384988358930, + 7512482176825678493, + 4207030036138354730 + ], + [ + 4778990000266723258, + 12646326430153649418, + 15602744563429649630, + 13225673449752707138 + ], + [ + 9874615904187846642, + 785813436574501824, + 7422887093860615814, + 12575067740028803899 + ], + [ + 2168314129068013776, + 5876170257821873353, + 6574425448964925595, + 13006818379253162445 + ], + [ + 18203396842093379784, + 1637929000957737331, + 16472903772026963266, + 10222221849709050007 + ], + [ + 8175241234035594021, + 11131701218615583700, + 2590544239124773213, + 13103205380700956240 + ], + [ + 10265760611171832222, + 10772001381712818941, + 9769892419500727073, + 3757944212165946207 + ], + [ + 12890674101364520820, + 17436315026775313277, + 17685632275460283213, + 11597862884205200021 + ], + [ + 6541476428026208530, + 1572664979326233234, + 7220008363221767753, + 5030515443926464143 + ], + [ + 1736392533925503753, + 4028348047388923757, + 1322644146499193870, + 7899110541856172042 + ], + [ + 824249951832333568, + 3650442342240934725, + 9551872020421810878, + 4459093260544332906 + ], + [ + 4897538583957298940, + 9763535759998548001, + 17962120881583547780, + 16423532894596203353 + ], + [ + 15621981029420175013, + 12716027808121583594, + 5698997410684688521, + 14893034348453337964 + ], + [ + 57123003983559085, + 1764189019842202487, + 12021079431755992353, + 4611397927843211028 + ], + [ + 11271204071286517021, + 11016763947620063917, + 10240257375147160558, + 6936015967868091242 + ], + [ + 13263159746058683924, + 2115544844352440396, + 17037308825725243672, + 15392971905394245550 + ], + [ + 3040132672294734369, + 8799577028392802142, + 4698252977355096983, + 12029143421110018733 + ], + [ + 3367138533962530706, + 11052858577054708144, + 13777717310915519372, + 1118835749836496249 + ], + [ + 18247935773305597594, + 4791613470261596504, + 2831278673598556804, + 13054754323096013606 + ], + [ + 16660028838922677973, + 9396606308613201784, + 10417460426584440111, + 8380249813777095858 + ], + [ + 8666375557464313815, + 6304275044317841466, + 17005733772133350822, + 14343984316653970581 + ], + [ + 6123226050306352446, + 17155936354664339685, + 8617663439980301335, + 15168460408431057703 + ], + [ + 4711490317757564870, + 4007952793500570494, + 1619724888362180342, + 135640370275358583 + ], + [ + 3568489405188009952, + 10063008786740635782, + 3645030669998184283, + 11251876386972219611 + ], + [ + 8493411482257270591, + 2420069605766207080, + 4319637578909518850, + 7366398383772225801 + ], + [ + 10514279907222008963, + 4576784878418470993, + 13703409256143697610, + 12595458216589602418 + ], + [ + 6518196967791403281, + 6267315352755318878, + 17017845178414282191, + 6219869337455185408 + ], + [ + 9419176152740350408, + 7255025946876060056, + 13692775553690785222, + 6482964045212267647 + ], + [ + 10371771524251272238, + 7264554963155886115, + 11851596230763322123, + 9644034659422561803 + ], + [ + 16478128758974022864, + 10586973455001136017, + 10940854718906381238, + 4322569144361190672 + ], + [ + 1408324526595066767, + 8225966379387133915, + 575234437450946120, + 4532159296152332514 + ], + [ + 14713730919085929141, + 8299030584912591200, + 12653081274697230155, + 7281510145820913452 + ], + [ + 13065256168386635886, + 11725981090441231815, + 9241488846717901227, + 2660860847185625194 + ], + [ + 17344786539017984359, + 16667262327893622443, + 2245517842543022928, + 5289295469095289187 + ], + [ + 7712996453163241402, + 13291387059438293554, + 15475873660461985862, + 421113001330390910 + ], + [ + 6600556276994686684, + 15236925279661890975, + 9085425445873596043, + 13489979627098239874 + ], + [ + 16522817509787049424, + 7880119001244729499, + 2065132977854154043, + 13961595284131100852 + ], + [ + 10136466656472241068, + 7462847284592418995, + 5211060891495522982, + 3429812446680794228 + ], + [ + 1290650595638649346, + 13577818566931833714, + 2388552128026682549, + 13062451014076475307 + ], + [ + 6070278064232182539, + 12399409837026713208, + 7006572737093555522, + 15229533042676039053 + ], + [ + 4546934482854074283, + 12178466512696871783, + 1691876649621188863, + 11473100481876466355 + ], + [ + 1236556729692669368, + 5549499687074217624, + 5958432331744161923, + 17960851426383425726 + ], + [ + 11313384441935481196, + 506230122531558484, + 17480105233549292653, + 3497216050489019068 + ], + [ + 14180330000703954943, + 17537654316605413864, + 13893109338811179145, + 12773435230801104558 + ], + [ + 1789329554161917105, + 3821166735342421302, + 492899993274707886, + 12499398353307226422 + ], + [ + 3089012429777109607, + 10341877957962585240, + 7745611914889843192, + 7156440096296115871 + ], + [ + 14047653524331542619, + 14986552290847971271, + 8344707263938736217, + 5768162811052933747 + ], + [ + 3282503115484594392, + 3455102204735354908, + 6152707383721113591, + 17881334209336571790 + ], + [ + 6895592993382091339, + 14944664838702526606, + 14158277091240311047, + 13527182248087302901 + ], + [ + 3709694612749923839, + 2612160447494745836, + 1406956200130224054, + 1366284088614500522 + ], + [ + 9948565747047514924, + 7052268914527763961, + 18019747825808196928, + 14284818641981927036 + ], + [ + 3586214080877747437, + 18259935751422321449, + 7615481956713457290, + 14815795422370035012 + ], + [ + 127402153735286355, + 14056365981282611643, + 13874770993027970720, + 619630456240824192 + ], + [ + 14160230678035047748, + 5889480608083619036, + 7255863117098942211, + 15199656156616971091 + ], + [ + 3095946492180700178, + 4006392168790405864, + 6879209997262175243, + 299198988833119182 + ], + [ + 7324876720724904977, + 16163169761447383767, + 12506750534396872240, + 2471214392724636123 + ], + [ + 9097827375986012190, + 14565705700237004602, + 14313871429102448506, + 11871591868576605558 + ], + [ + 9799079875206163527, + 16651435323107739422, + 12479220145998529239, + 3293893419326195678 + ], + [ + 10308258292354323463, + 12348814193023657478, + 7617037745166680507, + 4395321161975898727 + ], + [ + 5350571522462508856, + 13168312859432101164, + 16051585591307343397, + 14229124174436500603 + ], + [ + 7166265506509230502, + 7161154874163920078, + 8397077088165043439, + 11599821267858973994 + ], + [ + 7480649953471058826, + 10095090134750662786, + 10564643199160392009, + 13520621355659318250 + ], + [ + 10857779123272725120, + 15686674254635154618, + 8867730228951457290, + 10801878621148582310 + ], + [ + 15060256657026761959, + 9661131710054923901, + 672914961534049680, + 12834176932586128630 + ], + [ + 949448556211506716, + 15381404281513795275, + 11155631745566842701, + 2704703395424058389 + ], + [ + 9515248836992226419, + 8107063249314601218, + 7169007343668853680, + 4398533039543530267 + ], + [ + 5048521287079394266, + 469091126174822039, + 15224036421670482877, + 2109812614761568090 + ], + [ + 16374381239073062350, + 1415659237932604676, + 15755278916993952324, + 4477381067900828660 + ], + [ + 5908643369108814128, + 16993840892601214320, + 9745154490046936812, + 12675544964328790510 + ], + [ + 13069705042519055121, + 114347527485448732, + 13607966080279761362, + 3198027414138631154 + ], + [ + 2126201229935790021, + 11762486874095747924, + 4405447136645256490, + 4546150485765128281 + ], + [ + 11517522298498019347, + 9683562397139382420, + 17997189851623366056, + 15075626419278367114 + ], + [ + 17300749044902256514, + 13180322067670835054, + 13510754977375972746, + 16789287824862069583 + ], + [ + 12482184120647536152, + 6673581288163589602, + 12763923036507066435, + 14094147320392535720 + ], + [ + 14259634259170511729, + 4875730172347810212, + 84468584086030163, + 8303744294867418687 + ], + [ + 12134644548742181831, + 8520649738990136053, + 16059641390155564470, + 5416979754786543764 + ], + [ + 2092318536537973522, + 11767101658840205425, + 6426865564773940591, + 14647807617379392454 + ], + [ + 450267335414320409, + 9743488482513949727, + 60939637019009091, + 17766639401038188429 + ], + [ + 10940698167282175513, + 14751185897733548414, + 12951179730146965260, + 10875205992060835228 + ], + [ + 13364210655207872649, + 6433202412249539021, + 9336639704508334838, + 13505754981533474450 + ], + [ + 13696994814871272283, + 4490009507613100808, + 13804331039068475494, + 5468505803402562249 + ], + [ + 4777271447313491592, + 9940020440702119485, + 1101181637482946058, + 644606693604161858 + ], + [ + 15097959041405784257, + 12307130809829041484, + 17258499521253983865, + 10749514694060779271 + ], + [ + 10190208760039486310, + 4226050742652743727, + 8941293745652956008, + 16590522505585423775 + ], + [ + 345192297192706835, + 446809322130030426, + 14301758245246751976, + 9719056934946360728 + ], + [ + 12881116110058824616, + 9527685388634025534, + 11091584611747550280, + 17824266919172201804 + ], + [ + 1574239507079237453, + 8582461342969153012, + 12264251495254783586, + 17637680562426650364 + ], + [ + 10192143269632239849, + 13007991288866360616, + 15140175217087410009, + 12752906480866993968 + ], + [ + 1870988781431107523, + 12976682012942521853, + 16429062848935476734, + 5798003006437035985 + ], + [ + 14584766751103981854, + 17047930049374537599, + 16615811923791215213, + 4382675641211926136 + ], + [ + 2714557854446349417, + 7104188094330759435, + 4252584297915226480, + 8214575447584991866 + ], + [ + 11055975993893155083, + 4263965260378501220, + 14890629048371839452, + 12114106467257211085 + ], + [ + 1696215674801501046, + 2266423673248165355, + 17663731467117251495, + 3131727223950690444 + ], + [ + 9538270027605424981, + 14695627410990929758, + 1100103051852107643, + 7780696685697285282 + ], + [ + 3640909033400638252, + 4685184407249885115, + 1159593584695683466, + 5810155451150284456 + ], + [ + 2142365296746734893, + 15072293834204351367, + 10906328353503930623, + 567086761313849045 + ], + [ + 16792244974449676806, + 5281042885555694958, + 803668749758477336, + 9632569928427671141 + ], + [ + 11458024915503659884, + 12163640565717382175, + 5426693528062973190, + 5318451835514658298 + ], + [ + 17468129298890753615, + 16365877952312079431, + 4255216049796249864, + 17519162521801620751 + ], + [ + 16881958987441626136, + 5348165195536725074, + 1110205049250373278, + 3270960662287149636 + ], + [ + 1226689297335858879, + 5569006707448968175, + 12862213669554513549, + 13476251685033412618 + ], + [ + 17469709307599228055, + 10239286546577328519, + 11089348310818650527, + 16456908862000481769 + ], + [ + 1488822551903623063, + 1027724056630207939, + 17697306299429716060, + 16855149560650760331 + ], + [ + 6973362373999440967, + 10660889882557485296, + 10425405668156759777, + 6301066711999204638 + ], + [ + 414734469595850357, + 14255487988571755338, + 8593074929345797359, + 16605827151888774599 + ], + [ + 16875797800314241514, + 12421815564591930411, + 2652019482537730851, + 6038511721575984408 + ], + [ + 5083130506118840282, + 10236076700696608757, + 89798661707215807, + 11047945556430945234 + ], + [ + 9052849932438286930, + 766869919370273028, + 9513938692410545262, + 9325822678740812785 + ], + [ + 12214954222172122496, + 2137993706327729295, + 9068121284446752470, + 16719368474204358065 + ], + [ + 12846496216910539260, + 14961944612175511231, + 4871177192578157967, + 871092876547424272 + ], + [ + 8432570778385641968, + 16742266319428376459, + 5202631662503988626, + 9179077767480984950 + ], + [ + 6907086971366422845, + 3630230185711868320, + 6363326632303072661, + 2155376917773117715 + ], + [ + 7260111458604834720, + 15869987976273960274, + 5471864801301693834, + 6186332987204233992 + ], + [ + 7579472070725254127, + 4175627325036864033, + 2726864388901619006, + 17182366690618521544 + ], + [ + 10366850615209571638, + 594983328964439422, + 5708701194817491298, + 8320252948121397632 + ], + [ + 7681701787398279771, + 8922827186766353002, + 16390646056989747875, + 16861016347708202354 + ], + [ + 18349539097929417681, + 11011444774390028397, + 14929165998832565332, + 4785028369071377058 + ], + [ + 12474665121325276393, + 6203136048752329670, + 8857782650797383532, + 1205842604249274162 + ], + [ + 4986065786927816995, + 16774907198741044886, + 3781179129421387661, + 10415439284245950953 + ], + [ + 11574881136629381449, + 12379735189792408408, + 16543138864606381298, + 2352837174543239308 + ], + [ + 2755808935111250351, + 11413691641496289631, + 7433067894962399074, + 9263092778396333619 + ], + [ + 510815690565069916, + 1326078112306964442, + 2280931398968953373, + 16372347667232436246 + ], + [ + 13049250986319352420, + 1312888884206484061, + 5191125907416704942, + 12910692959434040696 + ], + [ + 12641131533859353693, + 806990755667531292, + 8339582499246533062, + 15459494525405539126 + ], + [ + 5334506198163160487, + 12788298331318017466, + 3878039519170214619, + 14733573925349283487 + ], + [ + 5190557862976962645, + 13714749928322729293, + 10374841881342744627, + 15288181470367912639 + ], + [ + 16231478233162755783, + 12802076246758748329, + 14761367109514758527, + 14411193599867587859 + ], + [ + 8198731374774297764, + 3230920736551397516, + 11406632512199098782, + 10984385724696684374 + ], + [ + 2230082119129443391, + 15626857176238648658, + 10525636546408036753, + 713830293126230928 + ], + [ + 4947353515945045110, + 14890750024678328507, + 11992121003625623155, + 9247439145474008589 + ], + [ + 2476255618728017726, + 12423839440278091466, + 11131574346213868564, + 15878857548422208415 + ], + [ + 14063080495591128251, + 17832973426635180302, + 16234044432643152520, + 3790040177800561340 + ], + [ + 17654367747593125286, + 14771556851404254590, + 7054247606189603403, + 16389491650139306501 + ], + [ + 16945878684828151504, + 3218677612764542854, + 4129066622553533042, + 12411143505986390453 + ], + [ + 18139421373310678346, + 12565918292252415379, + 15834446535016534449, + 6148063108469358612 + ], + [ + 12292679265601130740, + 13386299384345137465, + 13364501573803460934, + 8733289102497600737 + ], + [ + 6160628888236701076, + 812243480588759160, + 13247424403141713486, + 10099500208290322254 + ], + [ + 10969580462260030094, + 16960852675866882693, + 14194600920049272873, + 2806447904271636378 + ], + [ + 5308612537476412691, + 2017232117327961782, + 4894043882170046108, + 7279530397891640384 + ], + [ + 4144733560007592583, + 5771344498053405563, + 15232642512723560772, + 17432794023851843115 + ], + [ + 13083133801966421336, + 6640909047775641455, + 7780326336877273740, + 3087015496142074629 + ], + [ + 4093431377560277258, + 11212918479165511440, + 8471957796338043904, + 10134266515436065987 + ], + [ + 7717602192687906239, + 16498238127262085325, + 2796866393834457756, + 6080730252731365434 + ], + [ + 15198975112515001105, + 3427384774999580491, + 9100144446909554927, + 12939101842468805683 + ], + [ + 3513270711153070627, + 6760090775854266850, + 2266114679123970134, + 2453164217927145379 + ], + [ + 8454909244339253322, + 3937159550392777548, + 17092850706817714179, + 14355781411083550660 + ], + [ + 14878805576521609961, + 14710363931287834639, + 3026158727470434848, + 664513313042659381 + ], + [ + 8491751794767535837, + 13990906406579930747, + 10128524312616192734, + 11329057191619161908 + ], + [ + 14453858867510385195, + 7990714203132759977, + 5706371533563158927, + 4128865490009717707 + ], + [ + 7793399965923611298, + 13429890700846305668, + 6463577189314693043, + 1403793223780405881 + ], + [ + 14506683092001193039, + 2676502583153744002, + 432387115071868059, + 5324230977146090619 + ], + [ + 5163412501615965388, + 13723489526376938207, + 13122017355634831416, + 9867447233188068220 + ], + [ + 2169005641163984550, + 9186165665928554404, + 17910278673295197365, + 11381918494994166306 + ], + [ + 5758488670302072688, + 18181832326798847807, + 10253561012448568621, + 6796662601196927726 + ], + [ + 15384372095875884299, + 15758325895562962606, + 979979951038690002, + 4884709252008623452 + ], + [ + 9658033725016409161, + 11061216333798295999, + 10656853269529126466, + 10494481123210514991 + ], + [ + 10565302142069456280, + 4482395191206056917, + 1026499487185603956, + 7313927946426328835 + ], + [ + 914075172237814299, + 4712333083011398137, + 5903513285138462152, + 27234332817070790 + ], + [ + 6165097805071238615, + 12405114942064306895, + 644764352603959519, + 9890780672007958877 + ], + [ + 15139300154181340570, + 3763515407393500498, + 747278468332165545, + 12401993133389174873 + ], + [ + 1560524376846745097, + 4692895970840561536, + 8733218268882211058, + 11050746819680980390 + ], + [ + 2481724169828996194, + 13708290945708520871, + 4344699263192501279, + 7140288180697285542 + ], + [ + 296768972336373070, + 10813546555235346490, + 16170115378690748299, + 12802703395795280191 + ], + [ + 14251656741089442088, + 4214370918062569580, + 10032045984805229135, + 10373930023291015419 + ], + [ + 17093829866009459220, + 12859940170163163826, + 18210851741109329458, + 16336121553624015019 + ], + [ + 4407838941860440582, + 11854162025145257857, + 12199975997855699065, + 2502264419023857875 + ], + [ + 12466276041107521420, + 5321886014476179588, + 7215900333286173827, + 6244069735947509039 + ], + [ + 5660993473650802623, + 11420246285415070761, + 4658057095848491886, + 6674509485613885322 + ], + [ + 16443753989364975722, + 553371339109155814, + 6176240530340905521, + 5112633271096324804 + ], + [ + 17344015413911877127, + 17921285748955845167, + 472207513366524064, + 9508903352311585055 + ], + [ + 2373580342727259876, + 17626197481532596235, + 5443748763702275935, + 16239948710647217063 + ], + [ + 1893590215294085348, + 16922448579707654020, + 3562803535149926022, + 5008057946422210179 + ], + [ + 9528486283906265098, + 16540897732900210948, + 7987610981843235045, + 8503796247003141361 + ], + [ + 7151582572260738324, + 8798367050545135378, + 17208414855521381994, + 16950417755338618580 + ], + [ + 16098392335079248174, + 15218667139563807688, + 3579977320329860139, + 5640122365751888962 + ], + [ + 9584075531015381817, + 16275032664923657166, + 13987470479712899701, + 2201274726914907785 + ], + [ + 9927398107804295577, + 5687396867124688978, + 10639332412514046012, + 10390174472889436172 + ], + [ + 7906944927470502930, + 9629467849018808831, + 16716405557811073978, + 2687565502976952246 + ], + [ + 2357326643063601119, + 12372080030488676843, + 17862973568880540528, + 9758076484635237383 + ], + [ + 6955909340644692347, + 9788637714503672561, + 10015565612607022102, + 5622624961359105679 + ], + [ + 8476474886341847071, + 14658488683343597259, + 14961921379651609802, + 14123545985510427091 + ], + [ + 1388357604146037902, + 15713286211316016536, + 5612470285625982657, + 6487364037172184435 + ], + [ + 15189267229737199628, + 6502744762576006736, + 13803864300857374808, + 5415597147102054081 + ], + [ + 11784930967835797340, + 11401415610557072973, + 1534900691166631710, + 4724373879472771719 + ], + [ + 10801273164646452905, + 11959510535773071656, + 13440563277297614072, + 11732355214966685480 + ], + [ + 709242285317259075, + 14093566268118334778, + 17068650979174969466, + 14497803119243527377 + ], + [ + 1887862044793269490, + 8537802901513975848, + 1791222441789963991, + 9563652556460700888 ] - } + ] } \ No newline at end of file diff --git a/prover/data/keys/verification_compression_wrapper_1_key.json b/prover/data/keys/verification_compression_wrapper_1_key.json new file mode 100644 index 000000000000..7962a007a353 --- /dev/null +++ b/prover/data/keys/verification_compression_wrapper_1_key.json @@ -0,0 +1,260 @@ +{ + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 52, + "num_witness_columns": 78, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 8 + }, + "lookup_parameters": "NoLookup", + "domain_size": 65536, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 43116 + ], + [ + 1, + 43116 + ], + [ + 2, + 43116 + ], + [ + 3, + 43116 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + } + } + } + } + } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false + } + } + } + } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false + } + } + } + } + } + } + } + }, + "fri_lde_factor": 2, + "cap_size": 16 + }, + "setup_merkle_tree_cap": [ + [ + 11089233109673513909, + 4694567683723191950, + 2252594152558732892, + 328970513026299243 + ], + [ + 13110006211642469395, + 294375540944797602, + 16182235873004377367, + 2953023061901047966 + ], + [ + 12954993379135284962, + 6922678615292520290, + 17867758875593058615, + 339647768012530579 + ], + [ + 12809050784791995014, + 16689513786002107471, + 11773267927233763048, + 2032047837067080396 + ], + [ + 7271809219891052194, + 5444455652423618380, + 1935299370455922934, + 3289711575126119664 + ], + [ + 11181297440700596994, + 10603106417644946600, + 665809790647260411, + 187324941596609709 + ], + [ + 9724160063639293155, + 1608086271555753498, + 16260908485634719227, + 632759144306004522 + ], + [ + 16171710219953295253, + 11735348771071823498, + 13328414849155243388, + 388220022403515252 + ], + [ + 6347515368180647794, + 3011684189305320549, + 17039076561062895245, + 2001704612642658194 + ], + [ + 3707095019654850078, + 11362163228164094076, + 1561353676808431273, + 3424316751369411482 + ], + [ + 716932689692970095, + 18233950677301858032, + 17408689052397185323, + 2942664824563666170 + ], + [ + 12477682224945956203, + 420380906955838894, + 12174965353807932632, + 2912634883207646728 + ], + [ + 17124977403072675, + 18022072095965759474, + 364660436009892494, + 3385316467253708000 + ], + [ + 16889669530683164245, + 523943222152237493, + 1642074572079780044, + 993946077205588770 + ], + [ + 4746369334258751576, + 10488207333534533554, + 13843593047124360807, + 1554413355203877957 + ], + [ + 674378918528041149, + 9245737942013154408, + 5431441209257727894, + 970073226355719652 + ] + ] +} \ No newline at end of file diff --git a/prover/data/keys/verification_compression_wrapper_5_key.json b/prover/data/keys/verification_compression_wrapper_5_key.json index 8dd3feeabf37..b9a682b5ed3b 100644 --- a/prover/data/keys/verification_compression_wrapper_5_key.json +++ b/prover/data/keys/verification_compression_wrapper_5_key.json @@ -1,240 +1,238 @@ { - "CompressionMode5Circuit": { - "fixed_parameters": { - "parameters": { - "num_columns_under_copy_permutation": 28, - "num_witness_columns": 0, - "num_constant_columns": 4, - "max_allowed_constraint_degree": 4 - }, - "lookup_parameters": "NoLookup", - "domain_size": 131072, - "total_tables_len": 0, - "public_inputs_locations": [ - [ - 0, - 102321 - ], - [ - 1, - 102321 - ], - [ - 2, - 102321 - ], - [ - 3, - 102321 - ] + "fixed_parameters": { + "parameters": { + "num_columns_under_copy_permutation": 28, + "num_witness_columns": 0, + "num_constant_columns": 4, + "max_allowed_constraint_degree": 4 + }, + "lookup_parameters": "NoLookup", + "domain_size": 131072, + "total_tables_len": 0, + "public_inputs_locations": [ + [ + 0, + 102321 ], - "extra_constant_polys_for_selectors": 4, - "table_ids_column_idxes": [], - "quotient_degree": 8, - "selectors_placement": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 4, - "num_constants": 1, - "degree": 7, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 7, - "num_constants": 4, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 1, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 8, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + [ + 1, + 102321 + ], + [ + 2, + 102321 + ], + [ + 3, + 102321 + ] + ], + "extra_constant_polys_for_selectors": 4, + "table_ids_column_idxes": [], + "quotient_degree": 8, + "selectors_placement": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 4, + "num_constants": 1, + "degree": 7, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 7, + "num_constants": 4, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 1, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 8, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 5, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 9, - "num_constants": 0, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 5, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 9, + "num_constants": 0, + "degree": 2, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "right": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 11, - "num_constants": 4, - "degree": 2, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 0, - "num_constants": 4, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 11, + "num_constants": 4, + "degree": 2, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 0, + "num_constants": 4, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } - }, - "right": { - "Fork": { - "left": { - "Fork": { - "left": { - "Fork": { - "left": { - "GateOnly": { - "gate_idx": 6, - "num_constants": 2, - "degree": 3, - "needs_selector": true, - "is_lookup": false - } - }, - "right": { - "GateOnly": { - "gate_idx": 10, - "num_constants": 0, - "degree": 0, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "Fork": { + "left": { + "Fork": { + "left": { + "Fork": { + "left": { + "GateOnly": { + "gate_idx": 6, + "num_constants": 2, + "degree": 3, + "needs_selector": true, + "is_lookup": false + } + }, + "right": { + "GateOnly": { + "gate_idx": 10, + "num_constants": 0, + "degree": 0, + "needs_selector": true, + "is_lookup": false } - } - }, - "right": { - "GateOnly": { - "gate_idx": 3, - "num_constants": 0, - "degree": 1, - "needs_selector": true, - "is_lookup": false } } + }, + "right": { + "GateOnly": { + "gate_idx": 3, + "num_constants": 0, + "degree": 1, + "needs_selector": true, + "is_lookup": false + } } - }, - "right": { - "GateOnly": { - "gate_idx": 2, - "num_constants": 0, - "degree": 1, - "needs_selector": true, - "is_lookup": false - } + } + }, + "right": { + "GateOnly": { + "gate_idx": 2, + "num_constants": 0, + "degree": 1, + "needs_selector": true, + "is_lookup": false } } } } } } - }, - "fri_lde_factor": 512, - "cap_size": 8 + } }, - "setup_merkle_tree_cap": [ - [ - 16914330110517127429, - 16187587722999224490, - 18023818126147572005, - 2874604292345707728 - ], - [ - 16768425182336866443, - 12214564422923037261, - 13582724864735257774, - 1643211286062672867 - ], - [ - 15218535791823658828, - 14934144541713644491, - 5667321981618564549, - 961076974096461270 - ], - [ - 12538243484307626811, - 154885234119673688, - 6664593122905080257, - 3057958811251130407 - ], - [ - 12286013330322000138, - 5761148084208728264, - 2870132557697656188, - 1515812049810917361 - ], - [ - 12416599860285890728, - 16995984316626848023, - 6201310732706348436, - 3434944201786144260 - ], - [ - 2716626386491435001, - 128784567533803364, - 15547067112370735343, - 1561596902164897368 - ], - [ - 8739964537157479045, - 17599924720345455572, - 12386657679573206086, - 835122317104749492 - ] + "fri_lde_factor": 512, + "cap_size": 8 + }, + "setup_merkle_tree_cap": [ + [ + 16914330110517127429, + 16187587722999224490, + 18023818126147572005, + 2874604292345707728 + ], + [ + 16768425182336866443, + 12214564422923037261, + 13582724864735257774, + 1643211286062672867 + ], + [ + 15218535791823658828, + 14934144541713644491, + 5667321981618564549, + 961076974096461270 + ], + [ + 12538243484307626811, + 154885234119673688, + 6664593122905080257, + 3057958811251130407 + ], + [ + 12286013330322000138, + 5761148084208728264, + 2870132557697656188, + 1515812049810917361 + ], + [ + 12416599860285890728, + 16995984316626848023, + 6201310732706348436, + 3434944201786144260 + ], + [ + 2716626386491435001, + 128784567533803364, + 15547067112370735343, + 1561596902164897368 + ], + [ + 8739964537157479045, + 17599924720345455572, + 12386657679573206086, + 835122317104749492 ] - } + ] } \ No newline at end of file diff --git a/prover/data/keys/verification_scheduler_key.json b/prover/data/keys/verification_scheduler_key.json index 8a52cc244bac..ddcb7999dd4f 100644 --- a/prover/data/keys/verification_scheduler_key.json +++ b/prover/data/keys/verification_scheduler_key.json @@ -1,5 +1,4 @@ { - "SchedulerCircuit": { "fixed_parameters": { "parameters": { "num_columns_under_copy_permutation": 130, @@ -266,5 +265,4 @@ 9108687955872827734 ] ] - } -} \ No newline at end of file +} diff --git a/prover/setup-data-gpu-keys.json b/prover/setup-data-gpu-keys.json index 8a3bdeb262c1..0ced59cb4c2e 100644 --- a/prover/setup-data-gpu-keys.json +++ b/prover/setup-data-gpu-keys.json @@ -1,5 +1,5 @@ { - "us": "gs://matterlabs-setup-data-us/dc3bba7-gpu/", - "europe": "gs://matterlabs-setup-data-europe/dc3bba7-gpu/", - "asia": "gs://matterlabs-setup-data-asia/dc3bba7-gpu/" + "us": "gs://matterlabs-setup-data-us/ee4df49-gpu/", + "europe": "gs://matterlabs-setup-data-europe/ee4df49-gpu/", + "asia": "gs://matterlabs-setup-data-asia/ee4df49-gpu/" } diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh index 9c42f83f0020..c7357d661e2e 100644 --- a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -1906,9 +1906,7 @@ _arguments "${_arguments_options[@]}" : \ '(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ '--bellman-cuda=[]' \ '--setup-compressor-key=[]' \ -'--plonk-path=[]:PLONK_PATH:_default' \ -'--fflonk-path=[]:FFLONK_PATH:_default' \ -'--compressor-type=[]:COMPRESSOR_TYPE:(fflonk plonk all)' \ +'--path=[]:PATH:_default' \ '--region=[]:REGION:(us europe asia)' \ '--mode=[]:MODE:(download generate)' \ '--setup-keys=[]' \ @@ -1979,9 +1977,7 @@ _arguments "${_arguments_options[@]}" : \ ;; (compressor-keys) _arguments "${_arguments_options[@]}" : \ -'--plonk-path=[]:PLONK_PATH:_default' \ -'--fflonk-path=[]:FFLONK_PATH:_default' \ -'--compressor-type=[]:COMPRESSOR_TYPE:(fflonk plonk all)' \ +'--path=[]:PATH:_default' \ '--chain=[Chain to use]:CHAIN:_default' \ '-v[Verbose mode]' \ '--verbose[Verbose mode]' \ diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish index 8ba5afc5a49f..b724ddc6c723 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.fish +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -602,11 +602,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_ false\t''" complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l setup-compressor-key -r -f -a "true\t'' false\t''" -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l plonk-path -r -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l fflonk-path -r -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l compressor-type -r -f -a "fflonk\t'' -plonk\t'' -all\t''" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l path -r complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l region -r -f -a "us\t'' europe\t'' asia\t''" @@ -672,11 +668,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_ complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -l ignore-prerequisites -d 'Ignores prerequisites checks' complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l plonk-path -r -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l fflonk-path -r -complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l compressor-type -r -f -a "fflonk\t'' -plonk\t'' -all\t''" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l path -r complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l ignore-prerequisites -d 'Ignores prerequisites checks' diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh index 280863339c52..a6b4498d53fb 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.sh +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -7106,24 +7106,16 @@ _zkstack() { return 0 ;; zkstack__prover__compressor__keys) - opts="-v -h --plonk-path --fflonk-path --compressor-type --verbose --chain --ignore-prerequisites --help" + opts="-v -h --path --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --plonk-path) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --fflonk-path) + --path) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --compressor-type) - COMPREPLY=($(compgen -W "fflonk plonk all" -- "${cur}")) - return 0 - ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -7234,7 +7226,7 @@ _zkstack() { return 0 ;; zkstack__prover__init) - opts="-u -d -v -h --dev --proof-store-dir --bucket-base-url --credentials-file --bucket-name --location --project-id --shall-save-to-public-bucket --public-store-dir --public-bucket-base-url --public-credentials-file --public-bucket-name --public-location --public-project-id --clone --bellman-cuda-dir --bellman-cuda --setup-compressor-key --plonk-path --fflonk-path --compressor-type --region --mode --setup-keys --setup-database --prover-db-url --prover-db-name --use-default --dont-drop --cloud-type --verbose --chain --ignore-prerequisites --help" + opts="-u -d -v -h --dev --proof-store-dir --bucket-base-url --credentials-file --bucket-name --location --project-id --shall-save-to-public-bucket --public-store-dir --public-bucket-base-url --public-credentials-file --public-bucket-name --public-location --public-project-id --clone --bellman-cuda-dir --bellman-cuda --setup-compressor-key --path --region --mode --setup-keys --setup-database --prover-db-url --prover-db-name --use-default --dont-drop --cloud-type --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -7304,18 +7296,10 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; - --plonk-path) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --fflonk-path) + --path) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --compressor-type) - COMPREPLY=($(compgen -W "fflonk plonk all" -- "${cur}")) - return 0 - ;; --region) COMPREPLY=($(compgen -W "us europe asia" -- "${cur}")) return 0 diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs index 8b7bfb0fc543..9de616657b20 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs @@ -1,5 +1,4 @@ -use clap::{Parser, ValueEnum}; -use strum::EnumIter; +use clap::Parser; use zkstack_cli_common::Prompt; use crate::messages::MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT; @@ -7,51 +6,17 @@ use crate::messages::MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT; #[derive(Debug, Clone, Parser, Default)] pub struct CompressorKeysArgs { #[clap(long)] - pub plonk_path: Option, - #[clap(long)] - pub fflonk_path: Option, - #[clap(long, default_value = "plonk")] - pub compressor_type: CompressorType, -} - -#[derive(Debug, Clone, ValueEnum, EnumIter, strum::Display, PartialEq, Eq, Default)] -pub enum CompressorType { - Fflonk, - #[default] - Plonk, - All, + pub path: Option, } impl CompressorKeysArgs { - pub fn fill_values_with_prompt( - self, - default_plonk_path: &str, - default_fflonk_path: &str, - ) -> CompressorKeysArgs { - let plonk_path = if self.compressor_type != CompressorType::Fflonk { - Some(self.plonk_path.unwrap_or_else(|| { - Prompt::new(MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT) - .default(default_plonk_path) - .ask() - })) - } else { - None - }; - - let fflonk_path = if self.compressor_type != CompressorType::Plonk { - Some(self.fflonk_path.unwrap_or_else(|| { - Prompt::new(MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT) - .default(default_fflonk_path) - .ask() - })) - } else { - None - }; + pub fn fill_values_with_prompt(self, default_path: &str) -> CompressorKeysArgs { + let path = self.path.unwrap_or_else(|| { + Prompt::new(MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT) + .default(default_path) + .ask() + }); - CompressorKeysArgs { - plonk_path, - fflonk_path, - ..self - } + CompressorKeysArgs { path: Some(path) } } } diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs index afe57a8f5eb4..4956a23ac987 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs @@ -202,16 +202,13 @@ impl ProverInitArgs { pub(crate) fn fill_values_with_prompt( &self, shell: &Shell, - default_plonk_key_path: &str, - default_fflonk_key_path: &str, + default_compressor_key_path: &str, chain_config: &ChainConfig, ) -> anyhow::Result { let proof_store = self.fill_proof_storage_values_with_prompt(shell)?; let public_store = self.fill_public_storage_values_with_prompt(shell)?; - let compressor_key_args = self.fill_setup_compressor_key_values_with_prompt( - default_plonk_key_path, - default_fflonk_key_path, - ); + let compressor_key_args = + self.fill_setup_compressor_key_values_with_prompt(default_compressor_key_path); let bellman_cuda_config = self.fill_bellman_cuda_values_with_prompt(); let cloud_type = self.get_cloud_type_with_prompt(); let database_config = self.fill_database_values_with_prompt(chain_config); @@ -358,14 +355,11 @@ impl ProverInitArgs { fn fill_setup_compressor_key_values_with_prompt( &self, - default_plonk_path: &str, - default_fflonk_path: &str, + default_path: &str, ) -> Option { if self.dev { return Some(CompressorKeysArgs { - plonk_path: Some(default_plonk_path.to_string()), - fflonk_path: Some(default_fflonk_path.to_string()), - ..self.compressor_keys_args.clone() + path: Some(default_path.to_string()), }); } @@ -379,7 +373,7 @@ impl ProverInitArgs { Some( self.compressor_keys_args .clone() - .fill_values_with_prompt(default_plonk_path, default_fflonk_path), + .fill_values_with_prompt(default_path), ) } else { None diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs index 19ba634a4075..88eec0688da7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs @@ -3,7 +3,7 @@ use xshell::Shell; use zkstack_cli_common::{logger, spinner::Spinner}; use zkstack_cli_config::{get_link_to_prover, EcosystemConfig, GeneralConfig}; -use super::args::compressor_keys::{CompressorKeysArgs, CompressorType}; +use super::args::compressor_keys::CompressorKeysArgs; use crate::messages::{ MSG_CHAIN_NOT_FOUND_ERR, MSG_DOWNLOADING_SETUP_COMPRESSOR_KEY_SPINNER, MSG_PROOF_COMPRESSOR_CONFIG_NOT_FOUND_ERR, MSG_SETUP_KEY_PATH_ERROR, @@ -16,39 +16,12 @@ pub(crate) async fn run(shell: &Shell, args: CompressorKeysArgs) -> anyhow::Resu .context(MSG_CHAIN_NOT_FOUND_ERR)?; let mut general_config = chain_config.get_general_config()?; - let default_plonk_path = get_default_plonk_compressor_keys_path(&ecosystem_config)?; - let default_fflonk_path = get_default_fflonk_compressor_keys_path(&ecosystem_config)?; - let args = args.fill_values_with_prompt(&default_plonk_path, &default_fflonk_path); - - match args.compressor_type { - CompressorType::Fflonk => { - let path = args.clone().fflonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key(shell, &mut general_config, CompressorType::Fflonk, &path)?; - } - CompressorType::Plonk => { - let path = args.plonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key(shell, &mut general_config, CompressorType::Plonk, &path)?; - } - CompressorType::All => { - let plonk_path = args.clone().plonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - let fflonk_path = args.clone().fflonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key( - shell, - &mut general_config, - CompressorType::Fflonk, - &fflonk_path, - )?; - download_compressor_key( - shell, - &mut general_config, - CompressorType::Plonk, - &plonk_path, - )?; - } - } + let default_path = get_default_compressor_keys_path(&ecosystem_config)?; + let args = args.fill_values_with_prompt(&default_path); + + let path = args.path.context(MSG_SETUP_KEY_PATH_ERROR)?; + + download_compressor_key(shell, &mut general_config, &path)?; chain_config.save_general_config(&general_config)?; @@ -58,7 +31,6 @@ pub(crate) async fn run(shell: &Shell, args: CompressorKeysArgs) -> anyhow::Resu pub(crate) fn download_compressor_key( shell: &Shell, general_config: &mut GeneralConfig, - r#type: CompressorType, path: &str, ) -> anyhow::Result<()> { let spinner = Spinner::new(MSG_DOWNLOADING_SETUP_COMPRESSOR_KEY_SPINNER); @@ -68,50 +40,35 @@ pub(crate) fn download_compressor_key( .expect(MSG_PROOF_COMPRESSOR_CONFIG_NOT_FOUND_ERR) .clone(); - let url = match r#type { - CompressorType::Fflonk => { - compressor_config.universal_fflonk_setup_path = path.to_string(); - general_config.proof_compressor_config = Some(compressor_config.clone()); - compressor_config.universal_fflonk_setup_download_url - } - CompressorType::Plonk => { - compressor_config.universal_setup_path = path.to_string(); - general_config.proof_compressor_config = Some(compressor_config.clone()); - compressor_config.universal_setup_download_url - } - _ => unreachable!("Invalid compressor type"), - }; + compressor_config.universal_setup_path = path.to_string(); + general_config.proof_compressor_config = Some(compressor_config.clone()); let path = std::path::Path::new(path); - logger::info(format!("Downloading setup key by URL: {}", url)); + logger::info(format!( + "Downloading setup key by URL: {}", + compressor_config.universal_setup_download_url + )); let client = reqwest::blocking::Client::builder() .timeout(std::time::Duration::from_secs(600)) .build()?; - let response = client.get(url).send()?.bytes()?; + let response = client + .get(compressor_config.universal_setup_download_url) + .send()? + .bytes()?; shell.write_file(path, &response)?; spinner.finish(); Ok(()) } -pub fn get_default_plonk_compressor_keys_path( - ecosystem_config: &EcosystemConfig, -) -> anyhow::Result { - let link_to_prover = get_link_to_prover(ecosystem_config); - let path = link_to_prover.join("keys/setup/setup_2^24.key"); - let string = path.to_str().unwrap(); - - Ok(String::from(string)) -} - -pub fn get_default_fflonk_compressor_keys_path( +pub fn get_default_compressor_keys_path( ecosystem_config: &EcosystemConfig, ) -> anyhow::Result { let link_to_prover = get_link_to_prover(ecosystem_config); - let path = link_to_prover.join("keys/setup/setup_fflonk_compact.key"); + let path = link_to_prover.join("keys/setup/setup_compact.key"); let string = path.to_str().unwrap(); Ok(String::from(string)) diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs index b318f4924ec3..51034e02a213 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs @@ -24,10 +24,7 @@ use super::{ }; use crate::{ commands::prover::{ - args::{compressor_keys::CompressorType, init::ProofStorageFileBacked}, - compressor_keys::{ - get_default_fflonk_compressor_keys_path, get_default_plonk_compressor_keys_path, - }, + args::init::ProofStorageFileBacked, compressor_keys::get_default_compressor_keys_path, }, consts::{PROVER_MIGRATIONS, PROVER_STORE_MAX_RETRIES}, messages::{ @@ -41,18 +38,12 @@ use crate::{ pub(crate) async fn run(args: ProverInitArgs, shell: &Shell) -> anyhow::Result<()> { let ecosystem_config = EcosystemConfig::from_file(shell)?; - let default_plonk_key_path = get_default_plonk_compressor_keys_path(&ecosystem_config)?; - let default_fflonk_key_path = get_default_fflonk_compressor_keys_path(&ecosystem_config)?; + let default_compressor_key_path = get_default_compressor_keys_path(&ecosystem_config)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; - let args = args.fill_values_with_prompt( - shell, - &default_plonk_key_path, - &default_fflonk_key_path, - &chain_config, - )?; + let args = args.fill_values_with_prompt(shell, &default_compressor_key_path, &chain_config)?; if chain_config.get_general_config().is_err() || chain_config.get_secrets_config().is_err() { copy_configs(shell, &ecosystem_config.link_to_code, &chain_config.configs)?; @@ -66,35 +57,9 @@ pub(crate) async fn run(args: ProverInitArgs, shell: &Shell) -> anyhow::Result<( let public_object_store_config = get_object_store_config(shell, args.public_store)?; if let Some(args) = args.compressor_key_args { - match args.compressor_type { - CompressorType::Fflonk => { - let path = args.clone().fflonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key(shell, &mut general_config, CompressorType::Fflonk, &path)?; - } - CompressorType::Plonk => { - let path = args.plonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key(shell, &mut general_config, CompressorType::Plonk, &path)?; - } - CompressorType::All => { - let fflonk_path = args.clone().fflonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - let plonk_path = args.clone().plonk_path.context(MSG_SETUP_KEY_PATH_ERROR)?; - - download_compressor_key( - shell, - &mut general_config, - CompressorType::Fflonk, - &fflonk_path, - )?; - download_compressor_key( - shell, - &mut general_config, - CompressorType::Plonk, - &plonk_path, - )?; - } - } + let path = args.path.context(MSG_SETUP_KEY_PATH_ERROR)?; + + download_compressor_key(shell, &mut general_config, &path)?; } if let Some(args) = args.setup_keys {