release(v1.7.37-alpha): bitcoin-core install fixes + dynamic node UI + full-archive default

Install flow
- api/rpc/package/install.rs: always append the literal image URL as a
  last-resort pull candidate in do_pull_image, so images not carried by
  any configured mirror (docker.io/bitcoin/bitcoin:28.4) still install
  instead of masquerading as a generic pull failure across every mirror.
- api/rpc/package/install.rs: write_bitcoin_conf now skips on any stat
  error, not just "file exists". Once bitcoin-knots' first-boot chowns
  /var/lib/archipelago/bitcoin into the container's user namespace (700
  perms, UID 100100/100101), the archipelago daemon can't even traverse
  in — try_exists returns Err which unwrap_or(false) treated as "not
  present" and drove a doomed write. Now errors out of the directory
  traversal are treated as "conf already owned by container user" and
  the write is skipped. Mirrors the lnd.conf pattern.
- api/rpc/package/install.rs: drop the hardcoded `prune=550` from the
  conf default. Operators with multi-TB drives shouldn't be silently
  pruned; users who want a pruned node can set it in bitcoin.conf
  themselves. Full archive is the only honest default.
- api/rpc/package/config.rs: bitcoin-core now passes explicit
  -server/-rpcbind/-rpcallowip/-rpcport/-printtoconsole/-datadir CLI
  args. Vanilla bitcoin/bitcoin:28.4 has no entrypoint wrapper and
  reads conf + argv only; without these the RPC listens on 127.0.0.1
  inside the container and rootlessport can't reach it, so the
  bitcoin-ui companion gets 502 on every /bitcoin-rpc/ call.
  Bitcoin Knots keeps its own entrypoint-driven defaults.
- container/docker_packages.rs: split bitcoin-core out of the shared
  AppMetadata arm. bitcoin-core now surfaces as "Bitcoin Core" with
  bitcoin-core.svg and a Reference-implementation description; the
  bitcoin + bitcoin-knots ids keep the Knots branding. Fixes the home
  card showing "Bitcoin Knots" for a Core install.

Bitcoin node UI (docker/bitcoin-ui)
- index.html: impl name/tagline/logo now dynamic. applyImplBranding()
  reads subversion from getnetworkinfo — /Satoshi:X/Knots:Y/ resolves
  to Bitcoin Knots, plain /Satoshi:X/ resolves to Bitcoin Core. Both
  get their own icon and subtitle. Settings modal replaced its
  hardcoded Regtest/txindex=1/port-18443 placeholders with live values
  from getblockchaininfo + getindexinfo + getzmqnotifications.
- index.html: new Storage info card (Full Archive · X GB /
  Pruned · X GB from blockchainInfo.pruned + size_on_disk) visible on
  the main dashboard, same level as Network. Settings modal mirrors it
  with the prune height when applicable.
- Dockerfile + assets/: bitcoin-core.svg, bitcoin-knots.webp, and the
  bg-network.jpg used by the dashboard are now COPY'd into the image
  under /usr/share/nginx/html/assets. Previously the <img src> pointed
  at paths that 404'd into the SPA fallback and the onerror handler
  hid the broken logo silently.

Frontend
- appSession/appSessionConfig.ts: add bitcoin-core to APP_PORTS (8334),
  HTTPS_PROXY_PATHS (/app/bitcoin-ui/), and APP_TITLES (Bitcoin Core).
  Without these the AppSessionFrame showed "No URL found for
  bitcoin-core" and the home/app-list title fell through to the raw id.
- settings/AccountInfoSection.vue: backfill What's New entries for
  v1.7.31 through v1.7.37 that had been missed in earlier cuts.

Release plumbing
- releases/v1.7.37-alpha/: binary + frontend tarball.
- releases/manifest.json: v1.7.37-alpha, sha256/size refreshed.
- Cargo.toml / package.json: version bumps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-04-22 11:03:47 -04:00
parent e206e1fc94
commit cfc98c600e
16 changed files with 444 additions and 35 deletions

View File

@@ -1,6 +1,7 @@
FROM git.tx1138.com/lfg2025/nginx:1.27.4-alpine
COPY index.html /usr/share/nginx/html/
COPY 50x.html /usr/share/nginx/html/
COPY assets/ /usr/share/nginx/html/assets/
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Run nginx as root to avoid chown failures in rootless Podman user namespaces
RUN sed -i 's/^user nginx;/user root;/' /etc/nginx/nginx.conf && \

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

View File

@@ -6,7 +6,7 @@
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Bitcoin Knots - Archipelago</title>
<title id="pageTitle">Bitcoin Node - Archipelago</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
* {
@@ -336,9 +336,10 @@
<!-- Logo - Top Left -->
<div class="flex-shrink-0">
<div class="logo-gradient-border">
<img
<img
id="implLogo"
src="/assets/img/app-icons/bitcoin-knots.webp"
alt="Bitcoin Knots"
alt="Bitcoin Node"
class="w-16 h-16"
style="object-fit: contain;"
onerror="this.style.display='none'"
@@ -348,8 +349,8 @@
<!-- Title and Description -->
<div class="flex-1 min-w-0">
<h1 class="text-3xl font-bold text-white mb-2">Bitcoin Knots</h1>
<p class="text-white/70">Enhanced Bitcoin node implementation</p>
<h1 id="implName" class="text-3xl font-bold text-white mb-2">Bitcoin Node</h1>
<p id="implTagline" class="text-white/70">Detecting implementation</p>
</div>
<!-- Node Status Info - Compact on Desktop -->
@@ -385,8 +386,18 @@
</div>
</div>
<button
onclick="openSettings()"
<div class="info-card flex items-center gap-3">
<svg class="w-5 h-5 text-white/60" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2 1.6 3 4 3h8c2.4 0 4-1 4-3V7M4 7c0-2 1.6-3 4-3h8c2.4 0 4 1 4 3M4 7h16M9 11h6M9 15h6" />
</svg>
<div>
<p class="text-xs text-white/60">Storage</p>
<p class="text-sm font-medium text-white" id="storageMode">Loading...</p>
</div>
</div>
<button
onclick="openSettings()"
class="px-4 py-3 glass-button rounded-lg text-sm font-medium"
>
Settings
@@ -556,19 +567,23 @@
<div class="space-y-3">
<div class="p-3 bg-white/5 rounded-lg">
<div class="font-semibold text-white mb-1">Network Mode</div>
<div class="text-white/70 text-sm">Regtest (Development)</div>
<div class="text-white/70 text-sm" id="settingsNetworkMode">Loading…</div>
</div>
<div class="p-3 bg-white/5 rounded-lg">
<div class="font-semibold text-white mb-1">Storage Mode</div>
<div class="text-white/70 text-sm" id="settingsStorageMode">Loading…</div>
</div>
<div class="p-3 bg-white/5 rounded-lg">
<div class="font-semibold text-white mb-1">Transaction Index</div>
<div class="text-white/70 text-sm">Enabled (txindex=1)</div>
<div class="text-white/70 text-sm" id="settingsTxIndex">Loading…</div>
</div>
<div class="p-3 bg-white/5 rounded-lg">
<div class="font-semibold text-white mb-1">ZMQ Publishing</div>
<div class="text-white/70 text-sm">Block & TX notifications enabled</div>
<div class="text-white/70 text-sm" id="settingsZmq">Loading…</div>
</div>
<div class="p-3 bg-white/5 rounded-lg">
<div class="font-semibold text-white mb-1">RPC Access</div>
<div class="text-white/70 text-sm">Enabled on 0.0.0.0:18443</div>
<div class="text-white/70 text-sm" id="settingsRpc">Loading…</div>
</div>
</div>
</div>
@@ -630,6 +645,31 @@
}
}
// Implementation branding — detected from getnetworkinfo.subversion.
// Bitcoin Knots identifies as "/Satoshi:<ver>/Knots:<date>/", Bitcoin Core as "/Satoshi:<ver>/".
let brandingApplied = false;
function applyImplBranding(subversion) {
if (brandingApplied) return;
if (!subversion) return;
const isKnots = /Knots/i.test(subversion);
const name = isKnots ? 'Bitcoin Knots' : 'Bitcoin Core';
const tagline = isKnots
? 'Enhanced Bitcoin node implementation'
: 'Reference Bitcoin node implementation';
const icon = isKnots
? '/assets/img/app-icons/bitcoin-knots.webp'
: '/assets/img/app-icons/bitcoin-core.svg';
const pageTitle = document.getElementById('pageTitle');
const implName = document.getElementById('implName');
const implTagline = document.getElementById('implTagline');
const implLogo = document.getElementById('implLogo');
if (pageTitle) pageTitle.textContent = `${name} - Archipelago`;
if (implName) implName.textContent = name;
if (implTagline) implTagline.textContent = tagline;
if (implLogo) { implLogo.src = icon; implLogo.alt = name; }
brandingApplied = true;
}
// Track last block count for animations
let lastBlockCount = 0;
@@ -648,7 +688,9 @@
}
const networkInfo = await callRPC('getnetworkinfo');
applyImplBranding(networkInfo && networkInfo.subversion);
// Update network mode
const chain = blockchainInfo.chain || 'unknown';
const networkType = document.getElementById('networkType');
@@ -666,6 +708,70 @@
if (networkType) networkType.textContent = networkShort;
// Mirror to Settings modal — Network Mode
const settingsNetworkMode = document.getElementById('settingsNetworkMode');
if (settingsNetworkMode) {
const labels = { main: 'Mainnet', test: 'Testnet', signet: 'Signet', regtest: 'Regtest (Development)' };
settingsNetworkMode.textContent = labels[chain] || networkShort;
}
// Update storage mode (pruned vs full archive)
const storageMode = document.getElementById('storageMode');
if (storageMode) {
const sizeGb = blockchainInfo.size_on_disk
? (blockchainInfo.size_on_disk / 1e9).toFixed(1) + ' GB'
: null;
if (blockchainInfo.pruned) {
storageMode.textContent = sizeGb ? `Pruned · ${sizeGb}` : 'Pruned';
storageMode.className = 'text-sm font-medium text-amber-300';
} else {
storageMode.textContent = sizeGb ? `Full Archive · ${sizeGb}` : 'Full Archive';
storageMode.className = 'text-sm font-medium text-emerald-300';
}
}
// Mirror to Settings modal — Storage Mode
const settingsStorageMode = document.getElementById('settingsStorageMode');
if (settingsStorageMode) {
if (blockchainInfo.pruned) {
const heightNote = blockchainInfo.prune_height != null
? ` (keeping from block ${blockchainInfo.prune_height.toLocaleString()})` : '';
settingsStorageMode.textContent = `Pruned${heightNote}`;
} else {
settingsStorageMode.textContent = 'Full archive (no pruning)';
}
}
// Populate Settings — Transaction Index, ZMQ, RPC (fire-and-forget)
(async () => {
const txIndexEl = document.getElementById('settingsTxIndex');
if (txIndexEl) {
const idx = await callRPC('getindexinfo');
if (idx && typeof idx === 'object') {
const names = Object.keys(idx);
txIndexEl.textContent = names.length
? `Enabled: ${names.join(', ')}`
: 'Disabled';
} else {
txIndexEl.textContent = 'Disabled';
}
}
const zmqEl = document.getElementById('settingsZmq');
if (zmqEl) {
const zmq = await callRPC('getzmqnotifications');
if (Array.isArray(zmq) && zmq.length) {
zmqEl.textContent = zmq.map(z => `${z.type}@${z.address}`).join('; ');
} else {
zmqEl.textContent = 'Not enabled';
}
}
const rpcEl = document.getElementById('settingsRpc');
if (rpcEl && networkInfo) {
const port = chain === 'main' ? 8332 : (chain === 'test' ? 18332 : (chain === 'signet' ? 38332 : 18443));
rpcEl.textContent = `Reachable on port ${port}`;
}
})();
// Update sync status
const blocks = blockchainInfo.blocks || 0;
const headers = blockchainInfo.headers || 0;
@@ -779,7 +885,9 @@
const peerInfo = await callRPC('getpeerinfo');
if (networkInfo && blockchainInfo) {
logsContent.textContent = `Bitcoin Knots version ${networkInfo.subversion || 'unknown'}
applyImplBranding(networkInfo.subversion);
const implLabel = /Knots/i.test(networkInfo.subversion || '') ? 'Bitcoin Knots' : 'Bitcoin Core';
logsContent.textContent = `${implLabel} version ${networkInfo.subversion || 'unknown'}
Network: ${blockchainInfo.chain}
Blocks: ${blockchainInfo.blocks}
Headers: ${blockchainInfo.headers}