Guard against branch with one child and no value
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 274
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
When decoding nodes we should not allow branch with one child and no value.
This change requires changing the codec trait to allow the compact proof decoding in trie-db/src/proof/verify.rs (internally this proof can skip the value).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with trie-db/src/proof/verify.rs and trace the codec trait used for compact proof decoding. Check how branch nodes are decoded, then ensure a branch with one child and no value is rejected without preventing compact proofs from skipping the value. Done means invalid branches are guarded while valid compact proof decoding still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100