Skip to content

prestateTracer fails with TypeError when tracing a specific lock #249

@akegaviar

Description

@akegaviar

System information

Erigon version: erigon/0.08.1/linux-amd64/go1.22.10

OS & Version: Linux

Chain/Network: OP mainnet

Expected behaviour

Doing a debug_traceBlockByNumber with prestateTracer works with Geth/v1.101503.1-dev.1-7ec33828-20250313 on a specific block 103736515 on the OP mainnet.

curl -X POST GETH_NODE \
  -H "Content-Type: application/json" \
  -d '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByNumber",
    "params": [
      "0x62EE4C3",
      {
        "tracer": "prestateTracer"
      }
    ]
  }'

Response on Geth:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "0x1c233157caf59768b0503268dbbd647e51ee644a": {
          "balance": "0x6d4d188d3e3f",
          "nonce": 168,
          "code": "0x",
          "storage": {}
        },
        "0xacd03d601e5bb1b275bb94076ff46ed9d753435a": {
          "balance": "0x5295499552d35955500",
          "nonce": 713161,
          "code": "0x",
          "storage": {}
        }
      }
    }
  ]
}

Actual behaviour

Doing a debug_traceBlockByNumber with prestateTracer fails with erigon/0.08.1 on a specific block 103736515 on the OP mainnet.

curl -X POST OP_ERIGON_NODE \
  -H "Content-Type: application/json" \
  -d '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByNumber",
    "params": [
      "0x62EE4C3",
      {
        "tracer": "prestateTracer"
      }
    ]
  }'

Response on OP-Erigon:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "error": "TypeError: cannot read property '0xacd03d601e5bb1b275bb94076ff46e...' of null    in server-side tracer function 'result'"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions