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

[feat] Domain spec poseidon hash #400

Closed
wants to merge 4 commits into from
Closed

Conversation

noel2004
Copy link
Member

This PR add HashFixedWithDomain entry in crypto/poseidon/poseidon.go. This method enabli caller specifying a domain field in the 2->1 poseidon hash and it would be used by the new zktrie module with updated hash scheme

@@ -175,3 +175,8 @@ func HashFixed(inpBI []*big.Int) (*big.Int, error) {
rE.ToBigIntRegular(r)
return r, nil
}

// Deprecated HashFixed entry, with domain field is 0
func HashFixed(inpBI []*big.Int) (*big.Int, error) {
Copy link
Member

Choose a reason for hiding this comment

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

print out a warning message that this function is deprecated.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@noel2004
Copy link
Member Author

change has been included in #403 so this can be closed

@0xmountaintop 0xmountaintop deleted the poseidon_domain_spec branch June 13, 2024 11:59
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.

3 participants