# Quantus external miner. Runs on the GPU host and connects OUT to the node's # QUIC control channel; it listens on nothing but its loopback metrics port, so # it ships no firewalld service of its own. # # Hardened per ~/git/architecture/generic.md §8, with one deliberate relaxation: # # PrivateDevices=false # The miner needs /dev/nvidia*; PrivateDevices=true hides them and wgpu # finds no adapter, silently falling back to nothing. # # Poseidon2-over-Goldilocks is compute-bound in registers, not memory-bound, so # there is no tuning knob here worth more than the GPU power limit — which is a # host-level concern (nvidia-smi -pl), not a unit-file one. # # --cpu-workers 0 is deliberate: a current-gen desktop CPU contributes ~4 MH/s # next to a 4090's ~183 MH/s, for a couple hundred watts. Measured, not assumed. [Unit] Description=Quantus external miner (GPU) Documentation=https://github.com/Quantus-Network/quantus-miner After=network-online.target Wants=network-online.target [Service] Type=simple User=quantus-miner Group=quantus-miner Environment=RUST_LOG=info WorkingDirectory=/var/lib/quantus-miner ExecStart=/usr/local/bin/quantus-miner serve \ --node-addr ${QUANTUS_NODE_ADDR} \ --auth-token-file /etc/quantus-miner/miner-auth-token \ --tls-cert-sha256-file /etc/quantus-miner/miner-tls-cert-sha256 \ --gpu-devices ${QUANTUS_GPU_DEVICES} \ --cpu-workers 0 \ --metrics-port 9900 EnvironmentFile=/etc/quantus-miner/miner.env # The node may be down, still syncing, or mid-redeploy; reconnecting is normal # operation, not an error condition. Restart=always RestartSec=15s LimitNOFILE=65536 NoNewPrivileges=true ProtectSystem=strict ProtectHome=true PrivateTmp=true PrivateDevices=false ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true RestrictRealtime=true RestrictSUIDSGID=true LockPersonality=true SystemCallArchitectures=native MemoryDenyWriteExecute=false ReadWritePaths=/var/lib/quantus-miner RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 [Install] WantedBy=multi-user.target