trace_replayBlockTransactions
JSON-RPC method replays all transactions in a block and returns trace information for each transaction. This method provides detailed execution traces for all transactions in a specific block by replaying their execution, making it essential for comprehensive block analysis.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
- Block identifier (string, required): Block number, hash, or “latest”/“earliest”/“pending”
- Trace types (array, required): Array of trace types to include in response
Trace types
"trace"
: Basic execution trace information"vmTrace"
: Virtual machine execution trace"stateDiff"
: State differences caused by transactions
Response
The method returns an array of trace results for each transaction in the block.Response structure
Block trace results:- Array of trace results, one per transaction in the block
- Each result contains detailed execution traces for the transaction
Usage example
Basic implementation
Example request
Shell
Use cases
Thetrace_replayBlockTransactions
method is essential for applications that need to:
- Block analysis: Analyze complete blocks with detailed execution traces
- Performance monitoring: Monitor transaction execution performance across blocks
- Analytics platforms: Build comprehensive blockchain analytics tools
- Forensic investigation: Investigate suspicious blocks with complete trace data
- Compliance monitoring: Monitor regulatory compliance across entire blocks
- Development tools: Build block-level debugging and analysis tools
- Research platforms: Support detailed blockchain research and analysis
- Security auditing: Audit block execution for security issues
- MEV analysis: Analyze Maximum Extractable Value opportunities across blocks
- Protocol monitoring: Monitor protocol behavior across multiple transactions
Body
application/json
JSON-RPC version
Available options:
2.0
The RPC method name
Available options:
trace_replayBlockTransactions
Parameters: [block identifier, trace types array]
Request identifier