feat(debug): add enableReturnData param and returnData field #10172
Conversation
34157f0 to
eccea00
Compare
|
@macfarla Kindly take a look at once. |
|
This PR doesn't include any unit tests. Would be good to add at least: a test that returnData is captured or absent. |
Thanks @parthdagia05 for the review.
|
50a99e3 to
b5de795
Compare
|
@sagarkhandagre998 @JsonPropertyOrder needs returnData without it, Jackson serializes the field at an arbitrary position, breaking spec-expected ordering: @JsonPropertyOrder({"pc", "op", "gas", "gasCost", "depth", "refund", "stack", "memory", "returnData", "storage"}) |
@jframe is this correct behavior ? |
03b7e20 to
32b2fa6
Compare
macfarla
left a comment
There was a problem hiding this comment.
some comments, please take a look
b7e5253 to
f286618
Compare
|
@macfarla Kindly take a look |
macfarla
left a comment
There was a problem hiding this comment.
prob worth a changelog entry
6a0baf0 to
f4c7489
Compare
|
@macfarla All Done , Please take a look. |
macfarla
left a comment
There was a problem hiding this comment.
@sagarkhandagre998 spotless check is failing. before you ask for review, run gradlew build locally and ensure code builds and passes tests. reviewer's time is precious and limited.
|
@sagarkhandagre998 can you merge latest main and resolve conflicts |
41cc7d3 to
a216246
Compare
@macfarla Done. |
|
@sagarkhandagre998 I'm going to run the checks but you'll also need to resolve conflicts in changelog |
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
…nsures empty return buffer is omitted even when traceReturnData is enabled Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
…tests. Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
a216246 to
1fd88ab
Compare
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
7f90075 to
9bddf72
Compare
@macfarla we can run the checks |
…h#10172) * implements test by priority Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com> * add returnData field in the correct order - EIP-3155 Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com> * applying a targeted fix in captureReturnData and adding a test that ensures empty return buffer is omitted even when traceReturnData is enabled Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com> --------- Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
PR description
Add
enableReturnDataparam andreturnDatafieldPart of aligning Besu's debug RPC endpoints with the execution-apis spec.
What changed:
TransactionTraceParams— new optionalenableReturnDataboolean param (defaultfalse)DebugOperationTracer— capturesframe.getReturnData()per opcode when enabledTraceFrame— carries the captured return data buffer through the trace pipelineStructLog— serializesreturnDataas a hex string; field is omitted from JSON when not enabledBehaviour:
enableReturnData: false(default) — no change to existing responsesenableReturnData: true— each StructLog entry includes areturnDatafield containing the EVM return data buffer (populated after CALL/CREATE/etc.) as a0x-prefixed hex stringFixed Issue(s)
Refs #10115
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests