You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are the instructions if you want to build your own node without relying on images from Optimism. These instructions were generated on an Ubuntu 20.04 LTS box, but they should work with other systems too.
11
+
Docker images are the easiest way to run an OP Mainnet node, but you can always build your own node from source code.
12
+
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.
13
+
This guide will walk you through the full process of building a node from source.
12
14
13
-
## Before You Begin
15
+
## What You're Going to Build
14
16
15
-
### Hardware requirements
17
+
### Rollup Node
16
18
17
-
Nodes need to process and store the transaction history of OP Mainnet or OP Sepolia. They need to be relatively powerful machines (real or virtual). We recommend at least 16 GB RAM. We recommend a 2TB SSD for OP Mainnet, our current archive node usage is \~1TB. We recommend a 256GB SSD for OP Sepolia, or current full node usage is \~1.6GB and archive node usage is \~5.6GB.
19
+
The Rollup Node is responsible for deriving L2 block payloads from L1 data and passing those payloads to the Execution Client.
20
+
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.
21
+
The Rollup Node is largely analogous to a [consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum.
18
22
19
-
### Software requirements
23
+
In this tutorial you will build the `op-node` implementation of the Rollup Node as found in the [Optimism Monorepo](https://github.com/ethereum-optimism/optimism).
20
24
21
-
You'll need the following software installed to follow this tutorial:
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](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#engine-api----common-definitions).
28
+
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.
29
+
The Execution Client is largely analogous to an [execution client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum.
33
30
34
-
This tutorial was checked on:
31
+
In this tutorial you will build the `op-geth` implementation of the Execution Client as found in the [`op-geth` repository](https://github.com/ethereum-optimism/op-geth).
Legacy Geth is an optional component for OP Mainnet archive nodes.
36
+
Legacy Geth allows you to execute stateful queries like `eth_call` against blocks and transactions that occurred before the OP Mainnet [Bedrock Upgrade](https://blog.oplabs.co/introducing-optimism-bedrock/).
37
+
Legacy Geth is only relevant to OP Mainnet archive nodes and is not required for full nodes or OP Sepolia nodes.
38
+
39
+
Currently, `l2Geth` is the only available implementation of Legacy Geth.
40
+
In this tutorial you will build the `l2geth` implementation of Legacy Geth as found in the [`optimism-legacy` repository](https://github.com/ethereum-optimism/optimism-legacy).
First you're going to build the `op-node` implementation of the Rollup Node as found in the [Optimism Monorepo](https://github.com/ethereum-optimism/optimism).
44
56
45
-
## Build the Optimism Monorepo
46
57
47
58
<Steps>
48
-
### Navigate to your working directory
49
59
50
-
### Clone the [Optimism Monorepo](https://github.com/ethereum-optimism/optimism)
60
+
{<h3>Clone the Optimism Monorepo</h3>}
61
+
62
+
The Optimism Monorepo contains the source code for the `op-node`.
Release branches are created when new versions of the `op-node` are created.
72
+
Read through the [Releases page](https://github.com/ethereum-optimism/optimism/releases) to determine the correct branch to check out.
73
+
74
+
```bash
75
+
git checkout <name of release branch>
76
+
```
77
+
78
+
<Callout>
79
+
Make sure to read the Releases page carefully to determine the correct branch to check out.
80
+
Some releases may only be required for the OP Sepolia testnet.
81
+
</Callout>
82
+
83
+
{<h3>Install Node.js dependencies</h3>}
84
+
85
+
Install the Node.js dependencies for the Optimism Monorepo.
51
86
52
-
<Callouttype="info">
53
-
If you want to run the same version we're using in production, you can checkout our latest [release commit](https://github.com/ethereum-optimism/optimism/releases).
Build the Node.js packages for the Optimism Monorepo.
61
94
62
-
```bash
63
-
cd optimism
64
-
pnpm install
65
-
```
95
+
```bash
96
+
pnpm build
97
+
```
66
98
67
-
### Build the various packages inside of the Optimism Monorepo
99
+
{<h3>Build op-node</h3>}
68
100
69
-
```bash
70
-
make op-node
71
-
pnpm build
72
-
```
101
+
Build the `op-node` implementation of the Rollup Node.
102
+
103
+
```bash
104
+
make op-node
105
+
```
73
106
74
-
This process will take some time, so you can move onto the next section while the build completes.
75
107
</Steps>
76
108
77
-
## Build op-geth
109
+
## Build the Execution Client
110
+
111
+
Next you're going to build the `op-geth` implementation of the Execution Client as found in the [op-geth repository](https://github.com/ethereum-optimism/op-geth).
If you want to run the same version we're using in production, you can checkout our latest [release commit](https://github.com/ethereum-optimism/op-geth/releases).
86
-
</Callout>
117
+
The [`op-geth` repository](https://github.com/ethereum-optimism/op-geth) contains the source code for the `op-geth` implementation of the Execution Client.
## (Optional - OP Mainnet Archive Node) Build l2geth
127
+
Release branches are created when new versions of the `op-geth` are created.
128
+
Read through the [Releases page](https://github.com/ethereum-optimism/op-geth/releases) to determine the correct branch to check out.
129
+
130
+
```bash
131
+
git checkout <name of release branch>
132
+
```
101
133
102
-
<Callouttype="info">
103
-
OP Mainnet Archive Node
104
-
This step is only necessary for OP Mainnet archive nodes. If you're building a OP Testnet archive node, you do not need to do this step.
134
+
<Callout>
135
+
Make sure to read the Releases page carefully to determine the correct branch to check out.
136
+
Some releases may only be required for the OP Sepolia testnet.
105
137
</Callout>
106
138
139
+
{<h3>Build op-geth</h3>}
140
+
141
+
Build the `op-geth` implementation of the Execution Client.
142
+
143
+
```bash
144
+
make op-geth
145
+
```
146
+
147
+
</Steps>
148
+
149
+
## Build Legacy Geth (Optional)
150
+
151
+
Legacy Geth is an optional component for OP Mainnet archive nodes.
152
+
Legacy Geth allows you to execute stateful queries like `eth_call` against blocks and transactions that occurred before the OP Mainnet [Bedrock Upgrade](https://blog.oplabs.co/introducing-optimism-bedrock/).
153
+
Legacy Geth is only relevant to OP Mainnet archive nodes and is not required for full nodes or OP Sepolia nodes.
0 commit comments