mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 01:07:57 +00:00
Multiple transactions per account in TxQ (RIPD-1048):
* Tweak account XRP balance and sequence if needed before preclaim. * Limit total fees in flight to minimum reserve / account balance. * LastLedgerSequence must be at least 2 more than the current ledger to be queued. * Limit 10 transactions per account in the queue at a time. * Limit queuing multiple transactions after transactions that affect authentication. * Zero base fee transactions are treated as having a fixed fee level of 256000 instead of infinite. * Full queue: new txn can only kick out a tx if the fee is higher than that account's average fee. * Queued tx retry limit prevents indefinitely stuck txns. * Return escalation factors in server_info and _state when escalated. * Update documentation. * Update experimental config to only include the % increase. * Convert TxQ metric magic numbers to experimental config.
This commit is contained in:
committed by
Vinnie Falco
parent
7f97b7bc05
commit
2e2a7509cd
@@ -2053,10 +2053,31 @@ Json::Value NetworkOPsImp::getServerInfo (bool human, bool admin)
|
||||
if (admin)
|
||||
info[jss::load] = m_job_queue.getJson ();
|
||||
|
||||
auto const escalationMetrics = app_.getTxQ().getMetrics(
|
||||
app_, *app_.openLedger().current());
|
||||
if (!human)
|
||||
{
|
||||
info[jss::load_base] = app_.getFeeTrack ().getLoadBase ();
|
||||
info[jss::load_factor] = app_.getFeeTrack ().getLoadFactor ();
|
||||
if (escalationMetrics)
|
||||
{
|
||||
/* Json::Value doesn't support uint64, so clamp to max
|
||||
uint32 value. This is mostly theoretical, since there
|
||||
probably isn't enough extant XRP to drive the factor
|
||||
that high.
|
||||
*/
|
||||
constexpr std::uint64_t max =
|
||||
std::numeric_limits<std::uint32_t>::max();
|
||||
info[jss::load_factor_fee_escalation] =
|
||||
static_cast<std::uint32_t> (std::min(
|
||||
max, escalationMetrics->expFeeLevel));
|
||||
info[jss::load_factor_fee_queue] =
|
||||
static_cast<std::uint32_t> (std::min(
|
||||
max, escalationMetrics->minFeeLevel));
|
||||
info[jss::load_factor_fee_reference] =
|
||||
static_cast<std::uint32_t> (std::min(
|
||||
max, escalationMetrics->referenceFeeLevel));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2079,6 +2100,19 @@ Json::Value NetworkOPsImp::getServerInfo (bool human, bool admin)
|
||||
info[jss::load_factor_cluster] =
|
||||
static_cast<double> (fee) / base;
|
||||
}
|
||||
if (escalationMetrics)
|
||||
{
|
||||
if (escalationMetrics->expFeeLevel !=
|
||||
escalationMetrics->referenceFeeLevel)
|
||||
info[jss::load_factor_fee_escalation] =
|
||||
static_cast<double> (escalationMetrics->expFeeLevel) /
|
||||
escalationMetrics->referenceFeeLevel;
|
||||
if (escalationMetrics->minFeeLevel !=
|
||||
escalationMetrics->referenceFeeLevel)
|
||||
info[jss::load_factor_fee_queue] =
|
||||
static_cast<double> (escalationMetrics->minFeeLevel) /
|
||||
escalationMetrics->referenceFeeLevel;
|
||||
}
|
||||
}
|
||||
|
||||
bool valid = false;
|
||||
|
||||
Reference in New Issue
Block a user