Skip to content

[4/?] StaticAddr: Instant deposit withdrawals #719

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

Merged
merged 8 commits into from
Jun 5, 2024

Conversation

hieblmi
Copy link
Collaborator

@hieblmi hieblmi commented Mar 15, 2024

This PR enables instant withdrawals of funds at static address deposits, allowing the client to omit the CSV timeout period of their Musig2 outpoints and cooperatively spend selected deposit outpoints cooperatively with the server.

Withdrawing can be done for selected or all eligible deposits. Examples:

Selected deposit:

loop --network=regtest s withdraw --utxo 0b879cb14939f98ad359063d60e648b3db72a1dc32bf9a1fbafa1a0d87ec1db:0

All deposits:

loop --network=regtest s withdraw --all

@hieblmi hieblmi requested review from bhandras and sputn1ck March 15, 2024 14:51
@hieblmi hieblmi self-assigned this Mar 15, 2024
@hieblmi hieblmi marked this pull request as draft March 15, 2024 14:51
@hieblmi hieblmi changed the base branch from master to static-addr-staging March 15, 2024 14:52
@hieblmi hieblmi force-pushed the static-addr-4 branch 4 times, most recently from 309bcdc to 4611204 Compare March 22, 2024 00:10
@hieblmi hieblmi force-pushed the static-addr-4 branch 3 times, most recently from c5e9e9d to c7d2160 Compare April 12, 2024 13:03
@hieblmi hieblmi force-pushed the static-addr-4 branch 9 times, most recently from c204e8d to 34f843c Compare April 29, 2024 14:37
@hieblmi hieblmi force-pushed the static-addr-4 branch 5 times, most recently from bc540a6 to 1b4ca0c Compare May 6, 2024 12:25
@hieblmi hieblmi marked this pull request as ready for review May 6, 2024 12:29
@hieblmi hieblmi requested a review from bhandras May 6, 2024 12:29
@hieblmi hieblmi force-pushed the static-addr-staging branch from f614090 to 70a74bd Compare May 27, 2024 11:20
@hieblmi hieblmi force-pushed the static-addr-4 branch 2 times, most recently from bc8e20c to fb1300f Compare May 27, 2024 11:56
@lightninglabs-deploy
Copy link

@starius: review reminder
@sputn1ck: review reminder

@hieblmi hieblmi force-pushed the static-addr-staging branch 5 times, most recently from bb36baf to 28239df Compare June 3, 2024 18:03
@hieblmi hieblmi force-pushed the static-addr-4 branch 3 times, most recently from fc7f4d1 to dd75d00 Compare June 4, 2024 08:38
Copy link
Member

@sputn1ck sputn1ck left a comment

Choose a reason for hiding this comment

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

LGTM

expiry_sweep_txid BLOB
expiry_sweep_txid BLOB,

-- withdrawal_sweep_pk_script is the address that will be used to sweep the
Copy link
Member

Choose a reason for hiding this comment

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

nit: commment is off

@hieblmi hieblmi force-pushed the static-addr-staging branch from 28239df to dbc351a Compare June 4, 2024 11:34
@hieblmi hieblmi force-pushed the static-addr-4 branch 2 times, most recently from 6d65aaf to 64dd989 Compare June 4, 2024 12:15
@hieblmi hieblmi force-pushed the static-addr-staging branch from dbc351a to c4012d0 Compare June 5, 2024 09:37
@hieblmi hieblmi force-pushed the static-addr-4 branch 2 times, most recently from 56169ab to 848cf09 Compare June 5, 2024 09:54
hieblmi added 8 commits June 5, 2024 11:54
Deposit schema extension with a withdrawal
sweep address. If the user selects a deposit
for withdrawal the destination address of the
sweep is stored here.
A new rpc for deposit withdrawals is added.
A withdrawal cooperatively spends the 2/2
musig deposit outpoint to a client-specified
address.
A server endpoint to obtain a partial sig
to cooperatively spend a 2/2 musig deposit
outpoint.
@hieblmi hieblmi merged commit 385f3ea into lightninglabs:static-addr-staging Jun 5, 2024
4 checks passed
@hieblmi hieblmi deleted the static-addr-4 branch June 5, 2024 10:00
@hieblmi hieblmi mentioned this pull request Jun 28, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants