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

Structure used to customize TxQ behavior. More...

Collaboration diagram for ripple::TxQ::Setup:
Collaboration graph
[legend]

Public Member Functions

 Setup ()=default
 Default constructor. More...
 

Public Attributes

std::size_t ledgersInQueue = 20
 Number of ledgers' worth of transactions to allow in the queue. More...
 
std::size_t queueSizeMin = 2000
 The smallest limit the queue is allowed. More...
 
std::uint32_t retrySequencePercent = 25
 Extra percentage required on the fee level of a queued transaction to replace that transaction with another with the same SeqProxy. More...
 
FeeLevel64 minimumEscalationMultiplier = baseLevel * 500
 Minimum value of the escalation multiplier, regardless of the prior ledger's median fee level. More...
 
std::uint32_t minimumTxnInLedger = 32
 Minimum number of transactions to allow into the ledger before escalation, regardless of the prior ledger's size. More...
 
std::uint32_t minimumTxnInLedgerSA = 1000
 Like minimumTxnInLedger for standalone mode. More...
 
std::uint32_t targetTxnInLedger = 256
 Number of transactions per ledger that fee escalation "works towards". More...
 
std::optional< std::uint32_tmaximumTxnInLedger
 Optional maximum allowed value of transactions per ledger before fee escalation kicks in. More...
 
std::uint32_t normalConsensusIncreasePercent = 20
 When the ledger has more transactions than "expected", and performance is humming along nicely, the expected ledger size is updated to the previous ledger size plus this percentage. More...
 
std::uint32_t slowConsensusDecreasePercent = 50
 When consensus takes longer than appropriate, the expected ledger size is updated to the lesser of the previous ledger size and the current expected ledger size minus this percentage. More...
 
std::uint32_t maximumTxnPerAccount = 10
 Maximum number of transactions that can be queued by one account. More...
 
std::uint32_t minimumLastLedgerBuffer = 2
 Minimum difference between the current ledger sequence and a transaction's LastLedgerSequence for the transaction to be queueable. More...
 
bool standAlone = false
 Use standalone mode behavior. More...
 

Detailed Description

Structure used to customize TxQ behavior.

Definition at line 66 of file TxQ.h.

Constructor & Destructor Documentation

◆ Setup()

ripple::TxQ::Setup::Setup ( )
explicitdefault

Default constructor.

Member Data Documentation

◆ ledgersInQueue

std::size_t ripple::TxQ::Setup::ledgersInQueue = 20

Number of ledgers' worth of transactions to allow in the queue.

For example, if the last ledger had 150 transactions, then up to 3000 transactions can be queued.

Can be overridden by queueSizeMin

Definition at line 78 of file TxQ.h.

◆ queueSizeMin

std::size_t ripple::TxQ::Setup::queueSizeMin = 2000

The smallest limit the queue is allowed.

Will allow more than ledgersInQueue in the queue if ledgers are small.

Definition at line 84 of file TxQ.h.

◆ retrySequencePercent

std::uint32_t ripple::TxQ::Setup::retrySequencePercent = 25

Extra percentage required on the fee level of a queued transaction to replace that transaction with another with the same SeqProxy.

If queued transaction for account "Alice" with seq 45 has a fee level of 512, a replacement transaction for "Alice" with seq 45 must have a fee level of at least 512 * (1 + 0.25) = 640 to be considered.

Definition at line 94 of file TxQ.h.

◆ minimumEscalationMultiplier

FeeLevel64 ripple::TxQ::Setup::minimumEscalationMultiplier = baseLevel * 500

Minimum value of the escalation multiplier, regardless of the prior ledger's median fee level.

Definition at line 97 of file TxQ.h.

◆ minimumTxnInLedger

std::uint32_t ripple::TxQ::Setup::minimumTxnInLedger = 32

Minimum number of transactions to allow into the ledger before escalation, regardless of the prior ledger's size.

Definition at line 100 of file TxQ.h.

◆ minimumTxnInLedgerSA

std::uint32_t ripple::TxQ::Setup::minimumTxnInLedgerSA = 1000

Like minimumTxnInLedger for standalone mode.

Primarily so that tests don't need to worry about queuing.

Definition at line 103 of file TxQ.h.

◆ targetTxnInLedger

std::uint32_t ripple::TxQ::Setup::targetTxnInLedger = 256

Number of transactions per ledger that fee escalation "works towards".

Definition at line 106 of file TxQ.h.

◆ maximumTxnInLedger

std::optional<std::uint32_t> ripple::TxQ::Setup::maximumTxnInLedger

Optional maximum allowed value of transactions per ledger before fee escalation kicks in.

By default, the maximum is an emergent property of network, validator, and consensus performance. This setting can override that behavior to prevent fee escalation from allowing more than maximumTxnInLedger "cheap" transactions into the open ledger.

Definition at line 117 of file TxQ.h.

◆ normalConsensusIncreasePercent

std::uint32_t ripple::TxQ::Setup::normalConsensusIncreasePercent = 20

When the ledger has more transactions than "expected", and performance is humming along nicely, the expected ledger size is updated to the previous ledger size plus this percentage.

Calculations are subject to configured limits, and the recent transactions counts buffer.

Example: If the "expectation" is for 500 transactions, and a ledger is validated normally with 501 transactions, then the expected ledger size will be updated to 601.

Definition at line 129 of file TxQ.h.

◆ slowConsensusDecreasePercent

std::uint32_t ripple::TxQ::Setup::slowConsensusDecreasePercent = 50

When consensus takes longer than appropriate, the expected ledger size is updated to the lesser of the previous ledger size and the current expected ledger size minus this percentage.

Calculations are subject to configured limits.

Example: If the ledger has 15000 transactions, and it is validated slowly, then the expected ledger size will be updated to 7500. If there are only 6 transactions, the expected ledger size will be updated to 5, assuming the default minimum.

Definition at line 143 of file TxQ.h.

◆ maximumTxnPerAccount

std::uint32_t ripple::TxQ::Setup::maximumTxnPerAccount = 10

Maximum number of transactions that can be queued by one account.

Definition at line 145 of file TxQ.h.

◆ minimumLastLedgerBuffer

std::uint32_t ripple::TxQ::Setup::minimumLastLedgerBuffer = 2

Minimum difference between the current ledger sequence and a transaction's LastLedgerSequence for the transaction to be queueable.

Decreases the chance a transaction will get queued and broadcast only to expire before it gets a chance to be processed.

Definition at line 152 of file TxQ.h.

◆ standAlone

bool ripple::TxQ::Setup::standAlone = false

Use standalone mode behavior.

Definition at line 154 of file TxQ.h.