Skip to content

Add OutputSweeper persisting and spending outputs - #152

Merged
tnull merged 2 commits into
lightningdevkit:mainfrom
tnull:2023-08-sweep-sweep-sweep
Dec 11, 2023
Merged

Add OutputSweeper persisting and spending outputs#152
tnull merged 2 commits into
lightningdevkit:mainfrom
tnull:2023-08-sweep-sweep-sweep

Conversation

@tnull

@tnulltnull commented Aug 11, 2023

Copy link
Copy Markdown
Collaborator

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
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 5 times, most recently from aa6ea5d to 7a976b6CompareAugust 11, 2023 12:03
@tnull
tnull requested a review from wpaulinoAugust 11, 2023 12:19
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from d285a15 to e13dc9dCompareAugust 11, 2023 13:51
@tnulltnull changed the title Add OutputSweeper persisting and retrying output sweepsAdd OutputSweeper persisting and spending outpuAug 11, 2023
@tnulltnull changed the title Add OutputSweeper persisting and spending outpuAdd OutputSweeper persisting and spending outputsAug 11, 2023
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch from e13dc9d to 41687a1CompareAugust 12, 2023 10:01
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

Rebased on main after merging #105.

Comment threadsrc/wallet.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 6 times, most recently from 52828d1 to 19e55d9CompareAugust 15, 2023 10:14
@tnull
tnull requested a review from wpaulinoAugust 21, 2023 09:35

@wpaulinowpaulino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feel free to squash

Comment threadsrc/sweep.rs Outdated
Comment threadsrc/wallet.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 8 times, most recently from 4111b5d to 54889d8CompareNovember 1, 2023 12:48
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from d72eec7 to 8ea16daCompareNovember 22, 2023 15:39
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

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
Copy Markdown
CollaboratorAuthor

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

@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from 2090986 to 7619507CompareNovember 23, 2023 13:58
@tnulltnull added this to the 0.2 milestone Nov 27, 2023
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 2 times, most recently from f890ef8 to 59ee5f0CompareNovember 29, 2023 07:57
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

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

@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch from 59ee5f0 to 456b6caCompareDecember 1, 2023 09:53
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 2 times, most recently from ac5d405 to 6f98c96CompareDecember 4, 2023 19:20
@tnull

tnull commented Dec 4, 2023

Copy link
Copy Markdown
CollaboratorAuthor

Rebased after #205 landed.

Comment threadsrc/sweep.rs Outdated
Comment threadsrc/sweep.rs
@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch 3 times, most recently from 6305271 to 0f31390CompareDecember 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
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch from 0f31390 to ad072e7CompareDecember 11, 2023 17:53
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

Squashed without further changes.

@tnull
tnullforce-pushed the 2023-08-sweep-sweep-sweep branch from ad072e7 to 707c170CompareDecember 11, 2023 18:09
Sign up for freeto 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

@tnull@wpaulino