Upgrade runtime template provider: sv2-tp 1.0.6->1.1.1 + Bitcoin Core 30.2->31.1 #5

Merged
vnprc merged 1 commit from agent/upgrade-devenv-sv2-tp into master 2026-07-17 18:42:03 +01:00
Collaborator

Bumps the runtime Stratum V2 template provider to the current maintained release and the Bitcoin Core node it requires: sv2-tp 1.0.6 -> 1.1.1 and Bitcoin Core 30.2 -> 31.1, moving together as one coupled change. Core 31.0 restructured the mining.capnp IPC schema and sv2-tp v1.1.0 regenerated against it, so a mismatched pair fails at Init.makeMining ("old mining interface not supported") — a hard outage of template production, not a soft degrade. The pins live in four files — two .nix (dev / devenv up) and the two deploy scripts (production / testnet4 systemd) — and all four move in this single commit so the pair can never land half-applied.

Implements the dev plan notes/hashpool/dev-plans/upgrade-devenv-sv2-tp.md.

Changes

  • sv2-tp.nix: version = "1.1.1" + recomputed x86_64-linux-gnu hash.
  • bitcoin-node.nix: version = "31.1" + recomputed x86_64-linux-gnu hash, cross-checked against the official signed SHA256SUMS at bitcoincore.org. The multiprocess install layout (bin/bitcoin, bin/bitcoin-cli, libexec/bitcoin-node) is preserved.
  • scripts/build.sh + scripts/ship.sh: BITCOIN_VERSION="31.1", SV2_TP_VERSION="1.1.1" — these are the production pins that put binaries on testnet4, independent of the .nix files.
  • README.md: current-state component list → Bitcoin Core 31.1 / sv2-tp v1.1.1.
  • devenv.nix: refresh the stale sv2-tp version in the regtest IBD-wait comment (no functional change).

Runtime invocations and config/sv2-tp.conf are unchanged — all flags (-datadir/-chain/-conf/-ipcbind=unix, and sv2bind/ipcconnect/debug/loglevel) are identical in v1.1.1. Non-linux hashes (aarch64-linux-gnu, darwin) stay sha256-TODO; dev and prod are x86_64-linux.

Validation (agent gate)

  • nix build .#sv2-tp .#bitcoin-node succeeds; sv2-tp -version = v1.1.1, bitcoin-node -version = v31.1.0; multiprocess layout intact.
  • Deploy-script pins asserted present in both scripts; no 30.2 / 1.0.6 survives in either.
  • Regtest IPC smoke test using the exact devenv.nix bitcoin_node + sv2_tp invocations (bitcoin-node 31.1 + sv2-tp 1.1.1 against a throwaway regtest datadir): Connected to bitcoin-node via IPC, Template Provider listening on 127.0.0.1:18447, and zero makeMining / "old mining interface" / interfaces.cpp errors. This is the coupled-pair schema check the whole bump turns on. The full-stack pool-receives-templates + miner-shares flow via devenv up is left for the human live-session sign-off per the plan's Agent Gates.

Risk — R3 (High)

Coupled major-dependency bump on the live template-provider stack (dev + production testnet4). A half-applied pair or a stale /tmp binary cache ships a mismatched pair and hard-fails at Init.makeMining. Persistent production state: Core 31.1 opening the testnet4 datadir may upgrade the chainstate such that 30.2 can no longer load it, so a post-deploy rollback is restore-from-backup / testnet4 resync rather than a pure code revert. Lowered from R4 because the pairing is upstream-documented (v1.0.6 = last Core-30 release, v1.1.x = Core 31), the code change is a clean single-commit revert, and the regtest smoke test exercises the exact IPC path end-to-end.

Human-gated — production / testnet4 deploy

Per the plan's Agent Gates: back up /var/lib/hashpool/testnet4/ (Core's chain subdir only — the datadir root is shared with the ecash wallet / mint / pool / prometheus state, none reconstructable by resync); clear /tmp/{bitcoin,bitcoin-cli,bitcoin-node,sv2-tp} on the downloading machine (the staged-binary cache defeats version bumps); run ./scripts/build.sh (or ./scripts/ship.sh all); then confirm the installed binaries moved (/opt/hashpool/bin/sv2-tp -version = 1.1.1, /opt/hashpool/libexec/bitcoin-node -version = v31.1) and Core 31.1 opens the existing datadir without demanding -reindex. work/hashpool master is signing-required, so a human performs the signed merge.

One deviation from the plan's file targeting

The plan lists README ~line 95 for the version swap, but that line sits under the version-stamped "What's New in v0.1.1" heading and is a verbatim mirror of the dated CHANGELOG.md v0.1.1 breaking-change entry (2026-03-09) — v0.1.1 genuinely shipped Core 30.2 / sv2-tp v1.0.6. Swapping it to 31.1 / 1.1.1 would falsify that historical release note and make README disagree with CHANGELOG, which contradicts the plan's own "CHANGELOG.md and docs/archive/* are historical and stay untouched" principle. I updated only the current-state "Components Overview" list (README lines 49/53) and left the historical note intact. Trivial to change too if you'd prefer the literal line-95 swap.

Closes vnprc/hashpool#2

Bumps the runtime Stratum V2 template provider to the current maintained release and the Bitcoin Core node it requires: sv2-tp `1.0.6 -> 1.1.1` and Bitcoin Core `30.2 -> 31.1`, moving together as one coupled change. Core 31.0 restructured the `mining.capnp` IPC schema and sv2-tp v1.1.0 regenerated against it, so a mismatched pair fails at `Init.makeMining` ("old mining interface not supported") — a hard outage of template production, not a soft degrade. The pins live in four files — two `.nix` (dev / `devenv up`) and the two deploy scripts (production / testnet4 systemd) — and all four move in this single commit so the pair can never land half-applied. Implements the dev plan `notes/hashpool/dev-plans/upgrade-devenv-sv2-tp.md`. ## Changes - `sv2-tp.nix`: `version = "1.1.1"` + recomputed `x86_64-linux-gnu` hash. - `bitcoin-node.nix`: `version = "31.1"` + recomputed `x86_64-linux-gnu` hash, cross-checked against the official signed `SHA256SUMS` at bitcoincore.org. The multiprocess install layout (`bin/bitcoin`, `bin/bitcoin-cli`, `libexec/bitcoin-node`) is preserved. - `scripts/build.sh` + `scripts/ship.sh`: `BITCOIN_VERSION="31.1"`, `SV2_TP_VERSION="1.1.1"` — these are the production pins that put binaries on testnet4, independent of the `.nix` files. - `README.md`: current-state component list → Bitcoin Core 31.1 / sv2-tp v1.1.1. - `devenv.nix`: refresh the stale sv2-tp version in the regtest IBD-wait comment (no functional change). Runtime invocations and `config/sv2-tp.conf` are unchanged — all flags (`-datadir`/`-chain`/`-conf`/`-ipcbind=unix`, and `sv2bind`/`ipcconnect`/`debug`/`loglevel`) are identical in v1.1.1. Non-linux hashes (`aarch64-linux-gnu`, darwin) stay `sha256-TODO`; dev and prod are `x86_64-linux`. ## Validation (agent gate) - `nix build .#sv2-tp .#bitcoin-node` succeeds; `sv2-tp -version` = `v1.1.1`, `bitcoin-node -version` = `v31.1.0`; multiprocess layout intact. - Deploy-script pins asserted present in both scripts; no `30.2` / `1.0.6` survives in either. - Regtest IPC smoke test using the exact `devenv.nix` bitcoin_node + sv2_tp invocations (bitcoin-node 31.1 + sv2-tp 1.1.1 against a throwaway regtest datadir): `Connected to bitcoin-node via IPC`, `Template Provider listening on 127.0.0.1:18447`, and **zero** `makeMining` / "old mining interface" / `interfaces.cpp` errors. This is the coupled-pair schema check the whole bump turns on. The full-stack pool-receives-templates + miner-shares flow via `devenv up` is left for the human live-session sign-off per the plan's Agent Gates. ## Risk — R3 (High) Coupled major-dependency bump on the live template-provider stack (dev + production testnet4). A half-applied pair or a stale `/tmp` binary cache ships a mismatched pair and hard-fails at `Init.makeMining`. Persistent production state: Core 31.1 opening the testnet4 datadir may upgrade the chainstate such that 30.2 can no longer load it, so a post-deploy rollback is restore-from-backup / testnet4 resync rather than a pure code revert. Lowered from R4 because the pairing is upstream-documented (v1.0.6 = last Core-30 release, v1.1.x = Core 31), the code change is a clean single-commit revert, and the regtest smoke test exercises the exact IPC path end-to-end. ## Human-gated — production / testnet4 deploy Per the plan's Agent Gates: back up `/var/lib/hashpool/testnet4/` (Core's chain subdir only — the datadir root is shared with the ecash wallet / mint / pool / prometheus state, none reconstructable by resync); clear `/tmp/{bitcoin,bitcoin-cli,bitcoin-node,sv2-tp}` on the downloading machine (the staged-binary cache defeats version bumps); run `./scripts/build.sh` (or `./scripts/ship.sh all`); then confirm the installed binaries moved (`/opt/hashpool/bin/sv2-tp -version` = 1.1.1, `/opt/hashpool/libexec/bitcoin-node -version` = v31.1) and Core 31.1 opens the existing datadir without demanding `-reindex`. `work/hashpool master` is signing-required, so a human performs the signed merge. ## One deviation from the plan's file targeting The plan lists README `~line 95` for the version swap, but that line sits under the version-stamped "What's New in v0.1.1" heading and is a verbatim mirror of the dated `CHANGELOG.md` v0.1.1 breaking-change entry (2026-03-09) — v0.1.1 genuinely shipped Core 30.2 / sv2-tp v1.0.6. Swapping it to 31.1 / 1.1.1 would falsify that historical release note and make README disagree with CHANGELOG, which contradicts the plan's own "CHANGELOG.md and docs/archive/* are historical and stay untouched" principle. I updated only the current-state "Components Overview" list (README lines 49/53) and left the historical note intact. Trivial to change too if you'd prefer the literal line-95 swap. Closes vnprc/hashpool#2
Coupled runtime dependency bump. Core 31.0 restructured the mining.capnp IPC
schema and sv2-tp v1.1.0 regenerated against it, so the two must move together:
a mismatched pair fails at Init.makeMining ("old mining interface not
supported"). Bumps both the dev pins (.nix) and the production pins (deploy
scripts) in one commit so the pair never lands half-applied.

- sv2-tp.nix: version 1.1.1 + recomputed x86_64-linux-gnu hash
- bitcoin-node.nix: version 31.1 + recomputed x86_64-linux-gnu hash
  (cross-checked against the official signed SHA256SUMS); multiprocess layout
  bin/bitcoin + bin/bitcoin-cli + libexec/bitcoin-node preserved
- scripts/build.sh, scripts/ship.sh: BITCOIN_VERSION=31.1, SV2_TP_VERSION=1.1.1
- README.md: current-state component list -> Core 31.1 / sv2-tp v1.1.1
- devenv.nix: refresh the stale sv2-tp version in the IBD-wait comment

Invocations and config/sv2-tp.conf unchanged. Non-linux hashes stay TODO.

Verified: nix build .#sv2-tp .#bitcoin-node; sv2-tp -version=v1.1.1;
bitcoin-node -version=v31.1.0; regtest IPC smoke test connects (Connected to
bitcoin-node via IPC, Template Provider listening on 18447) with zero
makeMining/schema errors. Production testnet4 deploy is human-gated.
vnprc approved these changes 2026-07-17 18:41:58 +01:00
vnprc merged commit 7fe5780b87 into master 2026-07-17 18:42:03 +01:00
vnprc deleted branch agent/upgrade-devenv-sv2-tp 2026-07-17 18:42:03 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vnprc/hashpool!5
No description provided.