rippled
Public Member Functions | Public Attributes | List of all members
ripple::ConsensusParms Struct Reference

Consensus algorithm parameters. More...

Collaboration diagram for ripple::ConsensusParms:
Collaboration graph
[legend]

Public Member Functions

 ConsensusParms ()=default
 

Public Attributes

std::chrono::seconds validationVALID_WALL = std::chrono::minutes{5}
 The duration a validation remains current after its ledger's close time. More...
 
std::chrono::seconds validationVALID_LOCAL = std::chrono::minutes{3}
 Duration a validation remains current after first observed. More...
 
std::chrono::seconds validationVALID_EARLY = std::chrono::minutes{3}
 Duration pre-close in which validations are acceptable. More...
 
std::chrono::seconds proposeFRESHNESS = std::chrono::seconds{20}
 How long we consider a proposal fresh. More...
 
std::chrono::seconds proposeINTERVAL = std::chrono::seconds{12}
 How often we force generating a new proposal to keep ours fresh. More...
 
std::size_t minCONSENSUS_PCT = 80
 The percentage threshold above which we can declare consensus. More...
 
std::chrono::milliseconds ledgerIDLE_INTERVAL = std::chrono::seconds{15}
 The duration a ledger may remain idle before closing. More...
 
std::chrono::milliseconds ledgerMIN_CONSENSUS
 The number of seconds we wait minimum to ensure participation. More...
 
std::chrono::milliseconds ledgerMAX_CONSENSUS = std::chrono::seconds{10}
 The maximum amount of time to spend pausing for laggards. More...
 
std::chrono::milliseconds ledgerMIN_CLOSE = std::chrono::seconds{2}
 Minimum number of seconds to wait to ensure others have computed the LCL. More...
 
std::chrono::milliseconds ledgerGRANULARITY = std::chrono::seconds{1}
 How often we check state or change positions. More...
 
std::chrono::milliseconds avMIN_CONSENSUS_TIME = std::chrono::seconds{5}
 The minimum amount of time to consider the previous round to have taken. More...
 
std::size_t avINIT_CONSENSUS_PCT = 50
 Percentage of nodes on our UNL that must vote yes. More...
 
std::size_t avMID_CONSENSUS_TIME = 50
 Percentage of previous round duration before we advance. More...
 
std::size_t avMID_CONSENSUS_PCT = 65
 Percentage of nodes that most vote yes after advancing. More...
 
std::size_t avLATE_CONSENSUS_TIME = 85
 Percentage of previous round duration before we advance. More...
 
std::size_t avLATE_CONSENSUS_PCT = 70
 Percentage of nodes that most vote yes after advancing. More...
 
std::size_t avSTUCK_CONSENSUS_TIME = 200
 Percentage of previous round duration before we are stuck. More...
 
std::size_t avSTUCK_CONSENSUS_PCT = 95
 Percentage of nodes that must vote yes after we are stuck. More...
 
std::size_t avCT_CONSENSUS_PCT = 75
 Percentage of nodes required to reach agreement on ledger close time. More...
 

Detailed Description

Consensus algorithm parameters.

Parameters which control the consensus algorithm. This are not meant to be changed arbitrarily.

Definition at line 33 of file ConsensusParms.h.

Constructor & Destructor Documentation

◆ ConsensusParms()

ripple::ConsensusParms::ConsensusParms ( )
explicitdefault

Member Data Documentation

◆ validationVALID_WALL

std::chrono::seconds 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 46 of file ConsensusParms.h.

◆ validationVALID_LOCAL

std::chrono::seconds 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 54 of file ConsensusParms.h.

◆ validationVALID_EARLY

std::chrono::seconds 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 61 of file ConsensusParms.h.

◆ proposeFRESHNESS

std::chrono::seconds ripple::ConsensusParms::proposeFRESHNESS = std::chrono::seconds{20}

How long we consider a proposal fresh.

Definition at line 64 of file ConsensusParms.h.

◆ proposeINTERVAL

std::chrono::seconds ripple::ConsensusParms::proposeINTERVAL = std::chrono::seconds{12}

How often we force generating a new proposal to keep ours fresh.

Definition at line 67 of file ConsensusParms.h.

◆ minCONSENSUS_PCT

std::size_t ripple::ConsensusParms::minCONSENSUS_PCT = 80

The percentage threshold above which we can declare consensus.

Definition at line 74 of file ConsensusParms.h.

◆ ledgerIDLE_INTERVAL

std::chrono::milliseconds ripple::ConsensusParms::ledgerIDLE_INTERVAL = std::chrono::seconds{15}

The duration a ledger may remain idle before closing.

Definition at line 77 of file ConsensusParms.h.

◆ ledgerMIN_CONSENSUS

std::chrono::milliseconds ripple::ConsensusParms::ledgerMIN_CONSENSUS
Initial value:

The number of seconds we wait minimum to ensure participation.

Definition at line 80 of file ConsensusParms.h.

◆ ledgerMAX_CONSENSUS

std::chrono::milliseconds ripple::ConsensusParms::ledgerMAX_CONSENSUS = std::chrono::seconds{10}

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 89 of file ConsensusParms.h.

◆ ledgerMIN_CLOSE

std::chrono::milliseconds ripple::ConsensusParms::ledgerMIN_CLOSE = std::chrono::seconds{2}

Minimum number of seconds to wait to ensure others have computed the LCL.

Definition at line 92 of file ConsensusParms.h.

◆ ledgerGRANULARITY

std::chrono::milliseconds ripple::ConsensusParms::ledgerGRANULARITY = std::chrono::seconds{1}

How often we check state or change positions.

Definition at line 95 of file ConsensusParms.h.

◆ avMIN_CONSENSUS_TIME

std::chrono::milliseconds ripple::ConsensusParms::avMIN_CONSENSUS_TIME = std::chrono::seconds{5}

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 107 of file ConsensusParms.h.

◆ avINIT_CONSENSUS_PCT

std::size_t ripple::ConsensusParms::avINIT_CONSENSUS_PCT = 50

Percentage of nodes on our UNL that must vote yes.

Definition at line 116 of file ConsensusParms.h.

◆ avMID_CONSENSUS_TIME

std::size_t ripple::ConsensusParms::avMID_CONSENSUS_TIME = 50

Percentage of previous round duration before we advance.

Definition at line 119 of file ConsensusParms.h.

◆ avMID_CONSENSUS_PCT

std::size_t ripple::ConsensusParms::avMID_CONSENSUS_PCT = 65

Percentage of nodes that most vote yes after advancing.

Definition at line 122 of file ConsensusParms.h.

◆ avLATE_CONSENSUS_TIME

std::size_t ripple::ConsensusParms::avLATE_CONSENSUS_TIME = 85

Percentage of previous round duration before we advance.

Definition at line 125 of file ConsensusParms.h.

◆ avLATE_CONSENSUS_PCT

std::size_t ripple::ConsensusParms::avLATE_CONSENSUS_PCT = 70

Percentage of nodes that most vote yes after advancing.

Definition at line 128 of file ConsensusParms.h.

◆ avSTUCK_CONSENSUS_TIME

std::size_t ripple::ConsensusParms::avSTUCK_CONSENSUS_TIME = 200

Percentage of previous round duration before we are stuck.

Definition at line 131 of file ConsensusParms.h.

◆ avSTUCK_CONSENSUS_PCT

std::size_t ripple::ConsensusParms::avSTUCK_CONSENSUS_PCT = 95

Percentage of nodes that must vote yes after we are stuck.

Definition at line 134 of file ConsensusParms.h.

◆ avCT_CONSENSUS_PCT

std::size_t ripple::ConsensusParms::avCT_CONSENSUS_PCT = 75

Percentage of nodes required to reach agreement on ledger close time.

Definition at line 137 of file ConsensusParms.h.

std::chrono::milliseconds