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 single node tree verification bug #219

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Fix single node tree verification bug #219

merged 3 commits into from
Dec 20, 2024

Conversation

litt3
Copy link
Collaborator

@litt3 litt3 commented Dec 18, 2024

@litt3 litt3 requested review from anupsv, samlaf and epociask December 18, 2024 21:13
@litt3 litt3 self-assigned this Dec 18, 2024
verify/merkle.go Outdated Show resolved Hide resolved
verify/merkle.go Show resolved Hide resolved
@litt3 litt3 requested a review from samlaf December 19, 2024 16:59
@@ -7,9 +7,18 @@ import (
"github.com/ethereum/go-ethereum/crypto"
)

// ProcessInclusionProof processes the Merkle root proof
// ProcessInclusionProof computes the merkle root hash based on the provided leaf and proof, returning the result.
Copy link
Collaborator

Choose a reason for hiding this comment

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

knit - should we link the on-chain method we're referencing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 6357d45

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! Agree everytime we are mimicking onchain logic (which we should minimize and make eth_calls instead when applicable / not latency sensitive), we def need to add this as comment, because its a VERY important invariant that needs to be maintained.

@samlaf samlaf force-pushed the permit-single-node-tree branch from 6357d45 to b412bea Compare December 20, 2024 17:58
@litt3 litt3 merged commit 7dd3faa into main Dec 20, 2024
9 checks passed
@litt3 litt3 deleted the permit-single-node-tree branch December 20, 2024 18:04
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.

Inclusion proof verification doesn't permit trees consisting of a single node
3 participants