Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 401
fix(batcher): Update Lambdaworks Merkle Trees + Update merkle leaves length check in batcher#1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
65170c156fcbd46c733736ff7d681b6252dccbe26d1a28f987686a6b6e9ba78cae39a16b87d1683d05d84e57e7a4a0bad2b2a81ecFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -43,8 +43,12 @@ pub extern "C" fn verify_merkle_tree_batch_ffi( | ||
| let batch_data_comm: Vec<VerificationDataCommitment> = | ||
| batch.into_iter().map(|v| v.into()).collect(); | ||
| let computed_batch_merkle_tree: MerkleTree<VerificationCommitmentBatch> = | ||
| MerkleTree::build(&batch_data_comm); | ||
| let Some(computed_batch_merkle_tree) = | ||
| MerkleTree::<VerificationCommitmentBatch>::build(&batch_data_comm) | ||
| else { | ||
| error!("Failed to build merkle tree, batch data commitment is empty"); | ||
| return false; | ||
| }; | ||
| computed_batch_merkle_tree.root == *merkle_root | ||
| } | ||
| @@ -66,10 +70,7 @@ mod tests { | ||
| merkle_root_file.read_to_end(&mut root_vec).unwrap(); | ||
| let mut merkle_root = [0; 32]; | ||
| merkle_root.copy_from_slice( | ||
| &hex::decode(&root_vec) | ||
| .unwrap(), | ||
| ); | ||
| merkle_root.copy_from_slice(&hex::decode(&root_vec).unwrap()); | ||
| let result = | ||
| verify_merkle_tree_batch_ffi(bytes_vec.as_ptr(), bytes_vec.len(), &merkle_root); | ||
| @@ -86,10 +87,7 @@ mod tests { | ||
| merkle_root_file.read_to_end(&mut root_vec).unwrap(); | ||
| let mut merkle_root = [0; 32]; | ||
| merkle_root.copy_from_slice( | ||
| &hex::decode(&root_vec) | ||
| .unwrap(), | ||
| ); | ||
| merkle_root.copy_from_slice(&hex::decode(&root_vec).unwrap()); | ||
PatStiles marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| let result = | ||
| verify_merkle_tree_batch_ffi(bytes_vec.as_ptr(), bytes_vec.len(), &merkle_root); | ||
| @@ -106,10 +104,7 @@ mod tests { | ||
| merkle_root_file.read_to_end(&mut root_vec).unwrap(); | ||
| let mut merkle_root = [0; 32]; | ||
| merkle_root.copy_from_slice( | ||
| &hex::decode(&root_vec) | ||
| .unwrap(), | ||
| ); | ||
| merkle_root.copy_from_slice(&hex::decode(&root_vec).unwrap()); | ||
| let result = | ||
| verify_merkle_tree_batch_ffi(bytes_vec.as_ptr(), bytes_vec.len(), &merkle_root); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 715181f01c095618472a72cd06e384d92f02eadc4ea28bf097181b17fdc57f28 | ||
| d8f7329e4f522a871373c6251aa3c39be8b89766e54174c9e6457fcd491cd86d |
Uh oh!
There was an error while loading. Please reload this page.