-
Notifications
You must be signed in to change notification settings - Fork 69
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
New Poseidon library #245
base: main
Are you sure you want to change the base?
New Poseidon library #245
Conversation
Check if I'm reading your performance chart right: It seems that the mean is much slower than the other libaries, but the median is much faster. If that's accurate it could be hiding a first-time setup cost issue, which might be reasonable to accept or address separately. However it looks like the min/max values don't make sense (maybe they're reversed) and the mean/median is larger than the max in particular in most cases, so I don't know if I trust this chart in general. Can you check that it's being generated correctly? The structure of the library seems reasonable (similar to poseidon-lite), but I haven't checked over all the code in detail. |
Description
Note
No need for in-depth review here, but still required to merge. Open to any discussion of course.
This PR originated from #238, a proposal for using Noble, an audited library with many implementations that can be used on ZK-Kit to make code more secure.
This PR aimed to verify whether the performance and size of the bundle were equal to or better than the alternatives. The work led to the following conclusion: Noble seems solid, but the abstract implementation of Poseidon, which allows implementations with arbitrary parameters and constants to be built on top of it, still seems slow in comparison to
circomlibjs
andposeidon-lite
. The bundle size is the same as that ofposeidon-lite
.However, this branch could still be merged and remain in an experimental state (the package will not be shown in the readme nor published), pending any progress.
A future work that might be worth spending time on is to provide a version of Poseidon with the optimization introduced by Filecoin in Neptune, which could increase performance by sacrificing the bundle size.
Results
Related Issue(s)
Re #238
Checklist
yarn style
without getting any errors