rippled
ConsensusParms.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012-2017 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #ifndef RIPPLE_CONSENSUS_CONSENSUS_PARMS_H_INCLUDED
21 #define RIPPLE_CONSENSUS_CONSENSUS_PARMS_H_INCLUDED
22 
23 #include <chrono>
24 #include <cstddef>
25 
26 namespace ripple {
27 
34 {
35  explicit ConsensusParms() = default;
36 
37  //-------------------------------------------------------------------------
38  // Validation and proposal durations are relative to NetClock times, so use
39  // second resolution
47 
55 
62 
65 
68 
69  //-------------------------------------------------------------------------
70  // Consensus durations are relative to the internal Consensus clock and use
71  // millisecond resolution.
72 
75 
78 
82 
90 
93 
96 
108 
109  //------------------------------------------------------------------------------
110  // Avalanche tuning
111  // As a function of the percent this round's duration is of the prior round,
112  // we increase the threshold for yes votes to add a transaction to our
113  // position.
114 
117 
120 
123 
126 
129 
132 
135 
138 };
139 
140 } // namespace ripple
141 #endif
ripple::ConsensusParms::avCT_CONSENSUS_PCT
std::size_t avCT_CONSENSUS_PCT
Percentage of nodes required to reach agreement on ledger close time.
Definition: ConsensusParms.h:137
ripple::ConsensusParms::avMID_CONSENSUS_TIME
std::size_t avMID_CONSENSUS_TIME
Percentage of previous round duration before we advance.
Definition: ConsensusParms.h:119
ripple::ConsensusParms::avLATE_CONSENSUS_PCT
std::size_t avLATE_CONSENSUS_PCT
Percentage of nodes that most vote yes after advancing.
Definition: ConsensusParms.h:128
ripple::ConsensusParms::avSTUCK_CONSENSUS_PCT
std::size_t avSTUCK_CONSENSUS_PCT
Percentage of nodes that must vote yes after we are stuck.
Definition: ConsensusParms.h:134
std::chrono::seconds
ripple::ConsensusParms::ledgerGRANULARITY
std::chrono::milliseconds ledgerGRANULARITY
How often we check state or change positions.
Definition: ConsensusParms.h:95
ripple::ConsensusParms::proposeINTERVAL
std::chrono::seconds proposeINTERVAL
How often we force generating a new proposal to keep ours fresh.
Definition: ConsensusParms.h:67
ripple::ConsensusParms::validationVALID_WALL
std::chrono::seconds validationVALID_WALL
The duration a validation remains current after its ledger's close time.
Definition: ConsensusParms.h:46
cstddef
chrono
ripple::ConsensusParms::ledgerMAX_CONSENSUS
std::chrono::milliseconds ledgerMAX_CONSENSUS
The maximum amount of time to spend pausing for laggards.
Definition: ConsensusParms.h:89
ripple::ConsensusParms::minCONSENSUS_PCT
std::size_t minCONSENSUS_PCT
The percentage threshold above which we can declare consensus.
Definition: ConsensusParms.h:74
ripple::ConsensusParms::ledgerMIN_CLOSE
std::chrono::milliseconds ledgerMIN_CLOSE
Minimum number of seconds to wait to ensure others have computed the LCL.
Definition: ConsensusParms.h:92
ripple::ConsensusParms::proposeFRESHNESS
std::chrono::seconds proposeFRESHNESS
How long we consider a proposal fresh.
Definition: ConsensusParms.h:64
ripple::ConsensusParms::validationVALID_EARLY
std::chrono::seconds validationVALID_EARLY
Duration pre-close in which validations are acceptable.
Definition: ConsensusParms.h:61
ripple::ConsensusParms::avINIT_CONSENSUS_PCT
std::size_t avINIT_CONSENSUS_PCT
Percentage of nodes on our UNL that must vote yes.
Definition: ConsensusParms.h:116
ripple::ConsensusParms::avMID_CONSENSUS_PCT
std::size_t avMID_CONSENSUS_PCT
Percentage of nodes that most vote yes after advancing.
Definition: ConsensusParms.h:122
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::ConsensusParms::ledgerMIN_CONSENSUS
std::chrono::milliseconds ledgerMIN_CONSENSUS
The number of seconds we wait minimum to ensure participation.
Definition: ConsensusParms.h:80
ripple::ConsensusParms::ledgerIDLE_INTERVAL
std::chrono::milliseconds ledgerIDLE_INTERVAL
The duration a ledger may remain idle before closing.
Definition: ConsensusParms.h:77
ripple::ConsensusParms
Consensus algorithm parameters.
Definition: ConsensusParms.h:33
ripple::ConsensusParms::avSTUCK_CONSENSUS_TIME
std::size_t avSTUCK_CONSENSUS_TIME
Percentage of previous round duration before we are stuck.
Definition: ConsensusParms.h:131
ripple::ConsensusParms::ConsensusParms
ConsensusParms()=default
std::size_t
ripple::ConsensusParms::avLATE_CONSENSUS_TIME
std::size_t avLATE_CONSENSUS_TIME
Percentage of previous round duration before we advance.
Definition: ConsensusParms.h:125
ripple::ConsensusParms::validationVALID_LOCAL
std::chrono::seconds validationVALID_LOCAL
Duration a validation remains current after first observed.
Definition: ConsensusParms.h:54
ripple::ConsensusParms::avMIN_CONSENSUS_TIME
std::chrono::milliseconds avMIN_CONSENSUS_TIME
The minimum amount of time to consider the previous round to have taken.
Definition: ConsensusParms.h:107