ChainSafe / ChainSafe/gossamer

Improve StateRequestProvider to check merkle proofs and ignore invalid state

Open
#4,481 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.