besu
besu copied to clipboard
add engine_preparePayload_debug endpoint
PR description
Draft PR to enable debugging block proposals by re-adding an updated version of the deprecated
engine_preparePayload endpoint
be sure to use the current or a recent parent blockhash or you will DoS bonsai db example usage:
curl --location --request POST 'http://localhost:8551' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NTkwNDEzMzZ9.4PDdSaG9hFOFR4Th7rEgaKKECsXfz6IPckFRcfSP13o' \
--data-raw '{
"jsonrpc":"2.0",
"method":"engine_preparePayload_debug",
"params":
[
{
"parentHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"timestamp": "0x0",
"prevRandao": "0x0"
}
],
"id":1
}'
Fixed Issue(s)
Documentation
- [ ] I thought about documentation and added the
doc-change-requiredlabel to this PR if updates are required.
Changelog
- [ ] I thought about the changelog and included a changelog update if required.
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.
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
Hi Gary, can this be closed since it's been merged as part of another PR?
Hi Gary, can this be closed since it's been merged as part of another PR?
this was merged in a speculative RC candidate, and isn't in main yet.
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
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