summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sanders <gsanders87@gmail.com>2023-03-28 12:30:36 -0400
committerGreg Sanders <gsanders87@gmail.com>2023-03-28 12:33:37 -0400
commit8bad703ed8391a735e9d1adba2ba92d89a0b06e7 (patch)
tree86a899d8eb90dce5ffa2aa4f675b5980b1424788
parente08f6ad4dfed1ca67de9983d375a93d1481d1644 (diff)
downloadbips-8bad703ed8391a735e9d1adba2ba92d89a0b06e7.tar.xz
why n-pushes
-rw-r--r--bip-0345.mediawiki2
1 files changed, 1 insertions, 1 deletions
diff --git a/bip-0345.mediawiki b/bip-0345.mediawiki
index 2cac3de..d6d00c3 100644
--- a/bip-0345.mediawiki
+++ b/bip-0345.mediawiki
@@ -242,7 +242,7 @@ where
* <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 an up to 4-byte <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. <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>
** 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.