| 
    rippled
    
   | 
 
Consensus algorithm parameters. More...
#include <ConsensusParms.h>

Classes | |
| struct | AvalancheCutoff | 
Public Types | |
| enum | AvalancheState { init , mid , late , stuck } | 
Public Member Functions | |
| ConsensusParms ()=default | |
Public Attributes | |
| std::chrono::seconds const | validationVALID_WALL = std::chrono::minutes{5} | 
| The duration a validation remains current after its ledger's close time.   | |
| std::chrono::seconds const | validationVALID_LOCAL = std::chrono::minutes{3} | 
| Duration a validation remains current after first observed.   | |
| std::chrono::seconds const | validationVALID_EARLY = std::chrono::minutes{3} | 
| Duration pre-close in which validations are acceptable.   | |
| std::chrono::seconds const | proposeFRESHNESS = std::chrono::seconds{20} | 
| How long we consider a proposal fresh.   | |
| std::chrono::seconds const | proposeINTERVAL = std::chrono::seconds{12} | 
| How often we force generating a new proposal to keep ours fresh.   | |
| std::size_t const | minCONSENSUS_PCT = 80 | 
| The percentage threshold above which we can declare consensus.   | |
| 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 | ledgerMAX_CONSENSUS | 
| The maximum amount of time to spend pausing for laggards.   | |
| std::chrono::milliseconds const | ledgerMIN_CLOSE = std::chrono::seconds{2} | 
| Minimum number of seconds to wait to ensure others have computed the LCL.   | |
| std::chrono::milliseconds const | ledgerGRANULARITY = std::chrono::seconds{1} | 
| How often we check state or change positions.   | |
| std::size_t const | ledgerABANDON_CONSENSUS_FACTOR = 10 | 
| How long to wait before completely abandoning consensus.   | |
| std::chrono::milliseconds const | ledgerABANDON_CONSENSUS | 
| Maximum amount of time to give a consensus round.   | |
| std::chrono::milliseconds const | avMIN_CONSENSUS_TIME | 
| The minimum amount of time to consider the previous round to have taken.   | |
| std::map< AvalancheState, AvalancheCutoff > const | avalancheCutoffs | 
| Map the consensus requirement avalanche state to the amount of time that must pass before moving to that state, the agreement percentage required at that state, and the next state.   | |
| std::size_t const | avCT_CONSENSUS_PCT = 75 | 
| Percentage of nodes required to reach agreement on ledger close time.   | |
| std::size_t const | avMIN_ROUNDS = 2 | 
| Number of rounds before certain actions can happen.   | |
| std::size_t const | avSTALLED_ROUNDS = 4 | 
| Number of rounds before a stuck vote is considered unlikely to change because voting stalled.   | |
Consensus algorithm parameters.
Parameters which control the consensus algorithm. This are not meant to be changed arbitrarily.
Definition at line 38 of file ConsensusParms.h.
| Enumerator | |
|---|---|
| init | |
| mid | |
| late | |
| stuck | |
Definition at line 134 of file ConsensusParms.h.
      
  | 
  explicitdefault | 
| std::chrono::seconds const ripple::ConsensusParms::validationVALID_WALL = std::chrono::minutes{5} | 
The duration a validation remains current after its ledger's close time.
This is a safety to protect against very old validations and the time it takes to adjust the close time accuracy window.
Definition at line 51 of file ConsensusParms.h.
| std::chrono::seconds const ripple::ConsensusParms::validationVALID_LOCAL = std::chrono::minutes{3} | 
Duration a validation remains current after first observed.
The duration a validation remains current after the time we first saw it. This provides faster recovery in very rare cases where the number of validations produced by the network is lower than normal
Definition at line 59 of file ConsensusParms.h.
| std::chrono::seconds const ripple::ConsensusParms::validationVALID_EARLY = std::chrono::minutes{3} | 
Duration pre-close in which validations are acceptable.
The number of seconds before a close time that we consider a validation acceptable. This protects against extreme clock errors
Definition at line 66 of file ConsensusParms.h.
| std::chrono::seconds const ripple::ConsensusParms::proposeFRESHNESS = std::chrono::seconds{20} | 
How long we consider a proposal fresh.
Definition at line 69 of file ConsensusParms.h.
| std::chrono::seconds const ripple::ConsensusParms::proposeINTERVAL = std::chrono::seconds{12} | 
How often we force generating a new proposal to keep ours fresh.
Definition at line 72 of file ConsensusParms.h.
| std::size_t const ripple::ConsensusParms::minCONSENSUS_PCT = 80 | 
The percentage threshold above which we can declare consensus.
Definition at line 79 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerIDLE_INTERVAL | 
The duration a ledger may remain idle before closing.
Definition at line 82 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerMIN_CONSENSUS | 
The number of seconds we wait minimum to ensure participation.
Definition at line 86 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerMAX_CONSENSUS | 
The maximum amount of time to spend pausing for laggards.
This should be sufficiently less than validationFRESHNESS so that validators don't appear to be offline that are merely waiting for laggards.
Definition at line 95 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerMIN_CLOSE = std::chrono::seconds{2} | 
Minimum number of seconds to wait to ensure others have computed the LCL.
Definition at line 99 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerGRANULARITY = std::chrono::seconds{1} | 
How often we check state or change positions.
Definition at line 102 of file ConsensusParms.h.
| std::size_t const ripple::ConsensusParms::ledgerABANDON_CONSENSUS_FACTOR = 10 | 
How long to wait before completely abandoning consensus.
Definition at line 105 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::ledgerABANDON_CONSENSUS | 
Maximum amount of time to give a consensus round.
Does not include the time to build the LCL, so there is no reason for a round to go this long, regardless of how big the ledger is.
Definition at line 113 of file ConsensusParms.h.
| std::chrono::milliseconds const ripple::ConsensusParms::avMIN_CONSENSUS_TIME | 
The minimum amount of time to consider the previous round to have taken.
The minimum amount of time to consider the previous round to have taken. This ensures that there is an opportunity for a round at each avalanche threshold even if the previous consensus was very fast. This should be at least twice the interval between proposals (0.7s) divided by the interval between mid and late consensus ([85-50]/100).
Definition at line 126 of file ConsensusParms.h.
| std::map<AvalancheState, AvalancheCutoff> const ripple::ConsensusParms::avalancheCutoffs | 
Map the consensus requirement avalanche state to the amount of time that must pass before moving to that state, the agreement percentage required at that state, and the next state.
"stuck" loops back on itself because once we're stuck, we're stuck. This structure allows for "looping" of states if needed.
Definition at line 146 of file ConsensusParms.h.
| std::size_t const ripple::ConsensusParms::avCT_CONSENSUS_PCT = 75 | 
Percentage of nodes required to reach agreement on ledger close time.
Definition at line 160 of file ConsensusParms.h.
| std::size_t const ripple::ConsensusParms::avMIN_ROUNDS = 2 | 
Number of rounds before certain actions can happen.
Definition at line 165 of file ConsensusParms.h.
| std::size_t const ripple::ConsensusParms::avSTALLED_ROUNDS = 4 | 
Number of rounds before a stuck vote is considered unlikely to change because voting stalled.
Definition at line 169 of file ConsensusParms.h.