Is your feature request related to a problem? Please describe.
After #12056 aligned the default debug_trace* opcode (struct) tracer with execution-apis#762, two optional struct-log fields are still not emitted, leaving Nethermind short of the geth/Besu/Erigon/Reth default output:
refund — the accumulated gas-refund counter per step (others emit it when non-zero). This is the one field where Nethermind still diverges from the cross-client default.
returnData — per-step return data (others emit it only when enableReturnData is set; off by default, so omission is currently conformant).
Describe the solution you'd like
Emit both in the streaming (GethLikeTxDirectStreamingTracer) and in-memory (GethLikeTxMemoryTracer) tracers:
refund: include when non-zero, as the cumulative refund counter at each step (matching geth's pre-op GetRefund()).
returnData: include only when the enableReturnData flag is set.
Describe alternatives you've considered
Both fields are optional in execution-apis#762, so omitting them is spec-conformant — but emitting refund would match the cross-client majority.
Additional context
Deferred from #12056 because Nethermind exposes only per-op refund deltas via ReportRefund (no cumulative counter, no roll-back on reverted frames) and no per-step return-data buffer at the op-level hook, so both need EVM plumbing to implement correctly. Reference: go-ethereum eth/tracers/logger/logger.go.
Is your feature request related to a problem? Please describe.
After #12056 aligned the default
debug_trace*opcode (struct) tracer with execution-apis#762, two optional struct-log fields are still not emitted, leaving Nethermind short of the geth/Besu/Erigon/Reth default output:refund— the accumulated gas-refund counter per step (others emit it when non-zero). This is the one field where Nethermind still diverges from the cross-client default.returnData— per-step return data (others emit it only whenenableReturnDatais set; off by default, so omission is currently conformant).Describe the solution you'd like
Emit both in the streaming (
GethLikeTxDirectStreamingTracer) and in-memory (GethLikeTxMemoryTracer) tracers:refund: include when non-zero, as the cumulative refund counter at each step (matching geth's pre-opGetRefund()).returnData: include only when theenableReturnDataflag is set.Describe alternatives you've considered
Both fields are optional in execution-apis#762, so omitting them is spec-conformant — but emitting
refundwould match the cross-client majority.Additional context
Deferred from #12056 because Nethermind exposes only per-op refund deltas via
ReportRefund(no cumulative counter, no roll-back on reverted frames) and no per-step return-data buffer at the op-level hook, so both need EVM plumbing to implement correctly. Reference: go-ethereumeth/tracers/logger/logger.go.