@@ -141,6 +141,7 @@ pub struct ZKVMProof<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> {
141
141
pub pi_evals : Vec < E > ,
142
142
opcode_proofs : BTreeMap < String , ( usize , ZKVMOpcodeProof < E > ) > ,
143
143
table_proofs : BTreeMap < String , ( usize , ZKVMTableProof < E > ) > ,
144
+ witin_commit : <PCS as PolynomialCommitmentScheme < E > >:: Commitment ,
144
145
pub fixed_witin_opening_proof : PCS :: Proof ,
145
146
}
146
147
@@ -150,13 +151,15 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E>> ZKVMProof<E, PCS> {
150
151
pi_evals : Vec < E > ,
151
152
opcode_proofs : BTreeMap < String , ( usize , ZKVMOpcodeProof < E > ) > ,
152
153
table_proofs : BTreeMap < String , ( usize , ZKVMTableProof < E > ) > ,
154
+ witin_commit : <PCS as PolynomialCommitmentScheme < E > >:: Commitment ,
153
155
fixed_witin_opening_proof : PCS :: Proof ,
154
156
) -> Self {
155
157
Self {
156
158
raw_pi,
157
159
pi_evals,
158
160
opcode_proofs,
159
161
table_proofs,
162
+ witin_commit,
160
163
fixed_witin_opening_proof,
161
164
}
162
165
}
@@ -210,32 +213,10 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E> + Serialize> fmt::Dis
210
213
// also provide by-circuit stats
211
214
let mut by_circuitname_stats = HashMap :: new ( ) ;
212
215
// opcode circuit mpcs size
213
- let mpcs_opcode_commitment = self
214
- . opcode_proofs
215
- . iter ( )
216
- . map ( |( circuit_name, ( _, proof) ) | {
217
- let size = bincode:: serialized_size ( & proof. wits_commit ) ;
218
- size. inspect ( |size| {
219
- * by_circuitname_stats. entry ( circuit_name) . or_insert ( 0 ) += size;
220
- } )
221
- } )
222
- . collect :: < Result < Vec < u64 > , _ > > ( )
223
- . expect ( "serialization error" )
224
- . iter ( )
225
- . sum :: < u64 > ( ) ;
226
- let mpcs_opcode_opening = self
227
- . opcode_proofs
228
- . iter ( )
229
- . map ( |( circuit_name, ( _, proof) ) | {
230
- let size = bincode:: serialized_size ( & proof. wits_opening_proof ) ;
231
- size. inspect ( |size| {
232
- * by_circuitname_stats. entry ( circuit_name) . or_insert ( 0 ) += size;
233
- } )
234
- } )
235
- . collect :: < Result < Vec < u64 > , _ > > ( )
236
- . expect ( "serialization error" )
237
- . iter ( )
238
- . sum :: < u64 > ( ) ;
216
+ let mpcs_opcode_commitment =
217
+ bincode:: serialized_size ( & self . witin_commit ) . expect ( "serialization error" ) ;
218
+ let mpcs_opcode_opening =
219
+ bincode:: serialized_size ( & self . fixed_witin_opening_proof ) . expect ( "serialization error" ) ;
239
220
// opcode circuit for tower proof size
240
221
let tower_proof_opcode = self
241
222
. opcode_proofs
@@ -264,46 +245,6 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E> + Serialize> fmt::Dis
264
245
. expect ( "serialization error" )
265
246
. iter ( )
266
247
. sum :: < u64 > ( ) ;
267
- // table circuit mpcs size
268
- let mpcs_table_commitment = self
269
- . table_proofs
270
- . iter ( )
271
- . map ( |( circuit_name, ( _, proof) ) | {
272
- let size = bincode:: serialized_size ( & proof. wits_commit ) ;
273
- size. inspect ( |size| {
274
- * by_circuitname_stats. entry ( circuit_name) . or_insert ( 0 ) += size;
275
- } )
276
- } )
277
- . collect :: < Result < Vec < u64 > , _ > > ( )
278
- . expect ( "serialization error" )
279
- . iter ( )
280
- . sum :: < u64 > ( ) ;
281
- let mpcs_table_opening = self
282
- . table_proofs
283
- . iter ( )
284
- . map ( |( circuit_name, ( _, proof) ) | {
285
- let size = bincode:: serialized_size ( & proof. wits_opening_proof ) ;
286
- size. inspect ( |size| {
287
- * by_circuitname_stats. entry ( circuit_name) . or_insert ( 0 ) += size;
288
- } )
289
- } )
290
- . collect :: < Result < Vec < u64 > , _ > > ( )
291
- . expect ( "serialization error" )
292
- . iter ( )
293
- . sum :: < u64 > ( ) ;
294
- let mpcs_table_fixed_opening = self
295
- . table_proofs
296
- . iter ( )
297
- . map ( |( circuit_name, ( _, proof) ) | {
298
- let size = bincode:: serialized_size ( & proof. fixed_opening_proof ) ;
299
- size. inspect ( |size| {
300
- * by_circuitname_stats. entry ( circuit_name) . or_insert ( 0 ) += size;
301
- } )
302
- } )
303
- . collect :: < Result < Vec < u64 > , _ > > ( )
304
- . expect ( "serialization error" )
305
- . iter ( )
306
- . sum :: < u64 > ( ) ;
307
248
// table circuit for tower proof size
308
249
let tower_proof_table = self
309
250
. table_proofs
@@ -355,13 +296,10 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E> + Serialize> fmt::Dis
355
296
write ! (
356
297
f,
357
298
"overall_size {:.2}mb. \n \
358
- opcode mpcs commitment {:?}% \n \
359
- opcode mpcs opening {:?}% \n \
299
+ mpcs commitment {:?}% \n \
300
+ mpcs opening {:?}% \n \
360
301
opcode tower proof {:?}% \n \
361
302
opcode main sumcheck proof {:?}% \n \
362
- table mpcs commitment {:?}% \n \
363
- table mpcs opening {:?}% \n \
364
- table mpcs fixed opening {:?}% \n \
365
303
table tower proof {:?}% \n \
366
304
table same r sumcheck proof {:?}% \n \n \
367
305
by circuit_name break down: \n \
@@ -372,9 +310,6 @@ impl<E: ExtensionField, PCS: PolynomialCommitmentScheme<E> + Serialize> fmt::Dis
372
310
( mpcs_opcode_opening * 100 ) . div( overall_size) ,
373
311
( tower_proof_opcode * 100 ) . div( overall_size) ,
374
312
( main_sumcheck_opcode * 100 ) . div( overall_size) ,
375
- ( mpcs_table_commitment * 100 ) . div( overall_size) ,
376
- ( mpcs_table_opening * 100 ) . div( overall_size) ,
377
- ( mpcs_table_fixed_opening * 100 ) . div( overall_size) ,
378
313
( tower_proof_table * 100 ) . div( overall_size) ,
379
314
( same_r_sumcheck_table * 100 ) . div( overall_size) ,
380
315
by_circuitname_stats,
0 commit comments