refactor(payload): introduce FlashblockMeta#528
Open
julio4 wants to merge 1 commit into
Open
Conversation
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.
avalonche
reviewed
May 26, 2026
| target_flashblock_count: u64, | ||
| } | ||
|
|
||
| impl FlashblockMeta { |
Collaborator
There was a problem hiding this comment.
why not include other fields like the target count?
Member
Author
There was a problem hiding this comment.
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.
avalonche
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Group together single piece of data (derived from flashblock state) in the type system with FlashblockMeta.
BuilderTransactionstrait still takes the two bools but a follow-up can swap the trait arg to&FlashblockMetato get a self-consistent cursor flowing through the builder-tx API instead of a derived-bool pair.