BIP 448 implementation (0.32.x)#2
Open
darosior wants to merge 4 commits into
Open
Conversation
Expose names for the BIP348, BIP349, and BIP446 opcode bytes used by Bitcoin Inquisition signet. They remain aliases for the current OP_SUCCESSx bytes so script construction can use the proposal names without changing TapScript classification. Add coverage for the alias byte values, builder output, and current OP_SUCCESSx classification behavior.
Add a TemplateHash tagged-hash type and SighashCache helpers for computing the BIP446 OP_TEMPLATEHASH message used by Bitcoin Inquisition signet scripts. The helper commits to version, lock time, sequences, outputs, input index, and this input's annex data while intentionally leaving prevouts and spent amounts out of scope. Share the BIP341 annex hashing logic, add raw BIP340 signing helpers for CHECKSIGFROMSTACK use, and cover the behavior with local BIP446 vectors plus length and input-index error tests.
Add examples that build the common OP_TEMPLATEHASH OP_INTERNALKEY OP_CHECKSIGFROMSTACK Taproot script and sign a TemplateHash for a script-spend witness. These examples demonstrate the local construction and signing API without implying consensus validation. Document the intended Bitcoin Inquisition signet scope, the non-consensus limitations, the TemplateHash commitments, and the raw CSFS signing convention.
Author
|
Rebased on top of rust-bitcoin 0.32.101 |
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.
This is #1 ported to rust-bitcoin 0.32.101, which is the version currently used by LDK, with some slight modifications. My understanding is that LDK/BDK will stay on 0.32 for the time being, so it's probably worth maintaining a branch against this version.