|
rippled
|
Manages the generic consensus algorithm for use by the RCL. More...
#include <RCLConsensus.h>

Classes | |
| class | Adaptor |
Public Member Functions | |
| RCLConsensus (Application &app, std::unique_ptr< FeeVote > &&feeVote, LedgerMaster &ledgerMaster, LocalTxs &localTxs, InboundTransactions &inboundTransactions, Consensus< Adaptor >::clock_type const &clock, ValidatorKeys const &validatorKeys, beast::Journal journal) | |
| Constructor. | |
| RCLConsensus (RCLConsensus const &)=delete | |
| RCLConsensus & | operator= (RCLConsensus const &)=delete |
| bool | validating () const |
| Whether we are validating consensus ledgers. | |
| std::size_t | prevProposers () const |
| Get the number of proposing peers that participated in the previous round. | |
| std::chrono::milliseconds | prevRoundTime () const |
| Get duration of the previous round. | |
| ConsensusMode | mode () const |
| ConsensusPhase | phase () const |
| Json::Value | getJson (bool full) const |
| void | startRound (NetClock::time_point const &now, RCLCxLedger::ID const &prevLgrId, RCLCxLedger const &prevLgr, hash_set< NodeID > const &nowUntrusted, hash_set< NodeID > const &nowTrusted, std::unique_ptr< std::stringstream > const &clog) |
| Adjust the set of trusted validators and kick-off the next round of consensus. | |
| void | timerEntry (NetClock::time_point const &now, std::unique_ptr< std::stringstream > const &clog={}) |
| void | gotTxSet (NetClock::time_point const &now, RCLTxSet const &txSet) |
| RCLCxLedger::ID | prevLedgerID () const |
| void | simulate (NetClock::time_point const &now, std::optional< std::chrono::milliseconds > consensusDelay) |
| bool | peerProposal (NetClock::time_point const &now, RCLCxPeerPos const &newProposal) |
| ConsensusParms const & | parms () const |
Private Attributes | |
| std::recursive_mutex | mutex_ |
| Adaptor | adaptor_ |
| Consensus< Adaptor > | consensus_ |
| beast::Journal const | j_ |
Static Private Attributes | |
| static constexpr unsigned int | censorshipWarnInternal = 15 |
| Warn for transactions that haven't been included every so many ledgers. | |
Manages the generic consensus algorithm for use by the RCL.
Definition at line 32 of file RCLConsensus.h.
| xrpl::RCLConsensus::RCLConsensus | ( | Application & | app, |
| std::unique_ptr< FeeVote > && | feeVote, | ||
| LedgerMaster & | ledgerMaster, | ||
| LocalTxs & | localTxs, | ||
| InboundTransactions & | inboundTransactions, | ||
| Consensus< Adaptor >::clock_type const & | clock, | ||
| ValidatorKeys const & | validatorKeys, | ||
| beast::Journal | journal | ||
| ) |
Constructor.
Definition at line 35 of file RCLConsensus.cpp.
|
delete |
|
delete |
| bool xrpl::RCLConsensus::validating | ( | ) | const |
Whether we are validating consensus ledgers.
Definition at line 406 of file RCLConsensus.h.
| std::size_t xrpl::RCLConsensus::prevProposers | ( | ) | const |
Get the number of proposing peers that participated in the previous round.
Definition at line 414 of file RCLConsensus.h.
| std::chrono::milliseconds xrpl::RCLConsensus::prevRoundTime | ( | ) | const |
Get duration of the previous round.
The duration of the round is the establish phase, measured from closing the open ledger to accepting the consensus result.
Definition at line 427 of file RCLConsensus.h.
| ConsensusMode xrpl::RCLConsensus::mode | ( | ) | const |
Definition at line 434 of file RCLConsensus.h.
| ConsensusPhase xrpl::RCLConsensus::phase | ( | ) | const |
Definition at line 440 of file RCLConsensus.h.
| Json::Value xrpl::RCLConsensus::getJson | ( | bool | full | ) | const |
Definition at line 852 of file RCLConsensus.cpp.
| void xrpl::RCLConsensus::startRound | ( | NetClock::time_point const & | now, |
| RCLCxLedger::ID const & | prevLgrId, | ||
| RCLCxLedger const & | prevLgr, | ||
| hash_set< NodeID > const & | nowUntrusted, | ||
| hash_set< NodeID > const & | nowTrusted, | ||
| std::unique_ptr< std::stringstream > const & | clog | ||
| ) |
Adjust the set of trusted validators and kick-off the next round of consensus.
For more details,
Definition at line 1005 of file RCLConsensus.cpp.
| void xrpl::RCLConsensus::timerEntry | ( | NetClock::time_point const & | now, |
| std::unique_ptr< std::stringstream > const & | clog = {} |
||
| ) |
Definition at line 864 of file RCLConsensus.cpp.
| void xrpl::RCLConsensus::gotTxSet | ( | NetClock::time_point const & | now, |
| RCLTxSet const & | txSet | ||
| ) |
Definition at line 885 of file RCLConsensus.cpp.
| RCLCxLedger::ID xrpl::RCLConsensus::prevLedgerID | ( | ) | const |
Definition at line 473 of file RCLConsensus.h.
| void xrpl::RCLConsensus::simulate | ( | NetClock::time_point const & | now, |
| std::optional< std::chrono::milliseconds > | consensusDelay | ||
| ) |
Definition at line 903 of file RCLConsensus.cpp.
| bool xrpl::RCLConsensus::peerProposal | ( | NetClock::time_point const & | now, |
| RCLCxPeerPos const & | newProposal | ||
| ) |
Definition at line 912 of file RCLConsensus.cpp.
| ConsensusParms const & xrpl::RCLConsensus::parms | ( | ) | const |
Definition at line 490 of file RCLConsensus.h.
|
staticconstexprprivate |
Warn for transactions that haven't been included every so many ledgers.
Definition at line 36 of file RCLConsensus.h.
|
mutableprivate |
Definition at line 499 of file RCLConsensus.h.
|
private |
Definition at line 501 of file RCLConsensus.h.
Definition at line 502 of file RCLConsensus.h.
|
private |
Definition at line 503 of file RCLConsensus.h.