Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace Payloadloadbuilder::on_missing_payload with a type that tells the service how to behave #8647

Closed
mattsse opened this issue Jun 6, 2024 · 0 comments · Fixed by #8649
Assignees
Labels
A-block-building Related to block building C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jun 6, 2024

Describe the feature

fn on_missing_payload(
&self,
args: BuildArguments<Pool, Client, OptimismPayloadBuilderAttributes, OptimismBuiltPayload>,
) -> Option<OptimismBuiltPayload> {

is a hook that is invoked when the CL requests the payload and the payload is still unavailable.

The reason this exists is want to give the payload builder a chance to react here and prevent building an empty payload.

however this currently can result redundant work for OP payload building because this effectively rebuilds the block in place instead of awaiting the wip payload.

this can easily replaced with an enum with following variants:

enum MissingPayloadBehaviour {
   AwaitInprogress,
   RaceBuildEmpty,
   UsePayload(Self::BuiltPayload)
}

for OP we want to use the AwaitInprogress variant

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled C-perf A change motivated by improving speed, memory usage or disk footprint A-block-building Related to block building and removed S-needs-triage This issue needs to be labelled labels Jun 6, 2024
@mattsse mattsse self-assigned this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-block-building Related to block building C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant