For the complete documentation index, see llms.txt. This page is also available as Markdown.

debug_traceBlockByHash

Replays every transaction in a MegaETH block selected by hash and returns execution traces.

Summary

Replays a block selected by hash and returns one execution trace per transaction. The public MegaETH endpoint supports this standard debug method.

Parameters

Position
Name
Type
Required
Description

0

blockHash

DATA, 32 bytes

Yes

Hash of the block to replay.

1

traceConfig

object

Yes on the public gateway

Tracer selection and tracer-specific options. Use {} for the opcode tracer.

Common traceConfig fields include tracer, tracerConfig, and timeout. For example, set tracer to "callTracer" for a nested call frame instead of opcode-level structLogs.

Result

The result is an array ordered by transaction index. Each entry contains txHash and either result or error; the shape of result depends on the selected tracer.

Comparison with Ethereum Standard JSON-RPC

Ethereum Standard

The method replays all transactions in the selected block against its parent state. The genesis block cannot be replayed because it has no parent state.

MegaETH Node Behavior

MegaETH uses the standard geth-compatible tracer options and returns a trace paired with each transaction hash. System transactions may therefore appear in block traces.

MegaETH Public Gateway

The public gateway streams trace responses because they can be large. It requires two positional parameters and supports callTracer.

Errors

The | Scope | column distinguishes method failures from gateway policy errors.

Code
Scope
Message
When it happens

-32602

Method

Invalid params

Either positional parameter is missing or malformed.

-32000

Method

Server error

The block is unknown, its parent state is unavailable, or tracing fails.

-32099

Transport/policy

Payload too large

The request exceeds the public endpoint body limit.

Examples

Endpoint: https://mainnet.megaeth.com/rpc

Capture date: July 24, 2026

Outcome: success

The nested call frame is abbreviated below.

Sources

Last updated