-
Notifications
You must be signed in to change notification settings - Fork 66
feat: v4 payload support #121
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
Conversation
alloy & reth v1.2.0
src/server.rs
Outdated
|
||
enum PayloadVersion { | ||
V3, | ||
V4(Vec<Bytes>), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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;
}
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be OpExecutionPayloadV4
Reth Implementation:
https://github.com/paradigmxyz/reth/blob/a765af9e6b7cf1b0332bb1d132ed09530f055c42/crates/optimism/rpc/src/engine.rs#L82
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 16e9a4b
@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`
could you add an integration test for v4 support? |
Hey, thank you for the contribution. I am closing this in favour of #159 which is rebased on top of main. |
No description provided.