-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: create sweeper #1960
sweep: create sweeper #1960
Conversation
5ce7feb
to
0e9fbeb
Compare
369d13b
to
58740fd
Compare
|
Tested nursery tx migration again. Seems to work on my machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 LGTM 🎉
Ready to merge on my end once the final two commits squashed.
|
Modifying the static fees is not thread safe. In this commit the fees are made immutable.
We need to distinguish an lnd build for the purpose of integration testing from a regular dev build. This makes it possible to adapt parameters to let integration tests run faster (for example: sweeper batch window).
This commit is a preparation for the implementation of remote spend detection. Remote spends may happen before we broadcast our own sweep tx. This calls for accurate height hints.
This commit adds a function that takes a set of inputs and splits them in sensible sets to be used for generating transactions.
This commit adds a store for the sweeper. The sweeper needs minimal persistent data to be able to recognize its own sweeps.
In this commit, the sweep package is extended from just tx generation to an active sweeper that collects sweep inputs and autonomously proceeds to publish the sweep tx after the batch window time interval has passed without new inputs being added.
Previously, nursery generated and published its own sweep txes. It stored the sweep tx in nursery_store to prevent a new tx with a new sweep address from being generated on restart. In this commit, sweep generation and publication is removed from nursery and delegated to the sweeper. Also the confirmation notification is received from the sweeper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @joostjager, excited to finally have this in and help people sweep their stuck outputs! Very happy with the final iteration and the huge reduction in complexity over the nursery, LGTM 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔮
This PR moves the sweeper logic from
utxonursery
into a separate sweeper struct.A follow up PR is #2000, which will let resolvers use the sweeper directly instead of going through nursery. The end goal is to remove nursery completely.
In this PR, there is no db migration to clean up now unused nursery store data. This allows us to keep the downgrade path open for a while.