-
Notifications
You must be signed in to change notification settings - Fork 39
Introspection is all you need #577
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
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Let's add
|
This PR introduces Arkade Script, a way to run custom Bitcoin opcodes within VTXOs.
A VTXO's tapscript still require all existing rules, namely that tapscripts fall under the cooperative/unilateral script closures.
However, when submitting an Ark transaction, you may provide an additional
Arkade script
, along with its own witness, that will be evaluated in parallel. The VTXO tapscript that is executing this commits to it by tweaking the mandatory server key by a hash of this Arkade script.If evaluated successfully, Arkade signs the ark transaction with the tweaked key. Additionally, it provides an execution proof, which consists of the Arkade script, the Arkade witness, the tx, and a signature from the server on all prior items.
The custom opcodes (and the associated engine) are declared in a new package
common/arkscript
. This PR implements the following extra opcodes:An example of a VtxoScript using introspection can be found in the TestSendToArkScriptClosure e2e test.
@Kukks @tiero @altafan please review