Run a Node From Source
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.
Software Dependencies
Dependency | Version | Version Check Command |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
Build the Rollup Node
Clone the Boba Monorepo
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.
Install dependencies
Install the Node.js dependencies for the Boba Monorepo.
Build packages
Builde the Node.js packages for the Boba Monorepo.
Build op-node
Build the op-node
.
Build the Execution Engine
Clone the Erigon repo
Check out the required release branch
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 erigon
Build the erigon
.
Download Snapshots
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
.
Create a JWT Secret
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:
Start op-erigon
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.
Navigate to your op-erigon directory
Copy in the JWT secret
Copy the JWT secret you generated in the previous step into the v3-erigon
directory.
Start op-erigon
Using the following command to start op-erigon
in a default configuration. The JSON-RPC API will become available on port 9545.
Start op-node
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.
Navigate to your op-node directory
Copy in the JWT secret
Copy the JWT secret you generated in the previous step into the v3-erigon
directory.
Set environment variables
Set the following environment variable:
Start op-node
Using the following command to start op-node
in a default configuration. The JSON-RPC API will become available on port 8545.
Synchornization
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
.
Last updated