Jaspervdm - Progress update thread - March to May 2020

Hi all, time for me to give another update.

A few weeks back it became apparant to me that the work on async p2p was not of very high priority, since we have the grin v4.0 release planning. Since there are only 2 hard forks left, my time would be better spent on issues that are either consensus breaking or would greatly benefit from a HF (because they introduce new p2p messages, for example). This is why I decided to pick up spec and implementation of a desired feature called parallel IBD.

New nodes that are joining the network, need to download the chainstate. Unlike most other blockchains, we do not need to download all historical data to fully validate the state. In particular, we do not need to download and verify all outputs that have been spent in the past. For technical reasons up until recently we could only download the required data from a single peer at a time and verify it once it has been fully downloaded. This meant that the initial synchronisation was bottlenecked by the bandwith and honesty of that single peer.
Due to consensus changes in the previous Hard Fork we have the technical capability to parallelize this download, meaning we can request chunks from multiple peers at the same time, which can be mostly verified independently. This should decrease the synchronisation time significantly.

However the grin node does not yet make use of this new capability. It requires new messages on the peer-to-peer network, which would be easy to introduce in the next Hard Fork. Specifying and implementing these messages is what I have been working on for the past while. The specification work can be found in this PR, with implementation progressing simultaneously. There are still a few details that are under discussion in the PR and need to be hammered out but I am confident we can get the work done before the next release is out.

It has been a while since I gave the last update. My bad for the inconsistency, I will make sure I post updates in this thread more frequently to inform you of the progress I am making.

6 Likes