Skip to content

refactor: move config flags from FlashblocksState to OpPayloadBuilderCtx#478

Open
julio4 wants to merge 1 commit intomainfrom
refactor/state-root-flags-in-ctx
Open

refactor: move config flags from FlashblocksState to OpPayloadBuilderCtx#478
julio4 wants to merge 1 commit intomainfrom
refactor/state-root-flags-in-ctx

Conversation

@julio4
Copy link
Copy Markdown
Member

@julio4 julio4 commented Apr 24, 2026

Summary

  • disable_state_root and enable_incremental_state_root are read from flashblocks_config once per block and never mutated, yet they lived in FlashblocksState which is cloned/forwarded via next() on every flashblock.

The remaining static fields on FlashblocksState (target_flashblock_count, gas_per_batch, da_per_batch, da_footprint_per_batch) would need a slightly bigger change because their values aren't known until after the fallback block builds (derived from computed flashblock schedule). But a similar refactor could be possible.

@julio4 julio4 changed the title refactor: move state root flags from FlashblocksState to OpPayloadBuilderCtx refactor: move config flags from FlashblocksState to OpPayloadBuilderCtx Apr 24, 2026
…lderCtx

`disable_state_root` and `enable_incremental_state_root` are read from
`flashblocks_config` once per block and never mutated, yet they lived in
`FlashblocksState` — which is cloned/forwarded on every flashblock. Move
them into `OpPayloadBuilderCtx` alongside the other per-block config so
they're set once and read directly at the call sites.
@avalonche avalonche force-pushed the refactor/state-root-flags-in-ctx branch from f735d32 to eb5c661 Compare April 24, 2026 18:49
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