Run a Node From Source
Last updated
Last updated
DDocker images make it very simple to run a BOBA node, but you can also create your own node using the source code. You might choose to do this if you need the node to work on a specific architecture or if you want to look closely at the node's code. This guide will show you how to build and run a node from scratch.
Dependency | Version | Version Check Command |
---|---|---|
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.
Install the Node.js dependencies for the Boba Monorepo.
Builde the Node.js packages for the Boba Monorepo.
Build the op-node
.
Release branches are created when new versions of the erigon
are created. Read through the Releases page to determine the correct branch to check out.
Build the erigon
.
You can download the database snapshot for the client and network you wish to run.
Always verify snapshots by comparing the sha256sum of the downloaded file to the sha256sum listed on this page. Check the sha256sum of the downloaded file by running sha256sum <filename>
in a terminal.
BOBA Mainnet
The erigon db can be downloaded from the boba mainnet erigon db.
The geth db can be downloaded from boba mainnet geth db.
BOBA Sepolia
The erigon db can be downloaded from the boba sepolia erigon db.
The geth db can be downloaded from boba sepolia geth db.
OP Mainnet
The erigon db can be downloaded from Test in Prod OP Mainnet.
OP Sepolia
The erigon db can be downloaded from optimism sepolia erigon db.
Or you can download the genesis file from Optimsim and initialize the data directory with it.
The erigon can be built from the source using make erigon
.
op-erigon
and op-node
communicate over the engine API authrpc. This communication is secured using a shared secret. You will need to generate a shared secret and provide it to both op-erigon
and op-node
when you start them. In this case, the secret takes the form of a 32 byte hex string.
Run the following command to generate a random 32 byte hex string:
op-erigon
It's usually simpler to begin with op-erigon
before you start op-node
. You can start op-erigon
even if op-node
isn't running yet, but op-erigon
won't get any blocks until op-node
starts.
Copy the JWT secret you generated in the previous step into the v3-erigon
directory.
Using the following command to start op-erigon
in a default configuration. The JSON-RPC API will become available on port 9545.
op-node
Once you've started op-erigon
, you can start op-node
. op-node
will connect to op-erigon
and begin synchronizing the BOBA network. op-node
will begin sending block payloads to op-erigon
when it derives enough blocks from Ethereum.
Copy the JWT secret you generated in the previous step into the v3-erigon
directory.
Set the following environment variable:
Using the following command to start op-node
in a default configuration. The JSON-RPC API will become available on port 8545.
During the initial synchonization, you get log messages from op-node
, and nothing else appears to happen.
After a few minutes, op-node
finds the right batch and then it starts synchronizing. During this synchonization process, you get log messags from op-node
.
^2
git --version
^1.21
go --version
^20
node --version
^8
pnpm --version
^0.2.0
forge --version
^4
make --version