deploy: node 1.0.4 from the quantus/chain mirror

Fetch node release binaries from the releases of quantus/chain, our private
mirror on this Gitea, instead of GitHub. The runner authenticates with the
QUANTUS_CHAIN_READ_TOKEN secret (read-only, agent-bot app:quantus-deploy),
addresses the server by github.server_url since it answers to several names,
and checks the tarball against a pinned NODE_SHA256. A node_version dispatch
override now needs a matching node_sha256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5HxbVRq4fPMGdx3JzVEpC
This commit is contained in:
Rob Thijssen
2026-10-23 09:15:11 +03:00
co-authored by Claude Opus 5.5
parent a0ca61b028
commit 74e86e6c04
3 changed files with 47 additions and 7 deletions
+37 -2
View File
@@ -38,6 +38,9 @@ on:
node_version:
description: quantus-node version (overrides the pin)
required: false
node_sha256:
description: "sha256 the node release tarball must have (overrides NODE_SHA256); required with a node_version override"
required: false
chainspec_url:
description: "chain spec JSON to run from (overrides CHAINSPEC_URL): an https URL, or a path in this repo such as asset/chainspec/mainnet.json; empty = the built-in CHAIN name"
required: false
@@ -64,7 +67,15 @@ env:
CHAIN: mainnet
# Pinned; bump deliberately to upgrade. An unattended upgrade of a validator
# is how you find out at 3am that a release changed a consensus rule.
NODE_VERSION: "1.0.1"
NODE_VERSION: "1.0.4"
# Node release binaries come from the releases of quantus/chain, our private
# mirror on this Gitea, not from GitHub: the runner reads it with the
# QUANTUS_CHAIN_READ_TOKEN secret (a read-only token on agent-bot). A new
# version means attaching its x86_64 tarball to a release there first.
# NODE_SHA256 is the tarball's checksum from the publisher's sha256sums file;
# it is the defence against a tampered or mis-uploaded asset.
NODE_RELEASE_REPO: quantus/chain
NODE_SHA256: 3eafd33c3c7301d15b1d785cfc7a777f16473ab61eabd8df8e9378cb94bf6ebf
# Mainnet launch (2026-09-10 09:09 UTC): the chain spec is published as a
# file before a binary embeds it, so the node can run from a JSON at
# /etc/quantus-node/chainspec.json instead of a built-in name. When set, the
@@ -130,6 +141,18 @@ jobs:
n="${{ github.event.inputs.node_version || env.NODE_VERSION }}"
echo "node=${n}" >> "$GITHUB_OUTPUT"
echo "quantus-node ${n}"
# The pinned checksum only describes the pinned version, so an
# override must bring its own rather than fail later on a mismatch.
ns="${{ github.event.inputs.node_sha256 }}"
if [ -z "$ns" ]; then
if [ "$n" != "${{ env.NODE_VERSION }}" ]; then
echo "node_version ${n} overrides the pin, so node_sha256 is required" >&2
exit 1
fi
ns="${{ env.NODE_SHA256 }}"
fi
[[ "$ns" =~ ^[0-9a-f]{64}$ ]] || { echo "node_sha256 must be 64 lowercase hex characters" >&2; exit 1; }
echo "node_sha256=${ns}" >> "$GITHUB_OUTPUT"
cs="${{ github.event.inputs.chainspec_url || env.CHAINSPEC_URL }}"
eg="${{ github.event.inputs.expected_genesis || env.EXPECTED_GENESIS }}"
sha="${{ github.event.inputs.chainspec_sha256 || env.CHAINSPEC_SHA256 }}"
@@ -188,12 +211,24 @@ jobs:
{ echo "chain spec: $cs"; echo "id: $id"; echo "sha256: $(sha256sum _bin/chainspec.json | cut -d' ' -f1)"; } >> "$GITHUB_STEP_SUMMARY"
- name: download quantus-node
env:
# Through env, not inlined into the script, so it never lands in the
# rendered command the runner logs.
RELEASE_TOKEN: ${{ secrets.QUANTUS_CHAIN_READ_TOKEN }}
run: |
set -euo pipefail
v="${{ steps.v.outputs.node }}"
[ -n "$RELEASE_TOKEN" ] || { echo "QUANTUS_CHAIN_READ_TOKEN secret is not set" >&2; exit 1; }
# server_url, not a literal host: this Gitea answers to several names
# and the runner should use the one it was dispatched from.
curl -fSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 15 \
-H "Authorization: token ${RELEASE_TOKEN}" \
-o node.tar.gz \
"https://github.com/Quantus-Network/chain/releases/download/v${v}/quantus-node-v${v}-x86_64-unknown-linux-gnu.tar.gz"
"${{ github.server_url }}/${{ env.NODE_RELEASE_REPO }}/releases/download/v${v}/quantus-node-v${v}-x86_64-unknown-linux-gnu.tar.gz"
got=$(sha256sum node.tar.gz | cut -d' ' -f1)
[ "$got" = "${{ steps.v.outputs.node_sha256 }}" ] \
|| { echo "node tarball sha256 ${got} is not the expected ${{ steps.v.outputs.node_sha256 }}" >&2; exit 1; }
echo "node tarball sha256 matches"
tar xzf node.tar.gz
install -D -m 0755 "$(find . -name quantus-node -type f | head -1)" _bin/quantus-node
_bin/quantus-node --version
+4 -3
View File
@@ -8,9 +8,10 @@ code in this repository.
Deployment automation **only** — systemd units, firewalld definitions, config
templates, one Gitea Actions workflow and one provisioning script, for a Quantus
Planck node and its external GPU miner. There is no application code, no build,
and no test suite: the deployed artifacts are upstream release binaries fetched
by the workflow. Because there is nothing to compile, `generic.md` §1–§2 (Rust
workspace layout, crate naming) do not apply here.
and no test suite: the deployed artifacts are release binaries the workflow
fetches from the releases of `quantus/chain`, our private mirror on this Gitea.
Because there is nothing to compile, `generic.md` §1–§2 (Rust workspace layout,
crate naming) do not apply here.
**No secrets live in this repo.** `QUANTUS_INNER_HASH` is a Gitea Actions secret;
the miner's auth token and TLS pin are generated on the node host and copied
+6 -2
View File
@@ -334,6 +334,7 @@ and still looks healthy — it just takes from the network without adding to it.
| Name | What | Where |
| --- | --- | --- |
| `RSYNC_SSH_KEY` | the shared fleet runner key | Gitea secret — already exists, do **not** rotate |
| `QUANTUS_CHAIN_READ_TOKEN` | read-only token (`agent-bot`, `app:quantus-deploy`) for node release binaries on the private `quantus/chain` mirror | Gitea secret |
| `inner_hash` | 32-byte wormhole preimage, **one per node host** | workflow `deploy-node` matrix — **public, not a secret** |
**The inner_hash is not secret.** The node embeds it verbatim in the
@@ -420,7 +421,9 @@ untouched deployment is still healthy.
no GPU adapter, and a node that is authoring nothing because no miner is
attached, both look perfectly healthy to systemd. Hence the counter check.
Node upgrades are deliberate — bump `NODE_VERSION` in the workflow. There is no
Node upgrades are deliberate: attach the release tarball to a release on the
`quantus/chain` mirror, then bump `NODE_VERSION` and `NODE_SHA256` in the
workflow. There is no
auto-update on a validator on purpose. The miner follows quantus/miner `main`.
## Known conflict: GPU contention with helexa ⚠️
@@ -448,7 +451,8 @@ demand, which is a scheduling feature on the helexa side, not a unit-file one.
through wasmtime) and **`PrivateDevices=false`** on the miner (needs
`/dev/nvidia*`). Both are annotated in the unit files; neither is tidy-up-able.
- **`Type=simple`, not `notify`** — `quantus-node` does not `sd_notify(READY=1)`.
- **No Rust workspace.** This repo deploys upstream release binaries; there is
- **No Rust workspace.** This repo deploys release binaries from the
`quantus/chain` mirror's releases; there is
nothing to build, so `generic.md` §1–§2 do not apply.
## Upstream