deploy / fetch (push) Successful in 16s
deploy / deploy-node (bob.hanzalova.internal, 0x134e73f06fa9bdb1dbfa909e149c563f5860ceb71a0e7307918f7033970edf59, benjy.hanzalova.internal quadbrat.hanzalova.internal, --public-addr /dns4/nh.thgttg.com/tcp/30333, --unsafe-rpc-external --rpc-methods safe --rpc-c… (push) Successful in 34s
deploy / deploy-miner (1, quadbrat.hanzalova.internal, bob.hanzalova.internal) (push) Successful in 40s
deploy / deploy-miner (1, benjy.hanzalova.internal, bob.hanzalova.internal) (push) Successful in 42s
deploy / deploy-metrics (push) Successful in 9s
The chain can only see miners that WIN blocks. A miner too small to take a block in any given window is invisible in the authorship leaderboard while still being connected and still burning electricity. Telemetry sees every node, so the two series together answer a question neither can alone: nodes flat while distinct authors falls means small miners are being out-competed, not quitting. Measured on the live feed: 32 nodes against 9-21 distinct authors, 229 aggregate CPU cores, 15 VMs, and five client versions in the wild -- half the network is still on 0.6.x/0.7.x/0.8.x, which is a fork risk at a runtime upgrade and worth knowing before 2026-09-09. python3-websockets is a SOFT dependency, packaged not pip: without it the exporter serves every chain metric and reports quantus_telemetry_up 0, so a missing package degrades rather than breaks. infra-setup.sh installs it and treats failure as non-fatal. The genesis hash is discovered from the node rather than configured -- one less value to get wrong when the chain changes for mainnet.
67 lines
2.2 KiB
Desktop File
67 lines
2.2 KiB
Desktop File
# Prometheus exporter for network-wide Quantus mining statistics: difficulty,
|
|
# estimated network hashrate, and a per-miner authorship leaderboard derived
|
|
# from the PreRuntime digest in every block header.
|
|
#
|
|
# Runs on the node host and talks only to the node's loopback RPC, so it needs
|
|
# no chain data of its own and no credentials.
|
|
#
|
|
# Pure stdlib apart from ONE SOFT dependency: python3-websockets, used only for
|
|
# the telemetry feed. Without it the exporter still serves every chain metric and
|
|
# reports quantus_telemetry_up 0 — a missing package degrades rather than breaks.
|
|
# infra-setup.sh installs it from the Fedora repos; packaged, never pip.
|
|
#
|
|
# Otherwise pure stdlib Python — no venv, no
|
|
# build step, nothing to keep patched beyond the interpreter.
|
|
#
|
|
# Separate service account from the node on purpose: this reads the chain over a
|
|
# local read-only RPC and has no business being able to touch the validator's
|
|
# state or its reward config.
|
|
|
|
[Unit]
|
|
Description=Quantus arena exporter (network hashrate and authorship)
|
|
Documentation=https://git.lair.cafe/lair/quantus/issues/2
|
|
After=network-online.target quantus-node.service
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=quantus-arena
|
|
Group=quantus-arena
|
|
EnvironmentFile=/etc/quantus-arena/arena.env
|
|
WorkingDirectory=/var/lib/quantus-arena
|
|
|
|
ExecStart=/usr/bin/python3 /usr/local/bin/quantus-arena-exporter.py \
|
|
--rpc-url http://127.0.0.1:9944 \
|
|
--port 25033 \
|
|
--window-blocks 3600 \
|
|
--target-block-time 6 \
|
|
--self-preimage ${QUANTUS_INNER_HASH} \
|
|
--reward-address ${QUANTUS_REWARD_ADDRESS} \
|
|
--telemetry-url ${QUANTUS_TELEMETRY_URL}
|
|
|
|
# The node may be down or restarting; reconnecting is normal operation. The
|
|
# exporter already survives RPC errors internally, so a restart here means it
|
|
# died outright.
|
|
Restart=always
|
|
RestartSec=10s
|
|
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
PrivateDevices=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
RestrictRealtime=true
|
|
RestrictSUIDSGID=true
|
|
LockPersonality=true
|
|
MemoryDenyWriteExecute=true
|
|
SystemCallArchitectures=native
|
|
|
|
ReadWritePaths=/var/lib/quantus-arena
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|