# Ethereum debug_traceBlockByHash RPC method
Ethereum API method that replays the block that is already present in the database.
Information
Learn how to deploy a node with the debug and trace API methods enabled.
Parameters:
hash
— the hash of the block to be traced.
Returns:
array
— the block traces that have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):results
— the trace object with:calls
— the array of transactions in the block with:from
— the address of the sender.gas
— the quantity of the gas provided for the call, encoded as hexadecimal.gas used
— the quantity of the gas used for the call, encoded as hexadecimal.input
— the call data.output
— the return data.to
— the address of the receiver.null
if it is a contract creation transaction.type
— the type of the transaction, can beCALL
orCREATE
.value
— the amount of value for the transfer, encoded as hexadecimal.
Example:
- web3.py
- cURL
from web3 import Web3
node_url = "CHAINSTACK_NODE_URL"
web3 = Web3.HTTPProvider(node_url)
debug = web3.make_request('debug_traceBlockByHash', ['0x02409f8fcc7944a10903840ce1afb1df4559aba8c82ec6849f99b3a8cd3d7490', {'tracer': 'callTracer'}])
print(debug)