> ## 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.

# debug_traceBlockByHash | Arc

> Arc API method that returns detailed traces for all transactions in a block specified by block hash. Chainstack Arc reference.

Arc API method that returns detailed traces for all transactions in a block specified by block hash. This is useful for analyzing all contract interactions within a specific block.

## Parameters

* `blockHash` — the hash of the block to trace
* `tracerConfig` — (optional) tracer configuration object:
  * `tracer` — tracer type (e.g., `callTracer`, `prestateTracer`)
  * `timeout` — (optional) timeout for the trace
  * `tracerConfig` — (optional) tracer-specific configuration

## Response

* `result` — array of trace objects, one for each transaction in the block. The format depends on the tracer used.

For `callTracer`, each trace contains:

* `from` — sender address
* `to` — recipient address
* `gas` — gas provided
* `gasUsed` — gas consumed
* `input` — call data
* `output` — return data
* `calls` — nested array of internal calls
* `type` — call type (CALL, DELEGATECALL, etc.)

## `debug_traceBlockByHash` code examples

```javascript ethers.js theme={"system"}
const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

const traceBlockByHash = async (blockHash) => {
    const traces = await provider.send("debug_traceBlockByHash", [
      blockHash,
      { tracer: "callTracer" }
    ]);

    console.log(`Block contains ${traces.length} transaction traces`);
    for (let i = 0; i < traces.length; i++) {
      const trace = traces[i].result;
      console.log(`\nTx ${i}: ${trace.from} -> ${trace.to}`);
      console.log(`  Type: ${trace.type}, Gas Used: ${trace.gasUsed}`);
    }
  };

traceBlockByHash("0xb27e862c03e649114afd6904bd39f5e4a1ca41fffb92c0bbfe88dd7750b8c9a1");
```

```python web3.py theme={"system"}
from web3 import Web3

node_url = "CHAINSTACK_NODE_URL"
web3 = Web3(Web3.HTTPProvider(node_url))

result = web3.provider.make_request("debug_traceBlockByHash", [
    "0xb27e862c03e649114afd6904bd39f5e4a1ca41fffb92c0bbfe88dd7750b8c9a1",
    {"tracer": "callTracer"}
])

traces = result['result']
print(f"Block contains {len(traces)} transaction traces")

for i, tx_trace in enumerate(traces):
    trace = tx_trace['result']
    print(f"\nTx {i}: {trace['from']} -> {trace.get('to', 'Contract Creation')}")
    print(f"  Type: {trace['type']}, Gas Used: {trace['gasUsed']}")
```

```bash cURL theme={"system"}
curl -X POST "CHAINSTACK_NODE_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByHash",
    "params": ["0xb27e862c03e649114afd6904bd39f5e4a1ca41fffb92c0bbfe88dd7750b8c9a1", {"tracer": "callTracer"}],
    "id": 1
  }'
```


## OpenAPI

````yaml openapi/arc_node_api/debug_and_trace/debug_traceBlockByHash.json POST /
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.0
  description: This is an API for interacting with a Chainstack node.
servers:
  - url: https://arc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: debug_traceBlockByHash
      operationId: debug_traceBlockByHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceBlockByHash
                params:
                  type: array
                  default:
                    - >-
                      0xb27e862c03e649114afd6904bd39f5e4a1ca41fffb92c0bbfe88dd7750b8c9a1
                    - tracer: callTracer
      responses:
        '200':
          description: Returns the result of debug_traceBlockByHash.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        result:
                          type: object
                          properties:
                            from:
                              type: string
                            gas:
                              type: string
                            gasUsed:
                              type: string
                            to:
                              type: string
                            input:
                              type: string
                            output:
                              type: string
                            error:
                              type: string
                            revertReason:
                              type: string
                            calls:
                              type: array
                              items:
                                type: object
                                properties:
                                  from:
                                    type: string
                                  gas:
                                    type: string
                                  gasUsed:
                                    type: string
                                  to:
                                    type: string
                                  input:
                                    type: string
                                  output:
                                    type: string
                                  error:
                                    type: string
                                  revertReason:
                                    type: string
                                  calls:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        from:
                                          type: object
                                        gas:
                                          type: object
                                        gasUsed:
                                          type: object
                                        to:
                                          type: object
                                        input:
                                          type: object
                                        type:
                                          type: object
                                  value:
                                    type: string
                                  type:
                                    type: string
                            value:
                              type: string
                            type:
                              type: string
                        txHash:
                          type: string
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  - result:
                      from: '0x05756f67f5f6f4d3c798749a3c28b050dcd9aa99'
                      gas: '0xf4240'
                      gasUsed: '0x29be9'
                      to: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                      input: >-
                        0x33f23865300b6571a26fd52c350bf33577c1107fdc30555d44eaa2b2602fbe5f878eb5ff00000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db410000000000000000000000003600000000000000000000000000000000000000000000000000000000000000171a4217b86a807a64eb94757db6849fb4bdbaa0000000000000000000000000000000000000000000000000000000001a497ae7000000000000000000000000000000000000000000000000000000000008e9f1000000000000000000000000000000000000001b798a1cb4651f0000000000000000000000000000000000000000000000000000000000000000000001c69af0
                      output: >-
                        0x000000000000000000000000000000000000000000000000000000001a497ae7000000000000000000000000000000000000000000000000000000000008ea0f
                      calls:
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xe8f6a'
                          gasUsed: '0x10a'
                          to: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                          input: '0x0dfe1681'
                          output: >-
                            0x000000000000000000000000171a4217b86a807a64eb94757db6849fb4bdbaa0
                          type: STATICCALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xe8c21'
                          gasUsed: '0x134'
                          to: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                          input: '0xd21220a7'
                          output: >-
                            0x0000000000000000000000003600000000000000000000000000000000000000
                          type: STATICCALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xe7c2f'
                          gasUsed: '0x1ec4'
                          to: '0x3600000000000000000000000000000000000000'
                          input: >-
                            0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                          output: >-
                            0x0000000000000000000000000000000000000000000000000000000096d646b2
                          calls:
                            - from: '0x3600000000000000000000000000000000000000'
                              gas: '0xe26bb'
                              gasUsed: '0x2a7'
                              to: '0xc6ad664ac6679f4ce74e10e91449c93ec1ae3ca6'
                              input: >-
                                0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                              output: >-
                                0x0000000000000000000000000000000000000000000000000000000096d646b2
                              value: '0x0'
                              type: DELEGATECALL
                          type: STATICCALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xe5239'
                          gasUsed: '0x2616'
                          to: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                          input: >-
                            0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                          output: >-
                            0x0000000000000000000000000000000000000000000000000000000000000000
                          calls:
                            - from: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                              gas: '0xdfd6c'
                              gasUsed: '0x9f9'
                              to: '0xc6061272419bb754a6c0386d1df81ddb3fe5cf3c'
                              input: >-
                                0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                              output: >-
                                0x0000000000000000000000000000000000000000000000000000000000000000
                              value: '0x0'
                              type: DELEGATECALL
                          type: STATICCALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xe23a9'
                          gasUsed: '0x192f1'
                          to: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                          input: >-
                            0x128acb0800000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e23955930000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a497ae7000000000000000000000000000000000000001b798a1cb4651f00000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000
                          output: >-
                            0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff715f1000000000000000000000000000000000000000000000000000000001a497ae7
                          calls:
                            - from: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                              gas: '0xd5446'
                              gasUsed: '0x7d3f'
                              to: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                              input: >-
                                0xa9059cbb00000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593000000000000000000000000000000000000000000000000000000000008ea0f
                              output: >-
                                0x0000000000000000000000000000000000000000000000000000000000000001
                              calls:
                                - from: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                                  gas: '0xd1c6d'
                                  gasUsed: '0x7a83'
                                  to: '0xc6061272419bb754a6c0386d1df81ddb3fe5cf3c'
                                  input: >-
                                    0xa9059cbb00000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593000000000000000000000000000000000000000000000000000000000008ea0f
                                  output: >-
                                    0x0000000000000000000000000000000000000000000000000000000000000001
                                  value: '0x0'
                                  type: DELEGATECALL
                              value: '0x0'
                              type: CALL
                            - from: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                              gas: '0xcd596'
                              gasUsed: '0x560'
                              to: '0x3600000000000000000000000000000000000000'
                              input: >-
                                0x70a0823100000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41
                              output: >-
                                0x000000000000000000000000000000000000000000000000000004f52d7e6a4a
                              calls:
                                - from: '0x3600000000000000000000000000000000000000'
                                  gas: '0xc9fba'
                                  gasUsed: '0x2a7'
                                  to: '0xc6ad664ac6679f4ce74e10e91449c93ec1ae3ca6'
                                  input: >-
                                    0x70a0823100000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41
                                  output: >-
                                    0x000000000000000000000000000000000000000000000000000004f52d7e6a4a
                                  value: '0x0'
                                  type: DELEGATECALL
                              type: STATICCALL
                            - from: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                              gas: '0xccd5a'
                              gasUsed: '0x5a4a'
                              to: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                              input: >-
                                0xfa461e33fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff715f1000000000000000000000000000000000000000000000000000000001a497ae700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
                              calls:
                                - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                                  gas: '0xc90ea'
                                  gasUsed: '0x4f82'
                                  to: '0x3600000000000000000000000000000000000000'
                                  input: >-
                                    0xa9059cbb00000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41000000000000000000000000000000000000000000000000000000001a497ae7
                                  output: >-
                                    0x0000000000000000000000000000000000000000000000000000000000000001
                                  calls:
                                    - from: >-
                                        0x3600000000000000000000000000000000000000
                                      gas: '0xc5c1e'
                                      gasUsed: '0x4cc6'
                                      to: >-
                                        0xc6ad664ac6679f4ce74e10e91449c93ec1ae3ca6
                                      input: >-
                                        0xa9059cbb00000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41000000000000000000000000000000000000000000000000000000001a497ae7
                                      output: >-
                                        0x0000000000000000000000000000000000000000000000000000000000000001
                                      calls:
                                        - from: >-
                                            0x3600000000000000000000000000000000000000
                                          gas: '0xc14c8'
                                          gasUsed: '0x2eb4'
                                          to: >-
                                            0x1800000000000000000000000000000000000000
                                          input: >-
                                            0xbeabacc800000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e239559300000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41000000000000000000000000000000000000000000000017e86d2e201a917000
                                          output: >-
                                            0x0000000000000000000000000000000000000000000000000000000000000001
                                          value: '0x0'
                                          type: CALL
                                      value: '0x0'
                                      type: DELEGATECALL
                                  value: '0x0'
                                  type: CALL
                              value: '0x0'
                              type: CALL
                            - from: '0x82916bee18fcef517b26c72d7cb5f13694e1db41'
                              gas: '0xc7201'
                              gasUsed: '0x560'
                              to: '0x3600000000000000000000000000000000000000'
                              input: >-
                                0x70a0823100000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41
                              output: >-
                                0x000000000000000000000000000000000000000000000000000004f547c7e531
                              calls:
                                - from: '0x3600000000000000000000000000000000000000'
                                  gas: '0xc3db4'
                                  gasUsed: '0x2a7'
                                  to: '0xc6ad664ac6679f4ce74e10e91449c93ec1ae3ca6'
                                  input: >-
                                    0x70a0823100000000000000000000000082916bee18fcef517b26c72d7cb5f13694e1db41
                                  output: >-
                                    0x000000000000000000000000000000000000000000000000000004f547c7e531
                                  value: '0x0'
                                  type: DELEGATECALL
                              type: STATICCALL
                          value: '0x0'
                          type: CALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xc94d9'
                          gasUsed: '0x560'
                          to: '0x3600000000000000000000000000000000000000'
                          input: >-
                            0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                          output: >-
                            0x000000000000000000000000000000000000000000000000000000007c8ccbcb
                          calls:
                            - from: '0x3600000000000000000000000000000000000000'
                              gas: '0xc6000'
                              gasUsed: '0x2a7'
                              to: '0xc6ad664ac6679f4ce74e10e91449c93ec1ae3ca6'
                              input: >-
                                0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                              output: >-
                                0x000000000000000000000000000000000000000000000000000000007c8ccbcb
                              value: '0x0'
                              type: DELEGATECALL
                          type: STATICCALL
                        - from: '0x59940b5885b2e74400cee1e8aec7fdd1e2395593'
                          gas: '0xc8d80'
                          gasUsed: '0x4e2'
                          to: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                          input: >-
                            0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                          output: >-
                            0x000000000000000000000000000000000000000000000000000000000008ea0f
                          calls:
                            - from: '0x171a4217b86a807a64eb94757db6849fb4bdbaa0'
                              gas: '0xc58c5'
                              gasUsed: '0x229'
                              to: '0xc6061272419bb754a6c0386d1df81ddb3fe5cf3c'
                              input: >-
                                0x70a0823100000000000000000000000059940b5885b2e74400cee1e8aec7fdd1e2395593
                              output: >-
                                0x000000000000000000000000000000000000000000000000000000000008ea0f
                              value: '0x0'
                              type: DELEGATECALL
                          type: STATICCALL
                      value: '0x0'
                      type: CALL
                    txHash: >-
                      0x010237c95a77484f09c3b76b209efd1edd073de7d9cd10c3056b8f51107640ad

````