Skip to content

core/consensus: add gloas proposer timers - #4818

Open
KaloyanTanev wants to merge 5 commits into
mainfrom
kalo/gloas-proposer-timer
Open

KaloyanTanev wants to merge 5 commits into
mainfrom
kalo/gloas-proposer-timer

Conversation

@KaloyanTanev

@KaloyanTanev KaloyanTanev commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

From the gloas fork, proposer duties use 1.5s rounds anchored at the duty start with double_round_on_rearm_min_1s, so proposal_timeout no longer applies to them. The alpha linear feature proposes a quicker rotating shape instead (1.5s, 600ms, 900ms, 1.2s, ...), which the cluster agrees on through the priority protocol as the new proposer_timer infosync 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 of linear before the fork are unchanged.

category: feature
ticket: #4324
feature_flag: linear

@KaloyanTanev KaloyanTanev self-assigned this Nov 3, 2026
@KaloyanTanev KaloyanTanev changed the title core/consensus/timer: add gloas proposer timers core/consensus: add gloas proposer timers Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.86%. Comparing base (2b534eb) to head (115a740).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
core/infosync/infosync.go 73.17% 11 Missing ⚠️
app/app.go 0.00% 2 Missing ⚠️
core/priority/prioritiser.go 88.23% 2 Missing ⚠️
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.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_timer info-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

Comment thread core/infosync/infosync.go Resolved
Comment thread core/infosync/infosync.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

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.

2 participants