itest: cover custom-anchor MuSig2 key-path and tapscript script-path spends#162
Merged
Conversation
Lock an asset into an OP_TRUE output whose anchor commits a CSV timeout leaf, then unilaterally sweep it through the script path after the timelock matures. The sweep is caller-funded so tapd broadcasts it directly. Exercises the ScriptPath signing surface, caller-provided OP_TRUE asset witnesses, and non-cooperative proof regeneration without burning the asset.
darioAnongba
force-pushed
the
customanchor-signing-itests
branch
from
July 13, 2026 22:44
dabf4cc to
1ae6282
Compare
Lock an asset into an OP_TRUE output anchored to a MuSig2-aggregated internal key, then cooperatively sweep it with a single aggregate key-path signature produced by an in-process two-party ceremony (BIP-341 taproot tweak). Exercises the MuSig2 signing surface and non-cooperative asset-witness regeneration without burning the asset.
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.
Closes #161.
Adds integration coverage for the two custom-anchor signing surfaces that the existing custom-anchor itests deliberately assert are empty (
require.Empty(signingRequests.MuSig2)/require.Empty(signingRequests.ScriptPath)). Both are Ark-agnostic — described purely in builder terms (tapscript leaf / MuSig2 anchor key, script-path / key-path spend, proof verification).TestCustomAnchorBuilderScriptPathTimeoutSweepUnilateral timeout exit:
TaprootAssetRoot/TaprootMerkleRoot, exactly as an integrating host composes it.Closes the "proof regenerated without cooperation" property.
TestCustomAnchorBuilderMuSig2KeyPathSweepCooperative exit:
AggregateKeys(participants, false).PreTweakedKey, matching how the SDK reconstructs the committed key).ApplyKeyPathSignature.Notes
Verified against the pinned tapd itest stack, including the full custom-anchor suite in one process (CI ordering): all four custom-anchor itests pass.
go build ./...,go vet ./...,-tags itestbuild/vet, and gofmt all clean.