Skip to content

Commit a907eda

Browse files
committed
wip
1 parent 7994fe0 commit a907eda

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fmt: ## Check whether the code is formatted correctly
1515
@cargo fmt --all -- --check
1616

1717
test-light: ## Run light tests
18-
@cargo test --release --workspace --exclude integration-tests --exclude circuit-benchmarks
18+
@cargo test --release --workspace --exclude integration-tests --exclude circuit-benchmarks batch_circuit_raw
1919

2020
test-heavy: ## Run heavy tests serially to avoid OOM
2121
@cargo test --release --features scroll --all --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --skip max_tx # --test-threads 1

aggregator/src/aggregation/circuit.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use ark_std::{end_timer, start_timer};
2+
use eth_types::U256;
23
use halo2_proofs::{
34
circuit::{Layouter, SimpleFloorPlanner, Value},
45
halo2curves::bn256::{Bn256, Fr, G1Affine},
@@ -248,12 +249,8 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
248249
let barycentric = config.blob_consistency_config.assign_barycentric(
249250
&mut ctx,
250251
&self.batch_hash.blob_bytes,
251-
self.batch_hash
252-
.blob_consistency_witness
253-
.challenge()
254-
.0
255-
.into(),
256-
);
252+
self.batch_hash.challenge_digest(),
253+
\ );
257254

258255
ctx.print_stats(&["barycentric"]);
259256

aggregator/src/batch.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub struct BatchHeader<const N_SNARKS: usize> {
2828
pub data_hash: H256,
2929
// /// information needed to check that the blobs in the circuit match the blob the data availability provided.
3030
#[serde(flatten)]
31+
// don't touch this one!!!
3132
pub blob_consistency_witness: BlobConsistencyWitness,
3233
}
3334

@@ -169,7 +170,7 @@ pub struct BatchHash<const N_SNARKS: usize> {
169170
pub(crate) batch_header: BatchHeader<N_SNARKS>,
170171
/// The blob bytes (may be encoded batch bytes, or may be raw batch bytes).
171172
pub(crate) blob_bytes: Vec<u8>,
172-
173+
// update this one!!
173174
pub blob_consistency_witness: BlobConsistencyWitness,
174175
}
175176

@@ -286,6 +287,7 @@ impl<const N_SNARKS: usize> BatchHash<N_SNARKS> {
286287

287288
let batch_data = BatchData::<N_SNARKS>::new(number_of_valid_chunks, chunks_with_padding);
288289
let current_batch_hash = batch_header.batch_hash();
290+
dbg!(current_batch_hash);
289291
let blob_consistency_witness = BlobConsistencyWitness::new(&blob_bytes, &batch_data);
290292

291293
log::info!(

aggregator/src/blob_consistency/avail.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{AssignedBlobDataExport};
1+
use super::AssignedBlobDataExport;
22
use crate::{BatchData, RlcConfig};
33
use eth_types::{H256, U256};
44
use halo2_base::{gates::range::RangeConfig, AssignedValue, Context};

aggregator/src/blob_consistency/eip4844.rs

+2
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ impl BlobConsistencyWitness {
177177
let versioned_hash = get_versioned_hash(&coeffs);
178178
let point_evaluation_assignments =
179179
PointEvaluationAssignments::new(&batch_data, bytes, versioned_hash);
180+
dbg!(point_evaluation_assignments.challenge);
181+
dbg!(point_evaluation_assignments.challenge_digest);
180182
let blob_data_proof = [
181183
point_evaluation_assignments.challenge,
182184
point_evaluation_assignments.evaluation,

aggregator/src/blob_consistency/eip4844/barycentric.rs

+4
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ impl BarycentricEvaluationConfig {
128128
let (_, challenge) = challenge_digest.div_mod(*BLS_MODULUS);
129129
let challenge_scalar = Scalar::from_raw(challenge.0);
130130

131+
dbg!(challenge_digest);
132+
dbg!(challenge);
133+
panic!();
134+
131135
let challenge_digest_crt = self.load_u256(ctx, challenge_digest);
132136
let challenge_le = self.scalar.range().gate.assign_witnesses(
133137
ctx,

0 commit comments

Comments
 (0)