-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
input: update taproot scripts to add an option for the miniscript compat versions from latest spec #9639
base: master
Are you sure you want to change the base?
Conversation
In this commit, we switch to using the new txscript.ScriptTemplate function. This allows us to write the script in plain text, using some hidden template operations to swap in items like keys or sigs. This reduces in less code and boiler plate over all, the code that defines the script now reads as if it was a comment.
In this commit, we add an initial cut out to allow us to swap in the taproot scripts (which changed slightly) once we start using the final "production" feature bit. The changes to the scripts are pretty mechanic: we avoid using `OP_DROP` and instead use a `_VERIFY` earlier in the script to consume the stack item.
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
In this commit, we add an initial cut out to allow us to swap in the
taproot scripts (which changed slightly) once we start using the final
"production" feature bit.
The changes to the scripts are pretty mechanic: we avoid using
OP_DROP
and instead use a
_VERIFY
earlier in the script to consume the stackitem.
Along the way we start using
txsscript.ScriptTemplate
to cut down on some of the boilerplate needed when making scripts.
This PR is dependent on btcsuite/btcd#2216
In a follow up PR, we'll start to pass in this new argument based on which taproot channel
version was negotiated.