Introduction ============ This document details my configuration for running three private nodes, and one public node, and two home Macs. 1. Mac Mini, 192.168.1.22 (One public node, two private nodes) 2. MacBook Pro, 192.168.1.9 (One private node) Thanks to @nj, @reb0rn, @chris and @jonh for their help getting this going. Update: At the very end of this document, you'll see that I decided to consolidate all nodes onto one machine. I've documented that configuration as well, but will leave the original text here for those interested in multi-machine setups. Documentation ============= The official documentation on which this is based is found here: https://github.com/spacemeshos/go-spacemesh/blob/develop/p2p/README.md Startup scripts =============== Before signing up to Team24 and setting up the public/private nodes, I did not use configuration files, and simply included everything in my startup scripts. For that reason, my --listen parameters are found there. Here's an example from my node 4: #!/bin/bash /Users/mhenders/Spacemesh/app/go-spacemesh --config /Users/mhenders/Spacemesh/node4/config/config.json --listen /ip4/0.0.0.0/tcp/7518 -d /Users/mhenders/Spacemesh/node4/node-data --smeshing-opts-numunits 13 --smeshing-opts-maxfilesize 2147483648 --filelock /Users/mhenders/Spacemesh/node4/lock/spacemesh.lock --smeshing-opts-provider 0 --smeshing-coinbase {address} --smeshing-start --smeshing-opts-datadir /Users/mhenders/Spacemesh/node4/postdata --grpc-public-listener 0.0.0.0:9392 --grpc-private-listener 0.0.0.0:9393 --grpc-json-listener 0.0.0.0:9394 Public & Private node details ============================= Node, LAN IP, p2p NodeID, ListenPort, Public/Private ---------------------------------------------------- 1, 192.168.1.22, {p2p_node1}, 7515, Private 2, 192.168.1.22, {p2p_node2}, 7516, Public 3, 192.168.1.22, {p2p_node3}, 7517, Private 4, 192.168.1.9, {p2p_node4}, 7518, Private You can get the p2p_nodeID using: grpcurl -plaintext 127.0.0.1:9093 spacemesh.v1.DebugService.NetworkInfo Mac Mini Config Files ===================== Node 1 (Private) ---------------- { "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/192.168.1.22/tcp/7516/p2p/{p2p_node2}" ] }, "smeshing": { "smeshing-verifying-opts": { "smeshing-opts-verifying-disable": true } } } Node 2 (Public) --------------- { "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, "direct": [ "/ip4/192.168.1.22/tcp/7515/p2p/{p2p_node1}", "/ip4/192.168.1.22/tcp/7517/p2p/{p2p_node3}", "/ip4/192.168.1.9/tcp/7518/p2p/{p2p_node4}" ] }, "smeshing-verifying-opts": { "smeshing-opts-verifying-powflags":14 } } Node 3 (Private) ---------------- { "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/192.168.1.22/tcp/7516/p2p/{p2p_node2}" ] }, "smeshing": { "smeshing-verifying-opts": { "smeshing-opts-verifying-disable": true } } } Machine 2 Config Files ====================== Node 4 (Private) ---------------- { "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/192.168.1.22/tcp/7516/p2p/{p2p_node2}" ] }, "smeshing": { "smeshing-verifying-opts": { "smeshing-opts-verifying-disable": true } } } Update: Consolidation ===================== I discovered a problem with the previously described setup—issues would arise if was working for an extended time with the private-node MacBook Pro in a coffee shop, not the least of which was battery-drainage during cycle gaps. I decided to move the MacBook Pro's node to the Mac Mini, so that all my four nodes are now on the same machine. I'll leave all the above in place, for the benefit of anyone using multiple machines, but now my setup is simplified, and there are some subtle differences with respect to the above description: - I'm using the IP address 127.0.0.1 instead of the LAN IP addresses. - Since all the private nodes use the same configuration file, I moved the configuration files out of the node folders, into their own "config" folder. Here's how things now look: Startup scripts --------------- 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: - The "bootnodes" section helped with some syncing issues related to version 1.3.9 at the time of this writing. - The "smeshing-opts-verifying-powflags" I'm told will help with ATX verification if I have additional memory to spare on the machine, which I do. { "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: - The "smeshing-opts-verifying-disable" setting disables ATX processing on all the private nodes, tremendously reducing CPU usage during cycle gaps. { "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 } } }