besu icon indicating copy to clipboard operation
besu copied to clipboard

add engine_preparePayload_debug endpoint

Open garyschulte opened this issue 3 years ago • 2 comments

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-required label to this PR if updates are required.

Changelog

garyschulte avatar Sep 22 '22 21:09 garyschulte

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.

jflo avatar Sep 27 '22 14:09 jflo

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

garyschulte avatar Oct 05 '22 20:10 garyschulte

Hi Gary, can this be closed since it's been merged as part of another PR?

gfukushima avatar Jan 20 '23 09:01 gfukushima

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.

garyschulte avatar Feb 23 '23 19:02 garyschulte

can we close or re-status this @garyschulte ?

non-fungible-nelson avatar Apr 13 '23 19:04 non-fungible-nelson

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

garyschulte avatar Apr 13 '23 19:04 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

fab-10 avatar Apr 18 '23 12:04 fab-10