Open KolbyML opened 7 months ago
Nice write-up! I am thinking about a similar issue related to the state network as verifying an account/storage slot needs recursively lookup/verify the trie nodes (suppose an early version of Portal maintains a trie_hash => trie_node mapping).
One question is about the latency of the request that you observed?
In the history network we have three main pieces of content
Headers can be proven canonical by utilizing the proof included with them, on the other hand
block bodies
andreceipts
to validate these pieces of content we need to fetch theheader with proof
.Currently when validiting the canonicalness of
block bodies
andreceipts
we request theheader with proof
sequencially after recieving the respectiveblock bodies
orreceipts
. This causes a delay to when users can access this data. The reason we choose this route originally was because it was the quicker way to get a live product, but moving into launching looking into these paths seems more beneficitial.Solution 1
Request the header at the same time you request the
block bodies
orreceipts
.Solution 2
The
header with proof
is very small almost always less then 1200 bytes why not include it withblock bodies
andreceipts
. This lowers the amount of uTP connections we have to open minimizing congestion