๐Ÿ’พInstallation

Base Client installation guide.

๐Ÿ—๏ธ Under Construction ๐Ÿ—๏ธ

Create Aliases

echo "alias base-log='cd ~/node; docker compose logs -f --tail 100'" >> ~/.bashrc
echo "alias base-start='cd ~/node; docker compose up -d'" >> ~/.bashrc
echo "alias base-stop='cd ~/node; docker compose down'" >> ~/.bashrc
echo "alias base-restart='cd ~/node; docker compose down; docker compose up -d'" >> ~/.bashrc
echo "alias base-config='cd ~/node; vim docker-compose.yml'" >> ~/.bashrc

source ~/.bashrc

Dependency - Install Docker

UFW Config

Configure the firewall.

Execution Clients
BASE_GETH_P2P_PORT=        # Default: 30303
BASE_NODE_P2P_PORT=        # Default: 9222

sudo ufw allow ${BASE_GETH_P2P_PORT} comment 'Allow Base Geth P2P in'
sudo ufw allow ${BASE_NODE_P2P_PORT} comment 'Allow Base Node P2P in'

Base - Install

git clone https://github.com/base-org/node.git
  • Edit the .env.mainnet

vim .env.mainnet
  • Set

    • OP_NODE_L1_ETH_RPC

    • OP_NODE_L1_BEACON

    • OP_NODE_L1_TRUST_RPC=true

  • Edit the docker-compose.yml

vim docker-compose.yml
  • Set to mainnet

    • env_file:

  • Add restart: unless-stopped to all services

  • Modify host port mappings as required

Snapshot Download

mkdir ~/base-snapshot-download
cd ~/base-snapshot-download
tmux new -s base-snapshot-download

wget https://mainnet-full-snapshots.base.org/$(curl https://mainnet-full-snapshots.base.org/latest)
base-stop
sudo rm -rf ~/node/geth-data/geth
sudo mv ~/base-snapshot-download/snapshots/mainnet/download/geth ~/node/geth-data/geth

Docker Commands

docker compose up -d
docker compose logs -f
docker compose logs -f geth
docker compose logs -f node

Check sync progress

timestamp=$(curl -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' \
  -H "Content-Type: application/json" http://localhost:7545 | \
  jq -r '.result.unsafe_l2.timestamp')

if [[ -z "$timestamp" ]]; then
  echo "Failed to retrieve timestamp"
else
  echo
  echo
  echo Latest synced block behind by: $((($(date +%s) - timestamp) / 60 / 60 / 24)) days
  echo
  echo
fi

Last updated