---
updatedAt: 2026-05-27T08:54:15.000Z
agentTools:
  projectIndex: https://docs.tatum.io/llms.txt
---

# debug_traceBlockByNumber - Ethereum

Replays the block that is already present in the database.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "debug_traceBlockByNumber - Ethereum",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{ethereum-network}.gateway.tatum.io",
      "description": "RPC Gateway - Recommended",
      "variables": {
        "ethereum-network": {
          "enum": [
            "ethereum-mainnet",
            "ethereum-sepolia",
            "ethereum-hoodi"
          ],
          "default": "ethereum-mainnet"
        }
      }
    },
    {
      "url": "https://api.tatum.io/v3/blockchain/node/{ethereum-network}",
      "description": "Deprecated",
      "variables": {
        "ethereum-network": {
          "enum": [
            "ethereum-mainnet",
            "ethereum-sepolia",
            "ethereum-hoodi"
          ],
          "default": "ethereum-mainnet"
        }
      }
    }
  ],
  "x-sandbox": {
    "category": {
      "type": {
        "name": "category",
        "type": "string",
        "enum": [
          "core",
          "bundler",
          "nft",
          "token",
          "transfers",
          "transaction-receipts",
          "gas-manager",
          "trace",
          "debug",
          "gas-optimized-transactions",
          "private-transactions",
          "notify",
          "transaction-simulation"
        ]
      },
      "value": "debug"
    }
  },
  "paths": {
    "/": {
      "post": {
        "x-readme": {
          "samples-languages": [
            "shell",
            "javascript",
            "python",
            "java",
            "php"
          ]
        },
        "summary": "debug_traceBlockByNumber - Ethereum",
        "description": "Replays the block that is already present in the database.",
        "tags": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "default": 1
                      },
                      "jsonrpc": {
                        "type": "string",
                        "default": "2.0"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "default": "debug_traceBlockByNumber",
                        "type": "string"
                      },
                      "params": {
                        "type": "array",
                        "description": "1. String - Block number (in hex) or block tag\n2. `tracer` Object - Currently supports `callTracer` and `prestateTracer` (see above for definitions).\n",
                        "minItems": 1,
                        "maxItems": 1,
                        "items": {
                          "anyOf": [
                            {
                              "$ref": "#/paths/~1/post/requestBody/content/application~1json/schema/allOf/1/properties/params/prefixItems/0"
                            },
                            {
                              "type": "object",
                              "title": "tracer",
                              "properties": {
                                "tracer": {
                                  "$ref": "#/paths/~1/post/requestBody/content/application~1json/schema/allOf/1/properties/params/prefixItems/1/properties/tracer"
                                },
                                "tracerConfig": {
                                  "$ref": "#/paths/~1/post/requestBody/content/application~1json/schema/allOf/1/properties/params/prefixItems/1/properties/tracerConfig"
                                }
                              }
                            }
                          ]
                        },
                        "prefixItems": [
                          {
                            "type": "string",
                            "title": "Block Number or Tag",
                            "description": "String - Either the hex value of a **block number** OR **block tags**:\n  1. **block number** (in hex) OR\n  2. **block tag** (one of the following):\n    * `pending` (Not available on Ethereum) - 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.\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.\n    * `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.\n",
                            "default": "finalized"
                          },
                          {
                            "type": "object",
                            "title": "tracer",
                            "properties": {
                              "tracer": {
                                "type": "string",
                                "default": "callTracer",
                                "enum": [
                                  "callTracer",
                                  "prestateTracer"
                                ],
                                "description": "It might be callTracer or prestateTracer\n * `callTracer` - The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction.\n * `prestateTracer` - The prestateTracer replays the transaction and tracks every part of state that occured during the transaction.\n"
                              },
                              "tracerConfig": {
                                "type": "object",
                                "description": "An object that allows specifying configurations for the tracer.\n\nWhen using a tracer type disableMemory, disableStorage, disableStack, or disableReturnData will not have any effect. When no tracer is selected, the response defaults to Struct/opcode logger.\n",
                                "properties": {
                                  "onlyTopCall": {
                                    "description": "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.",
                                    "type": "boolean"
                                  },
                                  "disableStorage": {
                                    "description": "When enabled, it prevents tracing of storage changes made by the transaction being analyzed, which can reduce the resource requirements of the analysis. By default, this operation traces both memory and storage changes, but storage tracing can be particularly resource-intensive, especially for large transactions.",
                                    "type": "boolean"
                                  },
                                  "disableStack": {
                                    "description": "When enabled, it skips tracing of stack changes made by the transaction being analyzed.",
                                    "type": "boolean"
                                  },
                                  "disableMemory": {
                                    "description": "When true, it stops tracing of memory changes made by the transaction being analyzed, reducing resource requirements.",
                                    "type": "boolean"
                                  },
                                  "disableReturnData": {
                                    "description": "When true, it prevents the method from tracing the return data of a transaction. This return data tracing can be very demanding on resources, as it requires a lot of time and processing power.",
                                    "type": "boolean"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "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 gas 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"
                              }
                            }
                          }
                        }
                      },
                      "example": {
                        "jsonrpc": "2.0",
                        "id": 1,
                        "result": {
                          "type": "CALL",
                          "from": "0x0000000000000000000000000000000000000000",
                          "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
                          "value": "0x0",
                          "gas": "0x7fffffffffffadf7",
                          "gasUsed": "0x0",
                          "input": "0x",
                          "output": "0x"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "rpc-ethereum-debug_traceblockbynumber"
      }
    }
  }
}
```