-
Notifications
You must be signed in to change notification settings - Fork 995
add engine_preparePayload_debug endpoint #4427
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 engine_preparePayload_debug endpoint #4427
Conversation
5daa0ad to
d2a46f4
Compare
|
Since this is a debug method, would it be simpler to use if it always built on the chainhead? It would be less timing/juggling when it is being used. |
yes, yes it would 👍 . I think we can do the same thing we do with timestamp and default it to the current head if it is otherwise not specified |
a08359a to
097264e
Compare
0cb6ee6 to
097e121
Compare
|
Hi Gary, can this be closed since it's been merged as part of another PR? |
097e121 to
35c9fb9
Compare
this was merged in a speculative RC candidate, and isn't in main yet. |
bd81e68 to
0166200
Compare
|
can we close or re-status this @garyschulte ? |
|
IMO we should rebase and merge as it is useful for debugging proposals. @fab-10 was using a different mechanism to test proposals IIRC, so would be helpful to get his opinion |
It make sense to have this endpoint as well, it is an easier and fast method to trigger a payload creation |
...hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EnginePreparePayloadDebug.java
Outdated
Show resolved
Hide resolved
...hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/EnginePreparePayloadParameter.java
Outdated
Show resolved
Hide resolved
0166200 to
154f2fb
Compare
| ENGINE_GET_PAYLOAD_BODIES_BY_RANGE_V1("engine_getPayloadBodiesByRangeV1"), | ||
| ENGINE_EXCHANGE_CAPABILITIES("engine_exchangeCapabilities"), | ||
|
|
||
| ENGINE_PREPARE_PAYLOAD_DEBUG("engine_preparePayload_debug"), |
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.
Here is a tricky question, shouldn't this method be in the debug set? Another reason to move that is, the way we built the engine_exchange_capabilities mean Besu might report this method. CL is probably going to ignore it though.
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.
DEBUG is present even if the ENGINE api is not, so I think this needs to live within engine api. Good point about the capabilities though 🤔 I will check to see if this causes problems for CLs
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.
What about a ENGINE_DEBUG set? So it is separated from ENGINE and can be enabled only if used
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 filtered the debug prepare payload from the capabilities list in the same way the capabilities list filters itself 👍
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.
just saw the ENGINE_DEBUG set suggestion. I think we could add something like that if we have more than one engine debug endpoint in the future 👍 . Rule of three applies in this case IMO
...hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EnginePreparePayloadDebug.java
Outdated
Show resolved
Hide resolved
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
…, unit test coverage Signed-off-by: garyschulte <[email protected]>
154f2fb to
c845900
Compare
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
macfarla
left a comment
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
Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
PR description
PR to enable debugging block proposals by re-adding an updated version of the deprecated
engine_preparePayloadendpointbe sure to use the current or a recent parent blockhash or you will DoS bonsai db
All fields in the parameter are optional, including the parameter itself
example usage:
OR, this usage will use fee recipient 0x00..00, current timestamp, current chain head, "deadbeef" prevrandao, and empty withdrawals:
Fixed Issue(s)
Documentation
doc-change-requiredlabel to this PR ifupdates are required.
Changelog