-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: remove mimc from stdlib (#6402)
- Loading branch information
1 parent
94a37bb
commit ec03e77
Showing
7 changed files
with
4 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
pub mod poseidon; | ||
pub mod mimc; | ||
pub mod poseidon2; | ||
pub mod keccak; | ||
pub mod sha256; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
use std::hash::mimc; | ||
|
||
fn main( | ||
old_root: Field, | ||
old_leaf: Field, | ||
old_hash_path: [Field; 3], | ||
new_root: pub Field, | ||
leaf: Field, | ||
index: Field, | ||
mimc_input: [Field; 4], | ||
) { | ||
assert(old_root == std::merkle::compute_merkle_root(old_leaf, index, old_hash_path)); | ||
|
||
let calculated_root = std::merkle::compute_merkle_root(leaf, index, old_hash_path); | ||
assert(new_root == calculated_root); | ||
|
||
let h = mimc::mimc_bn254(mimc_input); | ||
// Regression test for PR #891 | ||
std::println(h); | ||
assert(h == 18226366069841799622585958305961373004333097209608110160936134895615261821931); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters