Skip to content

feat: bitcoin pruned mode with guarded seed restores - #27

Merged
erubboli merged 4 commits into
mainfrom
feat/bitcoin-pruned-mode
Oct 18, 2026
Merged

erubboli merged 4 commits into
mainfrom
feat/bitcoin-pruned-mode

Conversation

@erubboli

Copy link
Copy Markdown
Member

What

Bitcoin node storage mode becomes first-class instead of an install-time footnote:

  • Sidecar /status now reports pruned, pruneHeight and txindex from getblockchaininfo (shapes unit-tested).
  • Restore guard (create-time): a full-history seed restore (sync horizon 0) on a pruned node is refused with a plain-English 409 instead of silently missing coins. Generated wallets (horizon=now) are unaffected.
  • Restore guard (sync-time backstop): if bitcoind was unreachable during the restore attempt and comes back pruned, the sync task refuses a horizon-0 scan — no wrong balances, loud log line.
  • link-seed fail-fast: the API checks pruned state before unlocking private keys, so password + 2FA aren't burned on a restore that cannot work.
  • UI: "pruned node" chip in the Bitcoin page status strip with a tooltip explaining the limitation; setup/import error paths surface the refusal copy verbatim.
  • Docs: README storage-mode matrix (full ~700 GB vs pruned ~15–25 GB + restore limitation; the outdated "pruning incompatible with wallet sync" warning is gone), env.dev.example documents BITCOIN_TXINDEX=0 + BITCOIN_PRUNE=550 for light dev setups.

./init.sh already asks for the mode at install time (pruned by default); this PR makes the runtime stack honest about it.

Gates

  • cargo check + sidecar tests (9) green
  • tsc --noEmit clean, 74 files / 879 tests green, astro build OK
  • Diff reviewed in a recursive findings loop to zero findings; fix at each cycle

@erubboli
erubboli merged commit 7733306 into main Oct 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant