Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sweep: finalize and enhance the new sweeper's functionality #8680

Open
8 tasks
yyforyongyu opened this issue Apr 23, 2024 · 1 comment
Open
8 tasks

sweep: finalize and enhance the new sweeper's functionality #8680

yyforyongyu opened this issue Apr 23, 2024 · 1 comment
Labels
enhancement Improvements to existing features / behaviour utxo sweeping
Milestone

Comments

@yyforyongyu
Copy link
Collaborator

yyforyongyu commented Apr 23, 2024

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 mutil: introduce simple BlockBeat to fix itest flakes #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 LeaseOutput and ReleaseOutput - 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:

    lnd/htlcswitch/link.go

    Lines 1341 to 1345 in d4c1937

    newCommitFee := l.channel.IdealCommitFeeRate(
    netFee, minRelayFee,
    l.cfg.MaxAnchorsCommitFeeRate,
    l.cfg.MaxFeeAllocation,
    )
  • 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 PendingSweeps to return inputs in InputSet, which gives users more info about the sweeping tx, so better decisions can be made when calling BumpFee.
  • address editorial comments in readme.

Think the last item may be fixed in future releases?

@yyforyongyu yyforyongyu added enhancement Improvements to existing features / behaviour utxo sweeping labels Apr 23, 2024
@yyforyongyu yyforyongyu added this to the v0.18.1 milestone Apr 23, 2024
@ziggie1984
Copy link
Collaborator

ziggie1984 commented Apr 24, 2024

  • 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 check so we don't require the dummy in our sample.conf (; sweeper.budget=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour utxo sweeping
Projects
None yet
Development

No branches or pull requests

2 participants