Skip to content

Commit

Permalink
Add da-avail feature flag (#1433)
Browse files Browse the repository at this point in the history
* Add data_availibility directory

* move files around and change paths

* rename and move decode_blob

* unpub barycentric

* move eip4844 files into data_availability/

* export functions and structs only

* move get_bytes to decoder

* Add BlobConsistencyWitness and BlobConsistencyConfig

* don't export get_versioned_hash

* cleanup

* Move blob_data up to data_availability

* fix backwards compatibility

* fix rebase

* fix warnings

* remove empty file

* add and use blob_crts_limbs function

* add blob_crts_limbs to AssignedBlobDataExport

* move link out of blob data circuit into aggregation circuit

* remove unused arguments

* unpub get_coefficients

* rename data_availability to blob_consistency

* remove da-eip4844 feature flag

* define N_DATA_BYTES_PER_COEFFICIENT once

* fix da-avail build

* fix typos

* allow dead code for now

* cleanup comments

* Don't use BlobConsistencyWitness in BatchHeader

* don't derive (De)serialize

* add conversion functions

* cleanup

* fix da-avail build

* fix clippy

* move function to be before tests

* cargo fmt
  • Loading branch information
z2trillion authored Nov 5, 2024
1 parent 72bb2a8 commit 487c83e
Show file tree
Hide file tree
Showing 25 changed files with 1,380 additions and 1,111 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ anyhow = "1.0"
ark-std = "0.3"
base64 = "0.13.0"
bincode = "1"
cfg-if = "1"
ctor = "0.1"
env_logger = "0.10"
ethers = { version = "=2.0.7", features = ["ethers-solc"] }
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ test-benches: ## Compiles the benchmarks

test-all: fmt doc clippy test-doc test-benches test ## Run all the CI checks locally (in your actual toolchain)

test-da-avail: ## Run light tests
@cargo test --release --workspace --exclude integration-tests --exclude circuit-benchmarks --features da-avail batch_circuit

super_bench: ## Run Super Circuit benchmarks
@cargo test --profile bench bench_super_circuit_prover -p circuit-benchmarks --features benches -- --nocapture

Expand Down
2 changes: 2 additions & 0 deletions aggregator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ gadgets = { path = "../gadgets" }
zkevm-circuits = { path = "../zkevm-circuits", default-features=false, features = ["debug-annotations", "parallel_syn"] }

ark-std.workspace = true
cfg-if.workspace = true
ctor.workspace = true
env_logger.workspace = true
ethers-core.workspace = true
Expand Down Expand Up @@ -47,6 +48,7 @@ csv = "1.1"
default = ["revm-precompile/c-kzg", "halo2_proofs/circuit-params"]
display = []
print-trace = ["ark-std/print-trace"]
da-avail = []

[lints]
workspace = true
14 changes: 4 additions & 10 deletions aggregator/src/aggregation.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/// Config to evaluate blob polynomial at a random challenge.
mod barycentric;
/// Config to constrain batch data (decoded blob data)
mod batch_data;
/// Config to constrain blob data (encoded batch data)
mod blob_data;
pub mod batch_data;
/// Circuit implementation of aggregation circuit.
mod circuit;
/// Config for aggregation circuit
Expand All @@ -15,13 +11,11 @@ mod rlc;
/// Utility module
mod util;

pub(crate) use barycentric::{
interpolate, AssignedBarycentricEvaluationConfig, BarycentricEvaluationConfig, BLS_MODULUS,
};
pub use batch_data::BatchData;
pub(crate) use batch_data::BatchDataConfig;
pub(crate) use blob_data::BlobDataConfig;
pub use decoder::{decode_bytes, encode_bytes};
pub(crate) use decoder::{witgen, DecoderConfig, DecoderConfigArgs};
pub(crate) use rlc::RlcConfig;
pub(crate) use rlc::{RlcConfig, POWS_OF_256};

pub use circuit::BatchCircuit;
pub use config::BatchCircuitConfig;
Loading

0 comments on commit 487c83e

Please sign in to comment.