Skip to content

Commit

Permalink
feat: Compressor optimizations (#3476)
Browse files Browse the repository at this point in the history
## What ❔

Integrate optimizations for compressor's work.
Before:
PLONK: ~180s
FFLONK: ~248s
Now
Both: ~70s

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.

---------

Co-authored-by: afo <[email protected]>
Co-authored-by: zksync-admin-bot2 <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2025
1 parent 4073f81 commit 3e931be
Show file tree
Hide file tree
Showing 45 changed files with 3,791 additions and 3,873 deletions.
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
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"}

# 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
Loading

0 comments on commit 3e931be

Please sign in to comment.