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

fix: validate merkletree using StandardMerkleTree format #244

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Sekhmet
Copy link
Member

@Sekhmet Sekhmet commented Oct 13, 2023

StandardMerkleTree format from official @openzeppelin/merkle-tree should be build using keccak hash of keccak hash of leaf data, instead of just keccak hash of leaf data as we do now.

This change makes it compatible with that library client side.

References:

The leaves are double-hashed1 to prevent second preimage attacks.

StandardMerkleTree format from official @OpenZeppelin@merkle-tree
should be build using keccak hash of keccak hash of leaf data,
instead of just keccak hash of leaf data as we do now.

This change makes it compatible with that library client side.

References:
- https://github.com/OpenZeppelin/merkle-tree#validating-a-proof-in-solidity
- https://github.com/OpenZeppelin/merkle-tree#standard-merkle-trees
> The leaves are double-hashed1 to prevent second preimage attacks.
Copy link
Contributor

@Orland0x Orland0x left a comment

Choose a reason for hiding this comment

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

uTACK

@Sekhmet Sekhmet reopened this Oct 14, 2023
@Orland0x Orland0x merged commit 4a693e4 into main Oct 16, 2023
6 checks passed
@Sekhmet Sekhmet deleted the sekhmet/merkletree-format branch October 16, 2023 10:43
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