debug_traceBlockByNumber
Replays every transaction in a MegaETH block selected by number and returns execution traces.
Summary
Replays a block selected by number or tag and returns one execution trace per transaction. The public MegaETH endpoint supports this standard debug method.
Parameters
0
block
QUANTITY or block tag
Yes
Block number or latest, safe, finalized, earliest, or pending.
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.
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 geth-compatible tracer options and includes system transactions in the block trace when present.
MegaETH Public Gateway
The public gateway streams trace responses and requires two positional parameters.
Errors
The | Scope | column distinguishes method failures from gateway policy errors.
-32602
Method
Invalid params
Either positional parameter is missing or malformed.
-32000
Method
Server error
The block or parent state is unavailable, a timeout occurs, 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
Probe: MegaETH Mainnet public endpoint, July 24, 2026
Last updated