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

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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 5 times, most recently from d789260 to ccfe46a Compare November 20, 2024 07:04
This lets us maintain a reasonable 2 week target for commitment tx.

Signed-off-by: Rusty Russell <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
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.
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