archy/apps/bitcoin-core/manifest.yml

102 lines
3.9 KiB
YAML
Raw Normal View History

2026-01-24 22:01:51 +00:00
app:
id: bitcoin-core
2026-04-30 16:29:56 -04:00
name: Bitcoin Core
release(v1.7.35-alpha): rootless-netns self-heal + app update button + bitcoin-core 28.4 + Node DID unification - core/archipelago/src/bootstrap.rs (NEW): embed scripts/container-doctor.sh and image-recipe/configs/archipelago-doctor.{service,timer} via include_str! and sync to disk + enable the timer on every archipelago startup. Idempotent (content-hash compare), dev-box symlink guard keeps the git checkout untouched, best-effort (warn-only on failure) so bootstrap never blocks server readiness. Wired in main.rs as a background tokio task. - scripts/container-doctor.sh: add fix_rootless_netns_egress(). Detects when the rootless-netns has lost its pasta tap (container-to-container still works but outbound DNS/TCP fails) via an nsenter probe into aardvark-dns; with a two-probe 10s debounce to rule out transients and a host-precheck that bails out if the host itself is offline. When the rootless-netns is truly broken, does a graceful podman stop --all / start --all so pasta + aardvark-dns rebuild the netns from scratch. Bitcoin-knots and every other outbound container recover in one cycle. - core/archipelago/src/update.rs: host_sudo → pub(crate) so bootstrap.rs can reuse the existing systemd-run escape hatch. - apps/bitcoin-core/manifest.yml: bump app version 24.0.0 → 28.4.0 and image bitcoin/bitcoin:24.0 → bitcoin/bitcoin:28.4. Resources aligned with the real container-specs.sh large-disk tune (4 GiB memory cap, cpu_limit: 0 so bitcoind can run -par=auto across every core). - neode-ui/src/views/apps/AppCard.vue + Apps.vue: add an Update button + Updating spinner to every app card that has available-update set. Wires through serverStore.updatePackage(id) — the same RPC the detail view already calls. common.update / common.updating i18n keys added in en.json and es.json. - core/archipelago/src/identity_manager.rs: add create_from_signing_key() that mirrors an existing Ed25519 key as a manager-level identity with a deterministic id (`node-<pubkey16>`). Idempotent across restarts, gets the hex-SVG master avatar. - core/archipelago/src/server.rs: the auto-create path on first boot now mirrors the node's own signing_key (seed-derived on onboarded installs) as a "Node" identity instead of generating a random "Default" keypair. Once this ships, the DID on the Web5 DID Status card (via node.did RPC), the Node entry on the Identities page (via identity.list), and the DID used for peer-to-peer connects (via server_info.pubkey) all resolve to the same seed-derived pubkey. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 08:29:56 -04:00
version: 28.4.0
2026-04-30 16:29:56 -04:00
description: Reference Bitcoin Core node with dynamic prune/full-mode startup based on host disk.
2026-04-30 16:29:56 -04:00
container_name: bitcoin-core
release(v1.7.35-alpha): rootless-netns self-heal + app update button + bitcoin-core 28.4 + Node DID unification - core/archipelago/src/bootstrap.rs (NEW): embed scripts/container-doctor.sh and image-recipe/configs/archipelago-doctor.{service,timer} via include_str! and sync to disk + enable the timer on every archipelago startup. Idempotent (content-hash compare), dev-box symlink guard keeps the git checkout untouched, best-effort (warn-only on failure) so bootstrap never blocks server readiness. Wired in main.rs as a background tokio task. - scripts/container-doctor.sh: add fix_rootless_netns_egress(). Detects when the rootless-netns has lost its pasta tap (container-to-container still works but outbound DNS/TCP fails) via an nsenter probe into aardvark-dns; with a two-probe 10s debounce to rule out transients and a host-precheck that bails out if the host itself is offline. When the rootless-netns is truly broken, does a graceful podman stop --all / start --all so pasta + aardvark-dns rebuild the netns from scratch. Bitcoin-knots and every other outbound container recover in one cycle. - core/archipelago/src/update.rs: host_sudo → pub(crate) so bootstrap.rs can reuse the existing systemd-run escape hatch. - apps/bitcoin-core/manifest.yml: bump app version 24.0.0 → 28.4.0 and image bitcoin/bitcoin:24.0 → bitcoin/bitcoin:28.4. Resources aligned with the real container-specs.sh large-disk tune (4 GiB memory cap, cpu_limit: 0 so bitcoind can run -par=auto across every core). - neode-ui/src/views/apps/AppCard.vue + Apps.vue: add an Update button + Updating spinner to every app card that has available-update set. Wires through serverStore.updatePackage(id) — the same RPC the detail view already calls. common.update / common.updating i18n keys added in en.json and es.json. - core/archipelago/src/identity_manager.rs: add create_from_signing_key() that mirrors an existing Ed25519 key as a manager-level identity with a deterministic id (`node-<pubkey16>`). Idempotent across restarts, gets the hex-SVG master avatar. - core/archipelago/src/server.rs: the auto-create path on first boot now mirrors the node's own signing_key (seed-derived on onboarded installs) as a "Node" identity instead of generating a random "Default" keypair. Once this ships, the DID on the Web5 DID Status card (via node.did RPC), the Node entry on the Identities page (via identity.list), and the DID used for peer-to-peer connects (via server_info.pubkey) all resolve to the same seed-derived pubkey. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 08:29:56 -04:00
2026-01-24 22:01:51 +00:00
container:
2026-04-30 16:29:56 -04:00
image: 146.59.87.168:3000/lfg2025/bitcoin:28.4
pull_policy: if-not-present
network: archy-net
entrypoint: ["sh", "-lc"]
custom_args:
# Sync-speed flags: -par=0 uses every core (was capped at 2 by
# --cpus=2, now removed for bitcoin/electrumx). -dbcache sized to
chore: baseline codex hardening before lifecycle refactor Snapshots the in-flight hardening work so subsequent reconcile/Quadlet phases land on a clean before/after diff. Changes: - core/container/src/podman_client.rs: image_uses_insecure_registry() whitelist for the OVH (146.59.87.168:3000) and legacy Hetzner (23.182.128.160:3000) HTTP mirrors; podman_network_settings() lifts custom networks into the Networks map so containers can join them. - core/archipelago/src/container/prod_orchestrator.rs: ensure_container_network() creates per-manifest networks on demand; apply_data_uid() now goes through host_sudo for mkdir -p + chown so bind-mount roots get created and chowned without password prompts. - core/archipelago/src/api/rpc/package/{install,update,stacks}.rs: podman pull adds --tls-verify=false only for whitelisted registries. - core/archipelago/src/bootstrap.rs: removes stale dev-mode systemd override on startup (live nodes carried it from old installers). - core/archipelago/src/config.rs: ignore ARCHIPELAGO_DEV_MODE in prod binaries — it had been silently rerouting volumes to /tmp. - apps/bitcoin-{core,knots}/manifest.yml: locate bitcoind at runtime so image-layout differences don't break entrypoint. - scripts/app-catalog-image-smoke-test.py: production catalog/image smoke test that probes a target node before users click Install. - .gitignore: cover .codex, .pnpm-store, __pycache__, *.bak. Removes filebrowser.rs.bak and two stale catalog.json.bak files (verified identical to live counterparts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 08:52:29 -04:00
# the IBD sweet spot - 4GB on full nodes, 1GB on pruned. Container
# --memory=8g (config.rs::get_memory_limit) leaves headroom for
# mempool + connections.
fix: fresh-ISO feedback bug-bash — onboarding, status truthfulness, recovery, kiosk, logs Fixes from real fresh-install feedback (Framework node .81) + its log bundle: Backend: - websocket: subscribe before initial snapshot — broadcasts in the gap were silently lost, stranding clients on stale state until a hard refresh (the "everything needs ctrl-r" bug: My Apps stuck Loading, App Store stuck Checking, containers-scanned never arriving) - crash recovery: check the crash marker BEFORE writing our own PID — recovery had never run on any node (always saw its own PID and skipped); PID-reuse guard via /proc cmdline - boot status: pending-boot-starts registry (recovery, stack recovery, reconciler, adoption) — scanner overlays queued-but-down apps as Restarting instead of Stopped after a reboot; scanner-authored Restarting resolves immediately on a settled scan (no transitional wedge) - install deps: bounded wait (36x5s) when a dependency is installed but still starting ("Waiting for Bitcoin to start…") instead of instant rejection; dependency-gate rejections remove the optimistic entry (no phantom Stopped tile) and surface as a notification - seed backup: auth.setup persists the onboarding mnemonic as the encrypted seed backup (reveal previously failed on EVERY node — nothing ever wrote master_seed.enc); seed.restore stashes too; error sanitizer lets seed/2FA errors through instead of "Check server logs" - lnd: bitcoind.rpchost resolved from the running Bitcoin variant (hardcoded bitcoin-knots broke Core nodes); manifest uses derived_env - bitcoin status: clean human message for connection-reset/startup; raw URLs + os-error chains no longer reach the app card - fedimint-clientd: chown /var/lib/archipelago/fmcd to 1000:1000 (root- created dir crash-looped the rootless container, EACCES) — first-boot script + pre-start self-heal - log volume (>1GB/day on a day-old node): journald caps drop-in (ISO + bootstrap self-heal), bitcoind -printtoconsole=0 everywhere (90% of the journal was IBD UpdateTip spam), tracing default debug→info Frontend: - Login: Enter advances to confirm field then submits; submit always clickable with inline errors (was silently disabled on mismatch); Restart Onboarding needs a confirming second click (the mismatch → "onboarding restarted" trap) - sync store: 30s state reconciliation + refetch on re-entrant connect; 20s containers-scanned escape hatch so Checking can never show forever; fresh empty node reaches the real "no apps yet" state - intro video: CRF20 re-encode (SSIM 0.988) + faststart — moov was at EOF so playback needed the full 15MB first (the intro lag) - backgrounds: 10 heaviest JPEGs → WebP q90 (9.4MB→6.6MB); 7 stayed JPEG (WebP larger on noisy sources) - Web5ConnectedNodes: drop unused template ref that failed vue-tsc -b ISO/kiosk: - nginx: /assets/ 404s no longer cached immutable for a year; HTTPS block gained the missing /assets/ location (served index.html as images) - kiosk: launcher/service spliced from configs/ at ISO build (stale heredoc force-disabled GPU); MemoryHigh/Max 1200/1500→2200/2800M (kiosk rode the reclaim throttle = the lag); firmware-intel-graphics + firmware-amd-graphics (trixie split DMC blobs out of misc-nonfree) Verified: cargo test 898/898 green, npm run build green with dist contents confirmed (webp refs, lnd.png, faststart video, new strings). Handover for ISO build + deploy: docs/HANDOVER-2026-07-02-iso-feedback.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 08:00:39 -04:00
#
# -printtoconsole=0: foreground bitcoind defaults console logging ON,
# which pushed every IBD "UpdateTip" line through conmon into journald
# (>1 GB/day on a fresh node). bitcoind still writes debug.log in the
# datadir (/var/lib/archipelago/bitcoin/debug.log, self-shrunk on
# restart) — use that for deep debugging; podman logs only carries
# entrypoint/startup errors.
- >-
chore: baseline codex hardening before lifecycle refactor Snapshots the in-flight hardening work so subsequent reconcile/Quadlet phases land on a clean before/after diff. Changes: - core/container/src/podman_client.rs: image_uses_insecure_registry() whitelist for the OVH (146.59.87.168:3000) and legacy Hetzner (23.182.128.160:3000) HTTP mirrors; podman_network_settings() lifts custom networks into the Networks map so containers can join them. - core/archipelago/src/container/prod_orchestrator.rs: ensure_container_network() creates per-manifest networks on demand; apply_data_uid() now goes through host_sudo for mkdir -p + chown so bind-mount roots get created and chowned without password prompts. - core/archipelago/src/api/rpc/package/{install,update,stacks}.rs: podman pull adds --tls-verify=false only for whitelisted registries. - core/archipelago/src/bootstrap.rs: removes stale dev-mode systemd override on startup (live nodes carried it from old installers). - core/archipelago/src/config.rs: ignore ARCHIPELAGO_DEV_MODE in prod binaries — it had been silently rerouting volumes to /tmp. - apps/bitcoin-{core,knots}/manifest.yml: locate bitcoind at runtime so image-layout differences don't break entrypoint. - scripts/app-catalog-image-smoke-test.py: production catalog/image smoke test that probes a target node before users click Install. - .gitignore: cover .codex, .pnpm-store, __pycache__, *.bak. Removes filebrowser.rs.bak and two stale catalog.json.bak files (verified identical to live counterparts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 08:52:29 -04:00
BITCOIND="$(command -v bitcoind || true)";
if [ -z "$BITCOIND" ]; then
BITCOIND="$(find /opt -path '*/bin/bitcoind' -type f 2>/dev/null | sort | tail -n 1)";
fi;
if [ -z "$BITCOIND" ]; then
echo "bitcoind not found in image" >&2;
exit 127;
fi;
2026-06-11 04:44:58 -04:00
RPC_USER="$(printenv BITCOIN_RPC_USER)";
RPC_PASS="$(printenv BITCOIN_RPC_PASS)";
RPC_TXRELAY_AUTH="$(printenv BITCOIN_RPC_TXRELAY_RPCAUTH || true)";
DISK_GB_VALUE="$(printenv DISK_GB || true)";
RPC_HEADROOM="-rpcthreads=16 -rpcworkqueue=256";
RPC_TXRELAY_FLAGS="-rpcwhitelistdefault=0";
if [ -n "$RPC_TXRELAY_AUTH" ]; then
2026-06-12 03:00:15 -04:00
RPC_TXRELAY_FLAGS="$RPC_TXRELAY_FLAGS -rpcauth=$RPC_TXRELAY_AUTH -rpcwhitelist=txrelay:sendrawtransaction,submitpackage,testmempoolaccept,getmempoolinfo,getrawmempool,getmempoolentry,getnetworkinfo,getblockchaininfo,getblockcount,getblockhash,getblock,getblockheader,getrawtransaction,gettxout,gettxspendingprevout,decoderawtransaction,decodescript,estimatesmartfee,uptime,ping,getconnectioncount,getpeerinfo,getindexinfo,getdeploymentinfo,getchaintips";
2026-06-11 04:44:58 -04:00
fi;
if [ "${DISK_GB_VALUE:-0}" -lt 1000 ]; then
fix: fresh-ISO feedback bug-bash — onboarding, status truthfulness, recovery, kiosk, logs Fixes from real fresh-install feedback (Framework node .81) + its log bundle: Backend: - websocket: subscribe before initial snapshot — broadcasts in the gap were silently lost, stranding clients on stale state until a hard refresh (the "everything needs ctrl-r" bug: My Apps stuck Loading, App Store stuck Checking, containers-scanned never arriving) - crash recovery: check the crash marker BEFORE writing our own PID — recovery had never run on any node (always saw its own PID and skipped); PID-reuse guard via /proc cmdline - boot status: pending-boot-starts registry (recovery, stack recovery, reconciler, adoption) — scanner overlays queued-but-down apps as Restarting instead of Stopped after a reboot; scanner-authored Restarting resolves immediately on a settled scan (no transitional wedge) - install deps: bounded wait (36x5s) when a dependency is installed but still starting ("Waiting for Bitcoin to start…") instead of instant rejection; dependency-gate rejections remove the optimistic entry (no phantom Stopped tile) and surface as a notification - seed backup: auth.setup persists the onboarding mnemonic as the encrypted seed backup (reveal previously failed on EVERY node — nothing ever wrote master_seed.enc); seed.restore stashes too; error sanitizer lets seed/2FA errors through instead of "Check server logs" - lnd: bitcoind.rpchost resolved from the running Bitcoin variant (hardcoded bitcoin-knots broke Core nodes); manifest uses derived_env - bitcoin status: clean human message for connection-reset/startup; raw URLs + os-error chains no longer reach the app card - fedimint-clientd: chown /var/lib/archipelago/fmcd to 1000:1000 (root- created dir crash-looped the rootless container, EACCES) — first-boot script + pre-start self-heal - log volume (>1GB/day on a day-old node): journald caps drop-in (ISO + bootstrap self-heal), bitcoind -printtoconsole=0 everywhere (90% of the journal was IBD UpdateTip spam), tracing default debug→info Frontend: - Login: Enter advances to confirm field then submits; submit always clickable with inline errors (was silently disabled on mismatch); Restart Onboarding needs a confirming second click (the mismatch → "onboarding restarted" trap) - sync store: 30s state reconciliation + refetch on re-entrant connect; 20s containers-scanned escape hatch so Checking can never show forever; fresh empty node reaches the real "no apps yet" state - intro video: CRF20 re-encode (SSIM 0.988) + faststart — moov was at EOF so playback needed the full 15MB first (the intro lag) - backgrounds: 10 heaviest JPEGs → WebP q90 (9.4MB→6.6MB); 7 stayed JPEG (WebP larger on noisy sources) - Web5ConnectedNodes: drop unused template ref that failed vue-tsc -b ISO/kiosk: - nginx: /assets/ 404s no longer cached immutable for a year; HTTPS block gained the missing /assets/ location (served index.html as images) - kiosk: launcher/service spliced from configs/ at ISO build (stale heredoc force-disabled GPU); MemoryHigh/Max 1200/1500→2200/2800M (kiosk rode the reclaim throttle = the lag); firmware-intel-graphics + firmware-amd-graphics (trixie split DMC blobs out of misc-nonfree) Verified: cargo test 898/898 green, npm run build green with dist contents confirmed (webp refs, lnd.png, faststart video, new strings). Handover for ISO build + deploy: docs/HANDOVER-2026-07-02-iso-feedback.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 08:00:39 -04:00
exec "$BITCOIND" -datadir=/home/bitcoin/.bitcoin -noconf -printtoconsole=0 -server=1 -prune=550 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0:8332 -listen=1 -bind=0.0.0.0:8333 -dbcache=1024 -par=0 -maxconnections=125 $RPC_HEADROOM $RPC_TXRELAY_FLAGS -rpcuser="$RPC_USER" -rpcpassword="$RPC_PASS";
else
fix: fresh-ISO feedback bug-bash — onboarding, status truthfulness, recovery, kiosk, logs Fixes from real fresh-install feedback (Framework node .81) + its log bundle: Backend: - websocket: subscribe before initial snapshot — broadcasts in the gap were silently lost, stranding clients on stale state until a hard refresh (the "everything needs ctrl-r" bug: My Apps stuck Loading, App Store stuck Checking, containers-scanned never arriving) - crash recovery: check the crash marker BEFORE writing our own PID — recovery had never run on any node (always saw its own PID and skipped); PID-reuse guard via /proc cmdline - boot status: pending-boot-starts registry (recovery, stack recovery, reconciler, adoption) — scanner overlays queued-but-down apps as Restarting instead of Stopped after a reboot; scanner-authored Restarting resolves immediately on a settled scan (no transitional wedge) - install deps: bounded wait (36x5s) when a dependency is installed but still starting ("Waiting for Bitcoin to start…") instead of instant rejection; dependency-gate rejections remove the optimistic entry (no phantom Stopped tile) and surface as a notification - seed backup: auth.setup persists the onboarding mnemonic as the encrypted seed backup (reveal previously failed on EVERY node — nothing ever wrote master_seed.enc); seed.restore stashes too; error sanitizer lets seed/2FA errors through instead of "Check server logs" - lnd: bitcoind.rpchost resolved from the running Bitcoin variant (hardcoded bitcoin-knots broke Core nodes); manifest uses derived_env - bitcoin status: clean human message for connection-reset/startup; raw URLs + os-error chains no longer reach the app card - fedimint-clientd: chown /var/lib/archipelago/fmcd to 1000:1000 (root- created dir crash-looped the rootless container, EACCES) — first-boot script + pre-start self-heal - log volume (>1GB/day on a day-old node): journald caps drop-in (ISO + bootstrap self-heal), bitcoind -printtoconsole=0 everywhere (90% of the journal was IBD UpdateTip spam), tracing default debug→info Frontend: - Login: Enter advances to confirm field then submits; submit always clickable with inline errors (was silently disabled on mismatch); Restart Onboarding needs a confirming second click (the mismatch → "onboarding restarted" trap) - sync store: 30s state reconciliation + refetch on re-entrant connect; 20s containers-scanned escape hatch so Checking can never show forever; fresh empty node reaches the real "no apps yet" state - intro video: CRF20 re-encode (SSIM 0.988) + faststart — moov was at EOF so playback needed the full 15MB first (the intro lag) - backgrounds: 10 heaviest JPEGs → WebP q90 (9.4MB→6.6MB); 7 stayed JPEG (WebP larger on noisy sources) - Web5ConnectedNodes: drop unused template ref that failed vue-tsc -b ISO/kiosk: - nginx: /assets/ 404s no longer cached immutable for a year; HTTPS block gained the missing /assets/ location (served index.html as images) - kiosk: launcher/service spliced from configs/ at ISO build (stale heredoc force-disabled GPU); MemoryHigh/Max 1200/1500→2200/2800M (kiosk rode the reclaim throttle = the lag); firmware-intel-graphics + firmware-amd-graphics (trixie split DMC blobs out of misc-nonfree) Verified: cargo test 898/898 green, npm run build green with dist contents confirmed (webp refs, lnd.png, faststart video, new strings). Handover for ISO build + deploy: docs/HANDOVER-2026-07-02-iso-feedback.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 08:00:39 -04:00
exec "$BITCOIND" -datadir=/home/bitcoin/.bitcoin -noconf -printtoconsole=0 -server=1 -txindex=1 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0:8332 -listen=1 -bind=0.0.0.0:8333 -dbcache=4096 -par=0 -maxconnections=125 $RPC_HEADROOM $RPC_TXRELAY_FLAGS -rpcuser="$RPC_USER" -rpcpassword="$RPC_PASS";
fi
derived_env:
- key: DISK_GB
template: "{{DISK_GB}}"
secret_env:
- key: BITCOIN_RPC_PASS
secret_file: bitcoin-rpc-password
2026-06-11 04:44:58 -04:00
- key: BITCOIN_RPC_TXRELAY_RPCAUTH
secret_file: bitcoin-rpc-txrelay-rpcauth
data_uid: "100101:100101"
2026-01-24 22:01:51 +00:00
dependencies:
- storage: 500Gi
2026-01-24 22:01:51 +00:00
resources:
cpu_limit: 0
memory_limit: 4Gi
2026-01-24 22:01:51 +00:00
disk_limit: 500Gi
2026-01-24 22:01:51 +00:00
security:
capabilities: [CHOWN, FOWNER, SETUID, SETGID, DAC_OVERRIDE]
readonly_root: false
2026-01-24 22:01:51 +00:00
network_policy: isolated
2026-01-24 22:01:51 +00:00
ports:
- host: 8332
container: 8332
protocol: tcp
2026-01-24 22:01:51 +00:00
- host: 8333
container: 8333
protocol: tcp
2026-01-24 22:01:51 +00:00
volumes:
- type: bind
source: /var/lib/archipelago/bitcoin
target: /home/bitcoin/.bitcoin
options: [rw]
2026-01-24 22:01:51 +00:00
environment:
- BITCOIN_RPC_USER=archipelago
2026-01-24 22:01:51 +00:00
health_check:
type: tcp
endpoint: localhost:8332
2026-01-24 22:01:51 +00:00
interval: 30s
timeout: 5s
retries: 3
2026-01-24 22:01:51 +00:00
bitcoin_integration:
rpc_access: admin
sync_required: true
testnet_support: false
2026-01-24 22:01:51 +00:00
pruning_support: true