Skip to content

Commit 8bad703

Browse files
committed
why n-pushes
1 parent e08f6ad commit 8bad703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bip-0345.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ where
242242
* <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>
243243
** Otherwise, script execution MUST fail and terminate immediately.
244244
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.
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. <ref>'''Why only prepending with data pushes?''' Prepending the <code>leaf-update-script-body</code> with opcodes opens up the door to prepending OP_SUCCESSX opcodes, to name a single issue only, side-stepping the validation that was meant to be run by the committed script.</ref>
246246
** If this value does not decode to a valid CScriptNum, script execution when spending this output MUST fail and terminate immediately.
247247
** If this value is less than 0, script execution when spending this output MUST fail and terminate immediately.
248248
** If fewer than <code><n-pushes> + 2</code> items are on the stack, script execution when spending this output MUST fail and terminate immediately.

0 commit comments

Comments
 (0)