Skip to content

Conversation

mkykadir
Copy link

No description provided.

src/server.rs Outdated

enum PayloadVersion {
V3,
V4(Vec<Bytes>),
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of the payload version encapsulating the execution requests for the v4 new payload request, why not have a structure that encapsulates all the args for the new_payload method as an enum

Copy link
Author

Choose a reason for hiding this comment

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

can you elaborate on this?

Copy link
Collaborator

@avalonche avalonche Mar 6, 2025

Choose a reason for hiding this comment

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

payload version will just contain the version

enum PayloadVersion {
     V3,
     V4,

and new payload will accept an envelope

new_payload_v4() {
        let res = self
             .new_payload(
                 OpExecutionPayloadEnvelope{
                 OpExecutionPayloadEnvelopeV4{
                 execution_requests,
                 payload,
                 versioned_hashes,
                 parent_beacon_block_root,
}
}
             )
             .await;
}
new_payload_v3() {
        let res = self
             .new_payload(
                 OpExecutionPayloadEnvelope{
                 OpExecutionPayloadEnvelopeV3{
                 payload,
                 versioned_hashes,
                 parent_beacon_block_root,
}
}
             )
             .await;
}

Copy link
Author

Choose a reason for hiding this comment

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

OpExecutionenvelopeV(3/4) is from Alloy and fields are not similar to calls of new_payload but followed another approach in 4eb5e51

src/client.rs Outdated

pub async fn new_payload_v4(
&self,
payload: ExecutionPayloadV3,
Copy link
Collaborator

@0xOsiris 0xOsiris Mar 6, 2025

Choose a reason for hiding this comment

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

Copy link
Collaborator

@0xOsiris 0xOsiris Mar 6, 2025

Choose a reason for hiding this comment

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

The v4 Engine API to my understanding is introduced in the isthmus hard fork adding an additional withdrawalsRoot to the execution payload

https://specs.optimism.io/protocol/isthmus/exec-engine.html

This deviates from the v4 engine api on l1

Copy link
Author

Choose a reason for hiding this comment

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

added in 16e9a4b

src/server.rs Outdated

async fn new_payload_v4(
&self,
payload: ExecutionPayloadV3,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here - should be OpExecutionPayloadV4 I believe

Copy link
Author

Choose a reason for hiding this comment

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

added in 16e9a4b

Copy link

vercel bot commented Mar 7, 2025

@mkykadir is attempting to deploy a commit to the Flashbots Team on Vercel.

A member of the Team first needs to authorize it.

`OpExecutionPayloadV4` for `new_payload_v4`
@avalonche
Copy link
Collaborator

could you add an integration test for v4 support?

@ferranbt
Copy link
Contributor

ferranbt commented Apr 2, 2025

Hey, thank you for the contribution. I am closing this in favour of #159 which is rebased on top of main.

@ferranbt ferranbt closed this Apr 2, 2025
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.

4 participants