Skip to content

Fix --block-time flag being ignored due to SlotDurationMilliseconds precedence#417

Open
maoueh wants to merge 1 commit intoflashbots:mainfrom
streamingfast:fix/l1-block-time-not-respected-anymore
Open

Fix --block-time flag being ignored due to SlotDurationMilliseconds precedence#417
maoueh wants to merge 1 commit intoflashbots:mainfrom
streamingfast:fix/l1-block-time-not-respected-anymore

Conversation

@maoueh
Copy link
Copy Markdown
Contributor

@maoueh maoueh commented Apr 23, 2026

Prysm v7 introduced SlotDurationMilliseconds which takes precedence over SecondsPerSlot when > 0. UnmarshalConfig seeds from MainnetConfig() which has SlotDurationMilliseconds=12000, so setting SECONDS_PER_SLOT: 1 in the template had no effect — the slot duration stayed at 12s. Explicitly sync SlotDurationMilliseconds after UnmarshalConfig so the configured block time is actually applied.

A different way to fix it would be to change the CL config template that currently has SECONDS_PER_SLOT to use SLOT_DURATION_MS instead (and use Golang template to render it instead of hard-coded manual replacement)

…recedence

Prysm v7 introduced SlotDurationMilliseconds which takes precedence over SecondsPerSlot when > 0. UnmarshalConfig seeds from MainnetConfig() which has SlotDurationMilliseconds=12000, so setting SECONDS_PER_SLOT: 1 in the template had no effect — the slot duration stayed at 12s. Explicitly sync SlotDurationMilliseconds after UnmarshalConfig so the configured block time is actually applied.

A different way to fix it would be to change the CL config template that currently has `SECONDS_PER_SLOT` to use `SLOT_DURATION_MS` instead (and use Golang template to render it instead of hard-coded manual replacement)
@maoueh maoueh requested a review from canercidam as a code owner April 23, 2026 20:27
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.

1 participant