This repository was archived by the owner on Apr 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
use ark_std:: { end_timer, start_timer} ;
2
- use eth_types:: U256 ;
3
2
use halo2_proofs:: {
4
3
circuit:: { Layouter , SimpleFloorPlanner , Value } ,
5
4
halo2curves:: bn256:: { Bn256 , Fr , G1Affine } ,
@@ -249,13 +248,7 @@ impl<const N_SNARKS: usize> Circuit<Fr> for BatchCircuit<N_SNARKS> {
249
248
let barycentric = config. blob_consistency_config . assign_barycentric (
250
249
& mut ctx,
251
250
& self . batch_hash . blob_bytes ,
252
- U256 :: from_big_endian (
253
- & self
254
- . batch_hash
255
- . blob_consistency_witness
256
- . challenge ( )
257
- . to_bytes ( ) ,
258
- ) ,
251
+ self . batch_hash . blob_consistency_witness . challenge_digest ( ) ,
259
252
) ;
260
253
261
254
ctx. print_stats ( & [ "barycentric" ] ) ;
Original file line number Diff line number Diff line change @@ -188,8 +188,8 @@ impl BlobConsistencyWitness {
188
188
self . blob_versioned_hash
189
189
}
190
190
191
- pub fn challenge_digest ( & self ) -> H256 {
192
- self . challenge_digest
191
+ pub fn challenge_digest ( & self ) -> U256 {
192
+ word_from_digest ( self . challenge_digest )
193
193
}
194
194
195
195
pub fn challenge ( & self ) -> Scalar {
@@ -228,4 +228,4 @@ fn word_from_digest(x: H256) -> U256 {
228
228
U256 :: from_big_endian ( & x. to_fixed_bytes ( ) )
229
229
}
230
230
231
- // word_from scalar would not be used.
231
+ // word_from_scalar would not be used.
You can’t perform that action at this time.
0 commit comments