> ## Documentation Index
> Fetch the complete documentation index at: https://seilabs-docs-bridge-release-v6-7-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Tracing Overview

> Comprehensive guide to debugging and tracing EVM transactions on Sei. Learn to analyze transaction execution, optimize gas usage, and troubleshoot smart contracts with real examples and end-to-end workflows.

## Requirements

The examples in this guide call the debug JSON-RPC endpoints directly with `curl`. You do not need an SDK or other libraries. To pretty-print the JSON responses, you can install [`jq`](https://jqlang.github.io/jq/):

```bash theme={"dark"}
# macOS
brew install jq

# Debian/Ubuntu
sudo apt-get install jq
```

Debug tracing is your primary tool to understand how EVM transactions execute on Sei. With it, you can analyze transaction flow, optimize gas usage, debug smart contract interactions, and troubleshoot production issues.

## What you can trace

### Transaction execution

* Step-by-step opcode execution
* Contract call hierarchy
* Gas consumption breakdown
* State changes and storage access

### Contract interactions

* Cross-contract calls and returns
* Event emission analysis
* Precompile usage tracking
* External library calls

### Performance analysis

* Gas optimization opportunities
* Bottleneck identification
* Cache hit and miss patterns
* State access efficiency

### Security analysis

* Suspicious operation detection
* Reentrancy pattern analysis
* Access control verification
* Vulnerability scanning

## Available tracing methods

| Method | Purpose | Use case |
| - | - | - |
| `debug_traceTransaction` | Trace a specific transaction | Debugging failed transactions |
| `debug_traceBlockByNumber` | Trace an entire block | Block-level analysis |
| `debug_traceCall` | Simulate and trace | Testing before execution |
| `debug_traceStateAccess` | State access patterns | Performance optimization |

<Note>`debug_traceStateAccess` respects the node's configured `TraceTimeout`. If the trace deadline elapses during replay or serialization, the call aborts with a `context deadline exceeded` error instead of running unbounded. Additionally, the per-module state-access log is capped at 4 MiB of retained key/value payload. When a module exceeds this cap, its trace dump sets `"truncated": true`: the `reads`/`has` fields then reflect only the retained prefix, while the `stats` (operation counts and durations) remain complete and accurate.</Note>
\| `debug_traceTransactionProfile` | Trace plus timing/store-access profiling | Latency breakdown and DB-access analysis |

## Transaction analysis example

This example traces an ERC-20 transfer transaction:

<Tabs>
  <Tab title="Transaction Details">
    ```bash theme={"dark"}
    # Real transaction on Sei Mainnet
    TRANSACTION_HASH="0x75b7ba10248e90db85b224eae587db1728520b6f72c795b9185064f444cee7c3"

    # Transaction details

    curl -X POST -H "Content-Type: application/json" \
     --data '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": ["'$TRANSACTION_HASH'"],
    "id": 1
    }' \
     https://evm-rpc.sei-apis.com

    ```

    **Response:**

    ```json theme={"dark"}
    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "blockHash": "0xbc229fe41605ba2b46fcd7aa7ce328dc2f6da78385dfea84ca8dbef7b4325462",
        "blockNumber": "0x97aefcf",
        "from": "0x4cbee7ad42d33e9d3b41e8b6faca2f6f173c8a94",
        "gas": "0x66f24",
        "gasPrice": "0x565dd756",
        "maxFeePerGas": "0x565dd756",
        "maxPriorityFeePerGas": "0x5e679d6",
        "hash": "0x75b7ba10248e90db85b224eae587db1728520b6f72c795b9185064f444cee7c3",
        "input": "0x733214a3e5f551789f7ee58322679a2b141e64533098b8ba41d9e10cf8061a18a777d6ce00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a940000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000f6a756d7065722e65786368616e67650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004faaa00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001642646478b0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f1000000000000000000000000000000000000000000000000000000000004faaa000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000070023894085ef7ff0f0aedf52e2a2704928d1ec074f101ffff015cfa8db453c9904511c4ea9eb0bfc903e36b9f5f01fde9ce4e17b650efdca13d524f132876700d806f01e30fedd158a2e3b13e9badaeabafc5516e95e8c701ffff02001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x4",
        "to": "0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",
        "transactionIndex": "0x14",
        "value": "0x0",
        "type": "0x2",
        "accessList": [],
        "chainId": "0x531",
        "v": "0x0",
        "r": "0x3a107aca9cd554a9171a65ea2e8ef56ebeca8cfdc17f4bbecfb0f86837ca90d6",
        "s": "0x426134cf65b701bc8d43162f78bcf787319ff17cc6293188bcbb30fd99feb60",
        "yParity": "0x0"
      }
    }
    ```
  </Tab>

  <Tab title="Basic Trace">
    ```bash theme={"dark"}
    # Trace the transaction execution
    curl -X POST -H "Content-Type: application/json" \
      --data '{
        "jsonrpc": "2.0",
        "method": "debug_traceTransaction",
        "params": [
          "'$TRANSACTION_HASH'",
          {
            "tracer": "callTracer",
            "tracerConfig": {
              "withLog": true
            }
          }
        ],
        "id": 1
      }' \
      https://evm-rpc.sei-apis.com
    ```

    **Response:**

    ```json theme={"dark"}
    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "from": "0x4cbee7ad42d33e9d3b41e8b6faca2f6f173c8a94",
        "gas": "0x66f24",
        "gasUsed": "0x40f98",
        "to": "0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",
        "input": "0x733214a3e5f551789f7ee58322679a2b141e64533098b8ba41d9e10cf8061a18a777d6ce00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a940000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000f6a756d7065722e65786368616e67650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004faaa00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001642646478b0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f1000000000000000000000000000000000000000000000000000000000004faaa000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000070023894085ef7ff0f0aedf52e2a2704928d1ec074f101ffff015cfa8db453c9904511c4ea9eb0bfc903e36b9f5f01fde9ce4e17b650efdca13d524f132876700d806f01e30fedd158a2e3b13e9badaeabafc5516e95e8c701ffff02001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "calls": [
          {
            "from": "0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",
            "gas": "0x5d03f",
            "gasUsed": "0x3b0cc",
            "to": "0x31a9b1835864706af10103b31ea2b79bdb995f5f",
            "input": "0x733214a3e5f551789f7ee58322679a2b141e64533098b8ba41d9e10cf8061a18a777d6ce00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a940000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000f6a756d7065722e65786368616e67650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f000000000000000000000000fde9ce4e17b650efdca13d524f132876700d806f0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004faaa00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001642646478b0000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f1000000000000000000000000000000000000000000000000000000000004faaa000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000dd26083bfc745570000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000070023894085ef7ff0f0aedf52e2a2704928d1ec074f101ffff015cfa8db453c9904511c4ea9eb0bfc903e36b9f5f01fde9ce4e17b650efdca13d524f132876700d806f01e30fedd158a2e3b13e9badaeabafc5516e95e8c701ffff02001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
            "calls": [
              {
                "from": "0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",
                "gas": "0x5aa48",
                "gasUsed": "0xa724",
                "to": "0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1",
                "input": "0x23b872dd0000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a940000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000000000000000000000000000000000000004faaa",
                "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "calls": [
                  {
                    "from": "0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1",
                    "gas": "0x54283",
                    "gasUsed": "0x4ad6",
                    "to": "0x0000000000000000000000000000000000001001",
                    "input": "0x5c05961b0000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a940000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000004faaa00000000000000000000000000000000000000000000000000000000000000446962632f4341364642464146333939343734413036323633453130443043453541454242453135313839443644344232444439414445363130303745363845423944423000000000000000000000000000000000000000000000000000000000",
                    "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
                    "value": "0x0",
                    "type": "CALL"
                  }
                ],
                "logs": [
                  {
                    "address": "0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1",
                    "topics": [
                      "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                      "0x0000000000000000000000004cbee7ad42d33e9d3b41e8b6faca2f6f173c8a94",
                      "0x0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae"
                    ],
                    "data": "0x000000000000000000000000000000000000000000000000000000000004faaa",
                    "position": "0x1"
                  }
                ],
                "value": "0x0",
                "type": "CALL"
              },
              ...
            ]
          }
        ]
      }
    }
    ```
  </Tab>

  <Tab title="Gas Analysis">
    ```bash theme={"dark"}
    # Analyze gas usage patterns
    curl -X POST -H "Content-Type: application/json" \
      --data '{
        "jsonrpc": "2.0",
        "method": "debug_traceTransaction",
        "params": [
          "0x75b7ba10248e90db85b224eae587db1728520b6f72c795b9185064f444cee7c3",
          {
            "tracer": "{gasUsed: 0, operations: {}, step: function(log, db) { var op = log.op.toString(); var cost = log.getCost(); this.gasUsed += cost; if (!this.operations[op]) { this.operations[op] = { count: 0, totalGas: 0 }; } this.operations[op].count++; this.operations[op].totalGas += cost; }, fault: function(log, db) {}, result: function(ctx, db) { return { totalGas: this.gasUsed, operations: this.operations, efficiency: this.gasUsed / ctx.gasUsed }; }}"
          }
        ],
        "id": 1
      }' \
      https://evm-rpc.sei-apis.com
    ```

    **Response:**

    ```json theme={"dark"}
    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "totalGas": 6346011,
        "operations": {
          "PUSH1": {
            "count": 1476,
            "totalGas": 4428
          },
          "MSTORE": {
            "count": 342,
            "totalGas": 1690
          },
          "CALLDATASIZE": {
            "count": 41,
            "totalGas": 82
          },
          "PUSH2": {
            "count": 1400,
            "totalGas": 4200
          },

          ...


          "STOP": {
            "count": 5,
            "totalGas": 0
          },
          "LOG2": {
            "count": 2,
            "totalGas": 5578
          },
          "LOG4": {
            "count": 1,
            "totalGas": 2899
          },
          "LOG1": {
            "count": 1,
            "totalGas": 2542
          }
        },
        "efficiency": 23.84499278564343
      }
    }
    ```
  </Tab>
</Tabs>

## Debugging failed transactions

Use these steps to analyze and fix transaction failures:

### Step 1: Identify the problem

```bash theme={"dark"}
# Get transaction receipt
FAILED_TX="0xb2a6f4f7f37d8df728968126c05d1a8b0391003cf375ed5abb1b5e02fe66c717"

curl -X POST -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": ["'$FAILED_TX'"],
    "id": 1
  }' \
  https://evm-rpc.sei-apis.com
```

### Step 2: Trace the execution

```bash theme={"dark"}
# Trace to see where it failed
curl -X POST -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": [
      "'$FAILED_TX'",
      {
        "tracer": "callTracer",
        "tracerConfig": {
          "withLog": true
        }
      }
    ],
    "id": 1
  }' \
  https://evm-rpc.sei-apis.com
```

**Response:**

```json theme={"dark"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0x2c80b1b0473bb765ef536d2526ec63195794d945",
    "gas": "0xc3500",
    "gasUsed": "0x2863d",
    "to": "0xd1efe48b71acd98db16fcb9e7152b086647ef544",
    "input": "0x414bf3890000000000000000000000003894085ef7ff0f0aedf52e2a2704928d1ec074f1000000000000000000000000e30fedd158a2e3b13e9badaeabafc5516e95e8c70000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000002c80b1b0473bb765ef536d2526ec63195794d94500000000000000000000000000000000000000000000000000000000688a24580000000000000000000000000000000000000000000000000000000031aba85500000000000000000000000000000000000000000000009556d1a971e567965b0000000000000000000000000000000000000000000000000000000000000000",
    "output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000013546f6f206c6974746c6520726563656976656400000000000000000000000000",
    "error": "execution reverted",
    "revertReason": "Too little received",
    "calls": [
      ...
    ]
  }
}
```

### Step 3: Fix and test

```bash theme={"dark"}
# Simulate the fix with debug_traceCall
curl -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "method": "debug_traceCall",
    "params": [
      {
        "from": "0x2c80b1b0473bb765ef536d2526ec63195794d945",
        "to": "0xd1efe48b71acd98db16fcb9e7152b086647ef544",
        "gas": "0xc3500",
        "gasPrice": "0x2127ddd32",
        "value": "0x0"
      },
      "0x98a87cc",
      {
        "tracer": "callTracer",
        "tracerConfig": {
          "onlyTopCall": false,
          "withLog": true
        }
      }
    ],
    "id": 1
  }' \
  https://evm-rpc.sei-apis.com
```

## Common debugging scenarios

### Transaction reverted

**Problem**: The transaction failed with a revert.
**Solution**: Use `callTracer` to find the exact revert reason.

### Out of gas

**Problem**: The transaction ran out of gas.
**Solution**: Use the gas analysis tracer to optimize gas usage.

### Unexpected behavior

**Problem**: The transaction succeeded, but the result is wrong.
**Solution**: Use the opcode tracer for step-by-step analysis.

### Slow performance

**Problem**: The transaction uses too much gas.
**Solution**: Use the state access tracer to find inefficiencies.

## Quick reference

### Essential commands

```bash theme={"dark"}
# Trace transaction
debug_traceTransaction(hash, {tracer: "callTracer"})

# Trace block
debug_traceBlockByNumber("latest", {tracer: "callTracer"})

# Simulate call
debug_traceCall(tx, "latest", {tracer: "callTracer"})

# State access
debug_traceStateAccess(hash)
```

### Common tracers

* **`callTracer`**: Contract call hierarchy
* **`opcodeTracer`**: Opcode-level execution
* **Custom JS**: Custom analysis logic

## Pre-baked trace cache

RPC nodes can optionally pre-compute and cache `debug_trace*` results in the background. The node then serves trace requests from a local on-disk cache instead of re-executing the block live on every call. You configure this opt-in feature through `[evm]` fields in `app.toml`. It is recommended for RPC nodes only.

When the feature is enabled, a background worker re-executes each committed block with the configured tracers. It stores the results in a Pebble database at `<home>/data/trace_db`. These methods serve results from this cache on a cache hit. Otherwise, they fall through to live re-execution:

* `debug_traceTransaction`
* `debug_traceBlockByNumber` and `debug_traceBlockByHash`

### When the cache is used

The node serves a request from the cache only when trace baking is enabled **and** the request uses a *bakeable* tracer configuration:

* The tracer is one of `callTracer`, `prestateTracer`, or `flatCallTracer`.
* The request does not include a custom `tracerConfig`. A per-call `tracerConfig` (for example, `{"withLog": true}`) is not part of the cache key. Any custom tracer config makes the request un-bakeable, so it falls through to live re-execution.

Requests that use the struct logger (no tracer), a JavaScript tracer, or any other named tracer always run live.

### Configuration

These `[evm]` fields in `app.toml` control trace baking:

| Field | Default | Description |
| - | - | - |
| `trace_bake_enabled` | `false` | Enables the background trace-baking worker that caches results at `<home>/data/trace_db`. RPC nodes only. |
| `trace_bake_workers` | `1` | Number of re-execution worker goroutines. |
| `trace_bake_queue_size` | `4096` | Bounds the in-flight height queue. When the queue is full, heights are dropped so that consensus never blocks. Dropped blocks fall through to live re-execution. |
| `trace_bake_tracers` | `["callTracer"]` | Which tracers to bake per block. Eligible values: `callTracer`, `prestateTracer`, `flatCallTracer`. |
| `trace_bake_window_blocks` | `0` | Rolling prune window: blocks older than `(latest - window)` are pruned. `0` disables pruning, so the cache grows without limit. |
| `trace_bake_use_snapshot` | `false` | Uses in-memory memiavl snapshots as the state backend for trace baking when the store backend supports snapshots. |
| `trace_bake_snapshot_window` | `64` | Number of recent memiavl snapshots to keep for trace baking. |

<Warning>Trace baking adds a persistent on-disk store at `<home>/data/trace_db` and increases disk usage. The node flushes the store's write-ahead log when it shuts down cleanly.</Warning>

## Tracer allowlist

Caller-supplied `tracer` values on the `debug_trace*` endpoints are gated by `[evm]` config in `app.toml`. By default, only a fixed set of native geth tracers may be requested, and request-supplied JavaScript tracer source is rejected. This deviates from upstream geth, which accepts JavaScript tracers by default. The gate applies to `debug_traceCall`, `debug_traceTransaction`, `debug_traceBlockByNumber`/`debug_traceBlockByHash`, and `debug_traceTransactionProfile`. When no `tracer` is supplied, the default struct logger remains available.

| Field | Default | Description |
| - | - | - |
| `trace_allowed_tracers` | `["callTracer", "prestateTracer", "flatCallTracer", "4byteTracer", "noopTracer", "muxTracer"]` | Native debug tracer names that callers may request via `TraceConfig.Tracer`. Validated native-only at startup — a non-native or misspelled name fails startup. Set to `[]` to disable all named tracers. Request-supplied JavaScript tracer source can never be enabled through this list. |
| `trace_allow_js_tracers` | `false` | Opts in to request-supplied JavaScript tracer source in `TraceConfig.Tracer`. This executes untrusted code in-process; keep disabled on public/default RPC nodes. Enabling it does **not** widen `trace_allowed_tracers`: native tracer names must still be listed there to be usable. |

Behavior notes:

* A tracer name that is not listed in `trace_allowed_tracers` is rejected, unless it is JavaScript source and `trace_allow_js_tracers` is enabled.
* JavaScript tracer source is rejected unless `trace_allow_js_tracers` is set to `true`.
* When `muxTracer` is requested, its nested tracer names are validated recursively against the same allowlist, with a bounded nesting depth of 16.
* `trace_bake_tracers` names are held to the same native-only rule and validated at startup, so a non-native or misspelled baked tracer fails startup instead of being evaluated as JavaScript source on every block.

<Note>The `trace_bake_tracers` note above that eligible values are standard named tracers is subsumed by this native-only startup validation: entries must be native tracer names such as `callTracer`, `prestateTracer`, or `flatCallTracer`.</Note>

## Struct-logger output cap

The default `debug_trace*` endpoints (`debug_traceCall`, `debug_traceTransaction`, and `debug_traceBlockByNumber`/`debug_traceBlockByHash`) use the built-in struct logger when no custom tracer is supplied. Traces that read many distinct storage slots can retain large amounts of output, so the node bounds the retained struct-logger output per traced transaction.

The `max_trace_struct_log_bytes` field under `[evm]` in `app.toml` controls this cap:

| Field | Default | Description |
| - | - | - |
| `max_trace_struct_log_bytes` | `33554432` (32 MiB) | Bounds the retained struct-logger output, in bytes, per traced transaction on the default `debug_trace*` endpoints. Set to `0` for unlimited (upstream geth behavior). |

Behavior notes:

* The bound is applied **per transaction**, not per RPC call. Because geth builds a fresh struct logger for each transaction, a `debug_traceBlock*` call over N transactions can retain up to N times this value (and the parallelized block-trace path holds several concurrent traces live).
* A caller-supplied `Limit` larger than `max_trace_struct_log_bytes` is clamped down to the configured value.
* A smaller caller-supplied `Limit` is honored unchanged.
* Custom tracers (for example `callTracer`, `prestateTracer`, or JavaScript tracers) are unaffected, as are requests when the cap is disabled (`0`).

## Removed legacy trace filters

<Note>The legacy `*ExcludeTraceFail` endpoints have been removed. For block tracing, use `debug_traceBlockByNumber` or `debug_traceBlockByHash`. For EVM receipts, use `eth_getTransactionReceipt`. There is no block or filter method to discover synthetic logs from Cosmos-originated transactions. If you already know a synthetic transaction hash, enable `sei_getTransactionReceipt` to get its receipt and logs.</Note>

## Next steps

1. **[JavaScript tracers](/evm/tracing/javascript-tracers)**: Custom analysis scripts
2. **[Troubleshooting](/evm/tracing/troubleshooting)**: Common issues and solutions

<Info>Start with `callTracer` for general debugging. Then use specialized tracers for specific analysis needs.</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.