docs(consensus): add MERGE NOTE comments for upstream 86ef16dbeb resolution

Extends merge guidance to cover the empty-disputes bugfix (not yet in
sync-2.5.0): !disputes.empty() guard, stalled() j/clog params,
"should be rare" doc wording, debug→warn promotion, and auto-merged
testDisputes duplicate warning.
This commit is contained in:
Nicholas Dudfield
2026-03-11 10:45:04 +07:00
parent aa1a7e5320
commit b65d9faf12
4 changed files with 13 additions and 0 deletions

View File

@@ -1131,6 +1131,10 @@ public:
// MERGE NOTE (sync-2.5.0): upstream adds testDisputes() method and its
// run() entry here. Keep both all RNG tests below and testDisputes.
// The stalled() calls in testDisputes need j/clog params (from 86ef16dbeb).
// WARNING: upstream testDisputes() body may auto-merge WITHOUT conflict
// markers, creating a duplicate alongside our version (which already has
// j/clog params). Delete the auto-merged duplicate — keep only the version
// with j/clog params and expectStalled() lambda.
void
testRngCommitRevealConverges()
{

View File

@@ -139,6 +139,7 @@ RCLValidationsAdaptor::acquire(LedgerHash const& hash)
if (!ledger)
{
// MERGE NOTE (upstream 86ef16dbeb): promoted from debug to warn.
JLOG(j_.warn())
<< "Need validated ledger for preferred ledger analysis " << hash;

View File

@@ -110,6 +110,8 @@ shouldCloseLedger(
last ledger
@param currentAgreeTime how long, in milliseconds, we've been trying to
agree
// MERGE NOTE (upstream 86ef16dbeb): "should be rare" wording is from the
// bugfix. Upstream sync-2.5.0 has "will cause" instead. Keep ours.
@param stalled the network appears to be stalled, where
neither we nor our peers have changed their vote on any disputes in a
while. This is undesirable, and should be rare, and will cause us to
@@ -2976,6 +2978,10 @@ Consensus<Adaptor>::haveConsensus(
effectiveParms.ledgerMAX_CONSENSUS = std::chrono::seconds{5};
ConsensusParms const& parms = adaptor_.parms();
// MERGE NOTE (upstream 86ef16dbeb): the !result_->disputes.empty() guard,
// j_/clog capture in the lambda, and the stalled-logging block below are
// all from the bugfix. Upstream sync-2.5.0 does NOT have them yet.
// When 86ef16dbeb arrives, keep our version — it's already applied.
// Stalling is BAD. It means that we have a consensus on the close time, so
// peers are talking, but we have disputed transactions that peers are
// unable or unwilling to come to agreement on one way or the other.

View File

@@ -175,6 +175,8 @@ public:
@return bool Whether the peer changed its vote. (A new vote counts as a
change.)
*/
// MERGE NOTE (sync-2.5.0): upstream changes return type from void to
// [[nodiscard]] bool. We already have this. Keep ours.
[[nodiscard]]
bool
setVote(NodeID_t const& peer, bool votesYes);