You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0345.mediawiki
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,22 +239,22 @@ When evaluating <code>OP_VAULT</code> (<code>OP_SUCCESS187</code>,
239
239
240
240
where
241
241
242
-
* <code><leaf-update-script-body></code> is a data push of 0 or more bytes containing a script fragment.
243
-
** In conjunction with the leaf-update data items, it dictates the tapleaf script in the output taptree that will replace the one currently executing.
242
+
* <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>
243
+
** Otherwise, script execution MUST fail and terminate immediately.
244
244
245
-
* <code><n-pushes></code> is a <code>CScriptNum</code>-encoded number indicating how many leaf-update script items should be popped off the stack.
245
+
* <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.
246
246
** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately.
247
247
** If this value is less than 0, script execution when spending this output MUST fail and terminate immediately.
248
248
** If fewer than <code><n-pushes> + 2</code> items are on the stack, script execution when spending this output MUST fail and terminate immediately.
249
249
250
-
* 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.
250
+
* 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.
251
251
** 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.
252
252
253
-
* <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.
253
+
* <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.
254
254
** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately.
255
255
** 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.
256
256
257
-
* <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.
257
+
* <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.
258
258
** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately.
259
259
** If this value is greater than or equal to the number of outputs, script execution when spending this output MUST fail and terminate immediately.
260
260
@@ -264,8 +264,8 @@ After the stack is parsed, the following validation checks are performed:
264
264
* 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.
265
265
* 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''.
266
266
** The leaf-update data items will be in the same order in the ''leaf-update-script'' as they appeared on the stack.
267
-
* 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.
268
-
** Note: the parity bit of the resulting taproot is allowed to vary.
267
+
* 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.
268
+
** Note: the parity bit of the resulting taproot output is allowed to vary, so both values for the new output must be checked.
269
269
* Let the output designated by <code><revault-vout-idx></code> (if the index value is non-negative) be called ''revaultOut''.
270
270
* 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.
271
271
* 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
287
287
288
288
* <code><recovery-sPK-hash></code> is a 32-byte data push.
289
289
** If this is not 32 bytes in length, script execution when spending this output MUST fail and terminate immediately.
290
-
* <code><recovery-vout-idx></code> is a CScriptNum-encoded number indicating the index of the recovery output.
290
+
* <code><recovery-vout-idx></code> is an up to 4-byte CScriptNum-encoded number indicating the index of the recovery output.
291
291
** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately.
292
292
** 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.
0 commit comments