-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
After a new block is produced and imported nodes announce it to the peers they are connected to by sending a BlockAnnounce message. Peers can then request the block by sending a BlockRequest message and receive back a BlockResponse containing the block data.
This approach saves bandwidth by allowing peers to request only blocks they have not seen yet, avoiding downloading it multiple times. However, there is a cost: the block propagation time increases. If for example the latency between two peers is 200ms, it takes at least 600ms for the block to propagate from one peer to another.
We should consider improving the block propagation time of the RC by introducing a gossip protocol for small blocks. This makes the validator node views synchronise faster. Parachain consensus gossip between any two nodes only works if they have a common view, so views getting in sync faster ensure faster candidate backing and approval checking which further drives smoother block times and faster finality.
For example, on the Polkadot RC, most of the blocks are around 75KB, which might make it feasible to just gossip them. Large blocks, such ones containing parachain code upgades, would still work as they do now, but that is < 1% of blocks, allowing us to be much faster 99% of the time.
For parachains this is also beneficial, especially when collators are in different geographic regions and when fast blocks are used (500ms). This would increase the chances that next authors get the block fast enough and decrease the chances of building a fork.
At first we shoild do some research and project how the bandwidth utilisation increases vs the latency benefits given the current number of expected peer connections. I'd suggest a max block size that can be gossiped to be128KB which should be good for RC, given the usage now and future usage. However, if core usage ramps up significantly we can look at increasing the threshold, but at same time block size should go down after AHM.