20#ifndef RIPPLE_CONSENSUS_CONSENSUS_PARMS_H_INCLUDED 
   21#define RIPPLE_CONSENSUS_CONSENSUS_PARMS_H_INCLUDED 
   23#include <xrpl/beast/utility/instrumentation.h> 
  184    if (currentCutoff.next != currentState && currentRounds >= minimumRounds)
 
  191            nextCutoff.consensusTime >= currentCutoff.consensusTime,
 
  192            "ripple::getNeededWeight : next state valid");
 
  193        if (percentTime >= nextCutoff.consensusTime)
 
  195            return {nextCutoff.consensusPct, currentCutoff.next};
 
  198    return {currentCutoff.consensusPct, {}};
 
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::pair< std::size_t, std::optional< ConsensusParms::AvalancheState > > getNeededWeight(ConsensusParms const &p, ConsensusParms::AvalancheState currentState, int percentTime, std::size_t currentRounds, std::size_t minimumRounds)
 
std::size_t const consensusPct
 
AvalancheState const next
 
Consensus algorithm parameters.
 
std::size_t const avSTALLED_ROUNDS
Number of rounds before a stuck vote is considered unlikely to change because voting stalled.
 
std::chrono::milliseconds const ledgerGRANULARITY
How often we check state or change positions.
 
std::size_t const avCT_CONSENSUS_PCT
Percentage of nodes required to reach agreement on ledger close time.
 
std::chrono::seconds const proposeINTERVAL
How often we force generating a new proposal to keep ours fresh.
 
std::size_t const avMIN_ROUNDS
Number of rounds before certain actions can happen.
 
std::chrono::milliseconds const avMIN_CONSENSUS_TIME
The minimum amount of time to consider the previous round to have taken.
 
std::chrono::seconds const validationVALID_EARLY
Duration pre-close in which validations are acceptable.
 
std::chrono::milliseconds const ledgerIDLE_INTERVAL
The duration a ledger may remain idle before closing.
 
std::chrono::milliseconds const ledgerMIN_CONSENSUS
The number of seconds we wait minimum to ensure participation.
 
std::chrono::milliseconds const ledgerABANDON_CONSENSUS
Maximum amount of time to give a consensus round.
 
std::size_t const minCONSENSUS_PCT
The percentage threshold above which we can declare consensus.
 
std::map< AvalancheState, AvalancheCutoff > const avalancheCutoffs
Map the consensus requirement avalanche state to the amount of time that must pass before moving to t...
 
std::chrono::milliseconds const ledgerMIN_CLOSE
Minimum number of seconds to wait to ensure others have computed the LCL.
 
std::chrono::seconds const proposeFRESHNESS
How long we consider a proposal fresh.
 
std::chrono::seconds const validationVALID_LOCAL
Duration a validation remains current after first observed.
 
std::chrono::milliseconds const ledgerMAX_CONSENSUS
The maximum amount of time to spend pausing for laggards.
 
std::chrono::seconds const validationVALID_WALL
The duration a validation remains current after its ledger's close time.
 
std::size_t const ledgerABANDON_CONSENSUS_FACTOR
How long to wait before completely abandoning consensus.