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

trie: reject deletions when verifying range proofs #667

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

keefel
Copy link
Contributor

@keefel keefel commented Dec 16, 2021

Description

Fix "panic: deletion not supported" bug, cherry-pick from ethereum/go-ethereum#23960

Rationale

Return error when range contains deletion at VerifyRangeProof, then when trie update, the deletion value won't get there, the panic won't be triggered.

Example

go test -v -run TestEmptyValueRangeProof ./trie/*.go
=== RUN   TestEmptyValueRangeProof
--- PASS: TestEmptyValueRangeProof (0.01s)

Related issues

#475
#576

@unclezoro
Copy link
Collaborator

LGTM

@keefel keefel merged commit 5218949 into bnb-chain:develop Dec 20, 2021
This was referenced Jan 26, 2022
keefel added a commit to keefel/bsc that referenced this pull request Jun 6, 2022
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.

5 participants