mega_outputAtBlock
mega_outputAtBlock JSON-RPC reference for MegaETH.
Summary
Returns the output root at a given block.
The public MegaETH endpoint supports this method. The standard, node, and gateway layers below identify behavior that differs from a generic Ethereum endpoint.
Parameters
blockNumber Quantity REQUIRED
Concrete hex block number; block tags such as latest are not accepted.
Result
versionHash32, optionalOutput version. Fresh upstream responses can include it, while the gateway's cached projection currently omits it.
outputRootHash32Output commitment.
blockRefobjectBlock reference; see fields below.
hashHash32Block hash.
numbernumberBlock number (JSON number).
parentHashHash32Parent block hash.
timestampnumberBlock timestamp (JSON number).
l1originobjectL1 origin with
hashandnumber.sequenceNumbernumberSequence number.
withdrawalStorageRootHash32Withdrawal storage root.
stateRootHash32State root.
syncStatusobjectBackend sync-status snapshot.
Comparison with Ethereum Standard JSON-RPC
Ethereum Standard
mega_outputAtBlock is not part of the core Ethereum execution JSON-RPC API. It is a MegaETH extension.
MegaETH Node Behavior
The current MegaETH execution node's related native method is mega_optimismOutputAtBlock, which forwards a concrete block number to the OP node's optimism_outputAtBlock endpoint. The public mega_outputAtBlock spelling is a gateway-facing compatibility name.
MegaETH Public Gateway
The gateway rewrites this method to optimism_outputAtBlock and routes it to the OP-node pool. It caches stable output data for 30 minutes but refreshes the embedded synchronization status on a 1-second cadence. Its cached projection omits the upstream version field, so callers must tolerate version being present on a fresh response and absent on a cache hit.
Errors
The | Scope | column distinguishes method failures from gateway policy errors.
-32602
Request
Invalid params
Missing block number, wrong parameter count, or block tag instead of hex block number
-32603
Method
Internal error
Backend cannot produce output data for the requested block
-32005
Transport/policy
Rate limit exceeded
The caller exceeds the public gateway's simple read budget.
-32099
Transport/policy
Payload too large
The request body exceeds the 128 KiB public endpoint limit.
See also Error Codes.
Examples
Endpoint: https://mainnet.megaeth.com/rpc
Capture date: July 27, 2026
Outcome: success
The captured response below is abridged; syncStatus contains additional L1 and L2 progress fields.
Sources
Spec: EIP-1474 for JSON-RPC framing and error conventions; this method is an extension or legacy compatibility method.
Code:
[email protected]:megaeth-labs/mega-reth.git @ ab60376631228edab3a6df180f295280bad26e93: crates/megaeth/rpc/src/mega.rsCode:
[email protected]:megaeth-labs/mega-rpc.git @ 06aa35aa95d569c227cc25d2aa12834eb0458aa0: workers/src/processors/op-output-processor.tsProbe: MegaETH Mainnet public endpoint, July 27, 2026; response abridged to stable top-level fields
Last updated