TL;DR: As announced in Hashed Block Payloads - #3 by lastmjs, DFINITY has been working for a while on an approach that increases the throughput of consensus by putting references to ingress messages instead of the full ingress messages in blocks without introducing security holes.
We’ve completed the implementation of this feature now and DFINITY will propose to enable it on a couple of subnets.
Background:
When a node creates a block proposal, it currently adds full ingress messages users submitted to make replicated canister calls. The nodes either received these messages directly from boundary nodes or from peer nodes in their subnet and store them in their ingress pool. Thus, the block proposals a node sends to its peers contain the full ingress messages, even though the peers have most of the ingress messages already in their pools. This is a waste of time and bandwidth.
Proposed design
To mitigate this, the proposed implementation includes only the hashes of ingress messages in the blocks. Under good conditions, since all the ingress messages are broadcast anyway, replicas should be able to reconstruct the block proposal by retrieving all the ingress messages from their respective ingress pools by their hashes. In order to get missing ingress messages to be able to validate and/or execute a proposal, nodes can request the messages they don’t have yet from the peers who advertise the proposal.
To minimize changes to the overall protocol, we created a new component between P2P and Consensus responsible for stripping ingress messages from proposals on the sender side and adding them back on the receiver side. The remaining Consensus and P2P logic are largely not changed.
Proposed rollout plan
We want to provide value quickly with as simple an implementation as possible and without introducing new risks.This is also the reason why we propose to use this new approach on Ingress messages only in the beginning. Moreover, we suggest to use the same message/block limits first, and then later explore allowing larger messages.
According to our measurements, this should increase throughput capacity significantly already. In experiments with 13 node subnets, under some artificially imposed network conditions, we see an improvement from ~2 MBps to ~6 MBps.
DFINITY plans to submit proposals to gradually roll out this feature over the coming weeks, and use this forum thread to keep everybody informed of the progress. We also plan to collect throughput and latency metrics, so hopefully we’ll see these numbers improve soon.
We are working on a blog post with more details, we’ll share these in the next couple of weeks.
Thanks,
Kamil