-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[NO MERGE] tapscript: enable OP_CAT #2095
base: master
Are you sure you want to change the base?
Conversation
txscript/engine.go
Outdated
case OP_CAT: | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious. Does removing this case still throw some error when CAT (0x7e) is being used in a segwitv0 or legacy context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if opcode is being executed without a taproot context, it will fall back to old behavior: 9541657#diff-27954f8a5853761d7c36b3084d7eb53d7c9a6788eac76b4b20dc573f723a8296R1954
@@ -335,8 +335,6 @@ func (vm *Engine) isBranchExecuting() bool { | |||
// conditional). | |||
func isOpcodeDisabled(opcode byte) bool { | |||
switch opcode { | |||
case OP_CAT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the discussion in Inquistion, this check must still be triggered for legacy script, since the opcode won't be executed if inside a conditional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: 30ed9ec
Pull Request Test Coverage Report for Build 8535288446Details
💛 - Coveralls |
Updated in line with reference implementation. |
[SHOULD NOT BE MERGED]
Enabling OP_CAT as specified in BIP-CAT
Note this does currently lack any form of activation or flags for disabling it, hence many existing tests will fail.
Should not be merged before BIP is accepted and activation is decided on.