This repository was archived by the owner on Apr 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +14
-9
lines changed Expand file tree Collapse file tree 6 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ fmt: ## Check whether the code is formatted correctly
15
15
@cargo fmt --all -- --check
16
16
17
17
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
19
19
20
20
test-heavy : # # Run heavy tests serially to avoid OOM
21
21
@cargo test --release --features scroll --all --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --skip max_tx # --test-threads 1
Original file line number Diff line number Diff line change 1
1
use ark_std:: { end_timer, start_timer} ;
2
+ use eth_types:: U256 ;
2
3
use halo2_proofs:: {
3
4
circuit:: { Layouter , SimpleFloorPlanner , Value } ,
4
5
halo2curves:: bn256:: { Bn256 , Fr , G1Affine } ,
@@ -248,12 +249,8 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
248
249
let barycentric = config. blob_consistency_config . assign_barycentric (
249
250
& mut ctx,
250
251
& 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
+ \ ) ;
257
254
258
255
ctx. print_stats ( & [ "barycentric" ] ) ;
259
256
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub struct BatchHeader<const N_SNARKS: usize> {
28
28
pub data_hash : H256 ,
29
29
// /// information needed to check that the blobs in the circuit match the blob the data availability provided.
30
30
#[ serde( flatten) ]
31
+ // don't touch this one!!!
31
32
pub blob_consistency_witness : BlobConsistencyWitness ,
32
33
}
33
34
@@ -169,7 +170,7 @@ pub struct BatchHash<const N_SNARKS: usize> {
169
170
pub ( crate ) batch_header : BatchHeader < N_SNARKS > ,
170
171
/// The blob bytes (may be encoded batch bytes, or may be raw batch bytes).
171
172
pub ( crate ) blob_bytes : Vec < u8 > ,
172
-
173
+ // update this one!!
173
174
pub blob_consistency_witness : BlobConsistencyWitness ,
174
175
}
175
176
@@ -286,6 +287,7 @@ impl<const N_SNARKS: usize> BatchHash<N_SNARKS> {
286
287
287
288
let batch_data = BatchData :: < N_SNARKS > :: new ( number_of_valid_chunks, chunks_with_padding) ;
288
289
let current_batch_hash = batch_header. batch_hash ( ) ;
290
+ dbg ! ( current_batch_hash) ;
289
291
let blob_consistency_witness = BlobConsistencyWitness :: new ( & blob_bytes, & batch_data) ;
290
292
291
293
log:: info!(
Original file line number Diff line number Diff line change 1
- use super :: { AssignedBlobDataExport } ;
1
+ use super :: AssignedBlobDataExport ;
2
2
use crate :: { BatchData , RlcConfig } ;
3
3
use eth_types:: { H256 , U256 } ;
4
4
use halo2_base:: { gates:: range:: RangeConfig , AssignedValue , Context } ;
Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ impl BlobConsistencyWitness {
177
177
let versioned_hash = get_versioned_hash ( & coeffs) ;
178
178
let point_evaluation_assignments =
179
179
PointEvaluationAssignments :: new ( & batch_data, bytes, versioned_hash) ;
180
+ dbg ! ( point_evaluation_assignments. challenge) ;
181
+ dbg ! ( point_evaluation_assignments. challenge_digest) ;
180
182
let blob_data_proof = [
181
183
point_evaluation_assignments. challenge ,
182
184
point_evaluation_assignments. evaluation ,
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ impl BarycentricEvaluationConfig {
128
128
let ( _, challenge) = challenge_digest. div_mod ( * BLS_MODULUS ) ;
129
129
let challenge_scalar = Scalar :: from_raw ( challenge. 0 ) ;
130
130
131
+ dbg ! ( challenge_digest) ;
132
+ dbg ! ( challenge) ;
133
+ panic ! ( ) ;
134
+
131
135
let challenge_digest_crt = self . load_u256 ( ctx, challenge_digest) ;
132
136
let challenge_le = self . scalar . range ( ) . gate . assign_witnesses (
133
137
ctx,
You can’t perform that action at this time.
0 commit comments