---
updatedAt: 2025-09-18T22:05:48.000Z
agentTools:
  projectIndex: https://nodereal.readme.io/llms.txt
---

# debug_traceBlockByNumber

Replays the block that is already present in the database.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "debug_traceBlockByNumber",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://bsc-mainnet.nodereal.io/v1"
    }
  ],
  "paths": {
    "/{apiKey}": {
      "post": {
        "summary": "debug_traceBlockByNumber",
        "description": "Replays the block that is already present in the database.",
        "tags": [],
        "parameters": [
          {
            "name": "apiKey",
            "in": "path",
            "schema": {
              "type": "string",
              "default": "64a9df0874fb4a93b9d0a3849de012d3"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "default": 1
                      },
                      "jsonrpc": {
                        "type": "string",
                        "default": "2.0"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string",
                        "default": "debug_traceBlockByNumber",
                        "enum": [
                          "debug_traceBlockByNumber"
                        ]
                      },
                      "params": {
                        "type": "array",
                        "description": "1. String - Block number (in hex) or block tag \n2. `tracer` Object - Currently only supports `callTracer` (see above for definition).\n",
                        "minItems": 2,
                        "maxItems": 2,
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "String - Either the hex value of a **block number** OR One of the following **block tags**: \n  * `pending` - A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet.\n  * `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.\n  * `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Mainnet and Goerli**.\n  * `finalized` - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Mainnet and Goerli**.\n  * `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.\n",
                              "example": "finalized"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tracer": {
                                  "type": "string",
                                  "default": "callTracer",
                                  "enum": [
                                    "callTracer"
                                  ]
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns - array of block traces",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "jsonrpc": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "array",
                          "description": "array of block traces",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "CALL or CREATE"
                              },
                              "from": {
                                "type": "string",
                                "description": "20 Bytes - address of the sender"
                              },
                              "to": {
                                "type": "string",
                                "description": "20 Bytes - address of the receiver. null when its a contract creation transaction"
                              },
                              "value": {
                                "type": "string",
                                "description": "amount of value for transfer (in hex)"
                              },
                              "gas": {
                                "type": "string",
                                "description": "amount of gas provided for the call (in hex)"
                              },
                              "gasUsed": {
                                "type": "string",
                                "description": "amount of gsa used during the call (in hex)"
                              },
                              "input": {
                                "type": "string",
                                "description": "call data"
                              },
                              "output": {
                                "type": "string",
                                "description": "return data"
                              },
                              "error": {
                                "type": "string",
                                "description": "error, if any"
                              },
                              "revertReason": {
                                "type": "string",
                                "description": "solidity revert reason, if any"
                              },
                              "calls": {
                                "type": "array",
                                "description": "list of sub-calls"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "debug-traceblockbynumber"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```