You are setting up a self-sovereign mining stack on this Mac for a beginner: a Bitcoin Knots full node (the Bitcoin BLAKE2b chain) plus a DATUM Gateway pointed at the AlphaPool DATUM pool. The user's own node builds the blocks; the pool splits the coinbase and pays the user's address directly inside each block. Non-custodial. No signup. Work step by step. Run the commands yourself, verify each step, and STOP AND ASK if anything is ambiguous or fails. Explain briefly what you are doing. Be idempotent: if a step is already done, verify it and move on. Use sudo only where shown. Never open RPC to the network. Never modify any Bitcoin wallet or data directory except the ones this guide creates. ================================================================================== FACTS — use exactly, do not "improve" them ================================================================================== Chain: Bitcoin BLAKE2b (Bitcoin Knots 29.4.1 mainnet). First BLAKE2b block 961640. Do NOT set chain=testnet4/regtest. Node software: Bitcoin Knots 29.4.1.knots20260508 (official signed macOS build) Download base: https://bitcoinknots.org/files/29.x/29.4.1.knots20260508/ Apple Silicon: bitcoin-29.4.1.knots20260508-arm64-apple-darwin.tar.gz Intel: bitcoin-29.4.1.knots20260508-x86_64-apple-darwin.tar.gz checksums: SHA256SUMS (same folder) — verification is MANDATORY Gateway software: CONVOY DATUM Gateway (BLAKE2b + header-v2 build) repo: https://github.com/CONVOYMining/datum_gateway.git PINNED COMMIT: b9ea7dc3eb91352565ab487ec55ed6ee5964a440 Build exactly this commit. Do NOT build whatever master happens to be: upstream changes the pool protocol without notice, and a newer build can refuse to talk to the pool (it exits with "Bad configuration version"). required: history MUST contain commit 56c31f4 (older builds produce invalid shares) AlphaPool DATUM: host us2.alphapool.tech port 28916 pool pubkey: b831b2d6f1eaedb3da5b9e3702728edea0a32d6ce783a1452b2861c4d1b74d6b4c2ad5461bcf43485a6bac2cedf8da43d51164262ef6bcdb27f2242ada066d29 fee: 1.00% pool ops, flat 8×D window split, paid in-block to the miner's address Ports: node P2P 8333 (optional), node RPC 8332 (localhost ONLY), gateway stratum 23334 (LAN), gateway UI/API 7152 (localhost ONLY) Paths (macOS): node data $HOME/Library/Application Support/Bitcoin gateway $HOME/datum_gateway services $HOME/Library/LaunchAgents (launchd user agents) logs $HOME/Library/Logs/knots-node.log, datum-gateway.log Disk/time: ~20 GB free (node is pruned). First sync downloads the chain's history: plan on 1–3 days. Mining starts automatically once synced — the gateway waits. Note: A Mac that sleeps stops mining. A desktop/Mac mini is ideal; a laptop must stay plugged in with the lid open (or clamshell + external display). ================================================================================== STEP 0 — Ask the user (do not proceed with placeholders) ================================================================================== Ask for ONE thing: the payout address the coinbase should pay. - Recommended: a native-SegWit address starting with bc1q from a wallet dedicated to THIS chain (the fork's Knots bitcoin-qt wallet, Shrike, or Sparrow-BLAKE2b). Legacy 1... and 3... addresses are also valid. NEVER use a seed/wallet that also holds real Bitcoin. - If the user has no address, offer to create one in a fresh wallet on the node they are about to run (Step 5). Only do this if they explicitly say yes. Optionally ask for a short coinbase tag (their name/handle). Default: AlphaPool. Ask whether you may disable system sleep (pmset) so the Mac keeps mining. Confirm 1–3 day sync. ================================================================================== STEP 1 — Prerequisites (Xcode CLT + Homebrew + libraries) ================================================================================== uname -m # arm64 (Apple Silicon) or x86_64 (Intel) — call it $ARCH xcode-select -p || xcode-select --install # if it opens a dialog, wait for it to finish brew --version || echo "Homebrew missing" # if missing, install from https://brew.sh (the # user must approve; then re-open the terminal) brew install cmake pkgconf curl jansson libsodium libmicrohttpd argp-standalone epoll-shim git jq df -h ~ # need >= 20 GB free sysctl -n hw.memsize # bytes; >= 8 GiB → dbcache 2048, else 1024 ================================================================================== STEP 2 — Install Bitcoin Knots 29.4.1 (verify checksums — mandatory) ================================================================================== mkdir -p ~/knots-dl && cd ~/knots-dl F="bitcoin-29.4.1.knots20260508-${ARCH}-apple-darwin.tar.gz" curl -fLO "https://bitcoinknots.org/files/29.x/29.4.1.knots20260508/${F}" curl -fLO "https://bitcoinknots.org/files/29.x/29.4.1.knots20260508/SHA256SUMS" grep " ${F}\$" SHA256SUMS | shasum -a 256 -c - # MUST print ": OK". If not: STOP. tar -xzf "$F" xattr -dr com.apple.quarantine bitcoin-*/ 2>/dev/null || true # avoid Gatekeeper blocks sudo mkdir -p /usr/local/bin sudo install -m 0755 bitcoin-*/bin/bitcoind bitcoin-*/bin/bitcoin-cli /usr/local/bin/ bitcoind --version | head -1 # expect "Bitcoin Knots version v29.4.1.knots20260508" ================================================================================== STEP 3 — Configure the node (pruned mainnet, RPC on localhost) and run it via launchd ================================================================================== D="$HOME/Library/Application Support/Bitcoin"; mkdir -p "$D"; chmod 700 "$D" If "$D/bitcoin.conf" already exists, STOP and show it to the user before changing it. Generate: RPCUSER=datum ; RPCPASS=$(openssl rand -hex 24) Write "$D/bitcoin.conf" (mode 600) with exactly: server=1 daemon=0 rpcbind=127.0.0.1 rpcallowip=127.0.0.1 rpcuser= rpcpassword= prune=4000 dbcache=<2048 or 1024> blockmaxweight=785000 blocknotify=curl -fsS -o /dev/null http://127.0.0.1:7152/NOTIFY Write ~/Library/LaunchAgents/tech.alphamine.knots-node.plist: Labeltech.alphamine.knots-node ProgramArguments /usr/local/bin/bitcoind -conf=/Users//Library/Application Support/Bitcoin/bitcoin.conf -datadir=/Users//Library/Application Support/Bitcoin RunAtLoad KeepAlive ExitTimeOut900 StandardOutPath/Users//Library/Logs/knots-node.log StandardErrorPath/Users//Library/Logs/knots-node.log launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/tech.alphamine.knots-node.plist \ || launchctl kickstart -k gui/$(id -u)/tech.alphamine.knots-node sleep 30; bitcoin-cli getblockchaininfo | jq '{chain,blocks,headers,verificationprogress,pruned}' Expect chain "main", pruned true, blocks/headers climbing. (Full sync = 1–3 days; keep going.) ================================================================================== STEP 4 — Validate the payout address with the node (protects against stranded coins) ================================================================================== bitcoin-cli validateaddress "" | jq '{isvalid,address,iswitness}' "isvalid" MUST be true. If false: STOP and ask for a correct address. ================================================================================== STEP 5 — (ONLY if the user asked) create a fresh payout wallet on this node ================================================================================== bitcoin-cli -named createwallet wallet_name="alphapool-payout" descriptors=true bitcoin-cli -rpcwallet=alphapool-payout getnewaddress "" bech32 # the payout address bitcoin-cli -rpcwallet=alphapool-payout backupwallet "$HOME/alphapool-payout-BACKUP.dat" Tell the user in bold: copy ~/alphapool-payout-BACKUP.dat to a safe place offline NOW. If it and the wallet folder are lost, the coins are lost. Then run Step 4 on the new address. ================================================================================== STEP 6 — Build the CONVOY DATUM Gateway (BLAKE2b build) ================================================================================== cd ~ && ( [ -d datum_gateway ] || git clone https://github.com/CONVOYMining/datum_gateway.git ) cd ~/datum_gateway && git fetch origin && git checkout b9ea7dc3eb91352565ab487ec55ed6ee5964a440 # Pinned deliberately. Do NOT run "git pull" here. git merge-base --is-ancestor 56c31f4 HEAD && echo "COMMIT CHECK OK" || echo "COMMIT CHECK FAILED" If FAILED: STOP. Do not mine with this build. export PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig:$PKG_CONFIG_PATH" cmake -DCMAKE_PREFIX_PATH="$(brew --prefix)" . && make -j"$(sysctl -n hw.ncpu)" ls -l ~/datum_gateway/datum_gateway # the built binary must exist ================================================================================== STEP 7 — Gateway config (pool mode → AlphaPool) ================================================================================== APIPASS=$(openssl rand -hex 16) Write ~/datum_gateway/datum_gateway_config.json (mode 600) with exactly this, filling <...>: { "bitcoind": { "rpcuser": "", "rpcpassword": "", "rpcurl": "http://127.0.0.1:8332" }, "stratum": { "listen_addr": "0.0.0.0", "listen_port": 23334, "vardiff_min": 4096, "vardiff_target_shares_min": 8 }, "api": { "listen_addr": "127.0.0.1", "listen_port": 7152, "admin_password": "", "modify_conf": true }, "mining": { "pool_address": "", "coinbase_tag_primary": "AlphaPool", "coinbase_tag_secondary": "", "allow_hasher_time_rolling": false }, "datum": { "pool_host": "us2.alphapool.tech", "pool_port": 28916, "pool_pubkey": "b831b2d6f1eaedb3da5b9e3702728edea0a32d6ce783a1452b2861c4d1b74d6b4c2ad5461bcf43485a6bac2cedf8da43d51164262ef6bcdb27f2242ada066d29", "pool_pass_workers": true, "pool_pass_full_users": true, "pooled_mining_only": true } } jq . ~/datum_gateway/datum_gateway_config.json >/dev/null && echo JSON OK ================================================================================== STEP 8 — Run the gateway via launchd (it waits for the node to finish syncing) ================================================================================== Write ~/Library/LaunchAgents/tech.alphamine.datum-gateway.plist: Labeltech.alphamine.datum-gateway ProgramArguments /Users//datum_gateway/datum_gateway -c /Users//datum_gateway/datum_gateway_config.json WorkingDirectory/Users//datum_gateway RunAtLoad KeepAlive ThrottleInterval10 StandardOutPath/Users//Library/Logs/datum-gateway.log StandardErrorPath/Users//Library/Logs/datum-gateway.log launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/tech.alphamine.datum-gateway.plist \ || launchctl kickstart -k gui/$(id -u)/tech.alphamine.datum-gateway tail -n 15 ~/Library/Logs/datum-gateway.log NOTE: until the node is fully synced the gateway logs that templates are unavailable and retries — expected. Do not "fix" it. If the macOS firewall is on (/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate): sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add ~/datum_gateway/datum_gateway sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp ~/datum_gateway/datum_gateway If the user approved: sudo pmset -a sleep 0 disksleep 0 displaysleep 10 ================================================================================== STEP 9 — Verify (run all, report results) ================================================================================== launchctl print gui/$(id -u)/tech.alphamine.knots-node | grep -E "state|pid" launchctl print gui/$(id -u)/tech.alphamine.datum-gateway | grep -E "state|pid" bitcoin-cli getblockchaininfo | jq '{blocks,headers,verificationprogress}' bitcoin-cli getdeploymentinfo | jq '.deployments.blake2b' # active:true once synced past 961640 curl -s -o /dev/null -w "gateway UI http %{http_code}\n" http://127.0.0.1:7152/ LANIP=$(ipconfig getifaddr en0 || ipconfig getifaddr en1) Once synced, also: bitcoin-cli getblocktemplate '{"rules":["segwit","blake2b"]}' | jq -r '.rules[]' → must include "!blake2b". ================================================================================== FINAL REPORT — print this for the user, filled in ================================================================================== ✅ Node: Bitcoin Knots 29.4.1 running via launchd (tech.alphamine.knots-node, pruned). Sync: % — mining starts automatically at 100% (est. 1–3 days). Check anytime: bitcoin-cli getblockchaininfo | jq .verificationprogress ✅ Gateway: tech.alphamine.datum-gateway running, pointed at us2.alphapool.tech:28916 (AlphaPool). ✅ Payout address (validated by your node): ➡️ Point every BLAKE2b miner (Antminer A3, Innosilicon S11, Obelisk SC1, iBeLink, …) at: URL: stratum+tcp://:23334 Worker: (or .rigname) Password: x 📊 Your stats: https://knots.alphapool.tech/tides/miner (enter the payout address) 🔧 Gateway UI (this Mac only): http://127.0.0.1:7152 (admin password saved in the config) 🔒 RPC stays on localhost. Keep this Mac awake and plugged in. Back up any wallet you created.