What you’re going to build
Rollup node
The Rollup Node is responsible for deriving L2 block payloads from L1 data and passing those payloads to the Execution Client. The Rollup Node can also optionally participate in a peer-to-peer network to receive blocks directly from the Sequencer before those blocks are submitted to L1. The Rollup Node is largely analogous to a consensus client in Ethereum. In this tutorial you will build theop-node
implementation of the Rollup Node as found in the Optimism Monorepo.
Execution client
The Execution Client is responsible for executing the block payloads it receives from the Rollup Node over JSON-RPC via the standard Ethereum Engine API. The Execution Client exposes the standard JSON-RPC API that Ethereum developers are familiar with, and can be used to query blockchain data and submit transactions to the network. The Execution Client is largely analogous to an execution client in Ethereum.Legacy Geth (optional)
Legacy Geth is an optional component for OP Mainnet archive nodes. Legacy Geth allows you to execute stateful queries likeeth_call
against blocks and transactions that occurred before the OP Mainnet Bedrock Upgrade.
Legacy Geth is only relevant to OP Mainnet archive nodes and is not required for full nodes or OP Sepolia nodes.
Currently, l2Geth
is the only available implementation of Legacy Geth.
In this tutorial you will build the l2geth
implementation of Legacy Geth as found in the optimism-legacy
repository.
Software dependencies
Our build environment is managed through a tool called mise. Mise provides a convenient way to install and manage all necessary dependencies for building and testing the packages in this repository. You can find the mise configuration in themise.toml
in the root of the Optimism Monorepo.
Build the rollup node
First you’re going to build theop-node
implementation of the Rollup Node as found in the Optimism Monorepo.
1
Clone the Optimism Monorepo
The Optimism Monorepo contains the source code for the
op-node
.2
Check out the required release branch
Release branches are created when new versions of the
op-node
are created.
Read through the Releases page to determine the correct branch to check out.Make sure to read the Releases page carefully to determine the correct branch to check out.
Some releases may only be required for the OP Sepolia testnet.
3
Build `op-node`
Build the
op-node
implementation of the Rollup Node.Build the execution client
Next you’re going to build theop-geth
implementation of the Execution Client as found in the op-geth
repository.
1
Clone `op-geth`
The
op-geth
repository contains the source code for the op-geth
implementation of the Execution Client.2
Check out the required release branch
Release branches are created when new versions of the
op-geth
are created.
Read through the Releases page to determine the correct branch to check out.Make sure to read the Releases page carefully to determine the correct branch to check out.
Some releases may only be required for the OP Sepolia testnet.
3
Build `op-geth`
Build the
op-geth
implementation of the Execution Client.Build legacy Geth (optional)
Legacy Geth is an optional component for OP Mainnet archive nodes. Legacy Geth allows you to execute stateful queries likeeth_call
against blocks and transactions that occurred before the OP Mainnet Bedrock Upgrade.
Legacy Geth is only relevant to OP Mainnet archive nodes and is not required for full nodes or OP Sepolia nodes.
1
Clone the OP Legacy Repository
The OP Legacy repository contains the source code for the
l2geth
implementation of Legacy Geth.2
Build l2geth
Next steps
- Click here to Run a Superchain node from source code
- If you run into any problems, please visit the Node Troubleshooting Guide for help.