---
updatedAt: 2025-06-11T20:35:11.000Z
agentTools:
  projectIndex: https://docs.allthatnode.com/llms.txt
---

# debug_traceBlockByNumber

Similar to debug_traceBlock, traceBlockByNumber accepts a block number and will replay the block that is already present in the database. For the second parameter see TraceConfig reference.

# Parameters

* `QUANTITY`|`TAG `- integer block number, or the string "latest", "earliest" or "pending", see the default block parameter
* `OBJECT`- The tracer object with the following fields:
  * `tracer`: `STRING` - The type of tracer. It could be callTracer or prestateTracer
    * `callTracer` - The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction
    * `prestateTracer` - The prestateTracer replays the transaction and tracks every part of state that occured during the transaction
  * `tracerConfig`: `OBJECT` - The object to specify the configurations of the tracer
    * `onlyTopCall`: `BOOLEAN` - When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame

```curl Example
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceBlockByNumber",
  "params": [
    "latest",
    {
      "tracer": "callTracer",
      "tracderConfig": {
        "onlyTopCall": true
      }
    }
  ]
}'
```

# Returns

An `ARRAY` of`OBJECT` with the following fields:

* `txHash`: `STRING` - transaction hash
* `result`: `OBJECT`
  * `from` - The address the transaction is sent from
  * `gas` - The integer of the gas provided for the transaction execution
  * `gasUsed` - The integer of the gas used
  * `to` - The address the transaction is directed to
  * `input` - The data given at the time of input
  * `output` - The data which is returned as an output
  * `calls`: `ARRAY` - A array of sub-call objects
  * `value` - The hex encoded integer of the value sent with this transaction
  * `type` - The type of the call

```json Example
	{
  "jsonrpc": "2.0",
  "id": "1",
  "result": [
    {
      "txHash": "0x637eabe31da13cbc095b62668fcfabdf10277bde60ce879e0e3bd06c4db120cc",
      "result": {
        "from": "0x4e14529d962cba526a70435132cee96599675d45",
        "gas": "0xbf4a",
        "gasUsed": "0xbded",
        "to": "0x6a9014fb802dcc5efe3b97fd40aaa632585636d0",
        "input": "0x095ea7b3000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000000000000000000000000046681f67c89dd49af3",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "calls": [
          {
            "from": "0x6a9014fb802dcc5efe3b97fd40aaa632585636d0",
            "gas": "0x5ed3",
            "gasUsed": "0x5ed3",
            "to": "0xc629a01ec23ab04e1050500a3717a2a5c0701497",
            "input": "0x095ea7b3000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000000000000000000000000046681f67c89dd49af3",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
            "value": "0x0",
            "type": "DELEGATECALL"
          }
        ],
        "value": "0x0",
        "type": "CALL"
      }
    },
    // another objects
  ]
}
```

***

# Try Yourself

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "ethereum",
    "version": "0.5.0"
  },
  "servers": [
    {
      "url": "https://ethereum-mainnet-archive.allthatnode.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-allthatnode-api-key",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/{apiKey}": {
      "post": {
        "summary": "eth_getProof-polygon",
        "description": "Returns the account and storage values of the specified account including the Merkle-proof. This call can be used to verify that the data you are pulling from is not tampered with.",
        "operationId": "eth_getproof-polygon",
        "parameters": [
          {
            "name": "apiKey",
            "in": "path",
            "schema": {
              "type": "string",
              "default": "8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "RAW_BODY"
                ],
                "properties": {
                  "RAW_BODY": {
                    "type": "string",
                    "default": "{     \"jsonrpc\":\"2.0\",     \"id\":1,     \"method\":\"eth_getProof\",     \"params\":[         \"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842\",         [\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\"],         \"latest\"     ] }"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```