-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Poseidon is the hash function used by Mina in different places. It is primarily implemented in proof-systems in the library mina-hasher, see https://github.com/o1-labs/proof-systems/tree/master/hasher and https://github.com/o1-labs/proof-systems/tree/master/poseidon.
The crate in proof-systems do not define any code specific to Mina, even though it is used by external parties - in particular, thining about @dfstio with the no-std feature to run it on Solana/Sui.
The mina-rust codebase also has a crate called poseidon, see https://github.com/o1-labs/mina-rust/tree/develop/poseidon.
Some code between mina-rust and proof-system is duplicated, see https://github.com/o1-labs/mina-rust/blob/develop/poseidon/src/lib.rs with https://github.com/o1-labs/proof-systems/blob/master/poseidon/src/constants.rs.
Same thing for https://github.com/o1-labs/mina-rust/blob/develop/poseidon/src/params.rs.
The code in mina-rust, probably, exists to have the IV (initialization vector, i.e. field values that would be used for domain separation), see https://github.com/o1-labs/mina-rust/blob/develop/poseidon/src/hash.rs#L253
As the code is purely related to cryptography, we should move it to proof-systems, under mina-hasher. It would give access to more features related to Mina to the mina-hasher users.
Regression tests as https://github.com/o1-labs/mina-rust/blob/develop/poseidon/tests/test_hash_params.rs should also be moved,
Metadata
Metadata
Assignees
Labels
Type
Projects
Status