Install party : devenez forgerons v2!

Pour tenter d’aller plus loin; je viens de me refaire un docker-compose minimale pour un noeud smith/validator - sans DNS - et avec l’oracle qui ne démarre pas par défaut (il faut ajouter un “profile”).

Dans le fichier, j’utilise l’IP internet de mon serveur: 130.61.75.29

Mon serveur a une architecture ARM; c’est pour cela que j’ai platform: linux/arm64/v8

services:
  duniter-v2s-validator:
    image: duniter/duniter-v2s-gdev-800:latest
    platform: linux/arm64/v8
    container_name: duniter-v2s-gdev-smith-minimal
    restart: unless-stopped
    ports:
      # Private RPC ! (for SMITH)
      - 127.0.0.1:9946:9944
      # Public P2P using Host port 30335
      - 0.0.0.0:30335:30333
    volumes:
      - data-validator:/var/lib/duniter/
    environment:
      # gdev, gtest or g1
      - DUNITER_CHAIN_NAME=gdev
      - DUNITER_VALIDATOR=true
      - DUNITER_PRUNING_PROFILE=light # <--- stays light
      - DUNITER_NODE_NAME=Nicolas80-smith-de-minimal
      - DUNITER_PUBLIC_ADDR=/ip4/130.61.75.29/tcp/30335/ws
      - DUNITER_LISTEN_ADDR=/ip4/0.0.0.0/tcp/30333/ws

  distance-oracle:
    image: duniter/duniter-v2s-gdev-800:latest
    container_name: distance-oracle
    entrypoint: docker-distance-entrypoint # other entrypoint
    environment:
      ORACLE_RPC_URL: ws://duniter-v2s-gdev-smith-minimal:9944  # container_name from SMITH node above
      ORACLE_RESULT_DIR: /var/lib/duniter/chains/gdev/distance/ # should match network
      ORACLE_EXECUTION_INTERVAL: 200 # <--- should be adjusted based on network
    volumes:
      - data-validator:/var/lib/duniter/  # use same volume
    # The presence of a profile will prevent running this service "by default"
    # Unless specifically activating a profile like
    # $ docker compose --profile oracle up -d
    profiles:
      - oracle

# Reused volume between the 2 containers !
volumes:
  data-validator: null

Et quand je le lance (sans oracle) avec docker compose up -d et que je regarde les logs avec docker compose logs -f :

oracle-niania ➜  duniter-smith-minimal docker compose logs -f
duniter-v2s-gdev-smith-minimal  | Generating node key file '/var/lib/duniter/node.key'...
duniter-v2s-gdev-smith-minimal  | 12D3KooWRZsRbJyR1fB8wcF7qeQbAZ3ALmis7hm5DosiE8vYs49X
duniter-v2s-gdev-smith-minimal  | Node peer ID is '12D3KooWRZsRbJyR1fB8wcF7qeQbAZ3ALmis7hm5DosiE8vYs49X'.
duniter-v2s-gdev-smith-minimal  | Starting duniter with parameters: --name Nicolas80-smith-de-minimal --node-key-file /var/lib/duniter/node.key --public-addr /ip4/130.61.75.29/tcp/30335/ws --listen-addr /ip4/0.0.0.0/tcp/30333/ws --rpc-cors all --rpc-methods Unsafe --validator --blocks-pruning 14400 --chain gdev -d /var/lib/duniter --unsafe-rpc-external
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 Duniter
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 ✌️  version 0.9.2-unknown
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 ❤️   by librelois <c@elo.tf>:tuxmain <tuxmain@zettascript.org>:c-geek <https://forum.duniter.org/u/cgeek>:HugoTrentesaux <https://trentesaux.fr>:bgallois <benjamin@gallois.cc>:Duniter Developers <https://duniter.org>:Axiom-Team Developers <https://axiom-team.fr>, 2021-2025
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 📋 Chain specification: ĞDev
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 🏷  Node name: Nicolas80-smith-de-minimal
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 👤 Role: AUTHORITY
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:35 💾 Database: ParityDb at /var/lib/duniter/chains/gdev/paritydb/full
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:37 🔨 Initializing Genesis block/state (state: 0xea8a…64d2, header-hash: 0xc184…b6c3)
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 👶 Creating empty BABE epoch changes on what appears to be first startup.
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 Local node identity is: 12D3KooWRZsRbJyR1fB8wcF7qeQbAZ3ALmis7hm5DosiE8vYs49X
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 Running litep2p network backend
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 👶 Starting BABE Authorship worker
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Operating system: linux
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 CPU architecture: aarch64
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Target environment: gnu
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Memory: 23980MB
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Kernel: 6.8.0-1016-oracle
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Linux distribution: Debian GNU/Linux 11 (bullseye)
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 💻 Virtual machine: no
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 📦 Highest known block at #0
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 Running JSON-RPC server: addr=0.0.0.0:9944,[::]:44053
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 〽️ Prometheus exporter started at 127.0.0.1:9615
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:38 ***** Duniter has fully started *****
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:40 🔍 Discovered new external address for our node: /ip4/130.61.75.29/tcp/30335/ws/p2p/12D3KooWRZsRbJyR1fB8wcF7qeQbAZ3ALmis7hm5DosiE8vYs49X
duniter-v2s-gdev-smith-minimal  | 2025-04-07 16:30:43 ⚙️   Syncing, target=#5962833 (5 peers), best: #1265 (0xea9f…afea), finalized #1024 (0xcb1c…2f76), ⬇ 164.6kiB/s ⬆ 3.2kiB/s
...

On peut voir qu’il a bien découvert une adresse externe P2P (qui commence par ce que j’ai défini dans DUNITER_PUBLIC_ADDR: /ip4/130.61.75.29/tcp/30335/ws/p2p/12D3KooWRZsRbJyR1fB8wcF7qeQbAZ3ALmis7hm5DosiE8vYs49X et qu’il commence à synchroniser…

Edit: Si tu à modifié plusieurs choses dans ton docker compose et que tu veux réessayer de zéro, il est possible de supprimer les volume & network docker associés avec la commande docker compose down -v (attention, cela supprime les données que ce compose avait jusque là, bien vérifier d’être au bon endroit !)