Skip to content

debug_traceTransaction fails on state-sync transactions with "intrinsic gas too low" #2250

@icyverso-create

Description

@icyverso-create

System information

Bor client version: v2.8.0 and v2.8.2 (reproduces on both)

Heimdall client version: heimdall-v2 v0.7.1

OS & Version: Linux (Ubuntu 22.04)

Environment: Polygon Mainnet

Type of node: Archive

Additional Information: Stock Bor, no modifications to the client.

Overview of the problem

debug_traceTransaction always fails on state-sync transactions (the system transaction with from/to = zero address and gas = 0) with the error intrinsic gas too low: have 0, want 21000.

These are normal, valid transactions present in many blocks (they bridge L1→L2 state), so tracing them by hash should return a trace.

Actual behavior: debug_traceTransaction returns the intrinsic-gas error — with every tracer (callTracer, default struct logger) and with borTraceEnabled: true.

Expected behavior: It should return a trace for the transaction, the same way debug_traceBlockByNumber / debug_traceBlockByHash already do for the state-sync tx (the last entry of the block).

Key observation: On the same node and same transaction, debug_traceBlockByNumber works, but debug_traceTransaction fails. So the per-transaction tracer is missing the state-sync handling that the block-level tracers already have.

Reproduction Steps

  1. Pick any state-sync transaction. Example: 0xe269cc840783422bac8357bc7bb108eaea23f8442552d6051abb7a041bd85ec2 (in block 87565552 / 0x53824f0 on mainnet).
  2. Call debug_traceTransaction on it (see CURL below) → returns the intrinsic-gas error.
  3. Call debug_traceBlockByNumber on block 0x53824f0 → succeeds, and the last entry is this exact state-sync transaction.

Logs / Traces / Output / Error Messages

debug_traceTransaction (fails):

{ "jsonrpc": "2.0", "id": 1,
  "error": { "code": -32000, "message": "tracing failed: intrinsic gas too low: have 0, want 21000" } }

debug_traceBlockByNumber on the same block (works — last entry is the same tx):

{ "txHash": "0xe269cc840783422bac8357bc7bb108eaea23f8442552d6051abb7a041bd85ec2",
  "result": { "from": "0x0000000000000000000000000000000000000000", "gas": "0x0", "gasUsed": "0x0",
              "to": "0x0000000000000000000000000000000000000000", "input": "0x", "value": "0x0", "type": "CALL" } }

Additional Information

(4) CURL request that triggers the bug:

curl <BOR_RPC_URL> -X POST -H 'Content-Type: application/json' --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceTransaction",
  "params": [
    "0xe269cc840783422bac8357bc7bb108eaea23f8442552d6051abb7a041bd85ec2",
    { "tracer": "callTracer" }
  ]
}'

Same error occurs with the default tracer ("params": ["0xe269...cc"]) and with { "tracer": "callTracer", "borTraceEnabled": true }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions