Skip to content

core: start gloas attester consensus at slot start - #4769

Open
KaloyanTanev wants to merge 8 commits into
kalo/round-timer-refactorfrom
kalo/gloas-attester-eager-ahead
Open

KaloyanTanev wants to merge 8 commits into
kalo/round-timer-refactorfrom
kalo/gloas-attester-eager-ahead

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

From the gloas fork, attester consensus starts at the start of the slot with the new eager_ahead_split timer (rounds of 4s, 1s, 1s, then +1s per round, extend_on_rearm_1s), and the fetcher fetches attestation data on the slot's SSE head event, or at the attestation deadline if no block arrived. fetch_att_on_block becomes stable and fetch_att_on_block_with_delay is removed. Stacked on #4767.

category: feature
ticket: #4324

@KaloyanTanev KaloyanTanev self-assigned this Oct 9, 2026
@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Oct 9, 2026
@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-attester-eager-ahead branch 2 times, most recently from a4bdc93 to 7f8c79e Compare October 9, 2026 12:32
@KaloyanTanev
KaloyanTanev marked this pull request as draft October 9, 2026 12:32
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.18919% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.95%. Comparing base (58e30cc) to head (bc51f45).

Files with missing lines Patch % Lines
core/fetcher/fetcher.go 93.33% 4 Missing ⚠️
app/app.go 0.00% 3 Missing ⚠️
core/scheduler/scheduler.go 76.92% 3 Missing ⚠️
core/consensus/qbft/qbft.go 66.66% 1 Missing ⚠️
core/interfaces.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           kalo/round-timer-refactor    #4769      +/-   ##
=============================================================
+ Coverage                      66.76%   66.95%   +0.18%     
=============================================================
  Files                            250      250              
  Lines                          32289    32377      +88     
=============================================================
+ Hits                           21559    21677     +118     
+ Misses                         10729    10699      -30     
  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.

@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-attester-eager-ahead branch 2 times, most recently from bb6d1e5 to 523702b Compare October 9, 2026 13:50
@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-attester-eager-ahead branch from 523702b to bc51f45 Compare October 9, 2026 15:36
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

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

Sequential callbacks delay consensus participation, while timing races can miss or postpone head-event fetching.

4 open findings
What changed in this PR

Adds Gloas-specific attester timing so consensus can begin at slot start and fetch attestation data from SSE head events.

Changes:

  • Adds the eager_ahead_split consensus timer.
  • Adds head-event fetching with deadline fallback.
  • Stabilizes fetch_att_on_block and expands tests/documentation.
File Description
app/​app.go Wires Gloas head events into the fetcher.
app/​featureset/​featureset.go Stabilizes and consolidates attestation fetching flags.
core/​consensus/​qbft/​qbft.go Supplies fork timing to round timers.
core/​consensus/​qbft/​qbft_internal_test.go Updates timer construction tests.
core/​consensus/​qbft/​roundtimer_internal_test.go Tests Gloas rounds in QBFT.
core/​consensus/​timer/​extensions.go Adds per-round rearm extension behavior.
core/​consensus/​timer/​roundtimer.go Selects fork-aware timers and anchors.
core/​consensus/​timer/​roundtimer_internal_test.go Tests durations, anchors, and extensions.
core/​consensus/​timer/​roundtimer_test.go Tests fork-aware timer selection.
core/​consensus/​timer/​timers.go Defines the ahead-split timer.
core/​fetcher/​fetcher.go Implements Gloas head-event fetching and fallback.
core/​fetcher/​fetcher_internal_test.go Tests the new fetching flow.
core/​fetcher/​fetcher_test.go Updates fetcher construction.
core/​interfaces.go Annotates legacy pre-Gloas wiring.
core/​scheduler/​scheduler.go Starts Gloas attester duties at slot start.
core/​scheduler/​scheduler_internal_test.go Tests fork-aware head handling.
core/​scheduler/​scheduler_test.go Tests Gloas scheduling without offset delay.
docs/​consensus.md Documents Gloas timer semantics.
testutil/​integration/​simnet_test.go Adds Gloas attester integration coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/consensus/timer/timers.go
Comment thread core/fetcher/fetcher.go
Comment thread core/fetcher/fetcher.go
Comment thread core/scheduler/scheduler.go
@KaloyanTanev
KaloyanTanev marked this pull request as ready for review October 9, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-invalid PR raised against invalid branch. Not a main or release branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants