From e08f6ad4dfed1ca67de9983d375a93d1481d1644 Mon Sep 17 00:00:00 2001
From: Greg Sanders <gsanders87@gmail.com>
Date: Tue, 28 Mar 2023 11:51:21 -0400
Subject: few word changes

---
 bip-0345.mediawiki | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'bip-0345.mediawiki')

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 <code>OP_VAULT</code> (<code>OP_SUCCESS187</code>,
 
 where
 
-* <code><leaf-update-script-body></code> 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.
+* <code><leaf-update-script-body></code> is a minimally-encoded data push of a serialized script. <ref>In conjunction with the leaf-update data items, it dictates the tapleaf script in the output taptree that will replace the one currently executing.</ref>
+** Otherwise, script execution MUST fail and terminate immediately.
 
-* <code><n-pushes></code> is a <code>CScriptNum</code>-encoded number indicating how many leaf-update script items should be popped off the stack.
+* <code><n-pushes></code> is an up to 4-byte <code>CScriptNum</code>-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 <code><n-pushes> + 2</code> items are on the stack, script execution when spending this output MUST fail and terminate immediately.
 
-* The following <code><n-pushes></code> stack items are popped off the stack and prefixed as push-data arguments to the <code><leaf-update-script-body></code> to construct the expected tapleaf replacement script.
+* The following <code><n-pushes></code> stack items are popped off the stack and prefixed as minimally-encoded push-data arguments to the <code><leaf-update-script-body></code> to construct the expected tapleaf replacement script.
 ** If there are fewer than <code><n-pushes> + 2</code> items on the stack, script execution when spending this output MUST fail and terminate immediately.  
 
-* <code><trigger-vout-idx></code> 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.
+* <code><trigger-vout-idx></code> 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.
 
-* <code><revault-vout-idx></code> 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.
+* <code><revault-vout-idx></code> 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 <code><leaf-update-script-body></code> and prefixing it with minimally-encoded data pushes of the <code><n-pushes></code> 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 <code><revault-vout-idx></code> (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
 
 * <code><recovery-sPK-hash></code> 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.
-* <code><recovery-vout-idx></code> is a CScriptNum-encoded number indicating the index of the recovery output.
+* <code><recovery-vout-idx></code> 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

