ChainSafe / ChainSafe/gossamer
Improve StateRequestProvider to check merkle proofs and ignore invalid state
Open
T-enhancement
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
Currently our StateRequestProvider is asking peers for state "fragments" without checking if the fragment is correct or no. The only integration check we have is when we finish retrieving the whole state and build the trie, we are checking that the trie root is the expected one.
We can improve this by using merkle proofs and discarding invalid PRs, that will help us to save some time retrying the state retrieval in case the integrity was compromised.
Contributor guide
Assessment
This issue has not been assessed yet.