lnd
lnd copied to clipboard
sweep: finalize and enhance the new sweeper's functionality
With the new sweeper in place, we still have some TODOs that need to be fixed in 0.18.1,
- [ ] remove the hacks used in itest - there are lots of hacks used in the multi-hop and sweeper itests due to block sync issues among different subsystems, which should be fixed. Covered with https://github.com/lightningnetwork/lnd/pull/8717
- [ ] reconstruct the input set from the mempool tx, which is the missing part that gives the sweeper the ability to recover its state from a restart.
- [ ] properly lock wallet utxos in sweeper using
LeaseOutputandReleaseOutput- we need to make sure the wallet utxo is not locked forever, which means we should release the output when the sweeping tx fails. On the other hand, since the RBF can take hundreds of blocks, we need to figure out how long the wallet utxo should be locked. - [ ] add breach outputs to the sweeper, should be straightforward.
- [ ] anchor channel fee rate should be min relay fee to maximize the utility provided by the fee bumper: https://github.com/lightningnetwork/lnd/blob/d4c19375721ee6683089403c1115751444e506da/htlcswitch/link.go#L1341-L1345
- [ ] kick out the bad input from failed sweeping txns - we need to analyze the broadcast failure and decide whether to regroup the input or remove it.
- [ ] update
PendingSweepsto return inputs inInputSet, which gives users more info about the sweeping tx, so better decisions can be made when callingBumpFee. - [ ] address editorial comments in readme.
Think the last item may be fixed in future releases?
- [ ] make sure anchor outputs after confirmation of the commitment transaction are never bundled with other sweeping inputs, because they bear the risk of being replaced by a third party.
- [ ] fix
sample configuration checkso we don't require the dummy in our sample.conf (; sweeper.budget=)
- [ ] make sure anchor outputs after confirmation of the commitment transaction are never bundled with other sweeping inputs, because they bear the risk of being replaced by a third party.
Or pinned... See https://x.com/peterktodd/status/1793380279018803208.