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 circomlib #670

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Poseidon circomlib #670

wants to merge 6 commits into from

Conversation

themighty1
Copy link
Member

This PR adds a functionality to compute a Poseidon hash compatible with https://github.com/iden3/circomlib/blob/master/circuits/poseidon.circom

The build script generates the Poseidon constants and writes them to file.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 59.67742% with 25 lines in your changes missing coverage. Please review.

Project coverage is 55.96%. Comparing base (c03418a) to head (acb2ca8).

Files with missing lines Patch % Lines
...tes/components/poseidon-circomlib/src/generated.rs 59.25% 11 Missing ⚠️
crates/components/poseidon-circomlib/src/lib.rs 45.00% 11 Missing ⚠️
crates/components/poseidon-circomlib/src/spec.rs 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #670      +/-   ##
==========================================
+ Coverage   55.95%   55.96%   +0.01%     
==========================================
  Files         189      192       +3     
  Lines       20813    20875      +62     
==========================================
+ Hits        11646    11683      +37     
- Misses       9167     9192      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@themighty1
Copy link
Member Author

Sorry, the last force-push was me pressing the "Update with rebase" button. I was expecting GH to show that it made the rebase, not I.

Copy link
Member

@yuroitaki yuroitaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! love the generic implementation that caters for all rates up to 16 :)

crates/components/poseidon-circomlib/Cargo.toml Outdated Show resolved Hide resolved
crates/components/poseidon-circomlib/build.rs Show resolved Hide resolved
crates/components/poseidon-circomlib/build.rs Show resolved Hide resolved
crates/components/poseidon-circomlib/build.rs Show resolved Hide resolved
crates/components/poseidon-circomlib/build.rs Show resolved Hide resolved
@yuroitaki yuroitaki self-requested a review December 17, 2024 08:47
Copy link
Member

@yuroitaki yuroitaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants