Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions aggregator/src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ pub const N_ROWS_NUM_CHUNKS: usize = 2;
/// we explicitly set the most-significant byte to 0, effectively utilising only 31 bytes.
pub const N_BLOB_BYTES: usize = BLOB_WIDTH * N_DATA_BYTES_PER_COEFFICIENT;

/// Allow up to 5x compression via zstd encoding of the batch data.
pub const N_BATCH_BYTES: usize = N_BLOB_BYTES * 5;

/// KZG trusted setup
pub static KZG_TRUSTED_SETUP: Lazy<Arc<c_kzg::KzgSettings>> = Lazy::new(|| {
Arc::new(
Expand Down Expand Up @@ -162,12 +165,12 @@ impl<const N_SNARKS: usize> BatchData<N_SNARKS> {

/// The number of rows in Blob Data config's layout to represent the "chunk data" section.
pub const fn n_rows_data() -> usize {
N_BLOB_BYTES - Self::n_rows_metadata()
N_BATCH_BYTES - Self::n_rows_metadata()
}

/// The total number of rows used in Blob Data config's layout.
pub const fn n_rows() -> usize {
N_BLOB_BYTES + Self::n_rows_digest()
N_BATCH_BYTES + Self::n_rows_digest()
}

pub(crate) fn new(num_valid_chunks: usize, chunks_with_padding: &[ChunkHash]) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion aggregator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod util;
mod tests;

pub use self::core::extract_proof_and_instances_with_pairing_check;
pub use aggregation::*;
pub use aggregation::{witgen::init_zstd_encoder, *};
pub use batch::BatchHash;
pub use chunk::ChunkHash;
pub use compression::*;
Expand Down