File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use super::poseidon2;
22
33/// This calls the bb.js Poseidon2 implementation
44#[oracle(getPoseidon2Hash)]
5- unconstrained fn poseidon2_hash_oracle (input : [Field ; 10 ]) -> Field { }
5+ unconstrained fn poseidon2_hash_oracle (input : [Field ; 10 ]) -> Field {}
66
77unconstrained fn get_poseidon2_hash (input : [Field ; 10 ]) -> Field {
88 poseidon2_hash_oracle (input )
@@ -11,16 +11,16 @@ unconstrained fn get_poseidon2_hash(input: [Field; 10]) -> Field {
1111fn test_poseidon2_comparison (input : [Field ; 10 ]) -> bool {
1212 // get hash from Noir implementation
1313 let noir_hash = poseidon2::Poseidon2 ::hash (input , input .len ());
14-
14+
1515 // get hash from bb.js via oracle
1616 let bb_hash = unsafe { get_poseidon2_hash (input ) };
17-
17+
1818 noir_hash == bb_hash
1919}
2020
2121#[test]
2222fn test_poseidon2 (input : [Field ; 10 ]) {
2323 let result = test_poseidon2_comparison (input );
24-
24+
2525 assert (result );
2626}
You can’t perform that action at this time.
0 commit comments