Conversation
We previously included confirmation targets directly in HTLC and anchor transactions, which didn't really belong there. We now instead set confirmation targets at publication time, based on the current state of the force-close attempt. We also extract witness data for HTLCs (preimage and remote signature) when creating the command to publish the transaction, instead of doing it inside the publisher actors. We improve the checks done in the pre-publisher actors, which now take into account the min-depth for commit txs before aborting anchor txs. The `ReplaceableTxFunder` is also simpler now, thanks to a better encapsulation of the transaction's contents.
We didn't watch our anchor output on the remote commit, which means we weren't recording in the `AuditDB` the fees we paid to get a remote commit tx confirmed by spending our anchor output. We only had that code for the local commit, but we've recently started more aggressively trying to get the *remote* commitment confirmed, so it's important to correctly record those fees.
We can re-compute HTLC transactions when publishing for all commitment formats, which indicates that we may not need to store a map of htlc txs in `LocalCommitPublished`.
Member
|
Closing this PR, we decided to go even further and remove all tx instances from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #3075 we observed (see #3075 (comment)) that we can easily re-compute HTLC transactions when a local/commit transaction is published and do not need to store them, a list of commit tx outpoints spent by them should be enough.
The actual
htlcTxsmembers have not been modified yet (to avoid updating codecs which is a bit tedious and mechanical) but the code now uses a new propetyhtlcTxOutpoints: Set[OutPoint]which will eventually replace the currenthtlcTxsproperty.