-
Notifications
You must be signed in to change notification settings - Fork 387
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
CHECKSIGFROMSTACK has VERIFY semantics #202
Comments
Agreed, the logic should simply match checksigverify unless I'm missing some detail. |
Scripts that need to do optional verification should instead wrap the The same reasoning applies to
|
See also the |
Copied from #203 : Russell's comments is jogging a distant memory that the original behavior was actually a purposeful design. One of the Alpha features was going to be the removal of expensive non-VERIFY checks, particularly the CHECKSIG codes so we can do batch validation, however this ended up being too invasive as it breaks standard P2PKH scripts, among other things. So only the new opcodes, CHECKSIGFROMSTACK for example, got this behavior. And it seems to be fully undocumented. So either this behavior needs to be better documented, the actual engineering work done to make the other CHECKSIG opcodes have the same semantics, or this PR needs to be accepted and the behavior normalized. IMHO the best approach is to normalize semantics with how CHECKSIG works by accepting the changes in this pull request, and then doing batch validation when non-verify CHECKSIG* opcodes are the last opcodes to be executed. But given the history I'm not sure this is something any one of us can decide unilaterally. |
Closing since this is fixed in Tapscript, see #1020 |
If the signature fails validation in CHECKSIGFROMSTACK,
serror
is set and execution terminates even if this isn't from within the VERIFY version of the opcode. Therefore both opcodes have VERIFY semantics and differ only on whether the TRUE/FALSE result is left on the stack prior to termination. I do not believe this is the intended behavior.The text was updated successfully, but these errors were encountered: