Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions pages/operators/node-operators/rollup-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Before building your node, you will learn fundamental aspects of OP Stack rollup
Now, you are ready to build your OP Stack rollup node. You have two options for this:

* **Option 1:** Follow the [Running a Node with Docker](/operators/node-operators/tutorials/node-from-docker) tutorial, which gets your OP Stack rollup node up and running without having to build it from source.
* **Option 2:** Follow the [Building a Node from Source](/operators/node-operators/tutorials/node-from-source) tutorial, if you need to use a specific architecture or want to inspect the source code of your OP Stack rollup node.
* **Option 2:** Follow the [Building a Node from Source](/operators/node-operators/tutorials/node-from-source) tutorial, if you need to use a specific architecture or want to inspect the source code of your OP Stack rollup node.
</Steps>

## Configure your node
Expand All @@ -46,9 +46,9 @@ OP Stack rollup nodes can be configured for individual needs. The following step
* Configure `op-node` using the [base configuration](/operators/node-operators/configuration/base-config#working-base-configuration-1).

{<h3>Enable Snap Sync</h3>}
* Enable [snap sync](/operators/node-operators/management/snap-sync) for your node to significantly improve the experience and speed of syncing an OP Stack node.
This is an **optional** feature but highly recommended for node providers.

* Enable [snap sync](/operators/node-operators/management/snap-sync) for your node to significantly improve the experience and speed of syncing an OP Stack node.
This is an **optional** feature but highly recommended for node providers.

<Callout type="info">
Additional configuration options exist for [`op-geth`](/operators/node-operators/configuration/execution-config) and [`op-node`](/operators/node-operators/configuration/consensus-config), respectively.
Expand All @@ -62,14 +62,14 @@ Now, you will run your node and set your node debugging log level for more granu
<Steps>
{<h3>Run Your Node From Source</h3>}

You will now run your node from source for your Superchain network. Here are your options.
You will now run your node from source for your Superchain network. Here are your options.

<Callout type="warning">
The tutorial [Building a Node from Source](/operators/node-operators/tutorials/node-from-source) is a **pre-requisite** to running your node from source and must be completed first.
</Callout>

* **Option 1:** Follow the [Running an OP Sepolia Node from Source](/operators/node-operators/tutorials/testnet) tutorial.
* **Option 2:** Follow the [Running an OP Mainnet Node from Source](/operators/node-operators/tutorials/mainnet) tutorial, if you plan to run a full node or archive node.
* **Option 1:** Follow the [Running an OP Sepolia Node from Source](/operators/node-operators/tutorials/run-node-from-source) tutorial.
* **Option 2:** Follow the [Running an OP Mainnet Node from Source](/operators/node-operators/tutorials/run-node-from-source) tutorial, if you plan to run a full node or archive node.

{<h3>Update Node Log Level</h3>}

Expand All @@ -91,13 +91,12 @@ It is important to regularly monitor your node, and you can optionally configure
{<h3>Setup Prometheus & Grafana</h3>}

<Callout type="warning">
The following steps are intended for `go-ethereum`, so it must be tweaked to work for rollup nodes running within the Superchain.
The following steps are intended for `go-ethereum`, so it must be tweaked to work for rollup nodes running within the Superchain.
</Callout>

* Setup [influxdb](https://geth.ethereum.org/docs/monitoring/dashboards#setting-up-influxdb) to hold metrics data.
* Setup [prometheus](https://geth.ethereum.org/docs/monitoring/dashboards#setting-up-prometheus) to read your endpoint.
* Setup your [grafana dashboard](https://geth.ethereum.org/docs/monitoring/dashboards#setting-up-grafana) to provide UI for metrics.

</Steps>

## Follow node updates
Expand All @@ -114,12 +113,11 @@ It is important to regularly monitor your node, and you can optionally configure
Head over to GitHub to [suggest a new tutorial](https://github.com/ethereum-optimism/docs/issues/new?assignees=\&labels=tutorial%2Cdocumentation%2Ccommunity-request\&projects=\&template=suggest_tutorial.yaml\&title=%5BTUTORIAL%5D+Add+PR+title).
</Callout>

| Tutorial Name | Description | Difficulty Level |
| ----------------------------------------------------------- | ------------------------------------------------------ | ---------------- |
| [Running a Node With Docker](tutorials/node-from-docker) | Learn how to run a node with Docker. | 🟢 Easy |
| [Building a Node From Source](tutorials/node-from-source) | Learn how to compile node components from source code. | 🟢 Easy |
| [Running an OP Mainnet Node from Source](tutorials/mainnet) | Learn how to run an OP Mainnet node from source code. | 🟡 Medium |
| [Running an OP Sepolia Node from Source](tutorials/testnet) | Learn how to run an OP Sepolia node from source code. | 🟡 Medium |
| Tutorial Name | Description | Difficulty Level |
| ----------------------------------------------------------------------- | ------------------------------------------------------ | ---------------- |
| [Running a node with docker](tutorials/node-from-docker) | Learn how to run a node with Docker. | 🟢 Easy |
| [Building a Superchain node from source](tutorials/node-from-source) | Learn how to compile node components from source code. | 🟢 Easy |
| [Running a Superchain node from source](tutorials/run-node-from-source) | Learn how to run a Superchain node from source code. | 🟡 Medium |

## Next steps

Expand Down
9 changes: 4 additions & 5 deletions pages/operators/node-operators/tutorials.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import { Card, Cards } from 'nextra/components'

# Tutorials

This section provides information on various node operations. It covers running an OP Mainnet node from source, running a node with Docker, building a node from source, and running an OP Sepolia node from source. You'll find tutorials and guides to help you understand and work with these topics.
This section provides information on how to run a node on a Superchain network. It covers running a node with Docker, building a Superchain node from source, and running a Superchain node from source.

<Cards>
<Card title="Running an op mainnet node from source" href="/operators/node-operators/tutorials/mainnet" />

<Card title="Running a node with docker" href="/operators/node-operators/tutorials/node-from-docker" />

<Card title="Building a node from source" href="/operators/node-operators/tutorials/node-from-source" />
<Card title="Building a Superchain node from source" href="/operators/node-operators/tutorials/node-from-source" />

<Card title="Running a Superchain node from source" href="/operators/node-operators/tutorials/run-node-from-source" />

<Card title="Running an op sepolia node from source" href="/operators/node-operators/tutorials/testnet" />
</Cards>
5 changes: 2 additions & 3 deletions pages/operators/node-operators/tutorials/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"node-from-docker": "Running a node with Docker",
"node-from-source": "Building a node from source",
"mainnet": "Running OP Mainnet from source",
"testnet": "Running OP Sepolia from source"
"node-from-source": "Building a Superchain node from source",
"run-node-from-source": "Running a Superchain node from source"
}
35 changes: 6 additions & 29 deletions pages/operators/node-operators/tutorials/node-from-source.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Building a node from source
title: Building a Superchain node from source
lang: en-US
description: Learn how to build your own node without relying on images from Optimism.
---

import { Callout, Steps } from 'nextra/components'

# Building a node from source
# Building a Superchain node from source

Docker images are the easiest way to run an OP Mainnet node, but you can always build your own node from source code.
You might want to do this if you want to run a node on a specific architecture or if you want to inspect the source code of the node you're running.
Expand Down Expand Up @@ -41,14 +41,7 @@ In this tutorial you will build the `l2geth` implementation of Legacy Geth as fo

## Software dependencies

| Dependency | Version | Version Check Command |
| ------------------------------------------------------------- | -------- | --------------------- |
| [git](https://git-scm.com/) | `^2` | `git --version` |
| [go](https://go.dev/) | `^1.21` | `go version` |
| [node](https://nodejs.org/en/) | `^20` | `node --version` |
| [pnpm](https://pnpm.io/installation) | `^8` | `pnpm --version` |
| [foundry](https://github.com/foundry-rs/foundry#installation) | `^0.2.0` | `forge --version` |
| [make](https://linux.die.net/man/1/make) | `^4` | `make --version` |
Our build environment is managed through a tool called [mise](https://mise.jdx.dev/). 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 the [`mise.toml`](https://github.com/ethereum-optimism/optimism/blob/develop/mise.toml) in the root of the Optimism Monorepo.

## Build the rollup node

Expand Down Expand Up @@ -80,28 +73,13 @@ Make sure to read the Releases page carefully to determine the correct branch to
Some releases may only be required for the OP Sepolia testnet.
</Callout>

{<h3>Install Node.js dependencies</h3>}

Install the Node.js dependencies for the Optimism Monorepo.

```bash
pnpm install
```

{<h3>Build Node.js packages</h3>}

Build the Node.js packages for the Optimism Monorepo.

```bash
pnpm build
```

{<h3>Build op-node</h3>}

Build the `op-node` implementation of the Rollup Node.

```bash
make op-node
cd op-node
just
```

</Steps>
Expand Down Expand Up @@ -174,6 +152,5 @@ make

## Next steps

* Click here to [Run an OP Mainnet Node from Source Code](mainnet)
* Click here to [Run an OP Sepolia Node from Source Code](testnet)
* Click here to [Run a Superchain node from source code](run-node-from-source)
* If you run into any problems, please visit the [Node Troubleshooting Guide](/operators/chain-operators/management/troubleshooting) for help.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Running an OP Mainnet node from source
title: Running a Superchain node from source
lang: en-US
description: Learn how to run an OP Mainnet node from source code for full nodes and archive nodes.
description: Learn how to run a Superchain node from source code for full nodes and archive nodes.
---

import { Callout, Steps } from 'nextra/components'

# Running an OP Mainnet node from source
# Running a Superchain node from source

This tutorial explains how to run an OP Mainnet node from source code for full nodes and archive nodes.
Running an OP Mainnet node from source code is a flexible alternative to using pre-built Docker images.
This tutorial explains how to run an OP Stack node from source code for full nodes and archive nodes.
Running an OP Stack node from source code is a flexible alternative to using pre-built Docker images.

## Building the source code

Expand Down Expand Up @@ -39,7 +39,9 @@ Based on these trends, node operators should plan for future storage needs and c
Geth supports a "freezer" feature to store older chain data on HDDs, saving SSD space. Configure this for OP Mainnet using the `--datadir.ancient` flag. See [Geth docs](https://geth.ethereum.org/docs/fundamentals/databases) and [OP docs](/operators/node-operators/configuration/execution-config#datadirancient) for details.
</Callout>

## Full nodes
## Superchain nodes

All nodes in the Superchain ecosystem can be run from `op-node` and `op-geth` binaries if they're included in the [Superchain Registry](/superchain/superchain-registry). You can specify the type of node you want to run by configuring the `--network` flag on `op-node` and the `--op-network` flag on `op-geth`.

### Assess blob archiver

Expand Down Expand Up @@ -86,6 +88,9 @@ You can still start `op-geth` without yet running `op-node`, but the `op-geth` i

{<h3>Start op-geth</h3>}

<Callout type="info">
If you want to run an archive node, you will need to set `--gcmode=archive`. If you want to run an OP Mainnet archive node, please refer to the [OP Mainnet archive nodes](#op-mainnet-archive-nodes) section.
</Callout>
Use the following command to start `op-geth` in a default configuration.
The JSON-RPC API will become available on port 8545.
Refer to the `op-geth` [configuration documentation](/operators/node-operators/configuration/execution-config) for more detailed information about available options.
Expand All @@ -99,7 +104,7 @@ You can still start `op-geth` without yet running `op-node`, but the `op-geth` i
--authrpc.jwtsecret=./jwt.txt \
--verbosity=3 \
--rollup.sequencerhttp=https://mainnet-sequencer.optimism.io/ \
--op-network=op-mainnet \
--op-network=op-sepolia \
--datadir=$DATADIR_PATH
```
</Steps>
Expand Down Expand Up @@ -156,7 +161,7 @@ Once you've started `op-geth`, you can start `op-node`.
--l1.beacon=$L1_BEACON_URL \
--l2=ws://localhost:8551 \
--l2.jwt-secret=./jwt.txt \
--network=op-mainnet \
--network=op-sepolia \
--syncmode=execution-layer \
--l2.enginekind=geth
```
Expand Down Expand Up @@ -225,7 +230,7 @@ There are two stages on `op-geth` for snap sync:
#### Full sync

<Callout type="info">
You will need access to the migrated OP Mainnet database to run a full node with full sync.
For OP Mainnet you will need access to the migrated database to run a full node with full sync.
You can [migrate your own data directory](https://web.archive.org/web/20240110231645/https://blog.oplabs.co/reproduce-bedrock-migration/) or follow the options available for [archive nodes](#get-the-migrated-data-directory).
</Callout>

Expand Down Expand Up @@ -255,7 +260,7 @@ INFO [06-26|14:02:12.976] Chain head was updated number=4,068,
INFO [06-26|14:02:12.982] Starting work on payload id=0x5542117d680dbd4e
```

## Archive nodes
## OP Mainnet archive nodes

<Callout type="info">
You only need an archive node if you need the historical state. Most node operators should default to full nodes.
Expand Down
Loading