mirror of
https://github.com/bitcoin/bips.git
synced 2024-11-20 10:11:46 +01:00
Merge pull request #76 from sipa/201909_tapscript_resource_fixups
Fixups
This commit is contained in:
commit
d51109a03f
@ -59,7 +59,6 @@ Validation of such inputs must be equivalent to performing the following steps i
|
|||||||
* Given that <code>OP_SUCCESSx</code> even causes potentially unparseable scripts to pass, it can be used to introduce multi-byte opcodes, or even a completely new scripting language when prefixed with a specific <code>OP_SUCCESSx</code> opcode.</ref>.
|
* Given that <code>OP_SUCCESSx</code> even causes potentially unparseable scripts to pass, it can be used to introduce multi-byte opcodes, or even a completely new scripting language when prefixed with a specific <code>OP_SUCCESSx</code> opcode.</ref>.
|
||||||
## If any push opcode fails to decode because it would extend past the end of the tapscript, fail.
|
## If any push opcode fails to decode because it would extend past the end of the tapscript, fail.
|
||||||
# If the size of any element in the '''initial stack''' as defined in bip-taproot (i.e., the witness stack after removing both the optional annex and the two last stack elements after that) is bigger than 520 bytes, fail.
|
# If the size of any element in the '''initial stack''' as defined in bip-taproot (i.e., the witness stack after removing both the optional annex and the two last stack elements after that) is bigger than 520 bytes, fail.
|
||||||
# If the tapscript is bigger than 10000 bytes, fail.
|
|
||||||
# The tapscript is executed according to the rules in the following section, with the initial stack as input.
|
# The tapscript is executed according to the rules in the following section, with the initial stack as input.
|
||||||
## If execution fails for any reason, fail.
|
## If execution fails for any reason, fail.
|
||||||
## If the execution results in anything but exactly one element on the stack which evaluates to true with <code>CastToBool()</code>, fail.
|
## If the execution results in anything but exactly one element on the stack which evaluates to true with <code>CastToBool()</code>, fail.
|
||||||
@ -92,7 +91,7 @@ The following rules apply to <code>OP_CHECKSIG</code>, <code>OP_CHECKSIGVERIFY</
|
|||||||
*** For <code>OP_CHECKSIGVERIFY</code>, the script MUST fail and terminate immediately.
|
*** For <code>OP_CHECKSIGVERIFY</code>, the script MUST fail and terminate immediately.
|
||||||
*** For <code>OP_CHECKSIG</code>, an empty vector is pushed onto the stack, and execution continues with the next opcode.
|
*** For <code>OP_CHECKSIG</code>, an empty vector is pushed onto the stack, and execution continues with the next opcode.
|
||||||
*** For <code>OP_CHECKSIGADD</code>, a <code>CScriptNum</code> with value <code>n</code> is pushed onto the stack, and execution continues with the next opcode.
|
*** For <code>OP_CHECKSIGADD</code>, a <code>CScriptNum</code> with value <code>n</code> is pushed onto the stack, and execution continues with the next opcode.
|
||||||
** If the signature is not the empty vector, the <code>sigops_passed</code> counter is incremented (see further)
|
** If the signature is not the empty vector, the opcode is counted towards the sigops budget (see further).
|
||||||
*** For <code>OP_CHECKSIGVERIFY</code>, execution continues without any further changes to the stack.
|
*** For <code>OP_CHECKSIGVERIFY</code>, execution continues without any further changes to the stack.
|
||||||
*** For <code>OP_CHECKSIG</code>, a 1-byte value <code>0x01</code> is pushed onto the stack.
|
*** For <code>OP_CHECKSIG</code>, a 1-byte value <code>0x01</code> is pushed onto the stack.
|
||||||
*** For <code>OP_CHECKSIGADD</code>, a <code>CScriptNum</code> with value of <code>n + 1</code> is pushed onto the stack.
|
*** For <code>OP_CHECKSIGADD</code>, a <code>CScriptNum</code> with value of <code>n + 1</code> is pushed onto the stack.
|
||||||
|
Loading…
Reference in New Issue
Block a user