-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add cast command to convert beacon payload to execution payload b2e-payload
#11629
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
Add cast command to convert beacon payload to execution payload b2e-payload
#11629
Conversation
Have a couple of observations/questions @mattsse @shekhirin @jenpaff @zerosnacks, with this simple draft :
|
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.
good start, some suggestions, ideas
Right now I extract the payload from the example json given this path message.body.execution_payload, but I guess there are more beacon block json formats, depending on the api providers, do we want to support a couple ?
yep we could introduce an untagged enum
crates/cast/src/cmd/b2e_payload.rs
Outdated
// TODO: check if we used this format and this method engine version | ||
let json_rpc_request = serde_json::json!({ | ||
"jsonrpc": "2.0", | ||
"method": "engine_newPayloadV3", |
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.
for this wee need some --version argument as well
and we need to do some additional work here, because these endpoint take additional args:
crates/cast/src/cmd/b2e_payload.rs
Outdated
// TODO: check if we used this format and this method engine version | ||
let json_rpc_request = serde_json::json!({ | ||
"jsonrpc": "2.0", | ||
"method": "engine_newPayloadV3", |
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.
let's either not do this conversion to Engine API -compatible request format at all, or do it optionally with an argument. The motivation to just have the execution payload in output is to be able to pipe this into reth-bench send-payload
that accepts and RPC block.
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.
@shekhirin @mattsse I decided to remove it now - I can add in another pr follow-up and maybe we need some helper in alloy to make it cleaner.
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.
lgtm!
Motivation
Closes #11603.
Solution
Add sub-command
b2e-payload
to convert execution payload from beacon block to rpc execution payload.e.g.:
File downloaded from these instructions :
PR Checklist