charon
charon copied to clipboard
Improve QBFT latency for non-leaders
Problem to be solved
QBFT current requires every peer to call Propose
for that peer to participate in a consensus round. This has negative effect on over latency, since Quorum peers need to fetch duty data and propose before we can come to consensus.
But only the leader needs to actually propose. So non-leader can immediately participate. This should result in cluster wide consensus as soon as the first leader proposes.
Proposed solution
- Refactor
qbft.Run
to take ainputValueProvider func() V, bool
instead of the input value directly. When leader and the future isn't populated yet, trigger round change immediately. - Refactor
consensus.Component
to instantiate a newqfbt.Run
when messages are received andRun
wasn't called yet. - Refactor
consensus.Component
to populate the input value provider whenPropose
is called and aRun
was already called.