Repository navigation
core/consensus: add gloas proposer timers - #4818
KaloyanTanev wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4818 +/- ##
==========================================
+ Coverage 67.67% 67.86% +0.19%
==========================================
Files 255 255
Lines 33668 33781 +113
==========================================
+ Hits 22784 22926 +142
+ Misses 10883 10854 -29
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Critical info-sync flaws allow cross-slot timer disagreement and adoption of unsupported leader-supplied timers, risking misaligned round deadlines and stalled proposer duties.
2 open issues
What changed in this PR
Adds Gloas-specific proposer timers to Charon’s consensus workflow, supporting the hardfork preparation in #4324 while preserving pre-Gloas behavior.
Changes:
- Introduces duty-start-anchored proposer timers with 1.5s default rounds and a faster linear alternative.
- Negotiates timer types and inputs through the
proposer_timerinfo-sync topic. - Updates consensus metrics, tests, and documentation for the new timing behavior.
| File | Description |
|---|---|
testutil/integration/infosync_test.go |
Expects the proposer timer topic in integration results. |
docs/structure.md |
Updates the InfoSync package description. |
docs/consensus.md |
Documents Gloas timers, negotiation, and extensions. |
docs/architecture.md |
Adds proposer timers to InfoSync’s documented responsibilities. |
core/infosync/infosync.go |
Advertises, stores, and retrieves agreed proposer timers. |
core/infosync/infosync_internal_test.go |
Tests timer proposals, results, and activation slots. |
core/consensus/timer/timers.go |
Parameterizes timer definitions and adds Gloas durations. |
core/consensus/timer/roundtimer.go |
Selects Gloas proposer timers and parses agreed inputs. |
core/consensus/timer/roundtimer_test.go |
Tests fork-aware timer selection and registration inputs. |
core/consensus/timer/roundtimer_internal_test.go |
Tests timer schedules, extensions, and input parsing. |
core/consensus/qbft/roundtimer_internal_test.go |
Adapts timer construction to the agreement callback. |
core/consensus/qbft/qbft.go |
Connects timer agreement to QBFT and records the selected timer. |
core/consensus/qbft/qbft_internal_test.go |
Tests proposer timer callback registration. |
core/consensus/instance/instance_io.go |
Stores the instance’s timer type for metrics. |
app/featureset/featureset.go |
Clarifies feature comments for Gloas behavior. |
app/app.go |
Wires InfoSync timer agreement into consensus. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Coupled changes to QBFT leader-rotation deadlines and cluster-wide timer negotiation require human assessment and multi-node fault-injection validation of proposer liveness under leader failure across mixed-feature, mixed-version, and restarted peers.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
|




From the gloas fork, proposer duties use 1.5s rounds anchored at the duty start with
double_round_on_rearm_min_1s, soproposal_timeoutno longer applies to them. The alphalinearfeature proposes a quicker rotating shape instead (1.5s, 600ms, 900ms, 1.2s, ...), which the cluster agrees on through the priority protocol as the newproposer_timerinfosync topic, encoded as the timer and the inputs of its timer function (linear/1.5s/300ms,eager_dlinear/1.5s): every peer uses the agreed timer from the next slot once at least a threshold of peers propose it, and the default until then. Since consensus accepts a leader's proposed value as is, peers now verify every decided priority result against its signed proposals before acting on it. Pre-gloas timers and the behaviour oflinearbefore the fork are unchanged.category: feature
ticket: #4324
feature_flag: linear