File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ use dep::std;
2
2
3
3
fn main (
4
4
verification_key : [Field ; 114 ],
5
- public_inputs : pub [Field ; 2 ],
5
+ public_inputs : pub [Field ; 5 ],
6
6
key_hash : Field ,
7
- proof : [Field ; 109 ]
7
+ proof : [Field ; 93 ] //109
8
8
) -> pub u64 {
9
9
// verify sum was computed correctly
10
10
std:: verify_proof (
@@ -13,5 +13,5 @@ fn main(
13
13
public_inputs .as_slice (),
14
14
key_hash
15
15
);
16
- public_inputs [1 ] as u64
16
+ public_inputs [4 ] as u64
17
17
}
Original file line number Diff line number Diff line change @@ -77,11 +77,15 @@ async function start() {
77
77
innerProof2 ,
78
78
numPubInputs + 1 + 16 // +1 for public return +16 for hidden aggregation object
79
79
) ;
80
+ console . log ( "artifacts2.proof length = " , artifacts2 . proofAsFields . length ) ;
81
+
82
+ pub_inputs . push ( returnValue . toString ( ) ) ; // leaf returns sum
83
+ pub_inputs . push ( returnValue . toString ( ) ) ; // node also coded to return same value
80
84
81
85
// Generate and verify outer proof
82
86
const outerParams = {
83
87
verification_key : artifacts2 . vkAsFields ,
84
- public_inputs : [ pub_inputs . map . toString ( ) , returnValue . toString ( ) ] , // returns proven sum
88
+ public_inputs : pub_inputs ,
85
89
key_hash : artifacts2 . vkHash ,
86
90
proof : artifacts2 . proofAsFields
87
91
} ;
You can’t perform that action at this time.
0 commit comments