Skip to content

Limit the general PTC dependent root rule to epochs after the Gloas fork - #685

Merged
nflaig merged 2 commits into
ethereum:masterfrom
tcoratger:ptc-fork-epoch-bullets
Nov 24, 2026
Merged

nflaig merged 2 commits into
ethereum:masterfrom
tcoratger:ptc-fork-epoch-bullets

Conversation

@tcoratger

Copy link
Copy Markdown
Contributor

The PTC duties text says, for every epoch, to check the dependent root against event.current_epoch_dependent_root when the event is in the same epoch. The paragraph added in #671 says that for GLOAS_FORK_EPOCH it matches event.next_epoch_dependent_root instead, and that its root is at compute_start_slot_at_epoch(epoch) - 1. Both the bullets and the general formula now apply to epoch > GLOAS_FORK_EPOCH only, so the fork-epoch paragraph no longer contradicts them. Nothing changes for clients that already follow #671.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

imo it's implied that ptc is post-gloas, I don't think this needs to be overspecified, but curious what others think

@tcoratger

Copy link
Copy Markdown
Contributor Author

Thanks. The guard is not about pre-Gloas epochs, which indeed have no PTC. It separates GLOAS_FORK_EPOCH itself from the later Gloas epochs.

On master, the general text says the dependent root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1) and matches event.current_epoch_dependent_root in the same epoch. The paragraph from #671 then gives, for GLOAS_FORK_EPOCH, compute_start_slot_at_epoch(epoch) - 1 and event.next_epoch_dependent_root. Both texts apply to the fork epoch and give different roots. A reader can see the second as an override, but nothing says so.

If you prefer fewer words, a lighter fix is one clause on the general text, "except for GLOAS_FORK_EPOCH, see below". I am happy to switch to that.

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sure, it does make it more explicit, not opposed to merging as is

@nflaig
nflaig merged commit 09256e1 into ethereum:master Nov 24, 2026
3 checks passed
tcoratger added a commit to ethereum/EthLib that referenced this pull request Nov 26, 2026
The pin of ethereum/beacon-APIs moves from 0ed1255 to 09256e1, its
head of 2026-11-26. Four changes landed between the two:
- ethereum/beacon-APIs#676 gives one blob per requested hash in the
  blobs endpoint; #4665 already follows it.
- ethereum/beacon-APIs#678 selects the context of an updates chunk by
  the digest of its epoch; the decoder already computes that digest.
- ethereum/beacon-APIs#685 limits the general PTC dependent root to
  epochs after the Gloas fork; EthLib already refuses earlier epochs,
  and a comment and SOUNDNESS.md now say "every later epoch".
- ethereum/beacon-APIs#686 adds CN, EX, LA and NE to ClientCode in
  types/primitive.yaml. The vendored copy and its digest move with it;
  no vendored schema refers to ClientCode.

Every other link of the Lean doc comments, SOUNDNESS.md and the tests
moves to the new commit; no other file changed between the two.

Closes #4645.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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