Repository navigation
mempool: 3.2.1 -> 3.3.2 - #142
Conversation
ostermayer
left a comment
There was a problem hiding this comment.
I read the diff and checked the inputs. The source hash matches nix flake prefetch github:mempool/mempool/v3.3.2, the v3.3.2 tag carries a good signature from 523B596A78BB8495AA2EC45ABFD16BE592A9CD8D with the key from github.com/mononaut.gpg, the mining-pool-logos rev exists, and both patches match the 3.3.2 code. Two things need a fix.
The signer check accepts a tag signed by an expired or revoked key. generate.sh:40 runs git verify-tag --raw in a pipeline with || true, so the exit status is thrown away and only the VALIDSIG line counts. GnuPG prints VALIDSIG for every cryptographically valid signature, also next to EXPKEYSIG and REVKEYSIG, and git verify-tag exits 1 in both cases. I tested it with a throwaway key: the signed tag passes, then after gpg --quick-set-expire <fpr> seconds=1 git exits 1 with EXPKEYSIG but the script still extracts the fingerprint and accepts the tag. A revoked key takes the same path, and a revoked key is exactly the case where we must stop trusting a signer. Check the exit status first and parse afterwards:
status=$(git -C "$src" verify-tag --raw "$tag" 2>&1) || {
echo "Tag $tag failed verification:"; echo "$status"; exit 1
}
signer=$(sed -nE 's/^\[GNUPG:\] VALIDSIG .* ([0-9A-F]{40})$/\1/p' <<< "$status")The database migration needs a versioning entry. The commit message says the backend migrates its MariaDB schema from 97 to 106 on first start and that this can't be undone. 3.3.x also drops the blocks primary key and recreates it on hash (backend/src/api/database-migration.ts). AGENTS.md lists a data migration and a database reindex as changes that must get an entry in modules/versioning.nix, like the electrs entries, so users with services.mempool.enable see it at evaluation time. The entry should tell them to dump the database before they deploy if they want to keep a way back, because a rollback of the NixOS generation keeps the migrated database and 3.2.1 has no downgrade path.
build_test_drivers in CI died after three hours with "Nix daemon disconnected unexpectedly", after mempool-backend-3.3.2 had already built and been pushed to the cache, so that looks like a runner problem and a rerun should pass.
DeepSeek V4.1 Flash 1017 (max) flagged the key download from the same GitHub account that hosts the release, but the fingerprint allowlist covers that, so I dropped it. GLM 5.3 (max) found nothing in this PR's files. Codex (GPT-6 Astra, xhigh) found the || true problem as the second opinion on that run and again on the diff, together with the missing versioning entry, and I checked both against the script and the migration code before writing this.
e550d89 to
ef8969c
Compare
ef8969c to
ae31dde
Compare
|
Both are fixed in ae31dde. Signer check: the exit status alone doesn't catch an expired key. I tested with a throwaway key (git 2.54, GnuPG 2.4.9). For a revoked key, if ! status=$(git -C "$src" verify-tag --raw "$tag" 2>&1) ||
! grep -q '^\[GNUPG:\] GOODSIG ' <<< "$status"; then
echo "Tag $tag failed verification:"; echo "$status"; exit 1
fi
signer=$(sed -nE 's/^\[GNUPG:\] VALIDSIG .* ([0-9A-F]{40})$/\1/p' <<< "$status")With the throwaway key, a good signature is accepted and signatures by an expired or a revoked key are rejected. Database migration: added a 0.1.3 entry to CI: this wasn't a runner problem. Nix runs the build with a terminal as its log output. On that terminal, the progress spinner of Angular 20's |
ae31dde to
f44ce46
Compare
ostermayer
left a comment
There was a problem hiding this comment.
The gate ran on ae31dde, and f44ce46 only moves the docs pointer to docs/upgrading.md after #149, so it still applies. DeepSeek V4.1 Flash 1017 (max) and GLM 5.3 (max) found nothing in the files this PR changes, and Codex (GPT-6 Astra, xhigh) graded their findings without adding any here.
I re-checked the two fixes. GnuPG prints GOODSIG only for a good signature by a valid key and EXPKEYSIG or REVKEYSIG otherwise, so requiring that line plus the fingerprint match closes the expired-key case, and the versioning entry fires for every mempool user. CI is green on f44ce46, including the mempool test in netnsRegtest.
Release notes: https://github.com/mempool/mempool/releases/tag/v3.3.0 https://github.com/mempool/mempool/releases/tag/v3.3.1 https://github.com/mempool/mempool/releases/tag/v3.3.2 - Build and run with Node.js 26, like upstream (`.nvmrc`). - Rebase both patches. They are still needed: upstream still listens on all interfaces and still exits when the pools data can't be fetched. - Release tags since v3.3.0 are signed by mononaut's key 523B596A78BB8495AA2EC45ABFD16BE592A9CD8D instead of wiz' key. It is published only on GitHub (https://github.com/mononaut.gpg). `generate.sh` now accepts a tag signed by either of the two pinned keys, and only with a GOODSIG status, so signatures by expired or revoked keys are rejected. - Set `CI` for the frontend build. The Nix build log is a terminal, and the progress spinner of Angular 20's `ng build` stalls the build indefinitely on it. On first start, the backend migrates its database from schema version 97 to 106. This can't be undone: running an older mempool version again requires restoring a database backup. Add a versioning entry that tells mempool users to dump the database before deploying. Assisted-by: Claude Code (claude-opus-5-5)
f44ce46 to
fdff5fb
Compare
Updates mempool from 3.2.1 to 3.3.2 (3.3.0, 3.3.1, 3.3.2).
Upstream highlights: regtest and testnet4 support, sub-1 sat/vB transactions, stale block views, Taproot script tree visualization, and an Angular 16 -> 20 upgrade. 3.3.2 moves to Node.js 26.
Changes
nodejs_26/nodejs-slim_26, same version as upstream's.nvmrc).0002-bind-backend-to-HTTP_HOST.patch: upstream still callslisten()without a host, so without the patch the backend would listen on all interfaces.0001-allow-disabling-mining-pool-fetching.patch: upstream still exits at startup when it can't fetch the pools data, which breaks offline VM tests.523B596A78BB8495AA2EC45ABFD16BE592A9CD8D, not by wiz' key. That key is published only on GitHub and isn't certified by another key.generate.shnow accepts a tag signed by either of the two pinned fingerprints and fails on any other signer. It also requires aGOODSIGstatus, so it rejects signatures by expired or revoked keys (git verify-tagitself exits 0 for an expired key).CIfor the frontend build. The Nix build log is a terminal, and the progress spinner of Angular 20'sng buildstalls the build indefinitely on it. WithCIset, the frontend builds in about 1.5 minutes on a 4-core machine.Breaking: one-way database migration
No option, default, port or network exposure changes. The backend makes no new outbound connections. The upstream nginx changes only affect their enterprise SSR setup.
The database migration can't be undone, so this adds a 0.1.3 entry to
modules/versioning.nixfor configs withservices.mempool.enable. It tells users to dump the database before deploying, because rolling back the NixOS generation keeps the migrated database.docs/upgrading.md("Upgrading to config version 0.1.3") has themysqldumpcommand. bitcoinix'sservices.backupsdoesn't include this database.For the release notes
ALTER TABLEstatements onblocksandstatistics. On mainnet, Goggles data for blocks from height 896070 on is recomputed in the background.Tests
netnsRegtest, which ran the mempool test on 3.3.2. It checks that the backend starts, thatconfig.jsongets mode 600, that the frontend is served through nginx, that the backend listens only on its own address (patch 0002), that MariaDB listens only on 127.0.0.1, and that the API reports the regtest tip height.nix flake check --no-buildand./test/shellcheck.shpass locally.generate.shran on x86_64-linux and verified the v3.3.2 tag signature. The rust-gbt cargo vendor hash didn't change.generate.shwas tested with a throwaway key: it accepts a good signature and rejects a signature by an expired and by a revoked key.Refs #7