Skip to content

Check the voluntary exit epoch against the wall clock - #5596

Merged
jtraglia merged 3 commits into
ethereum:masterfrom
jtraglia:voluntary-exit-refactor
Sep 3, 2026
Merged

Check the voluntary exit epoch against the wall clock#5596
jtraglia merged 3 commits into
ethereum:masterfrom
jtraglia:voluntary-exit-refactor

Conversation

@jtraglia

@jtraglia jtraglia commented Sep 3, 2026

Copy link
Copy Markdown
Member

In validate_voluntary_exit_gossip, the voluntary exit epoch was compared against the head state's current epoch, which lags the wall clock and ignores clock disparity, so an exit published at the start of its epoch could be dropped by peers whose head has not advanced yet. This PR adds is_future_epoch, which derives the current epoch from the wall clock with a MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance, and use it in place of that comparison. The check no longer needs the state, so it moves ahead of the head lookup where it is much cheaper.

The voluntary exit epoch was compared against the head state's current epoch,
which lags the wall clock and ignores clock disparity, so an exit published at
the start of its epoch could be dropped by peers whose head has not advanced
yet. Add `is_future_epoch`, which derives the current epoch from the wall clock
with a `MAXIMUM_GOSSIP_CLOCK_DISPARITY` allowance, and use it in place of that
comparison. The check no longer needs the state, so it moves ahead of the head
lookup where it is much cheaper.
@jtraglia
jtraglia requested a review from jihoonsong September 3, 2026 14:05
@github-actions github-actions Bot added testing CI, actions, tests, testing infra phase0 deneb labels Sep 3, 2026
@ethereum ethereum deleted a comment from jihoonsong Sep 3, 2026
@jtraglia
jtraglia merged commit 798c551 into ethereum:master Sep 3, 2026
19 checks passed
@jtraglia
jtraglia deleted the voluntary-exit-refactor branch September 3, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deneb phase0 testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants