> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# trace_block | Base

> Base API method trace_block provides a comprehensive trace of all transactions included in a specific block. Chainstack Base reference.

Base API method `trace_block` provides a comprehensive trace of all transactions included in a specific block. This method is crucial for developers, auditors, and blockchain analysts who need to understand the detailed execution flow of every transaction within a block, including contract calls, state changes, and event emissions. It offers a holistic view of the block's impact on the Ethereum Virtual Machine (EVM) and the blockchain state.

## Parameters

* `blockNumber` or `blockHash` — The number or hash of the block you wish to trace, specified as a hexadecimal string or a decimal number. This identifies the specific block whose transactions you want to analyze in detail.

## Response

* `result` — An array containing the trace data for each transaction in the specified block. Each element in the array represents the trace of a single transaction, detailing every operation executed, such as calls to other contracts, value transfers, and the execution outcomes.

## Use case

The `trace_block` method is invaluable for conducting in-depth block analyses. Developers can use it to debug and optimize the interactions of multiple transactions within a block, auditors can employ it to ensure the security and integrity of all transactions in a block, and analysts might use it to investigate block-wide patterns or detect anomalies. This method provides a comprehensive overview of how a block's transactions interact with the blockchain, which is crucial for understanding its overall effects and ensuring its correctness.


## OpenAPI

````yaml /openapi/base_node_api/trace_block.json POST /2fc1de7f08c0465f6a28e3c355e0cb14
openapi: 3.0.0
info:
  title: trace_block example
  version: 1.0.0
  description: >-
    This API example demonstrates how to use the trace_block method to retrieve
    detailed execution  traces for all transactions included in a block,
    identified by the block's number.
servers:
  - url: https://base-mainnet.core.chainstack.com
security: []
paths:
  /2fc1de7f08c0465f6a28e3c355e0cb14:
    post:
      tags:
        - Debug Operations
      summary: trace_block
      operationId: traceBlockByNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - id
                - params
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: trace_block
                id:
                  type: integer
                  default: 1
                params:
                  type: array
                  items:
                    type: string
                  default:
                    - '0xbb5583'
      responses:
        '200':
          description: >-
            Detailed execution traces for all transactions in the specified
            block
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: object
                    description: >-
                      An array of execution traces for each transaction in the
                      block.

````