go-ethereum/eth/tracers/logger
Chase Wright c787778ed4
eth/tracers/logger: fix legacy structLog JSON encoding
Fix several issues in the legacy structLog JSON format produced by the
struct logger tracer:

- Error field: change from string to *string so that error is truly
  omitted (rather than serialised as "") when there is no error.
- Memory words: zero-pad each 32-byte chunk before hex-encoding so the
  output always matches the expected 64-character format instead of
  emitting a truncated hex string for partial words.
- Storage/ReturnData: use hexutil.Encode / common.Hash.Hex() to produce
  consistent 0x-prefixed output rather than bare %x formatting.

Add tests that cover the legacy JSON shape directly (TestStructLogLegacyJSONSpecFormatting),
and two integration-level tracer tests verifying that refund counters and
storage snapshots are captured correctly and that hard-failure vs revert
return values are handled as specified.
2026-03-26 10:34:02 -05:00
..
access_list_tracer.go eth/tracers: fix accessList StorageKeys return null (#33976) 2026-03-11 11:46:49 +08:00
gen_callframe.go t8ntool: add optional call frames to json logger (#29353) 2024-03-27 16:12:57 +01:00
gen_structlog.go eth/tracers/logger: make structlog/json-log stack hex again (#28628) 2023-12-05 09:37:48 +01:00
logger.go eth/tracers/logger: fix legacy structLog JSON encoding 2026-03-26 10:34:02 -05:00
logger_json.go eth/tracers/logger: fix json-logger output missing (#30804) 2024-11-25 10:07:50 +01:00
logger_test.go eth/tracers/logger: fix legacy structLog JSON encoding 2026-03-26 10:34:02 -05:00