@@ -176,7 +176,7 @@ fn build_witness(num_adds: usize, system: &System<U32CS>) -> SystemWitness {
176176}
177177
178178/// Build claims for the first `num_adds` additions (same PRNG seed as `build_witness`).
179- fn build_claims ( num_adds : usize ) -> Vec < [ Val ; 4 ] > {
179+ fn build_claims ( num_adds : usize ) -> Vec < Vec < Val > > {
180180 let f = Val :: from_u32;
181181 let mut a: u32 = 0xdead_beef ;
182182 let mut b: u32 = 0xcafe_babe ;
@@ -191,7 +191,7 @@ fn build_claims(num_adds: usize) -> Vec<[Val; 4]> {
191191 let x = a;
192192 let y = b;
193193 let ( z, _carry) = x. overflowing_add ( y) ;
194- claims. push ( [ f ( 1 ) , f ( x) , f ( y) , f ( z) ] ) ;
194+ claims. push ( vec ! [ f( 1 ) , f( x) , f( y) , f( z) ] ) ;
195195 }
196196 claims
197197}
@@ -223,15 +223,12 @@ fn bench_prove(c: &mut Criterion) {
223223 for log_height in [ 12 , 13 , 14 ] {
224224 let num_adds = 1 << log_height;
225225 let claims = build_claims ( num_adds) ;
226- let claim_refs: Vec < & [ Val ] > = claims. iter ( ) . map ( |c| c. as_slice ( ) ) . collect ( ) ;
227226 group. bench_function (
228227 BenchmarkId :: new ( "u32_add" , format ! ( "2^{log_height}" ) ) ,
229228 |b| {
230229 b. iter_batched (
231- || build_witness ( num_adds, & system) ,
232- |witness| {
233- system. prove_multiple_claims ( fri_parameters, & key, & claim_refs, witness)
234- } ,
230+ || ( build_witness ( num_adds, & system) , claims. clone ( ) ) ,
231+ |( witness, claims) | system. prove ( fri_parameters, & key, claims, witness) ,
235232 criterion:: BatchSize :: LargeInput ,
236233 ) ;
237234 } ,
@@ -263,17 +260,12 @@ fn bench_verify(c: &mut Criterion) {
263260 for log_height in [ 12 , 13 , 14 ] {
264261 let num_adds = 1 << log_height;
265262 let claims = build_claims ( num_adds) ;
266- let claim_refs: Vec < & [ Val ] > = claims. iter ( ) . map ( |c| c. as_slice ( ) ) . collect ( ) ;
267263 let witness = build_witness ( num_adds, & system) ;
268- let proof = system. prove_multiple_claims ( fri_parameters, & key, & claim_refs , witness) ;
264+ let proof = system. prove ( fri_parameters, & key, claims , witness) ;
269265 group. bench_function (
270266 BenchmarkId :: new ( "u32_add" , format ! ( "2^{log_height}" ) ) ,
271267 |b| {
272- b. iter ( || {
273- system
274- . verify_multiple_claims ( fri_parameters, & claim_refs, & proof)
275- . unwrap ( )
276- } ) ;
268+ b. iter ( || system. verify ( fri_parameters, & proof) . unwrap ( ) ) ;
277269 } ,
278270 ) ;
279271 }
0 commit comments