From e08f6ad4dfed1ca67de9983d375a93d1481d1644 Mon Sep 17 00:00:00 2001 From: Greg Sanders Date: Tue, 28 Mar 2023 11:51:21 -0400 Subject: few word changes --- bip-0345.mediawiki | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bip-0345.mediawiki b/bip-0345.mediawiki index a5ffa08..2cac3de 100644 --- a/bip-0345.mediawiki +++ b/bip-0345.mediawiki @@ -239,22 +239,22 @@ When evaluating OP_VAULT (OP_SUCCESS187, where -* is a data push of 0 or more bytes containing a script fragment. -** In conjunction with the leaf-update data items, it dictates the tapleaf script in the output taptree that will replace the one currently executing. +* is a minimally-encoded data push of a serialized script. In conjunction with the leaf-update data items, it dictates the tapleaf script in the output taptree that will replace the one currently executing. +** Otherwise, script execution MUST fail and terminate immediately. -* is a CScriptNum-encoded number indicating how many leaf-update script items should be popped off the stack. +* is an up to 4-byte CScriptNum-encoded number indicating how many leaf-update script items should be popped off the stack. ** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately. ** If this value is less than 0, script execution when spending this output MUST fail and terminate immediately. ** If fewer than + 2 items are on the stack, script execution when spending this output MUST fail and terminate immediately. -* The following stack items are popped off the stack and prefixed as push-data arguments to the to construct the expected tapleaf replacement script. +* The following stack items are popped off the stack and prefixed as minimally-encoded push-data arguments to the to construct the expected tapleaf replacement script. ** If there are fewer than + 2 items on the stack, script execution when spending this output MUST fail and terminate immediately. -* is a CScriptNum-encoded number indicating the index of the output which, in conjunction with an optional revault output, carries forward the value of this input, and has an identical taptree aside from the currently executing leaf. +* is an up to 4-byte CScriptNum-encoded number indicating the index of the output which, in conjunction with an optional revault output, carries forward the value of this input, and has an identical taptree aside from the currently executing leaf. ** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately. ** If this value is less than 0 or is greater than or equal to the number of outputs, script execution when spending this output MUST fail and terminate immediately. -* is a CScriptNum-encoded number optionally indicating the index of an output which, in conjunction with the trigger output, carries forward the value of this input, and has an identical scriptPubKey to the current input. +* is an up to 4-byte CScriptNum-encoded number optionally indicating the index of an output which, in conjunction with the trigger output, carries forward the value of this input, and has an identical scriptPubKey to the current input. ** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately. ** If this value is greater than or equal to the number of outputs, script execution when spending this output MUST fail and terminate immediately. @@ -264,8 +264,8 @@ After the stack is parsed, the following validation checks are performed: * If the scriptPubKey of ''triggerOut'' is not a witness program of the same version as the currently executing script, script execution MUST fail and terminate immediately. * Let the script constructed by taking the and prefixing it with minimally-encoded data pushes of the leaf-update script data items be called the ''leaf-update-script''. ** The leaf-update data items will be in the same order in the ''leaf-update-script'' as they appeared on the stack. -* If the scriptPubKey of ''triggerOut'' is not a taptree that is identical to that of the current input, but with the current leaf script substituted for ''leaf-update-script'', script execution when spending this output MUST fail and terminate immediately. -** Note: the parity bit of the resulting taproot is allowed to vary. +* If the scriptPubKey of ''triggerOut'' does not match that of a taptree that is identical to that of the currently evaluated input, but with the leaf script substituted for ''leaf-update-script'', script execution when spending this output MUST fail and terminate immediately. +** Note: the parity bit of the resulting taproot output is allowed to vary, so both values for the new output must be checked. * Let the output designated by (if the index value is non-negative) be called ''revaultOut''. * If the scriptPubKey of ''revaultOut'' is not equal to the scriptPubKey of the input being spent, script execution when spending this output MUST fail and terminate immediately. * If the sum of the amounts of ''triggerOut'' and ''revaultOut'' (if any) are not greater than or equal to the value of this input, script execution when spending this output MUST fail and terminate immediately. @@ -287,7 +287,7 @@ where * is a 32-byte data push. ** If this is not 32 bytes in length, script execution when spending this output MUST fail and terminate immediately. -* is a CScriptNum-encoded number indicating the index of the recovery output. +* is an up to 4-byte CScriptNum-encoded number indicating the index of the recovery output. ** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately. ** If this value is less than 0 or is greater than or equal to the number of outputs, script execution when spending this output MUST fail and terminate immediately. -- cgit v1.2.3