Skip to content

Conversation

@Farukest
Copy link
Contributor

Summary

Remove the FlashblocksExtraCtx struct and inline its fields directly into OpPayloadBuilderCtx. This eliminates an unnecessary layer of indirection since flashblocks is now the only builder mode.

Changes

  • Move all FlashblocksExtraCtx fields into OpPayloadBuilderCtx
  • Replace with_extra_ctx() with with_next_flashblock()
  • Update all ctx.extra.xxx usages to ctx.xxx
  • Return tuple instead of struct from build_next_flashblock()

Test plan

  • cargo check -p op-rbuilder passes
  • cargo check -p op-rbuilder --tests passes

Closes #443

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 14, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Copy link
Collaborator

@haardikk21 haardikk21 left a comment

Choose a reason for hiding this comment

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

minor nits

Pool: PoolBounds,
Client: ClientBounds,
{
#[allow(clippy::too_many_arguments)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah i dont love this, but i guess its fine for now

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea I'm not sure this is worth it

@Farukest Farukest force-pushed the chore/remove-flashblocks-extra-context branch from 8a04383 to f625850 Compare January 14, 2026 14:45
@Farukest
Copy link
Contributor Author

minor nits

All done @haardikk21 let me know if anything else needs

haardikk21
haardikk21 previously approved these changes Jan 14, 2026
Copy link
Collaborator

@haardikk21 haardikk21 left a comment

Choose a reason for hiding this comment

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

LGTM, will wait for another review before merge

@Farukest Farukest force-pushed the chore/remove-flashblocks-extra-context branch from f625850 to 5f82ea2 Compare January 14, 2026 20:26
Copy link
Collaborator

@danyalprout danyalprout left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Can you please fix the tests/clippy and I'll approve

Remove FlashblocksExtraCtx struct and inline its fields directly into
OpPayloadBuilderCtx. This simplifies the code by eliminating an
unnecessary layer of indirection.

- Move all FlashblocksExtraCtx fields into OpPayloadBuilderCtx
- Replace with_extra_ctx() with with_next_targets()
- Update all ctx.extra.xxx usages to ctx.xxx
- Return tuple instead of struct from build_next_flashblock()
- Remove redundant flashblock_index() and target_flashblock_count() getters

Closes base#443
@haardikk21 haardikk21 force-pushed the chore/remove-flashblocks-extra-context branch from a12683c to d043ba2 Compare January 15, 2026 17:10
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

I don't think this is worth it. The previous encapsulation of flashblock-related context made OpPayloadBuilderCtx a lot more approachable. We're pretty much just inlining for the sake of inlining here with no real benefit / reduction in logic. I'd prefer not to merge this change.

@refcell
Copy link
Contributor

refcell commented Jan 15, 2026

Going to close this for now. Preference for the encapsulated way

@refcell refcell closed this Jan 15, 2026
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.

chore(builder): remove flashblocks extra context

5 participants