Skip to main content
op-node implements rollup-specific functionality as the Consensus Layer, similar to an L1 beacon node. It provides RPC methods for querying rollup state, managing peers, and controlling sequencer operations.
Use eth_gasPrice instead of rollup_gasPrices for the L2 gas price. For the L1 gas price, you can call the GasPriceOracle’s l1BaseFee function. If you want to estimate the cost of a transaction, you can use the SDK.

Making RPC Requests

The following examples show you how to make requests with curl and cast.
Protip: piping these commands into jq will give you nicely formatted JSON responses.$ cast rpc optimism_syncStatus --rpc-url http://localhost:9545 | jq

optimism Namespace

Optimism-specific rollup methods for querying chain state and configuration.

optimism_outputAtBlock

Get the output root at a specific block. This method is documented in the specifications.
Sample success output:

optimism_syncStatus

Get the synchronization status of the rollup node. This method provides detailed information about L1 and L2 block processing states.
Sample success output:

optimism_rollupConfig

Get the rollup configuration parameters.
Sample success output:

optimism_version

Get the software version of the op-node.
At the moment, building from source will not give you the correct version, but our docker images will.
Sample success output:

opp2p Namespace

The opp2p namespace handles peer-to-peer networking interactions, allowing you to manage peer connections, discovery, and network policies.

opp2p_self

Returns your node’s peer information including peer ID, addresses, and network configuration.
Sample success output:

opp2p_peers

Returns a list of your node’s peers with detailed connection information.
Sample success output:

opp2p_peerStats

Returns aggregate statistics about your peer connections.
Sample success output:

opp2p_discoveryTable

Returns your peer discovery table containing node records (ENRs) of discovered peers.
Sample success output:

opp2p_blockPeer

Blocks a peer by peer ID, preventing future connections.
Sample success output:

opp2p_unblockPeer

Unblocks a previously blocked peer.
Sample success output:

opp2p_listBlockedPeers

Returns a list of blocked peer IDs.
Sample success output:

opp2p_blockAddr

Blocks connections from a specific IP address.
Sample success output:

opp2p_unblockAddr

Unblocks a previously blocked IP address.
Sample success output:

opp2p_listBlockedAddrs

Returns a list of blocked IP addresses.
Sample success output:

opp2p_blockSubnet

Blocks connections from a specific subnet (CIDR notation).
Sample success output:

opp2p_unblockSubnet

Unblocks a previously blocked subnet.
Sample success output:

opp2p_listBlockedSubnets

Returns a list of blocked subnets.
Sample success output:

opp2p_protectPeer

Protects a peer from being pruned from the connection pool.
Sample success output:

opp2p_unprotectPeer

Removes protection from a peer, allowing it to be pruned if necessary.
Sample success output:

opp2p_connectPeer

Initiates a connection to a peer using its multiaddress.
Sample success output:

opp2p_disconnectPeer

Disconnects from a specific peer.
Sample success output:

admin Namespace

Administrative methods for controlling sequencer operations and the derivation pipeline.

admin_resetDerivationPipeline

Resets the derivation pipeline, forcing it to re-derive L2 blocks from L1 data.
Sample success output:

admin_startSequencer

Starts the sequencer if it was previously stopped. This allows the node to begin producing new blocks.
Sample success output:

admin_stopSequencer

Stops the sequencer, preventing it from producing new blocks. The node will continue to sync from other sequencers.
Sample success output:

admin_sequencerActive

Returns whether the sequencer is currently active and producing blocks.
Sample success output: