fix: debug_traceTransaction default param#9788
fix: debug_traceTransaction default param#9788macfarla wants to merge 8 commits intohyperledger:mainfrom
Conversation
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…ue, matching the documented API behavior Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
|
@lu-pinto can you review this one - the default param behavior is currently inconsistent between RPCs - this came up from looking at a docs PR hyperledger/besu-docs#1909 - in one spot we say the trace flags are all false by default but looking at the code that's not the case, and actually you currently get different behavior between passing no options and empty {} options |
| if (disableStackNullable() != null) { | ||
| builder.traceStack(!disableStack()); | ||
| } | ||
| var defaultTracerConfig = builder.traceOpcodes(opcodes()).build(); |
There was a problem hiding this comment.
nit: I know this was like this before but this name defaultTracerConfig could be misleading. At this stage these option are not default anymore, they are a mix of user set params and defaults, so probably would just call it tracerConfig
lu-pinto
left a comment
There was a problem hiding this comment.
Looks good, I think the default behavior for Geth is also to not show memory if not enabled. Make sense to align cases with empty params with no params at all
PR description
When reviewing docs PR 1909, claude picked up an inconsistency with default parameters when no params are supplied vs empty {} params - as described in #9787
Docs still needs correcting here to say disableMemory is true by default (all other booleans default to false) https://besu.hyperledger.org/public-networks/reference/api#debug_tracetransaction
Fixed Issue(s)
fixes #9787
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