Skip to content
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

Poseidon hash function #3455

Merged
merged 14 commits into from Sep 19, 2019

Conversation

@imeckler
Copy link
Contributor

commented Sep 19, 2019

After implementing Rescue, I benchmarked it and found it was really slow

┌─────────────────────────────────────────────┬────────────┬──────────┬──────────┬──────────┬────────────┐
│ Name                                        │   Time/Run │  mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├─────────────────────────────────────────────┼────────────┼──────────┼──────────┼──────────┼────────────┤
│ [lib/snark_params/snark_params.ml] pedersen │   152.88us │  22.56kw │   1.32kw │   1.32kw │      5.10% │
│ [lib/snark_params/snark_params.ml] rescue   │ 2_995.88us │ 120.05kw │ 118.56kw │ 118.56kw │    100.00% │
│ [lib/snark_params/snark_params.ml] poseidon │   132.82us │   6.03kw │   4.71kw │   4.71kw │      4.43% │
└─────────────────────────────────────────────┴────────────┴──────────┴──────────┴──────────┴────────────┘

but as you can see from that table, the Poseidon implementation in this PR is way faster! I'm not 100% sure about the number of rounds I chose. It may need to be a bit higher.

@imeckler imeckler requested review from rbkhmrcr and vanishreerao as code owners Sep 19, 2019
@imeckler imeckler requested a review from mrmr1993 Sep 19, 2019
imeckler added 3 commits Sep 19, 2019
@imeckler imeckler merged commit 171be4a into develop Sep 19, 2019
18 of 21 checks passed
18 of 21 checks passed
ci/circleci: build-wallet Your tests failed on CircleCI
Details
ci/circleci: test--test_postake_holy_grail Your tests failed on CircleCI
Details
ci/circleci: build-macos CircleCI is running your tests
Details
Summary 1 rule matches
Details
ci/circleci: build-artifacts--testnet_postake_medium_curves Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test--fake_hash Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_bootstrap Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_catchup Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_delegation Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_five_even_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_five_even_txns Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_split Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_split_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_three_proposers Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_txns Your tests passed on CircleCI!
Details
ci/circleci: test-unit--dev Your tests passed on CircleCI!
Details
ci/circleci: test-unit--test_postake_snarkless_unittest Your tests passed on CircleCI!
Details
ci/circleci: tracetool Your tests passed on CircleCI!
Details
@imeckler imeckler deleted the feature/poseidon branch Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.