orochi-network/orochimaru

Make the poseidon to be a separated package

Closed this issue · 3 comments

Poseidon circuit had been implemented here but we want to create a crate out of it. So please make it to be an independent crate.

https://github.com/orochi-network/orochimaru/tree/main/zkmemory/src/poseidon

I'd like take this issue and also clarify a few question:

  1. What I understand is I need to make poseidon a separate package and I'd most possibly do it this way. Does this align with what you expect?
├── src/
│   ├── commitment/
│   ├── constraints/
│   ├── poseidon/
│   │   ├── mod.rs
│   │   ├── poseidon_constants.rs
│   │   └── poseidon_hash.rs
│   ├── base.rs
│   ├── config.rs
│   ├── error.rs
│   ├── lib.rs
│   └── machine.rs
├── poseidon_hash/  <-- Make a new directory 
│   ├── src/
│   │   └── lib.rs
│   │   ├── poseidon_constants.rs
│   │   └── poseidon_hash.rs
│   └── Cargo.toml
├── Cargo.toml
  1. There are some with visibility only to crate level
    pub (crate) const ROUND_CONSTANTS_FR
    If I make it a separate package, Is it okay to make these const variables public to external? namely,
    pub const ROUND_CONSTANTS_FR

Please move on with this 👍

closed by #77