[SharovBot] fix: add 0x prefix to structLogs storage keys/values in debug_traceCall#20647
[SharovBot] fix: add 0x prefix to structLogs storage keys/values in debug_traceCall#20647erigon-copilot[bot] wants to merge 3 commits into
Conversation
…ebug_traceCall
FormatLogs() was formatting storage map keys and values using
fmt.Sprintf("%x", ...) which produces bare hex without the 0x prefix.
The reference implementation returns storage keys/values with 0x prefix
(e.g. "0x2fa8c5322c..."), but Erigon was returning "2fa8c5322c...".
Fix: use common.Hash.Hex() which internally calls hexutil.Encode()
and properly produces 0x-prefixed hex strings for both keys and values.
This affects both rpc/ethapi/api.go (FormatLogs used by debug_traceCall,
debug_traceTransaction, etc.) and the duplicate copy in
execution/tracing/tracers/logger/logger.go.
Fixes mainnet-rpc-integ-tests-latest CI failure consistently seen across
all 10 recent release/3.4 commits (debug_traceCall/test_43.json).
Refs: https://github.com/erigontech/erigon/actions/runs/24602505567/job/71943405095
Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
|
[SharovBot] The Failing job: https://github.com/erigontech/erigon/actions/runs/24602883581/job/71944385182 This suggests that the Before merging, the fix needs to either:
The |
…raceCall) Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
|
[SharovBot] The initial fix only patched Added a follow-up commit to fix the streaming path:
This should resolve the remaining |
|
[SharovBot] CI analysis update (release/3.4 monitor run — 2026-04-22T20:25:49Z) The Root cause: The Evidence:
The Action needed: A PR to erigontech/rpc-tests is required to regenerate the 57 affected test fixtures with the correct |
|
This PR is substituted by #20478 |
[SharovBot]
Problem
mainnet-rpc-integ-tests-latestCI has been failing on every commit torelease/3.4branch (10/10 commits) due to a mismatch indebug_traceCall/test_43.json.The diff shows:
The reference implementation returns storage keys/values with
0xprefix, but Erigon was returning bare hex.Root Cause
FormatLogs()in bothrpc/ethapi/api.goandexecution/tracing/tracers/logger/logger.goformats storage map keys and values using:%xformat verb produces bare hex without the0xprefix.Fix
Use
common.Hash.Hex()which callshexutil.Encode()and produces properly0x-prefixed output:Impact
Affects
debug_traceCall,debug_traceTransaction,debug_traceBlock,debug_traceBlockByNumber, and any other endpoint that usesFormatLogs()for structLog output.Testing
go build ./rpc/... ./execution/tracing/...release/3.4commits confirms this is a regression, not flaky