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

Add OutputSweeper persisting and spending outputs #152

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Aug 11, 2023

Based on #105

Closes #94

We add an OutputSweeper object that will keep track of spendable outputs. It implements Listen/Confirm and regularly retries to sweep outputs that haven't been spent.

@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 5 times, most recently from aa6ea5d to 7a976b6 Compare August 11, 2023 12:03
@tnull tnull requested a review from wpaulino August 11, 2023 12:19
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from d285a15 to e13dc9d Compare August 11, 2023 13:51
@tnull tnull changed the title Add OutputSweeper persisting and retrying output sweeps Add OutputSweeper persisting and spending outpu Aug 11, 2023
@tnull tnull changed the title Add OutputSweeper persisting and spending outpu Add OutputSweeper persisting and spending outputs Aug 11, 2023
@tnull
Copy link
Collaborator Author

tnull commented Aug 12, 2023

Rebased on main after merging #105.

src/wallet.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 6 times, most recently from 52828d1 to 19e55d9 Compare August 15, 2023 10:14
@tnull tnull requested a review from wpaulino August 21, 2023 09:35
Copy link

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to squash

src/sweep.rs Outdated Show resolved Hide resolved
src/wallet.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Show resolved Hide resolved
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 8 times, most recently from 4111b5d to 54889d8 Compare November 1, 2023 12:48
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from d72eec7 to 8ea16da Compare November 22, 2023 15:39
@tnull
Copy link
Collaborator Author

tnull commented Nov 22, 2023

Started to include some necessary prefactors to allow to test this reasonably. In particular I now moved transaction broadcasting to a TransactionBroadcaster module asynchronously processing a queue. Will do the same with FeeEstimator which should allow us create test setups much more modularly.

@tnull
Copy link
Collaborator Author

tnull commented Nov 23, 2023

Now split out the prefactors to #205 and rebased this PR on it.

@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from 2090986 to 7619507 Compare November 23, 2023 13:58
@tnull tnull added this to the 0.2 milestone Nov 27, 2023
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 2 times, most recently from f890ef8 to 59ee5f0 Compare November 29, 2023 07:57
@tnull
Copy link
Collaborator Author

tnull commented Nov 29, 2023

Rebased on #205 and dropped the WIP testing commit. Will add coverage when upstreaming OutputSweeper to LDK.

@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 2 times, most recently from ac5d405 to 6f98c96 Compare December 4, 2023 19:20
@tnull
Copy link
Collaborator Author

tnull commented Dec 4, 2023

Rebased after #205 landed.

src/sweep.rs Outdated Show resolved Hide resolved
src/sweep.rs Show resolved Hide resolved
@tnull tnull force-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from 6305271 to 0f31390 Compare December 6, 2023 09:56
We add an `OutputSweeper` object that will keep track of sweepable
outputs. To this end, we start by adding the general structures and the
required utilities to persist the `SpendableOutputStatus` to our
`KVStore`.
@tnull
Copy link
Collaborator Author

tnull commented Dec 11, 2023

Squashed without further changes.

@tnull tnull merged commit 15f4f2a into lightningdevkit:main Dec 11, 2023
11 of 12 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.

Remember and regularly sweep spendable outputs
2 participants