Introduction

Author: Matt Henderson @dafacto

This document details my configuration for running three private nodes, and one public node, on a 2023 Mac mini, with the M2 Pro processor and 32GB of memory.

Thanks to @nj, @reb0rn, @chris and @jonh for their help getting this going.

Documentation

The official Spacemesh documentation on which this is based is found here.

Startup scripts

Following are my startup scripts for my one public node, and three private nodes.

Public node:

#!/bin/bash

/Users/mhenders/Spacemesh/app/go-spacemesh \
--config /Users/mhenders/Spacemesh/config/config-public.json \
--listen /ip4/0.0.0.0/tcp/7516 \
-d /Users/mhenders/Spacemesh/node2/node-data \
--smeshing-opts-numunits 55 \
--smeshing-opts-maxfilesize 34359738368 \
--filelock /Users/mhenders/Spacemesh/node2/lock/spacemesh.lock \
--smeshing-opts-provider 0 \
--smeshing-coinbase {coinbase_address} \
--smeshing-start \
--smeshing-opts-datadir /Volumes/smesh2/postdata \
--grpc-public-listener 0.0.0.0:9192 \
--grpc-private-listener 0.0.0.0:9193 \
--grpc-json-listener 0.0.0.0:9194

Private nodes (using node 1 as an example):

#!/bin/bash

/Users/mhenders/Spacemesh/app/go-spacemesh \
--config /Users/mhenders/Spacemesh/config/config-private.json \
--listen /ip4/0.0.0.0/tcp/7515 \
-d /Users/mhenders/Spacemesh/node1/node-data \
--smeshing-opts-numunits 55 \
--smeshing-opts-maxfilesize 2147483648 \
--filelock /Users/mhenders/Spacemesh/node1/lock/spacemesh.lock \
--smeshing-opts-provider 0 \
--smeshing-coinbase {coinbase_address} \
--smeshing-start \
--smeshing-opts-datadir /Volumes/smesh1/postdata \
--grpc-public-listener 0.0.0.0:9092 \
--grpc-private-listener 0.0.0.0:9093 \
--grpc-json-listener 0.0.0.0:9094

Configuration files

Public node:

{
  "main": {
    "poet-server": [
      "https://poet-1.team24.co",
      "https://poet-2.team24.co",
      "https://poet-3.team24.co",
      "https://poet-4.team24.co"
    ]
  },
  "logging": {
    "p2p": "error"
  },
  "poet": {
    "phase-shift": "288h",
    "cycle-gap": "24h",
    "grace-period": "2h"
  },
  "p2p": {
    "min-peers": 30,
    "low-peers": 60,
    "high-peers": 100,
    "bootnodes": [
      "/dns4/mainnet-bootnode-14.spacemesh.network/tcp/5000/p2p/12D3KooWRkZMjGNrQfRyeKQC9U58cUwAfyQMtjNsupixkBFag8AY",
      "/dns4/mainnet-bootnode-16.spacemesh.network/tcp/5000/p2p/12D3KooWDAFRuFrMNgVQMDy8cgD71GLtPyYyfQzFxMZr2yUBgjHK",
      "/dns4/mainnet-bootnode-18.spacemesh.network/tcp/5000/p2p/12D3KooWMJmdfwxDctuGGoTYJD8Wj9jubQBbPfrgrzzXaQ1RTKE6"
    ],
    "direct": [
      "/ip4/127.0.0.1/tcp/7515/p2p/{p2p_node1}",
      "/ip4/127.0.0.1/tcp/7517/p2p/{p2p_node3}",
      "/ip4/127.0.0.1/tcp/7518/p2p/{p2p_node4}"
    ]
  },
  "smeshing-verifying-opts": {
     "smeshing-opts-verifying-powflags":14
  }
}

Private nodes:

{
  "main": {
      "poet-server": [
        "https://poet-1.team24.co",
        "https://poet-2.team24.co",
        "https://poet-3.team24.co",
        "https://poet-4.team24.co"
      ]
  },
  "logging": {
      "p2p": "error"
    },
  "poet": {
    "phase-shift": "288h",
    "cycle-gap": "24h",
    "grace-period": "2h"
  },
    "p2p": {
      "min-peers": 1,
      "low-peers": 10,
      "high-peers": 20,
      "disable-dht": true,
      "bootnodes": [],
      "direct": [
          "/ip4/127.0.0.1/tcp/7516/p2p/{p2p_node2}"
      ]
    },
  "smeshing": {
    "smeshing-verifying-opts": {
      "smeshing-opts-verifying-disable": true
    }
  }
}