Repository navigation
feat: derive EIP-8198 slot duration from fork config - #895
barnabasbusa wants to merge 6 commits into
Conversation
… v1.7.0-beta.4) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
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."
This comment has been minimized.
This comment has been minimized.
…d builder sweep balance Co-Authored-By: Claude <noreply@anthropic.com>
…8365 deposits Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
| // 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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
c83e4e8 to
b896613
Compare
Updates dora to consensus-specs v1.7.0-beta.4. #5710 replaces the standalone
SLOT_DURATION_SCHEDULEwith a fork-specificSLOT_DURATION_MS_EIP8198, so dora now derives the wallclock schedule fromSLOT_DURATION_MSat genesis plusSLOT_DURATION_MS_EIP8198fromEIP8198_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 inslash_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