File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/examples/zkprogram/runtime-table Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11import { Field , verify } from 'o1js' ;
22import { PayrollRuntimeTableZkProgram } from './payroll.js' ;
3+ import { perfStart , perfEnd } from '../../../lib/testing/perf-regression.js' ;
34
5+ const cs = await PayrollRuntimeTableZkProgram . analyzeMethods ( ) ;
6+
7+ perfStart ( 'compile' , PayrollRuntimeTableZkProgram . name ) ;
48let { verificationKey } = await PayrollRuntimeTableZkProgram . compile ( { withRuntimeTables : true } ) ;
9+ perfEnd ( ) ;
510
611export const examplePayrollPublicInput = Field ( 1600_00 ) ; // total withheld (cents)
712export const examplePayrollPrivateInputs = [
@@ -13,9 +18,11 @@ export const examplePayrollPrivateInputs = [
1318 Field ( 3_000 ) , // Charlie rate
1419] as const ;
1520
21+ perfStart ( 'prove' , PayrollRuntimeTableZkProgram . name , cs , 'verifyPayroll' ) ;
1622let { proof } = await PayrollRuntimeTableZkProgram . verifyPayroll (
1723 examplePayrollPublicInput ,
1824 ...examplePayrollPrivateInputs
1925) ;
26+ perfEnd ( ) ;
2027
2128verify ( proof , verificationKey ) ;
You can’t perform that action at this time.
0 commit comments