Skip to content

fix(consensus): correct locked and valid value handling across rounds and restarts - #1450

Open
oXtxNt9U wants to merge 7 commits into
developfrom
fix/consensus/prevote-nil-when-locked
Open

fix(consensus): correct locked and valid value handling across rounds and restarts#1450
oXtxNt9U wants to merge 7 commits into
developfrom
fix/consensus/prevote-nil-when-locked

Conversation

@oXtxNt9U

@oXtxNt9U oXtxNt9U commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • onProposal prevoted any valid proposal regardless of the lock, so a validator locked on one block could help a conflicting one reach +2/3 in a later round
  • #signProposal re-proposed a restored valid value without deserializing its payload, throwing into an unawaited promise and killing the node on startup
  • onProposalLocked prevoted nil for a lock-proven proposal whenever the proposer's validRound predated the lock even when the proposal was for the very block the validator was locked on, wasting a round each time

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.96%. Comparing base (58176af) to head (1bb461e).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1450      +/-   ##
===========================================
+ Coverage    77.57%   77.96%   +0.39%     
===========================================
  Files          923      934      +11     
  Lines        16019    16463     +444     
  Branches      2205     2286      +81     
===========================================
+ Hits         12426    12835     +409     
- Misses        3588     3621      +33     
- Partials         5        7       +2     
Flag Coverage Δ
contracts 91.76% <ø> (?)
packages 77.58% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@oXtxNt9U
oXtxNt9U force-pushed the fix/consensus/prevote-nil-when-locked branch from 897f433 to 53747e3 Compare August 17, 2026 04:03
@oXtxNt9U
oXtxNt9U force-pushed the fix/consensus/prevote-nil-when-locked branch from 59ec00f to 1bb461e Compare August 17, 2026 05:39
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