Skip to content

Conversation

@alessandromazza98
Copy link
Contributor

@alessandromazza98 alessandromazza98 commented Dec 5, 2025

This PR makes it possible to actually return the Platform specific context in the build_payload fn of the Platform trait.

This way you can use the platform specific context there to do what you need. Otherwise you get a generic P::CheckpointContext type that you cannot really use.

Before this PR:

fn build_payload<P>(
    payload: Checkpoint<P>,
    provider: &dyn StateProvider,
    ) -> Result<types::BuiltPayload<P>, PayloadBuilderError>
    where
    P: PlatformExecBounds<Self>,
    {
        // here is just the generic P::CheckpointContext
        let my_context = payload.context();
        ...
}

With this PR:

fn build_payload<P>(
    payload: Checkpoint<P>,
    provider: &dyn StateProvider,
    ) -> Result<types::BuiltPayload<P>, PayloadBuilderError>
    where
    P: PlatformExecCtxBounds<Self>,
    {
        // here is the very specific type, and you access all its inner elements
        let my_context = payload.context();
        ...
}

@alessandromazza98
Copy link
Contributor Author

can you merge it? or is there any question? thanks

@karim-agha karim-agha merged commit a1f087d into flashbots:main Dec 6, 2025
4 checks passed
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