From e447f9f021c0e08823cffafeaf422ff62fd3a0c5 Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Tue, 23 Jun 2026 09:55:01 +0700 Subject: [PATCH] docs(consensus): add export apply projection markers --- src/xrpld/app/consensus/ConsensusExtensions.cpp | 2 +- src/xrpld/app/tx/detail/Export.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xrpld/app/consensus/ConsensusExtensions.cpp b/src/xrpld/app/consensus/ConsensusExtensions.cpp index 3a445702f..75bbcd998 100644 --- a/src/xrpld/app/consensus/ConsensusExtensions.cpp +++ b/src/xrpld/app/consensus/ConsensusExtensions.cpp @@ -523,13 +523,13 @@ ConsensusExtensions::selectEntropy( auto const digest = sha512Half(s.slice()); auto const count = static_cast(sorted.size()); + //@@start entropy-selector-tier-ladder // Tier ladder over the AGREED participant count — deterministic on every // node holding this entropySetHash. quorumThreshold() = ceil(0.8 * // effective view); tier2Threshold() = the equivocation-safe intersection // floor over the original view (~0.6*n; see calculateParticipantThreshold). // Below tier2Threshold too few aligned participants contributed to trust // the result — fall back. - //@@start entropy-selector-tier-ladder if (count >= quorumThreshold()) return {digest, entropyTierValidatorQuorum, count}; if (count >= tier2Threshold()) diff --git a/src/xrpld/app/tx/detail/Export.cpp b/src/xrpld/app/tx/detail/Export.cpp index bb5827951..e0bffc4a9 100644 --- a/src/xrpld/app/tx/detail/Export.cpp +++ b/src/xrpld/app/tx/detail/Export.cpp @@ -172,6 +172,7 @@ Export::doApply() if (!ctx_.app.config().standalone()) { + //@@start export-doapply-agreed-signature-snapshot std::size_t const threshold = unlSize == 0 ? 1 : calculateQuorumThreshold(unlSize); @@ -187,6 +188,7 @@ Export::doApply() collectedSigs = consensusExtensions.agreedExportSignatures( ctx_.tx, txId, *validatorView, threshold); } + //@@end export-doapply-agreed-signature-snapshot if (!collectedSigs) { @@ -228,6 +230,7 @@ Export::doApply() upgradeUnverifiedForNextRound(); + //@@start export-doapply-retry-without-signature-quorum JLOG(j_.info()) << "Export: insufficient signatures" << " txHash=" << txId << " ledgerSeq=" << currentSeq @@ -237,6 +240,7 @@ Export::doApply() : "no") << " result=terRETRY_EXPORT"; return terRETRY_EXPORT; + //@@end export-doapply-retry-without-signature-quorum } }