File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -124,13 +124,8 @@ impl Proof {
124124 let merkle_proof = group. merkle_proof ( & to_element ( * identity. commitment ( ) ) ) ;
125125 let merkle_proof_length = merkle_proof. siblings . len ( ) ;
126126
127- // The index must be converted to a list of indices, 1 for each tree level.
128- // The missing siblings can be set to 0, as they won"t be used in the circuit.
129- let mut merkle_proof_indices = Vec :: new ( ) ;
130127 let mut merkle_proof_siblings = Vec :: < Element > :: new ( ) ;
131128 for i in 0 ..merkle_tree_depth {
132- merkle_proof_indices. push ( ( merkle_proof. index >> i) & 1 ) ;
133-
134129 if let Some ( sibling) = merkle_proof. siblings . get ( i as usize ) {
135130 merkle_proof_siblings. push ( * sibling) ;
136131 } else {
@@ -150,8 +145,8 @@ impl Proof {
150145 vec ! [ merkle_proof_length. to_string( ) ] ,
151146 ) ,
152147 (
153- "merkleProofIndices " . to_string ( ) ,
154- merkle_proof_indices . iter ( ) . map ( |i| i . to_string ( ) ) . collect ( ) ,
148+ "merkleProofIndex " . to_string ( ) ,
149+ vec ! [ merkle_proof . index . to_string( ) ] ,
155150 ) ,
156151 (
157152 "merkleProofSiblings" . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub fn to_element(value: Fq) -> Element {
4040
4141/// Download zkey from artifacts: https://snark-artifacts.pse.dev/
4242pub fn download_zkey ( depth : u16 ) -> Result < String , Box < dyn Error > > {
43- let version = "4.0 .0" ;
43+ let version = "4.13 .0" ;
4444 let base_url = format ! ( "https://snark-artifacts.pse.dev/semaphore/{version}/" ) ;
4545 let filename = format ! ( "semaphore-{depth}.zkey" ) ;
4646 let dest_filename = format ! ( "semaphore-{version}-{depth}.zkey" ) ;
You can’t perform that action at this time.
0 commit comments