githubEdit

💻Baremetal

Authors: [man4ela | catapulta.eth]

System Requirements

CPU
OS
RAM
DISK

8+ cores CPU

Debian 12/Ubuntu 22.04

=> 16 GB RAM

6TB+ (NVME preffered)

circle-info

The Base archive node reached a size of 13TB on November 30th, 2024

Base 🔵

circle-check
circle-exclamation

Pre-Requisites

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

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

Setting up Firewall

Set explicit default UFW rules

sudo ufw default deny incoming
sudo ufw default allow outgoing

Allow SSH

Allow remote RPC connections with Base Node

circle-exclamation

Enable Firewall

Download a snapshot

Create a directory and start downloading an archive in screen session as it takes ~9 hours

Compile Op-node

Required Software Dependencies

Dependency
Version
Version Check Command

go

^1.22

go version

node

^20

node --version

pnpm

^8

pnpm --version

foundry

^0.2.0

forge --version

make

^4

make --version

yarn

1.22.21

yarn --version

nvm

0.39.3

nvm --verison

Install go

Install nvm

Download foundry

Install foundry

Install node and yarn

Check if go and all dependancies are installed

Create directories

Build op-node

#The binary is built at /root/github/optimism/op-node/bin/op-node

Create systemd service

circle-exclamation

Compile op-geth

#The binary is built at /root/github/op-geth/build/bin/geth

Create JWT secret file and download genesis and rollup .json files

Create systemd service

circle-info

If you wish to sync from scratch, consider bootstraping the node first by running

/root/github/op-geth/build/bin/geth --datadir /root/data/base/geth/op-geth init /root/data/base/geth/op-geth/genesis-l2.json

Sync using downloaded Snapshot

#Unzipping takes ~3-4 hrs so you can go touch some grass

Consider switching screen by pressingctrl A+Dto allow a process run in the background

After extracting is done move the contents of geth directory into op-geth data directoy:

Start op-geth

circle-info

To check or modify op-geth.service parameters simply run

sudo nano /etc/systemd/system/op-geth.service

Ctrl+X and Y to save changes

You can also run curl command in the terminal to check the status of your node

You can see If blocks increase at https://base.blockscout.com/arrow-up-right by entering returned hash. It means the node is catching up and the setup is successful.

References

Last updated

Was this helpful?