From 34bbb1433cfca972a07cd8c3aa745b76e8ca522d Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Sun, 31 May 2026 00:31:08 +0200 Subject: [PATCH] perf: Shorten consensus cadence for low-latency perf clusters --- src/xrpld/app/consensus/RCLConsensus.cpp | 2 +- src/xrpld/consensus/ConsensusParms.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrpld/app/consensus/RCLConsensus.cpp b/src/xrpld/app/consensus/RCLConsensus.cpp index a474c9c339..2fdb45b5e8 100644 --- a/src/xrpld/app/consensus/RCLConsensus.cpp +++ b/src/xrpld/app/consensus/RCLConsensus.cpp @@ -784,7 +784,7 @@ RCLConsensus::Adaptor::buildLCL( // Update fee computations based on accepted txs using namespace std::chrono_literals; - app_.getTxQ().processClosedLedger(app_, *built, roundTime > 5s); + app_.getTxQ().processClosedLedger(app_, *built, roundTime > 2500ms); // And stash the ledger in the ledger master if (ledgerMaster_.storeLedger(built)) diff --git a/src/xrpld/consensus/ConsensusParms.h b/src/xrpld/consensus/ConsensusParms.h index e6dd7f046e..ad254db88d 100644 --- a/src/xrpld/consensus/ConsensusParms.h +++ b/src/xrpld/consensus/ConsensusParms.h @@ -59,10 +59,10 @@ struct ConsensusParms std::size_t const minConsensusPct = 80; //! The duration a ledger may remain idle before closing - std::chrono::milliseconds const ledgerIdleInterval = std::chrono::seconds{15}; + std::chrono::milliseconds const ledgerIdleInterval = std::chrono::seconds{5}; //! The number of seconds we wait minimum to ensure participation - std::chrono::milliseconds const ledgerMinConsensus = std::chrono::milliseconds{1950}; + std::chrono::milliseconds const ledgerMinConsensus = std::chrono::milliseconds{1000}; /** The maximum amount of time to spend pausing for laggards. * @@ -73,7 +73,7 @@ struct ConsensusParms std::chrono::milliseconds const ledgerMaxConsensus = std::chrono::seconds{15}; //! Minimum number of seconds to wait to ensure others have computed the LCL - std::chrono::milliseconds const ledgerMinClose = std::chrono::seconds{2}; + std::chrono::milliseconds const ledgerMinClose = std::chrono::seconds{1}; //! How often we check state or change positions std::chrono::milliseconds const ledgerGRANULARITY = std::chrono::seconds{1}; @@ -99,7 +99,7 @@ struct ConsensusParms twice the interval between proposals (0.7s) divided by the interval between mid and late consensus ([85-50]/100). */ - std::chrono::milliseconds const avMinConsensusTime = std::chrono::seconds{5}; + std::chrono::milliseconds const avMinConsensusTime = std::chrono::seconds{2}; //------------------------------------------------------------------------------ // Avalanche tuning