Skip to content

Commit bb68dcd

Browse files
lupin012claude
authored andcommitted
rpc align debug trace flags with execution-apis spec (erigontech#762) (erigontech#20755)
Replace disableMemory/disableReturnData (opt-out, default ON) with enableMemory/enableReturnData (opt-in, default OFF) to match the ethereum/execution-apis#762 spec and Geth behavior. Also adds returnData emission to JsonStreamLogger which was previously missing. evm tool flags (--nomemory/--noreturndata) preserve existing behavior. needs Rpc-test tag --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c4925f2 commit bb68dcd

15 files changed

Lines changed: 132 additions & 32 deletions

.github/workflows/qa-rpc-integration-tests-gnosis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
uses: actions/cache@v5
7474
with:
7575
path: ${{ runner.workspace }}/rpc-tests
76-
key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-v2.7.0
76+
key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-v2.8.1
7777

7878
- name: Run RPC Integration Tests
7979
id: test_step

.github/workflows/qa-rpc-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
uses: actions/cache@v5
7474
with:
7575
path: ${{ runner.workspace }}/rpc-tests
76-
key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-v2.7.0
76+
key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-v2.8.1
7777

7878
- name: Run RPC Integration Tests
7979
id: test_step

.github/workflows/scripts/run_rpc_tests_ethereum.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ DISABLED_TEST_LIST=(
4343
DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}")
4444

4545
# Call the main test runner script with the required and optional parameters
46-
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.7.0 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"
46+
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"

.github/workflows/scripts/run_rpc_tests_ethereum_latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ DISABLED_TEST_LIST=(
3434
DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}")
3535

3636
# Call the main test runner script with the required and optional parameters
37-
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.7.0 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" "latest" "$REFERENCE_HOST" "do-not-compare-error-message" "$DUMP_RESPONSE"
37+
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" "latest" "$REFERENCE_HOST" "do-not-compare-error-message" "$DUMP_RESPONSE"

.github/workflows/scripts/run_rpc_tests_gnosis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ DISABLED_TEST_LIST=(
2222
DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}")
2323

2424
# Call the main test runner script with the required and optional parameters
25-
"$(dirname "$0")/run_rpc_tests.sh" gnosis v2.7.0 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"
25+
"$(dirname "$0")/run_rpc_tests.sh" gnosis v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"
2626

.github/workflows/scripts/run_rpc_tests_remote_ethereum.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ DISABLED_TEST_LIST=(
3131
DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}")
3232

3333
# Call the main test runner script with the required and optional parameters
34-
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.7.0 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"
34+
"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR"

ChangeLog.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Changelog
22

3+
## [3.5.0] – 2026-04-25
4+
5+
### Breaking Changes
6+
7+
#### `debug_trace*` RPC: `enableMemory` / `enableReturnData` replace `disableMemory` / `disableReturnData`
8+
9+
Aligns Erigon with the execution-apis specification ([ethereum/execution-apis#762](https://github.com/ethereum/execution-apis/pull/762)) and Geth behavior.
10+
11+
**What changed:**
12+
13+
| Field | Before (Erigon) | After (Erigon / Geth / Spec) |
14+
|-------|-----------------|------------------------------|
15+
| Memory in trace | `disableMemory` (default: included) | `enableMemory` (default: excluded) |
16+
| Return data in trace | `disableReturnData` (default: included) | `enableReturnData` (default: excluded) |
17+
18+
The change is **twofold**:
19+
1. The JSON key is renamed (`disable*``enable*`).
20+
2. The default value is inverted: previously memory and return data were **included** by default (opt-out model); now they are **excluded** by default (opt-in model), matching the spec and Geth.
21+
22+
**Migration:**
23+
24+
```jsonc
25+
// Before — disable memory explicitly
26+
{ "disableMemory": true }
27+
28+
// After — enable memory explicitly
29+
{ "enableMemory": true }
30+
31+
// Before — memory included by default (no flag needed)
32+
{}
33+
34+
// After — must opt in
35+
{ "enableMemory": true }
36+
```
37+
38+
Affected RPC methods: `debug_traceTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`.
39+
40+
---
41+
342
## [3.3.0] – 2025-11-17
443

544
### Added

cmd/evm/internal/t8ntool/transition.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ func Main(ctx *cli.Context) error {
121121
if ctx.Bool(TraceFlag.Name) {
122122
// Configure the EVM logger
123123
logConfig := &trace_logger.LogConfig{
124-
DisableStack: ctx.Bool(TraceDisableStackFlag.Name),
125-
DisableMemory: ctx.Bool(TraceDisableMemoryFlag.Name),
126-
DisableReturnData: ctx.Bool(TraceDisableReturnDataFlag.Name),
127-
Debug: true,
124+
DisableStack: ctx.Bool(TraceDisableStackFlag.Name),
125+
EnableMemory: !ctx.Bool(TraceDisableMemoryFlag.Name),
126+
EnableReturnData: !ctx.Bool(TraceDisableReturnDataFlag.Name),
127+
Debug: true,
128128
}
129129
var prevFile *os.File
130130
// This one closes the last file

cmd/evm/runner.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ func runCmd(ctx *cli.Context) error {
151151
log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(ctx.Int(VerbosityFlag.Name)), log.StderrHandler))
152152
}
153153
logconfig := &logger.LogConfig{
154-
DisableMemory: ctx.Bool(DisableMemoryFlag.Name),
155-
DisableStack: ctx.Bool(DisableStackFlag.Name),
156-
DisableStorage: ctx.Bool(DisableStorageFlag.Name),
157-
DisableReturnData: ctx.Bool(DisableReturnDataFlag.Name),
158-
Debug: ctx.Bool(DebugFlag.Name),
154+
EnableMemory: !ctx.Bool(DisableMemoryFlag.Name),
155+
DisableStack: ctx.Bool(DisableStackFlag.Name),
156+
DisableStorage: ctx.Bool(DisableStorageFlag.Name),
157+
EnableReturnData: !ctx.Bool(DisableReturnDataFlag.Name),
158+
Debug: ctx.Bool(DebugFlag.Name),
159159
}
160160

161161
var (

cmd/evm/staterunner.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ func stateTestCmd(ctx *cli.Context) error {
6868

6969
// Configure the EVM logger
7070
config := &logger.LogConfig{
71-
DisableMemory: ctx.Bool(DisableMemoryFlag.Name),
72-
DisableStack: ctx.Bool(DisableStackFlag.Name),
73-
DisableStorage: ctx.Bool(DisableStorageFlag.Name),
74-
DisableReturnData: ctx.Bool(DisableReturnDataFlag.Name),
71+
EnableMemory: !ctx.Bool(DisableMemoryFlag.Name),
72+
DisableStack: ctx.Bool(DisableStackFlag.Name),
73+
DisableStorage: ctx.Bool(DisableStorageFlag.Name),
74+
EnableReturnData: !ctx.Bool(DisableReturnDataFlag.Name),
7575
}
7676
cfg := vm.Config{}
7777
if machineFriendlyOutput {

0 commit comments

Comments
 (0)