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

Skip anchor tx when remote commit has been evicted #2830

Merged
merged 1 commit into from Feb 22, 2024

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Feb 21, 2024

When we detect that the remote commit has been published, we spend our anchor output from that commit if the fees are too low and we have funds at risk. But if the remote commit is then evicted from our mempool, we cannot publish our anchor tx and must instead skip it, since we don't provide the fully signed remote commitment to the publisher.

We otherwise error when calling fundrawtransaction, where bitcoind fails because it cannot find the external non-wallet utxo. This change gets rid of those errors that can be quite confusing for node operators.

When we detect that the remote commit has been published, we spend our
anchor output from that commit if the fees are too low and we have funds
at risk. But if the remote commit is then evicted from our mempool, we
cannot publish our anchor tx and must instead skip it, since we don't
provide the fully signed remote commitment to the publisher.

We otherwise error when calling `fundrawtransaction`, where `bitcoind`
fails because it cannot find the external non-wallet utxo. This change
gets rid of those errors that can be quite confusing for node operators.
@t-bast t-bast requested a review from pm47 February 21, 2024 14:26
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e32044f) 85.94% compared to head (95136b0) 85.94%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2830      +/-   ##
==========================================
- Coverage   85.94%   85.94%   -0.01%     
==========================================
  Files         219      219              
  Lines       18429    18435       +6     
  Branches      770      773       +3     
==========================================
+ Hits        15839    15844       +5     
- Misses       2590     2591       +1     
Files Coverage Δ
...ir/channel/publish/ReplaceableTxPrePublisher.scala 68.37% <100.00%> (+1.70%) ⬆️

... and 2 files with indirect coverage changes

@t-bast t-bast merged commit 5d6a1db into master Feb 22, 2024
1 check passed
@t-bast t-bast deleted the claim-anchor-remote-commit-evicted branch February 22, 2024 08:21
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

3 participants