Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Compressor optimizations #3476

Merged
merged 27 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bdf04fb
initial commit
Artemka374 Jan 13, 2025
c075da6
fast compressor implementation
Unsainted374 Jan 15, 2025
a0b15ba
prettify VKs, update zkstack
Unsainted374 Jan 15, 2025
e4b2807
Merge branch 'main' into afo/faster-compressor
Unsainted374 Jan 15, 2025
3194794
update CI
Unsainted374 Jan 15, 2025
adc094a
update dependencies
Unsainted374 Jan 15, 2025
ee4df49
update dependencies
Unsainted374 Jan 15, 2025
fe248c0
fix warning
Unsainted374 Jan 15, 2025
fbb320c
fix fmt, lint
Artemka374 Jan 16, 2025
47464ee
pretty scheduler key
Artemka374 Jan 16, 2025
b355a30
remove compression from all_boojum
Artemka374 Jan 16, 2025
d766c7f
remove unused import
Artemka374 Jan 16, 2025
fd03230
fix format problem for compression VKs
Artemka374 Jan 16, 2025
0fb1a59
update scheduler key
Unsainted374 Jan 16, 2025
ad4ebc1
chore: Update generated Prover FRI GPU setup-data keys from branch af…
zksync-admin-bot2 Jan 16, 2025
374818c
Merge branch 'refs/heads/main' into afo/faster-compressor
Artemka374 Jan 16, 2025
0b90dda
update dependencies
Artemka374 Jan 16, 2025
e2a6d33
try to return back old scheduler
Unsainted374 Jan 16, 2025
f62c56c
the key was correct, i was dumb
Unsainted374 Jan 16, 2025
7cfdab1
remove unused import
Unsainted374 Jan 17, 2025
a5d7741
add fflonk/plonk setup data to gitignore
Unsainted374 Jan 17, 2025
0c9d8ac
add CRS to dockerignore
Artemka374 Jan 17, 2025
e59c354
chore: Update generated Prover FRI GPU setup-data keys from branch af…
zksync-admin-bot2 Jan 17, 2025
07b9310
bump dependencies
Artemka374 Jan 17, 2025
e3e4805
Merge branch 'main' into afo/faster-compressor
Artemka374 Jan 23, 2025
cc7ac65
fix deserialization
Artemka374 Jan 23, 2025
0357aa4
fmt
Artemka374 Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ keys/setup
!contracts/
!setup_2\^26.key
!setup_2\^24.key
!setup_compact.key
# It's required to remove .git from contracts,
# otherwise yarn tries to use .git parent directory that
# doesn't exist.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-proof-fri-gpu-compressor-gar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ hyperchain-*.yml
# Prover keys that should not be commited
prover/crates/bin/vk_setup_data_generator_server_fri/data/setup_*
prover/data/keys/setup_*
prover/data/keys/fflonk_setup_snark_data.bin
EmilLuta marked this conversation as resolved.
Show resolved Hide resolved
prover/data/keys/plonk_setup_snark_data.bin

# ZK Stack CLI
chains/era/configs/*
Expand Down
97 changes: 49 additions & 48 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
EmilLuta marked this conversation as resolved.
Show resolved Hide resolved

# New VM; pinned to a specific commit because of instability
zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "457d8a7eea9093af9440662e33e598c13ba41633" }
Expand Down
1 change: 1 addition & 0 deletions core/lib/prover_interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions core/lib/prover_interface/src/outputs.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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<Bn256, ZkSyncSnarkWrapperCircuit>,
pub protocol_version: ProtocolSemanticVersion,
}

Expand Down
Loading
Loading