Skip to content

Commit 66fc5d3

Browse files
committed
Remove proof slicing
1 parent a598c68 commit 66fc5d3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • operator/mina_account/lib/src

operator/mina_account/lib/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mod merkle_verifier;
99
const MAX_PROOF_SIZE: usize = 16 * 1024;
1010
const MAX_PUB_INPUT_SIZE: usize = 6 * 1024;
1111
const HASH_SIZE: usize = 32;
12-
const MERKLE_PATH_LEN_SIZE: usize = 4;
1312

1413
#[no_mangle]
1514
pub extern "C" fn verify_account_inclusion_ffi(
@@ -64,10 +63,7 @@ pub fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp), String> {
6463
}
6564

6665
pub fn parse_proof(proof_bytes: &[u8]) -> Result<Vec<MerklePath>, String> {
67-
let merkle_path_bytes = proof_bytes
68-
.get(MERKLE_PATH_LEN_SIZE..)
69-
.ok_or("Failed to slice merkle path".to_string())?
70-
.chunks_exact(HASH_SIZE + 1);
66+
let merkle_path_bytes = proof_bytes.chunks_exact(HASH_SIZE + 1);
7167

7268
if !merkle_path_bytes.remainder().is_empty() {
7369
return Err(format!(

0 commit comments

Comments
 (0)