Comments (4)
See also this circom PR (unreviewed): iden3/circomlib#98
from neptune.
Agreed. Here are a few not-entirely-cooked thoughts about how that might best be integrated. Some of this is more about the overall 'container' than a Poseidon 2 implementation per se:
- Implement such that it's easy to use with SAFE and swap the permutation. In other words, if someone knows they want to use Poseidon 2 in the future and wants to start writing code for that world now — they can do so using SAFE and later swap out the underlying implementation with minimal effort. (Nova is an example of a consumer already using SAFE for its random oracle).
- Add a merkle-hashing wrapper with similar API (at least in spirit) to existing 'merkle DST' implementations where a simple N-ary hash function is what the application wants (as, for example Filecoin and Lurk) do.
- Deprecate the old domain-separation tag facility. It's complicated and derives from suggestions made in the first version of the Poseidon paper. Ensuring the various modes are implemented correctly (where still stubs), then ensuring there are no inconsistencies, etc. represents a large implementation and maintenance burden.
Some of the above is not strictly required for Poseidon 2 — but I'm noting it here because it's part of a logical path forward for neptune generally, and is part of what we should consider when deciding how to integrate it.
A separate question is how much of the GPU support for batched hashing (on top of which tree-building is constructed) we would extend to Poseidon 2. The Neptune tree-building is no longer the most optimized (relative to approaches that keep intermediate values on the GPU). Nevertheless, the simple batched hashing is certainly useful when compared to CPU — when parallel hashing is needed.
from neptune.
I think we can split the issue in several steps, in that order:
- out-of-circuit implementation of Poseidon2 with minimal1 divergence from the existing Poseidon (which helps review & incidentally, witness-gen),
- in-circuit implementation of Poseidon2 with minimal divergence from the existing Poseidon,
- SAFE API implementation that can dispatch to Poseidon / Poseidon2,
- GPU acceleration
- Merkle-hashing wrapper that can dispatch to Poseidon / Poseidon2,
I think the topics of DST deprecation, while valuable, is an orthogonal problem that deserves its own orthogonal issue.
Footnotes
-
"Minimal" here means the first priority is correctness, the second is performance, and the third is code reuse / sharing. ↩
from neptune.
That all makes sense to me.
from neptune.
Related Issues (20)
- dev needs to be rebased on main HOT 1
- dev needs to be rebased on main HOT 1
- dev needs to be rebased on main HOT 3
- dev needs to be rebased on main HOT 1
- dev needs to be rebased on main HOT 3
- dev needs to be rebased on main HOT 23
- dev needs to be rebased on main HOT 5
- dev needs to be rebased on main HOT 16
- dev needs to be rebased on main HOT 22
- dev needs to be rebased on main HOT 18
- Reporting rebasing need only once HOT 1
- CI: push tests vs merge groups
- dev needs to be rebased on main HOT 5
- Add a CITATION.cff to the repo
- dev needs to be rebased on main HOT 2
- chore: rust toolchain needs an upgrade
- chore: some installed deps are not needed HOT 1
- chore: some installed deps are not needed
- chore: rust toolchain needs an upgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neptune.