Repository navigation
CHECKSIGFROMSTACK should not have VERIFY semantics - #203
instagibbs wants to merge 1 commit into
Conversation
|
|
||
| if (opcode == OP_CHECKSIGFROMSTACKVERIFY) | ||
| popstack(stack); | ||
| { |
There was a problem hiding this comment.
tiny style nit: '{' should be after the if condition.
There was a problem hiding this comment.
EDIT: in fact, more style nits:
if (opcode == OP_CHECKSIGFROMSTACKVERIFY) {
if (fSuccess) {
popstack(stack);
} else {
return set_error(serror, SCRIPT_ERR_CHECKSIGFROMSTACKVERIFY);
}
}
But perhaps it is better to have it like the rest (checksigverify and OP_CHECKMULTISIGVERIFY) as an exception to the style rules?
|
Yeah, I think it should mimic checksigverify and OP_CHECKMULTISIGVERIFY unless I'm missing something. utACK 3aaca6c |
|
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. |
|
Can you rebase to let us know what travis thinks about all this? |
|
what's the status on this? it doesn't need rebase anymore. |
|
Since we've already deployed, I'm not sure of the status of this. Future segwit version update instead with taproot? Closing for now. |
|
I won't object to closing, but this is the elements repo not liquid. |
|
At a minimum needs port to master. |
|
Yes, I think we'll reconsider this opcode when we add Taproot. Probably we'll add a Schnorr analogue to the VERIFY version and drop the non-VERIFY version. This is analogous to what the Taproot proposal will do for CHECKSIG, and the reasoning is that non-validating signatures are never useful, but the possibility of them complicates batch verification. |
Resolves #202