HugoTrentesaux

Run a smith node🔗

Running a smith node is useful for the network decentralisation and resilience. On the test networks, we aim at 20-30 smith nodes and on the production network we aim at 80-100 smith nodes. This means that we expect to build a smith web of trust with at least 150 persons (smith are not available 100% of the time).

Definitions🔗

In this context "smith node" and "validator node" are equivalent. This is only Duniter vs Substrate vocabulary.

Requirements🔗

The first step to run a smith node is to get a machine well connected to the network and with a good uptime (the time it is available). A self-hosted machine subject to power outage is discouraged if you are not experienced with this.

The power of the machine should be equal or superior to the reference machine (currently a Raspberry Pi 4, see forum), but for the training network it does not matter.

The prefered method to run a node is with Docker. You need to have Docker installed:

You should also be able to connect to your machine directly with ssh or a vpn.

Install🔗

Here is an example docker-compose.yml file configured to run a validator node.

# Duniter validator node
version: "3.5"

services:
  duniter-validator:
    image: duniter/duniter-v2s-gdev:latest # <--- here is the image
    restart: unless-stopped
    ports:
      # prometheus endpoint (local)
      - 127.0.0.1:9615:9615
      # rpc via http (local)
      - 127.0.0.1:9933:9933
      # rpc via websocket (local)
      - 127.0.0.1:9944:9944
      # public p2p endpoint
      - 30333:30333                         # <--- here is your public p2p port
    volumes:
      - duniter-data:/var/lib/duniter/
    environment:
      - DUNITER_CHAIN_NAME=gdev             # <--- the network you want to connect to
      - DUNITER_NODE_NAME=YOUR_NAME-validator # <--- the name of your node on the network
      - DUNITER_VALIDATOR=true              # <--- enable validator
      - DUNITER_PRUNING_PROFILE=light       # <--- stays light
      - DUNITER_PUBLIC_ADDR=/dns/gdev.example.org/tcp/30333 # <--- your public p2p endpoint
      - DUNITER_LISTEN_ADDR=/ip4/0.0.0.0/tcp/30333

volumes:
  duniter-data:

The required steps are:

Run🔗

In the folder of your docker-compose.yml file, run:

# start the node in demon mode
docker compose up -d
# look at the logs and follow
docker compose logs -f

That's all. You can now become smith.