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

Integrate ExecutedBlock in BuiltPayload #10159

Closed
Tracked by #8742
mattsse opened this issue Aug 7, 2024 · 0 comments · Fixed by #10216
Closed
Tracked by #8742

Integrate ExecutedBlock in BuiltPayload #10159

mattsse opened this issue Aug 7, 2024 · 0 comments · Fixed by #10216

Comments

@mattsse
Copy link
Collaborator

mattsse commented Aug 7, 2024

I would be beneficial to also retrieve the ExecutedBlock from a resolved payload so that we can immediately insert this into the tree ref #10158

this can be achieved by extending the trait for the BuiltPayload:

pub trait BuiltPayload: Send + Sync + std::fmt::Debug {

so that it returns an Option for ExecutedBlock, this should be an option because the payload builder can be anywhere (e.g. a different process)

the main loop can then subscribe to resolved payloads via:

/// Payload events handler, used to broadcast and subscribe to payload events.
payload_events: broadcast::Sender<Events<Engine>>,

/// The built payload that has been just built.
/// Triggered by the CL whenever it asks for an execution payload.
/// This event is only thrown if the CL is a validator.
BuiltPayload(Engine::BuiltPayload),

and if it has an ExecutedBlock we can insert this directly into the tree (#10158)

TODO

  1. introduce the Option as trait function
  2. change
    pub struct EthBuiltPayload {
    and
    pub struct OptimismBuiltPayload {
    so that they also keep ExecutedBlock
  3. integrate in main loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant