Docker

Authors: [jLeopoldA]

System Requirements

CPU
OS
Ram
Disk

4vCPU

Ubuntu 18.04

16GB

2.5TB+ (SSD)

The Fuse archival node has a size of 2.4TB on July 3rd, 2024

Pre-Requisites

sudo apt update -y

Install Docker

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Install Docker Packages

 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Verify Docker Engine Installation is Successful

sudo docker run hello-world

Set Firewall Rules

Set explicit default UFW rules

sudo ufw default deny incoming
sudo ufw default deny outgoing

Allow SSH

sudo ufw allow 22/tcp

Allow remote RPC connections

sudo ufw allow 8545

Building a Node on Fuse with Nethermind client

Since 08.2022 Fuse is moving from OE client to Nethermind. To bootstrap Fuse archive node this guide covers the steps on how to build Nethermind from source and configure it to run for Fuse Network

Clone Fuse Repository

$ git clone https://github.com/fuseio/fuse-network.git ~/Dev/fuse-network

Download Quickstart

You can create an archival node using Quickstart.sh

# Enter the fuse-network folder
cd ~/Dev/fuse-network

# Download
wget -O quickstart.sh https://raw.githubusercontent.com/fuseio/fuse-network/master/nethermind/quickstart.sh

# Gain needed permissions
chmod 755 quickstart.sh

# Run Outline Example
./quickstart.sh -r [node_role] -n [network_name] -k [node_key]

# To create an archival node
./quickstart.sh -r explorer -n fuse -k [your_node_key_here]

Query Fuse Node

# To ensure your archival node has been correctly started, run the below
curl -X POST -H "Content-type: application/json" --data \
'{"jsonrpc":"2.0", "method":"eth_blockNumber", "params":[], "id":1}' \
http://localhost:8545

# Your result should resemble the following:
{"jsonrpc":"2.0","id":1,"result":"0xcab5ab"}

To access your archival node - use your current server's IP address with port 8545. Ex. http://localhost:8545

Check Docker Logs

# Get Container ID
docker ps

# Desired Image name should be "fusenet/node:nethermind"
# Copy the Container ID and check your logs
docker logs [Container_ID]

Last updated