-
Notifications
You must be signed in to change notification settings - Fork 377
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
Engine API: define payload bodies requests #352
Conversation
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, thanks for the rebase!
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
I am wondering how we can make these methods future compatible with
|
src/engine/shanghai.md
Outdated
1. Client software **MUST** support `count` values of at least 32 blocks. | ||
|
||
1. Client software **MUST** place `null` in the response array for any blocks that have been pruned or where the request extends past the current latest known 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.
Shouldn't this be determinable by the number of responses? Is there ever a case where there would be a gap? Right now, I expect every request over a boundary to be like:
-> engine_getPayloadBodiesByRangeV1(100, 5)
<- [block_101, block_102, null, null, null]
Basically I think the trailing nulls are redundant info.
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 point. @arnetheduck why would CL need trailing nulls?
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.
I don't think it matters greatly either way - we have to consider that a syncing client cannot reliably tell if it should be a null or not past its own head, so we can just pick one "style" and go with it.
Arguably, not sending "null" carries the "I don't know" distinction vs "I know there's nothing past that block" as happens with a historical request over a boundary where the EL "knows" there are blocks after the gap, so it might indeed be better to not include the null for any request past head.
I'm not convinced there's much to do on this front - ie a client that doesn't understand v2 will not be able to do anything (significantly) better - ie maybe show an informational log to the user that the fork that they're on no longer is supported by the connected EL.. a v2 client on the other hand will already know what to do. |
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
I have added a requirement to set |
Very basic implementation for get payload bodies rpc calls. Once we have Hive tests for these calls I can pick this back up and work through any issues. Implementation of ethereum/execution-apis#352.
The steal of #218 (I hope @arnetheduck doesn't mind) as we need this change in Shanghai ASAP.
Differences from the original PR:
withdrawals
are added toExecutionBlockBodyV1
structengine_getPayloadBodiesByRangeV1
isn't optional and must be supported by all EL clientsRESP_TIMEOUT
param value from the p2p-interface specnil
is replaced bynull
to follow JSON format