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

lightningd: use CPFP on peer's commitment tx if we can't broadcast our own #6752

Merged

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Oct 9, 2023

Based on #6751 (Merged!)

@t-bast pointed out that we should do this. He's right, but I didn't want to try to reconstruct the peer's commitment transaction, so I save them at signing time: we only need to keep information about anchors on the last two commitment transactions, worst case (there may be more than two, due to splicing), as earlier ones are sure to be revoked.

@rustyrussell rustyrussell added this to the v23.11 milestone Oct 9, 2023
@rustyrussell rustyrussell mentioned this pull request Oct 16, 2023
@nepet nepet requested a review from cdecker October 20, 2023 15:30
@rustyrussell rustyrussell force-pushed the guilt/push-peer-anchor branch 2 times, most recently from 07ef6ac to 92b40ad Compare October 26, 2023 02:37
@rustyrussell
Copy link
Contributor Author

Trivial fix: postgres caught me accessing an int field with a u64 accessor. And rebased.

We try to use anchors to CPFP our own commitment, but what if they
get there first?  We also need to use anchors on the commitment
txs they broadcast.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ing_commitsig

We don't actually use this at all.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
channel_txs was a thin wrapper around channel_splice_txs, but that's
just confusing.  Rename channel_splice_txs to channel_txs, and just
call it everywhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We're going to want this, soon.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It's going to want to remember these, in case it encounters peers'
commitment tx and needs to boost it with CPFP on the anchor.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Store enough to know how to CPFP the peer's commitment tx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We actually only need to remember the last two, worst case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ur own.

This means refactoring out some of the generic anchor info, from the
per-commitment-tx info (we can have at least two, perhaps more with
splicing!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@nepet
Copy link
Collaborator

nepet commented Oct 26, 2023

Rebased, merged wallet/db.c

@rustyrussell rustyrussell merged commit f8e036b into ElementsProject:master Oct 27, 2023
38 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.

None yet

2 participants