Skip to content

trie: reject deletions when verifying range proofs#667

Merged
keefel merged 1 commit intobnb-chain:developfrom
keefel:dev
Dec 20, 2021
Merged

trie: reject deletions when verifying range proofs#667
keefel merged 1 commit intobnb-chain:developfrom
keefel:dev

Conversation

@keefel
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
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