charon icon indicating copy to clipboard operation
charon copied to clipboard

Improve QBFT latency for non-leaders

Open corverroos opened this issue 2 years ago • 0 comments

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 a inputValueProvider 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 new qfbt.Run when messages are received and Run wasn't called yet.
  • Refactor consensus.Component to populate the input value provider when Propose is called and a Run was already called.

corverroos avatar Aug 08 '22 06:08 corverroos