Skip to content

Commit 487c83e

Browse files
authored
Add da-avail feature flag (#1433)
* 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
1 parent 72bb2a8 commit 487c83e

25 files changed

+1380
-1111
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ anyhow = "1.0"
2626
ark-std = "0.3"
2727
base64 = "0.13.0"
2828
bincode = "1"
29+
cfg-if = "1"
2930
ctor = "0.1"
3031
env_logger = "0.10"
3132
ethers = { version = "=2.0.7", features = ["ethers-solc"] }

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ test-benches: ## Compiles the benchmarks
3030

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

33+
test-da-avail: ## Run light tests
34+
@cargo test --release --workspace --exclude integration-tests --exclude circuit-benchmarks --features da-avail batch_circuit
35+
3336
super_bench: ## Run Super Circuit benchmarks
3437
@cargo test --profile bench bench_super_circuit_prover -p circuit-benchmarks --features benches -- --nocapture
3538

aggregator/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ gadgets = { path = "../gadgets" }
1111
zkevm-circuits = { path = "../zkevm-circuits", default-features=false, features = ["debug-annotations", "parallel_syn"] }
1212

1313
ark-std.workspace = true
14+
cfg-if.workspace = true
1415
ctor.workspace = true
1516
env_logger.workspace = true
1617
ethers-core.workspace = true
@@ -47,6 +48,7 @@ csv = "1.1"
4748
default = ["revm-precompile/c-kzg", "halo2_proofs/circuit-params"]
4849
display = []
4950
print-trace = ["ark-std/print-trace"]
51+
da-avail = []
5052

5153
[lints]
5254
workspace = true

aggregator/src/aggregation.rs

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/// Config to evaluate blob polynomial at a random challenge.
2-
mod barycentric;
31
/// Config to constrain batch data (decoded blob data)
4-
mod batch_data;
5-
/// Config to constrain blob data (encoded batch data)
6-
mod blob_data;
2+
pub mod batch_data;
73
/// Circuit implementation of aggregation circuit.
84
mod circuit;
95
/// Config for aggregation circuit
@@ -15,13 +11,11 @@ mod rlc;
1511
/// Utility module
1612
mod util;
1713

18-
pub(crate) use barycentric::{
19-
interpolate, AssignedBarycentricEvaluationConfig, BarycentricEvaluationConfig, BLS_MODULUS,
20-
};
14+
pub use batch_data::BatchData;
2115
pub(crate) use batch_data::BatchDataConfig;
22-
pub(crate) use blob_data::BlobDataConfig;
16+
pub use decoder::{decode_bytes, encode_bytes};
2317
pub(crate) use decoder::{witgen, DecoderConfig, DecoderConfigArgs};
24-
pub(crate) use rlc::RlcConfig;
18+
pub(crate) use rlc::{RlcConfig, POWS_OF_256};
2519

2620
pub use circuit::BatchCircuit;
2721
pub use config::BatchCircuitConfig;

0 commit comments

Comments
 (0)