Skip to content

Fix: Don't flag consensus as stalled prematurely #5627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Jul 28, 2025

High Level Overview of Change

Fix stalled consensus detection to prevent false positives in situations where insufficient proposals1 have been received and there are no disputed transactions.

Context of Change

Stalled consensus detection was added to 2.5.0 in response to a network consensus halt that caused a round to run for over an hour. See #5277 and #5318.

It has a flaw that makes it very easy to have false positives. Those false positives are usually mitigated by other checks that prevent them from having an effect, but there have been several instances of validators "running ahead" because there are circumstances where the other checks are "successful", allowing the stall state to be checked.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Footnotes

  1. Insufficient meaning the node has received proposals from fewer than 3/4 of the number of participants in the previous round.

- Specifically, we must have at least 3/4 the previous round's
  participants proposing, and at least one dispute.
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.8%. Comparing base (baf4b83) to head (579e9f8).

Files with missing lines Patch % Lines
src/xrpld/consensus/Consensus.h 55.6% 4 Missing ⚠️
src/xrpld/consensus/Consensus.cpp 50.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5627     +/-   ##
=========================================
- Coverage     78.8%   78.8%   -0.0%     
=========================================
  Files          814     814             
  Lines        71261   71268      +7     
  Branches      8368    8374      +6     
=========================================
+ Hits         56131   56132      +1     
- Misses       15130   15136      +6     
Files with missing lines Coverage Δ
src/xrpld/consensus/Consensus.cpp 77.4% <50.0%> (+0.7%) ⬆️
src/xrpld/consensus/Consensus.h 84.5% <55.6%> (-0.4%) ⬇️

... and 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant