mempool: 3.3.2

- Node 26, en-US-only frontend build
- Set NG_FORCE_TTY=false: under Nix's pty the Angular CLI spinner
  redraws forever and the frontend build never finishes
- generate.sh: verify release tags against pinned wiz or mononaut
  fingerprints (mononaut signs since v3.3.0; key fetched from GitHub)
- Newer mining-pool logos
- nginx: serve the English site at / instead of redirecting
- docs/fork-maintenance.md: reflect 3.3.2, Node 26 and the signer change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pleb
2026-11-16 08:30:23 -08:00
co-authored by Claude Opus 5.5
parent e1af5b794e
commit 230e5c539b
5 changed files with 62 additions and 26 deletions
+16 -7
View File
@@ -30,7 +30,7 @@ declares:
| `services.bitcoind` | on, `bitcoind-32.1` from system nixpkgs, `i2p = false` | | `services.bitcoind` | on, `bitcoind-32.1` from system nixpkgs, `i2p = false` |
| `services.lnd` | on, package overridden to nix-pleb's `unstablePkgs.lnd` | | `services.lnd` | on, package overridden to nix-pleb's `unstablePkgs.lnd` |
| `services.electrs` | on, from system nixpkgs | | `services.electrs` | on, from system nixpkgs |
| `services.mempool` | on, fork-packaged `mempool-*-3.2.1`, `electrumServer = "electrs"` | | `services.mempool` | on, fork-packaged `mempool-*-3.3.2`, `electrumServer = "electrs"` |
| `nix-bitcoin.operator` | on (`pleb`) | | `nix-bitcoin.operator` | on (`pleb`) |
| `nix-bitcoin.nodeinfo` | on (from secure-node preset) | | `nix-bitcoin.nodeinfo` | on (from secure-node preset) |
| `nix-bitcoin.generateSecrets` | on, `secretsSetupMethod = "setup-secrets"` | | `nix-bitcoin.generateSecrets` | on, `secretsSetupMethod = "setup-secrets"` |
@@ -163,12 +163,21 @@ Ordered from most to least work:
node modules, the frontend-assets fetch, and the rust-gbt cargo node modules, the frontend-assets fetch, and the rust-gbt cargo
vendor), a local patch vendor), a local patch
(`0001-allow-disabling-mining-pool-fetching.patch`), and a pinned (`0001-allow-disabling-mining-pool-fetching.patch`), and a pinned
`nodejs_22`. It's at 3.2.1 against upstream's 3.3.2. Expect every `nodejs_26` / `nodejs-slim_26`. It's at 3.3.2, level with upstream,
version bump to need the hashes redone. Node 22 also has an end-of-life and builds the frontend in en-US only. Expect every version bump to
date, after which nixpkgs will drop `nodejs_22` and force a Node bump need the hashes redone. Node 26 also has an end-of-life date, after
here. nixpkgs doesn't package mempool, so there's no upstream to lean which nixpkgs will drop `nodejs_26` and force a Node bump here.
on. If you ever stop wanting the mempool UI, removing it is the nixpkgs doesn't package mempool, so there's no upstream to lean on. If
biggest maintenance cut available. you ever stop wanting the mempool UI, removing it is the biggest
maintenance cut available.
`generate.sh` accepts a release tag only if it's signed by one of two
pinned fingerprints: wiz (`913C…6173`, on keyservers and Keybase) or
mononaut (`523B…CD8D`, who has signed releases since v3.3.0). Mononaut's
key is fetched from `github.com/mononaut.gpg`. It is a new key (created
2026-04-14), not cross-signed by anyone and not on keyservers or Keybase,
so trust in it rests on mononaut's GitHub account. If a release is
signed by any other key, find out why before adding its fingerprint.
2. **`mempool.nix` module**: configures mariadb, nginx (includes 2. **`mempool.nix` module**: configures mariadb, nginx (includes
`mempool-nginx-conf` from the package) and the backend's JSON config. `mempool-nginx-conf` from the package) and the backend's JSON config.
It follows NixOS changes to the mysql and nginx modules and mempool's It follows NixOS changes to the mysql and nginx modules and mempool's
+26 -9
View File
@@ -1,7 +1,7 @@
{ lib { lib
, stdenvNoCC , stdenvNoCC
, nodejs_22 , nodejs_26
, nodejs-slim_22 , nodejs-slim_26
, fetchFromGitHub , fetchFromGitHub
, fetchNodeModules , fetchNodeModules
, runCommand , runCommand
@@ -16,34 +16,34 @@
, napi-rs-cli , napi-rs-cli
}: }:
rec { rec {
nodejs = nodejs_22; nodejs = nodejs_26;
nodejsRuntime = nodejs-slim_22; nodejsRuntime = nodejs-slim_26;
version = "3.2.1"; version = "3.3.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mempool"; owner = "mempool";
repo = "mempool"; repo = "mempool";
tag = "v${version}"; tag = "v${version}";
hash = "sha256-O2XPD1/BXQnzuOP/vMVyRfmFZEgjA85r+PShWne0vqU="; hash = "sha256-xMMBr3bSOwVNgpjOPVf7MEcGvhhNneTsE8PH9sLUr30=";
}; };
nodeModules = { nodeModules = {
frontend = fetchNodeModules { frontend = fetchNodeModules {
inherit src nodejs; inherit src nodejs;
sourceRoot = "source/frontend"; sourceRoot = "source/frontend";
hash = "sha256-+jfgsAkDdYvgso8uSHaBj/sQL3fC/ABQWzVTXfdZcU0="; hash = "sha256-LRK2W5Ypml5QSTWTHtUpilDXm5gIt13wL0pGBgkhhvk=";
}; };
backend = fetchNodeModules { backend = fetchNodeModules {
inherit src nodejs; inherit src nodejs;
sourceRoot = "source/backend"; sourceRoot = "source/backend";
hash = "sha256-y5l2SYZYK9SKSy6g0+mtTWD6JFkkdQHHBboECpEvWZ4="; hash = "sha256-jszxFq1+H9D0p0NNB6q0iFoVy2gLAmdlnzPDK8ywJo0=";
}; };
}; };
frontendAssets = fetchFiles { frontendAssets = fetchFiles {
name = "mempool-frontend-assets"; name = "mempool-frontend-assets";
hash = "sha256-r6GfOY8Pdh15o2OQMk8syfvWMV6WMCReToAEkQm7tqQ="; hash = "sha256-hnW3VUTFgrQyDWizdxYaX6Vf2m/+RYp1x2cWCg+8HM0=";
fetcher = ./frontend-assets-fetch.sh; fetcher = ./frontend-assets-fetch.sh;
}; };
@@ -99,6 +99,23 @@ rec {
# internet. Disable this script and instead add the assets manually after building. # internet. Disable this script and instead add the assets manually after building.
: > sync-assets.js : > sync-assets.js
# Only build the en-US locale instead of all ~30 translations.
# This greatly reduces build time. The output layout (`<locale>/index.html`)
# is unchanged, and nginx falls back to `en-US` for all other languages.
substituteInPlace package.json --replace-fail 'production --localize' 'production'
node -e '
const fs = require("fs");
const f = "angular.json";
const a = JSON.parse(fs.readFileSync(f));
a.projects.mempool.architect.build.options.localize = ["en-US"];
fs.writeFileSync(f, JSON.stringify(a, null, 2));
'
# The Nix builder's stdout is a pty, so the Angular CLI enables its interactive
# progress spinners. These redraw endlessly (gigabytes of escape codes) and
# stall the build. Disable TTY detection.
export NG_FORCE_TTY=false
${lib.optionalString (config != {}) '' ${lib.optionalString (config != {}) ''
ln -s ${builtins.toFile "mempool-frontend-config" (builtins.toJSON config)} mempool-frontend-config.json ln -s ${builtins.toFile "mempool-frontend-config" (builtins.toJSON config)} mempool-frontend-config.json
''} ''}
+1 -1
View File
@@ -8,7 +8,7 @@ set -euo pipefail
# This file is updated by ./frontend-assets-update.sh # This file is updated by ./frontend-assets-update.sh
declare -A revs=( declare -A revs=(
["mempool/mining-pool-logos"]=53972ebbd08373cf4910cbb3e6421a1f3bba4563 ["mempool/mining-pool-logos"]=059212bff7194617153c4307bc7acfccea057b6c
) )
fetchFile() { fetchFile() {
+16 -4
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i bash -p gnupg gnused jq #! nix-shell -i bash -p gnupg gnused jq curl
set -euo pipefail set -euo pipefail
# Use this to start a debug shell at the location of this statement # Use this to start a debug shell at the location of this statement
# . "${BASH_SOURCE[0]%/*}/../../helper/start-bash-session.sh" # . "${BASH_SOURCE[0]%/*}/../../helper/start-bash-session.sh"
version=3.2.1 version=3.3.2
# You can also specify a rev instead: # You can also specify a rev instead:
# rev=57eddac7f0b99b4fe84d91c0f4a50a4f7ccfe55f # rev=57eddac7f0b99b4fe84d91c0f4a50a4f7ccfe55f
owner=mempool owner=mempool
@@ -31,9 +31,21 @@ updateSrc() {
git clone --depth 1 --branch "$tag" -c advice.detachedHead=false $repo "$src" git clone --depth 1 --branch "$tag" -c advice.detachedHead=false $repo "$src"
git -C "$src" checkout tags/$tag git -C "$src" checkout tags/$tag
export GNUPGHOME=$TMPDIR export GNUPGHOME=$TMPDIR
# Release tags are signed by one of these keys
trustedKeys=(
913C5FF1F579B66CA10378DBA394E332255A6173 # wiz
523B596A78BB8495AA2EC45ABFD16BE592A9CD8D # mononaut (since v3.3.0)
)
# Fetch wiz' key # Fetch wiz' key
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 913C5FF1F579B66CA10378DBA394E332255A6173 2> /dev/null gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 913C5FF1F579B66CA10378DBA394E332255A6173 2> /dev/null || :
git -C "$src" verify-tag $tag # Fetch mononaut's key (not available on keyservers)
curl -fsS https://github.com/mononaut.gpg | gpg --import 2> /dev/null
signer=$(git -C "$src" verify-tag --raw $tag 2>&1 | sed -nE 's/^\[GNUPG:\] VALIDSIG ([0-9A-F]+) .*/\1/p')
if [[ ! " ${trustedKeys[*]} " =~ " $signer " ]]; then
echo "Error: Tag $tag is not signed by a trusted key (signer: ${signer:-none})"
exit 1
fi
echo "Tag $tag has a valid signature by $signer"
rev=$tag rev=$tag
fi fi
rm -rf "$src"/.git rm -rf "$src"/.git
+3 -5
View File
@@ -4,12 +4,10 @@
# see order of nginx location rules # see order of nginx location rules
# https://stackoverflow.com/questions/5238377/nginx-location-priority # https://stackoverflow.com/questions/5238377/nginx-location-priority
# for exact / requests, redirect based on $lang # for exact / requests, serve en-US.
# cache redirect for 5 minutes # (Upstream redirects to /$lang/ here, but the frontend is only built with
# the en-US locale, so all other language paths would just serve en-US.)
location = / { location = / {
if ($lang != '') {
return 302 $scheme://$host/$lang/;
}
try_files /en-US/index.html =404; try_files /en-US/index.html =404;
expires 5m; expires 5m;
} }