Skip to content

refactor(payload): introduce FlashblockMeta#528

Open
julio4 wants to merge 1 commit into
mainfrom
refactor/flashblock-meta
Open

refactor(payload): introduce FlashblockMeta#528
julio4 wants to merge 1 commit into
mainfrom
refactor/flashblock-meta

Conversation

@julio4
Copy link
Copy Markdown
Member

@julio4 julio4 commented May 25, 2026

Group together single piece of data (derived from flashblock state) in the type system with FlashblockMeta.

BuilderTransactions trait still takes the two bools but a follow-up can swap the trait arg to &FlashblockMeta to get a self-consistent cursor flowing through the builder-tx API instead of a derived-bool pair.

Replace the `is_first_flashblock: bool, is_last_flashblock: bool` argument
pair (paired booleans derived from the same flashblock index) with a
named `FlashblockMeta` projection of `FlashblocksState`.

Adds a `FlashblocksState::meta()` accessor that yields a small
`{ flashblock_index, target_flashblock_count }` cursor with `is_first` /
`is_last` predicates, used at the three `add_builder_txs` call sites.

This is a tightly-scoped local rename: the `BuilderTransactions` trait
signature is unchanged, hooks are not introduced, and no Debug / Clone
bounds are added to the type parameters.
target_flashblock_count: u64,
}

impl FlashblockMeta {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not include other fields like the target count?

Copy link
Copy Markdown
Member Author

@julio4 julio4 May 27, 2026

Choose a reason for hiding this comment

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

The idea is that FlashblockMeta is a projection of FlashblocksState only for BuilderTx. And BuilderTx acts as some kind of pre-seal 'hook', so this projection can be expanded later on if needed but kept as minimal as possible now.

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