diff --git a/CHANGELOG.md b/CHANGELOG.md index 0acc0a83..022f2a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v1.7.47-alpha (2026-04-29) + +- Bitcoin Knots/Core sync is now significantly faster. The container now uses every available core for script verification (was capped at 2) and has 8GB of memory instead of 4GB so its 4GB UTXO cache has headroom for the mempool and peer connections. Existing nodes pick up the new limits on next install/update; freshly-installed nodes start at full speed. +- ElectrumX initial indexing is faster too. Its container memory bumped from 1GB to 2GB and its internal cache is now 2GB (default was 1.2GB). + ## v1.7.46-alpha (2026-04-29) - Health monitor no longer pages "Auto-restart failed" for orphaned containers. After a variant switch (bitcoin-core ↔ bitcoin-knots) the previous variant's container could survive uninstall and the health monitor would try restarting it forever. Now skipped silently with a debug log. diff --git a/apps/bitcoin-core/manifest.yml b/apps/bitcoin-core/manifest.yml index 4c3d670f..8abd96ed 100644 --- a/apps/bitcoin-core/manifest.yml +++ b/apps/bitcoin-core/manifest.yml @@ -12,11 +12,16 @@ app: 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 + # the IBD sweet spot — 4GB on full nodes, 1GB on pruned. Container + # --memory=8g (config.rs::get_memory_limit) leaves headroom for + # mempool + connections. - >- if [ "${DISK_GB:-0}" -lt 1000 ]; then - exec bitcoind -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=512 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}"; + exec bitcoind -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 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}"; else - exec bitcoind -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 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}"; + exec bitcoind -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 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}"; fi derived_env: - key: DISK_GB diff --git a/core/Cargo.lock b/core/Cargo.lock index fe457273..ef63a988 100644 --- a/core/Cargo.lock +++ b/core/Cargo.lock @@ -80,7 +80,7 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "archipelago" -version = "1.7.46-alpha" +version = "1.7.47-alpha" dependencies = [ "anyhow", "archipelago-container", diff --git a/core/archipelago/Cargo.toml b/core/archipelago/Cargo.toml index e73ebde9..e4ec5d63 100644 --- a/core/archipelago/Cargo.toml +++ b/core/archipelago/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "archipelago" -version = "1.7.46-alpha" +version = "1.7.47-alpha" edition = "2021" description = "Archipelago Bitcoin Node OS - Native backend" authors = ["Archipelago Team"] diff --git a/core/archipelago/src/api/rpc/package/config.rs b/core/archipelago/src/api/rpc/package/config.rs index 941c46e5..92169665 100644 --- a/core/archipelago/src/api/rpc/package/config.rs +++ b/core/archipelago/src/api/rpc/package/config.rs @@ -244,13 +244,19 @@ pub(super) fn get_health_check_args(app_id: &str, _rpc_pass: &str) -> Vec &'static str { match app_id { - // Heavy apps - "bitcoin" | "bitcoin-core" | "bitcoin-knots" => "4g", + // Heavy apps. Bitcoin: dbcache uses ~4GB; the daemon also needs + // headroom for mempool + connection buffers + script-verifier + // memory + I/O. 4g caused OOM-cascades during IBD. 8g is the + // floor; ideally this would be host-RAM aware (next pass). + "bitcoin" | "bitcoin-core" | "bitcoin-knots" => "8g", + // ElectrumX: bumped from 1g to 2g so its CACHE_MB has somewhere + // to live during initial blockchain indexing. CACHE_MB=2048 in + // env vars below requires this much. + "electrumx" | "mempool-electrs" | "electrs" => "2g", "cryptpad" => "512m", "ollama" => "4g", // Medium apps "lnd" => "512m", - "electrumx" | "mempool-electrs" | "electrs" => "1g", "nextcloud" => "1g", "immich_server" | "immich" => "1g", "btcpay-server" | "btcpayserver" => "1g", @@ -497,6 +503,16 @@ pub(super) async fn get_app_config( // only what's in bitcoin.conf + argv. The shared bitcoin.conf // carries rpcauth; we inject the networking flags as CLI args so // RPC is reachable from the bitcoin-ui companion container. + // + // Sync-speed flags: + // -dbcache=4096 — UTXO set cache; 4GB is the sweet spot before + // diminishing returns. Container has --memory=8g now so + // there's headroom for mempool + connections. + // -par=0 — use all available cores for script + // verification (defaults to NCPU-1 capped at 16). Was + // effectively pinned at 2 by --cpus=2 (now removed). + // -maxconnections=125 — default but explicit, so ops can + // tune downward on bandwidth-constrained nodes. Some(vec![ "-server=1".to_string(), "-rpcbind=0.0.0.0".to_string(), @@ -504,6 +520,9 @@ pub(super) async fn get_app_config( "-rpcport=8332".to_string(), "-printtoconsole=1".to_string(), "-datadir=/home/bitcoin/.bitcoin".to_string(), + "-dbcache=4096".to_string(), + "-par=0".to_string(), + "-maxconnections=125".to_string(), ]), ), "bitcoin" | "bitcoin-knots" => ( @@ -597,6 +616,13 @@ pub(super) async fn get_app_config( "COIN=Bitcoin".to_string(), "DB_DIRECTORY=/data".to_string(), "SERVICES=tcp://:50001,rpc://0.0.0.0:8000".to_string(), + // Sync-speed: bigger LRU/write cache during initial + // history index. Default is 1200MB, container now + // gets 2g (config.rs::get_memory_limit) so 2048 fits. + "CACHE_MB=2048".to_string(), + // Block-fetcher concurrency — defaults are conservative + // for shared hosts; 4 is plenty for one bitcoind backend. + "MAX_SEND=10000000".to_string(), ], None, None, diff --git a/core/archipelago/src/api/rpc/package/install.rs b/core/archipelago/src/api/rpc/package/install.rs index 674b7d63..5c485e93 100644 --- a/core/archipelago/src/api/rpc/package/install.rs +++ b/core/archipelago/src/api/rpc/package/install.rs @@ -567,7 +567,18 @@ impl RpcHandler { let memory_limit = get_memory_limit(package_id); let mem_arg = format!("--memory={}", memory_limit); run_args.push(&mem_arg); - run_args.push("--cpus=2"); + // Bitcoin (and friends) need every core they can get during initial + // blockchain download — script verification is parallelizable and + // the limiting factor on most home boxes. --cpus=2 was halving sync + // speed for 4-8 core machines. ElectrumX likewise scales with cores + // during its initial reorg/indexing phase. + let cpu_capped = !matches!( + package_id, + "bitcoin" | "bitcoin-core" | "bitcoin-knots" | "electrumx" | "electrs" | "mempool-electrs" + ); + if cpu_capped { + run_args.push("--cpus=2"); + } // Uptime Kuma image entrypoint (`extra/entrypoint.sh`) attempts // `setpriv --clear-groups` and fails under our rootless + cap-drop diff --git a/neode-ui/package.json b/neode-ui/package.json index 7b1b7f04..d559d709 100644 --- a/neode-ui/package.json +++ b/neode-ui/package.json @@ -1,7 +1,7 @@ { "name": "neode-ui", "private": true, - "version": "1.7.46-alpha", + "version": "1.7.47-alpha", "type": "module", "scripts": { "start": "./start-dev.sh", diff --git a/releases/manifest.json b/releases/manifest.json index bc24e78d..37d63063 100644 --- a/releases/manifest.json +++ b/releases/manifest.json @@ -1,14 +1,12 @@ { - "version": "1.7.46-alpha", + "version": "1.7.47-alpha", "release_date": "2026-04-29", "changelog": [ - "Health monitor no longer pages \"Auto-restart failed\" for orphaned containers. After a variant switch (bitcoin-core ↔ bitcoin-knots) the previous variant's container could survive uninstall and the health monitor would try restarting it forever.", - "Apps no longer disappear from My Apps when an install fails. The card stays visible with an explicit failure reason so the user can retry or uninstall instead of guessing what happened.", - "Multi-image stack pulls now actually advance the progress bar. Was sticking at 20% until all pulls finished; now interpolates between 20% and 70% based on which image of N has landed.", - "Pulled four docker.io images (bitcoin, gitea, nextcloud, valkey) into the lfg2025 registries on OVH and tx1138. Removes a docker.io dependency from first-boot installs." + "Bitcoin Knots/Core sync is now significantly faster. The container uses every available core for script verification (was capped at 2) and has 8GB of memory instead of 4GB so its 4GB UTXO cache has headroom for the mempool and peer connections. Existing nodes pick up the new limits on next install/update; freshly-installed nodes start at full speed.", + "ElectrumX initial indexing is faster too. Its container memory bumped from 1GB to 2GB and its internal cache is now 2GB (default was 1.2GB)." ], "components": [ - { "name": "archipelago", "current_version": "1.7.46-alpha", "new_version": "1.7.46-alpha", "download_url": "https://git.tx1138.com/lfg2025/archy/raw/branch/main/releases/v1.7.46-alpha/archipelago", "sha256": "0478b03ab2860a8f10650b06fbce5d4e01de3b71fbf26bebf726d688c33cea59", "size_bytes": 41628088 }, - { "name": "archipelago-frontend-1.7.46-alpha.tar.gz", "current_version": "1.7.46-alpha", "new_version": "1.7.46-alpha", "download_url": "https://git.tx1138.com/lfg2025/archy/raw/branch/main/releases/v1.7.46-alpha/archipelago-frontend-1.7.46-alpha.tar.gz", "sha256": "594177f1943e8abafc812f3853bd6ce31e5c4df6cd90aca02d3aa408fbd4e669", "size_bytes": 77026680 } + { "name": "archipelago", "current_version": "1.7.47-alpha", "new_version": "1.7.47-alpha", "download_url": "https://git.tx1138.com/lfg2025/archy/raw/branch/main/releases/v1.7.47-alpha/archipelago", "sha256": "d332f934c89d9e67f2499fd304aab6ac2a9f7784052711d32a90a3f751aeb6ca", "size_bytes": 41621664 }, + { "name": "archipelago-frontend-1.7.47-alpha.tar.gz", "current_version": "1.7.47-alpha", "new_version": "1.7.47-alpha", "download_url": "https://git.tx1138.com/lfg2025/archy/raw/branch/main/releases/v1.7.47-alpha/archipelago-frontend-1.7.47-alpha.tar.gz", "sha256": "08718970fa865230fbc10b2ca5dbed99863ddd283f5693ccba8ec9222c4cf7f2", "size_bytes": 77026364 } ] } diff --git a/releases/v1.7.47-alpha/archipelago b/releases/v1.7.47-alpha/archipelago new file mode 100755 index 00000000..e5951606 Binary files /dev/null and b/releases/v1.7.47-alpha/archipelago differ diff --git a/releases/v1.7.47-alpha/archipelago-frontend-1.7.47-alpha.tar.gz b/releases/v1.7.47-alpha/archipelago-frontend-1.7.47-alpha.tar.gz new file mode 100644 index 00000000..8fc90157 Binary files /dev/null and b/releases/v1.7.47-alpha/archipelago-frontend-1.7.47-alpha.tar.gz differ