Improve Consensus interface and documentation (RIPD-1340):
- Add Consensus::Result, which represents the result of the establish state and includes the consensus transaction set, final proposed position and disputes. - Add Consensus::Mode to track how we are participating in consensus and ensures the onAccept callback can distinguish when we entered the round with consensus versus when we recovered from a wrong ledger during a round. - Rename Consensus::Phase to Consensus::State and eliminate the processing phase. Instead, accept is a terminal phase which notifies RCLConsensus via onAccept callbacks. Even if clients dispatch accepting to another thread, all future calls except to startRound will not change the state of consensus. - Move validate_ status from Consensus to RCLConsensus, since generic implementation does not directly reference whether a node is validating or not. - Eliminate gotTxSetInternal and handle externally received TxSets distinct from locally generated positions. - Change ConsensusProposal::changePosition to always update the internal close time and position even if we have bowed out. This enforces the invariant that our proposal's position always matches our transaction set.
BIN
docs/images/consensus/EffCloseTime.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/images/consensus/block_chain.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
docs/images/consensus/consensus_modes.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/consensus/consensus_overview.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/images/consensus/disputes.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/consensus/ledger_chain.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
docs/images/consensus/threshold.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |