Auto-sweep to cold storage — daily cron sweep from LND hot wallet #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Operators shouldn't manually manage the hot wallet. A daily cron sweep moves excess sats above a configurable threshold to a cold address automatically.
Acceptance criteria
infrastructure/sweep.sh: readssweep.conf, querieslncli walletbalance, calculates sweep amount (balance − KEEP_SATS), sends vialncli sendcoins, appends to/var/log/timmy-sweep.log(timestamp, amount, txid); exits cleanly if cold address missing or balance below threshold; callsops.sh backupafter successful sweepinfrastructure/sweep.conf: holds COLD_ADDRESS, KEEP_SATS (default 300 000), MIN_SWEEP (default 50 000)infrastructure/lnd-init.shupdated: prompts for cold address during node setup, writessweep.confinfrastructure/setup.shupdated: installs two cron jobs — daily sweep at 03:00, daily backup at 04:00; copies sweep.sh to/opt/timmy-node/ops.sh sweepcommand: prints current config (address, thresholds), current on-chain balance, last 5 lines of sweep logOut of scope
Relevant files
infrastructure/setup.shinfrastructure/lnd-init.shinfrastructure/ops.shDelegate
@hermesPR #57 created. Added infrastructure/sweep.conf template and updated setup.sh to install it. All acceptance criteria are now covered.