Introduce solver classes to simplify how we create a spend LN transactions #3073
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.
The goal of this PR is to simplify how we create and spend LN transactions (HTLC success/timeout, pemality transactions, ...) by refactoring how we create "redeem info" (information needed to spend specific outputs).
The biggest change is that
redeemInfois removed from ourInputInfoclass:TransactionWithInputInfo#3056 and Add high-level helpers for taproot channels #3028)HtlcSuccessTx,HtlcTimeoutTx, andClaimHtlcTimeoutTx, and update codecs to store this informationInputInfoclass, or from the transaction's witness. These transactions were signed and published so this info has to be there.This PR includes tooling support for taproot channels (i.e. solvers already implement signing/spending taproot transactions) , which helps validate whether this approach is suitable and extensible enough, but does not include code to actually create live taproot channels.
Codecs have been updated, payment hash and expiry fields that have been added to some of our class will be extracted either from the redeem script that we used to persist or from the transaction's witness (they're all
p2wshtransactions).