Skip to content

Anchor code cleanup: always use anchors, but only boost to estimateblockfee 12. #7832

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

Conversation

rustyrussell
Copy link
Contributor

If a commitment tx isnt' urgent (no HTLCs) we didn't create an anchor at all. This is problematic as the user doesn't have a good way to do it themselves.

  1. Always make an anchor if feeboost needed.
  2. Always aim for 12 blocks away, at best (starts at 2 weeks).
  3. Remember when we started closing, so this timing works across restarts.
  4. Fix error where we would use the wrong values if we failed to create a PSBT in the loop (but we would update feerate etc).

@rustyrussell rustyrussell added this to the v24.11 milestone Nov 18, 2024
@rustyrussell rustyrussell force-pushed the guilt/anchors-clarity branch 6 times, most recently from ccfe46a to c4a40ab Compare November 22, 2024 02:22
@rustyrussell rustyrussell force-pushed the guilt/anchors-clarity branch 2 times, most recently from 70c7655 to 2bef5af Compare November 25, 2024 10:03
This lets us maintain a reasonable 2 week target for commitment tx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1. merge_deadlines can't really fail.
2. We don't care about incoming HTLCs with no preimage.
3. Debug print anchor points as soon as we calc them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We're going to call this twice.  But this patch also takes care
that a failed attempt to create an anchor doesn't alter other
variables!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Protocol: we now create a low-priority (2016 down to 12 blocks fee target) anchor for low-fee unilateral closes even if there's no urgency.
…chors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell merged commit 20257c3 into ElementsProject:master Nov 26, 2024
39 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.

1 participant