Skip to content

feat: continuous-build mode#458

Open
julio4 wants to merge 1 commit into
mainfrom
feat/continuous-flashblock-build
Open

feat: continuous-build mode#458
julio4 wants to merge 1 commit into
mainfrom
feat/continuous-flashblock-build

Conversation

@julio4
Copy link
Copy Markdown
Member

@julio4 julio4 commented Apr 9, 2026

📝 Summary

Adds a continuous flashblock building mode (under --flashblocks.continuous-build flag) that pre-seals candidates between scheduler triggers, so the best block is ready for instant publish when the timer fires.

@julio4 julio4 force-pushed the reapply-async-payload-builder branch from d83dffd to cbe4b7a Compare April 15, 2026 06:45
@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch from 895a4a2 to d45b137 Compare April 15, 2026 07:53
Base automatically changed from reapply-async-payload-builder to main April 16, 2026 10:21
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/metrics.rs
@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch from d45b137 to 3435df5 Compare April 19, 2026 02:45
Comment thread crates/op-rbuilder/src/builder/payload.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/builder/service.rs
Comment thread crates/op-rbuilder/src/builder/payload.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
@avalonche
Copy link
Copy Markdown
Collaborator

did you push your changes correctly? don't see code changes for comments

@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch 2 times, most recently from 932b00a to 88c1026 Compare April 27, 2026 09:44
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous.rs Outdated
@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch 5 times, most recently from 9fc7ebc to 8a3b18e Compare May 6, 2026 10:17
Comment thread crates/op-rbuilder/src/builder/continuous/interval.rs
Comment thread crates/op-rbuilder/src/builder/continuous/shared_best.rs Outdated
Comment thread crates/op-rbuilder/src/builder/continuous/candidate_loop.rs Outdated
Comment on lines +58 to +68
_ = deps.payload_cancel.cancelled() => {
Self::record_cancellation_reason(self.metrics(), deps.payload_cancel, deps.span);
self.record_flashblocks_metrics(
&interval.base_ctx,
&interval.base_fb_state,
&interval.base_info,
target_flashblocks,
deps.span,
);
return Ok(());
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

payload_cancel is triggered when we receive the getPayload call, right? I figured we could publish the last flashblock then as well but here you're just exiting the loop. Is it not possible to do that? We would end up solving the race with ending block building and sending the last flashblock if possible

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

payload_cancel is triggered when one of these fire: getPayload received, payload deadline reached, new FCU received.

I assumed that last trigger should always arrive before getPayload, but I agree with you this would be a nice improvement to submit last flashblock here if it's not the case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

definitely, i think leveraging PayloadJobCancellation would be a good idea

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes but let's do this as a follow up

Comment thread crates/op-rbuilder/src/builder/continuous/transition.rs
Comment thread crates/op-rbuilder/src/builder/continuous/publish.rs Outdated
@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch 3 times, most recently from 64fa2f5 to e5e6711 Compare May 8, 2026 07:26
Comment on lines +90 to +92
pub(super) base_ctx: OpPayloadJobCtx,
pub(super) base_fb_state: FlashblocksState,
pub(super) base_info: ExecutionInfo,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are these fields just used for metrics? if so can you find a better way of recording those metrics instead of carrying these clones around? It's not clear otherwise why you would need to duplicate this info from BuildState

@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch 3 times, most recently from 940ea59 to b1e6208 Compare May 25, 2026 05:44
@julio4 julio4 force-pushed the feat/continuous-flashblock-build branch from b1e6208 to 83fd70d Compare May 27, 2026 07:37
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.

3 participants