contractcourt: validate HTLC resolver spends - #11113
Draft
yyforyongyu wants to merge 8 commits into
Draft
Conversation
Validate notifier spend data against the second-level outpoint before updating resolver reports. Derive the claim transaction ID from the validated transaction instead of trusting notifier metadata.
Select the stored commitment output script for local and remote Taproot HTLCs instead of deriving it from control proofs. Add shared realistic tree fixtures covering auxiliary and duplicate leaves.
Hash trusted timeout scripts independently of candidate spends. Treat a verified timeout proof sibling as optional so duplicate leaves cannot turn valid success spends into persistent classification errors.
Authenticate revealed tapscripts against the authoritative HTLC commitment output before accepting a preimage. Handle auxiliary, duplicate-leaf, key-path, annex, and malformed spend cases without changing legacy witness classification.
Register local Taproot commitment spends with the independently stored HTLC output script. Avoid reconstructing notifier targets from stored timeout proofs that can select duplicate leaves.
Route every timeout spend decision through authenticated Taproot classification. Propagate malformed spends before cleanup and preserve the existing timeout path for valid non-success and legacy spends.
Authenticate cached and live contest spends before claiming a preimage. Hand valid auxiliary and key-path spends to the embedded timeout resolver without marking or checkpointing contest success.
Link the spend-validation follow-up from the existing HTLC success resolver entries in both active release-note series.
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.
Summary
Follow up on #10869 by closing the remaining resolver spend-validation gaps
identified while addressing #10840.
Change Description
before recording a successful claim.
against the authoritative HTLC output before accepting a preimage.