🖥️Baremetal

Authors: [Payne | StakeSquid]

System Requirements

CPU
OS
RAM
DISK

4c/8T

Ubuntu 22.04

>= 16GB

>= 8TB

Pre-requisites

sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y

sudo apt install -y git make wget gcc pkg-config libusb-1.0-0-dev libudev-dev jq gcc g++ curl libssl-dev apache2-utils build-essential pkg-config 

# Add to PATH
echo "export PATH="$PATH:/root/.foundry/bin:/usr/local/go/bin:/root/.local/bin"" >> /root/.bashrc

source /root/.bashrc

# Install go
sudo wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz && sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz && rm go1.21.6.linux-amd64.tar.gz

# Install nvm
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash 

# Download foundry
curl -L https://foundry.paradigm.xyz | bash

# Install foundry
foundryup

source /root/.bashrc

# Install node and yarn
nvm install 16 && npm install --global yarn && nvm use 16 && npm -g install pnpm

source /root/.bashrc

# Check if go and npm are installed:
go version
nvm -v
npm -v
yarn -v
pnpm -v

# Create directories
mkdir -p /root/github
mkdir -p /root/data/optimism/geth/dtl
mkdir -p /root/data/optimism/geth/l2geth
mkdir -p /root/data/optimism/geth/op-node
mkdir -p /root/data/optimism/geth/op-geth

# Download snapshots
https://docs.optimism.io/builders/node-operators/management/snapshots#op-mainnet

# Verify tree structure
/root/data/optimism/geth  tree -d
.
|-- dtl
|-- l2geth
|   |-- geth
|   |   |-- chaindata
|   |   |   `-- ancient
|   |   |-- chaindata-part1
|   |   |   `-- ancient
|   |   |-- chaindata-part2
|   |   |-- lightchaindata
|   |   `-- nodes
|   `-- keystore
|-- op-geth
|   |-- geth
|   |   |-- blobpool
|   |   |-- chaindata
|   |   |   `-- ancient
|   |   |-- nodes
|   |   `-- triecache
|   `-- keystore
`-- op-node
    |-- opnode_discovery_db
    `-- opnode_peerstore_db

22 directories

DTL

Building Optimism DTL

Setting up the Systemd file for DTL

To verify that DTL is running correctly you can run a command

If synchronizing from L1:

If synchronizing from L2:

L2-GETH

Building and preparing L2 GETH

Setting up the Systemd file for L2GETH

To check if l2geth is running correctly, open another command line window and run these commands:

Wait a few seconds and then look at the blocknumber again and exit:

OP NODE

Building and preparing OP Node

Setting up the Systemd file for OP Node

OP-GETH

Building and preparing OP-GETH

Setting up the Systemd file for OP GETH

Last updated

Was this helpful?