op-reth is the Rust execution client for the OP Stack, based on Reth. It implements the same Engine API and Ethereum JSON-RPC surface as op-geth, so it is a drop-in alternative on OP Stack chains.
This page documents the JSON-RPC methods that were tested against an OP Stack devnet running op-reth v2.2.3 (build reth/v2.2.0-88505c7) with the V2 (Jovian) fee model active.
Overview
op-reth implements the standard Ethereum JSON-RPC API with the same OP Stack additions as op-geth. Familiar Ethereum tools (cast, web3.js, ethers, viem, …) work without modification.
The execution engine’s RPC interface is functionally identical to the upstream Reth RPC interface. The OP-specific behavior matches
op-geth: transaction receipts include additional L1 data-availability fee fields, and deposit transactions (type 0x7e) carry OP-specific fields.Key Differences from Ethereum
Whileop-reth maintains compatibility with Ethereum’s JSON-RPC API, there are important differences shared with the wider OP Stack:
Transaction Receipts
User transaction receipts include additional L1 data fee information. With the V2 (Jovian) fee model the fields are:l1GasUsed— Amount of L1 gas attributed to L1 data availability.l1GasPrice— L1 base fee at the time of execution.l1Fee— Total L1 data fee charged in wei.l1BaseFeeScalar— Scalar applied to the L1 base fee component.l1BlobBaseFee— L1 blob base fee at the time of execution.l1BlobBaseFeeScalar— Scalar applied to the L1 blob base fee component.daFootprintGasScalar— Scalar applied to the data-availability footprint.
Deposit transactions
OP Stack deposit transactions (type: 0x7e) include extra fields in both transaction and receipt responses:
- On the transaction:
sourceHash,mint,depositReceiptVersion. - On the receipt:
depositNonce,depositReceiptVersion.
Gas Price Calculation
For L2 gas prices, use the standardeth_gasPrice method.
For L1 gas prices and end-to-end fee estimation, use the GasPriceOracle predeploy or the Optimism SDK.
Standard JSON-RPC Methods
All examples below were verified live againstop-reth v2.2.3.
eth_blockNumber
Returns the number of the most recent block.- curl
- cast
eth_chainId
Returns the currently configured chain ID, used for signing replay-protected transactions.eth_syncing
Returns sync status.Unlike
op-geth, op-reth always returns a structured object that lists each pipeline stage (Headers, Bodies, Execution, MerkleExecute, …) and their per-stage progress, even when the node is fully synced. Clients that treat any non-false response as “still syncing” need to compare currentBlock and highestBlock instead.eth_getBalance
Returns the balance of the account at the given address.eth_getTransactionByHash
Returns information about a transaction by transaction hash. Deposit transactions includesourceHash, mint, and depositReceiptVersion.
eth_getTransactionReceipt
Returns the receipt of a transaction by hash. Includes OP Stack–specific L1 fee fields. The example below is a deposit-tx receipt (note thedepositNonce / depositReceiptVersion fields and l1Fee = 0); a regular user-tx receipt will carry a non-zero l1Fee computed from the V2 scalars.
Notice the OP-specific fields at the end of the receipt:
l1GasUsed, l1GasPrice, l1Fee, plus the V2 scalars l1BaseFeeScalar, l1BlobBaseFee, l1BlobBaseFeeScalar, and daFootprintGasScalar. The Bedrock-era l1FeeScalar field is not present on V2 chains.eth_call
Executes a new message call immediately without creating a transaction on the blockchain. Example callsGasPriceOracle.l1BaseFee().
eth_estimateGas
Generates and returns an estimate of gas needed for a transaction to complete.eth_sendRawTransaction
Submits a signed transaction to the network. The example payload is intentionally invalid to demonstrate the error shape.result.
eth_getBlockByNumber
Returns information about a block by block number. Op-reth populates the standard post-Ecotone/Cancun fields:withdrawalsRoot, blobGasUsed, excessBlobGas, parentBeaconBlockRoot, and requestsHash.
eth_getLogs
Returns an array of all logs matching a given filter object.Gas Price Methods
eth_gasPrice
Returns the current gas price in wei for L2 execution.This only returns the L2 gas price. For comprehensive transaction cost estimation including L1 data fees, use the
GasPriceOracle predeployed contract or the Optimism SDK.eth_maxPriorityFeePerGas
Returns the current maximum priority fee per gas (EIP-1559).eth_feeHistory
Returns historical base fee, gas-usage ratio, blob base fee, and priority-fee percentile data for fee estimation.Account and State Methods
eth_getCode
Returns code at a given address.eth_getStorageAt
Returns the value from a storage position at a given address.eth_getTransactionCount
Returns the number of transactions sent from an address (the nonce).Txpool Methods
When thetxpool namespace is enabled (--http.api eth,net,web3,debug,txpool), op-reth exposes the standard txpool inspection methods.
txpool_status
Debug Methods
op-reth supports the debug_* namespace for transaction inspection. Enable with --http.api …,debug.
debug_traceTransaction
Returns the trace of a transaction, showing all internal calls and state changes. ThecallTracer is recommended for most use cases.
debug_traceCall
Traces a call without executing it on-chain.GasPriceOracle.l1BaseFee()):
WebSocket Support
op-reth supports WebSocket connections for real-time event subscriptions using the eth_subscribe method. Default port is 8546.
eth_subscribe
Creates a subscription for specific events. Verified subscription topics includenewHeads, logs, newPendingTransactions, and syncing.
eth_unsubscribe
Cancels an active subscription.Methods that behave differently from op-geth
These calls are worth flagging for tooling that auto-detects client capability:Additional Resources
For a complete list of all supported JSON-RPC methods, refer to:- op-geth JSON-RPC API — the same Ethereum JSON-RPC surface, on the op-geth reference page. Useful for cross-referencing if you’re migrating from op-geth.
- Reth JSON-RPC / Namespaces Documentation
- Geth JSON-RPC Documentation
- Ethereum JSON-RPC Specification
- OP Stack Transaction Cost Estimation
Running a Node with RPC Access
To run your ownop-reth node with full RPC access:
Test environment
The samples above were generated by running each curl/websocat command against anop-reth v2.2.3 (reth/v2.2.0-88505c7) node in our u19-beta-v223 devnet (chain ID 0x190a85e3 / 420120035), HTTP port 8555, WS port 8556. All listed methods returned successful (or expected-error) responses.