Skip to content

feat: derive EIP-8198 slot duration from fork config - #895

Open
barnabasbusa wants to merge 6 commits into
masterfrom
bbusa/eip8198-slot-duration-beta4
Open

barnabasbusa wants to merge 6 commits into
masterfrom
bbusa/eip8198-slot-duration-beta4

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Updates dora to consensus-specs v1.7.0-beta.4. #5710 replaces the standalone SLOT_DURATION_SCHEDULE with a fork-specific SLOT_DURATION_MS_EIP8198, so dora now derives the wallclock schedule from SLOT_DURATION_MS at genesis plus SLOT_DURATION_MS_EIP8198 from EIP8198_FORK_EPOCH. go-eth2-client is bumped to ethpandaops/go-eth2-client#64 for the Heze EIP-8015 containers (no eth1 data / deposits), and the state transition follows the beta.4 changes: pending builder payments of any slashed proposer are cleared in slash_validator (#5719), the builder sweep withdraws the balance left after earlier withdrawals in the same payload, and Heze skips deposits that would create validators with BLS withdrawal credentials (EIP-8365). The beta.4 vector replay passes again and now covers Heze.

🤖 Generated with Claude Code

… v1.7.0-beta.4)

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

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR follows consensus-specs v1.7.0-beta.4: the EIP-8198 slot schedule is now derived from the scalar SLOT_DURATION_MS (genesis) and SLOT_DURATION_MS_EIP8198 (from EIP8198_FORK_EPOCH), with the wallclock seeding a genesis entry and the old SLOT_DURATION_SCHEDULE handling removed. I traced the derivation, duplicate/overflow handling in newWallclockSchedule, and the CheckMismatch slice branches, and found the change consistent and correct. No real problems to report.


Reviewed 3 changed file(s) @ 79e1bf07 — no blocking issues found.
A red panda's scientific name, Ailurus fulgens, means "shining cat."

@redpandabot

This comment has been minimized.

…d builder sweep balance

Co-Authored-By: Claude <noreply@anthropic.com>
barnabasbusa and others added 2 commits October 9, 2026 12:11
…8365 deposits

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread clients/consensus/chainspec.go Outdated
// SlotDurationScheduleEntry is one entry of the EIP-8198 SLOT_DURATION_SCHEDULE:
// SlotDurationScheduleEntry is one entry of the slot duration schedule:
// slots from Epoch on last SlotDurationMs milliseconds.
type SlotDurationScheduleEntry struct {

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.

SlotDurationScheduleEntry should be removed entirely.
It's a leftover as AI doesn't like removing code. Tell it to clean up stuff ;)
Pass the specs to the relevant codepaths that need the schedule, not a separate parsed schedule array

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed SlotDurationScheduleEntry and GetSlotDurationSchedule entirely in c9ea455. SetupClock / newWallclockSchedule now take the ChainSpec and build the segments straight from SLOT_DURATION_MS + EIP8198_FORK_EPOCH/SLOT_DURATION_MS_EIP8198; the generic sort/merge logic is gone and the tests use specs too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also dropped wallclockSegment in c83e4e8: the schedule is now flat (slotDuration, forkSlot, forkSlotDuration and a single precomputed forkOffset), and all the segment loops are unrolled into a before/after-fork branch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reverted the segment flattening again (force-pushed back to b896613): with wallclockSegment it reads cleaner, so the schedule stays specs-driven but keeps the segments.

barnabasbusa and others added 2 commits October 9, 2026 13:33
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@barnabasbusa
barnabasbusa force-pushed the bbusa/eip8198-slot-duration-beta4 branch from c83e4e8 to b896613 Compare October 9, 2026 13:01
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