summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinstagibbs <gsanders87@gmail.com>2016-04-13 11:46:17 -0400
committerinstagibbs <gsanders87@gmail.com>2016-04-13 11:48:20 -0400
commit58409dd0e8b487bd3a4a42d6de41bc0631fe95ed (patch)
treef6b470151d71807ea1d1591f87e393d91d736c6d
parent6c71b46623246950fd9ea335047f07076957177f (diff)
downloadbips-58409dd0e8b487bd3a4a42d6de41bc0631fe95ed.tar.xz
Some clarification on path meaning and structure
-rw-r--r--bip-0114.mediawiki4
1 files changed, 2 insertions, 2 deletions
diff --git a/bip-0114.mediawiki b/bip-0114.mediawiki
index 4ad593f..f2a960e 100644
--- a/bip-0114.mediawiki
+++ b/bip-0114.mediawiki
@@ -35,9 +35,9 @@ The <code>Position</code>, <code>Path</code>, and <code>MAST Script</code> are p
The double-SHA256 of the MAST Script (≤ TBD bytes) must be correctly connected to the <code>MAST Root</code> with the <code>ComputeMerkleRootFromBranch</code> function, with the specified <code>Path</code> and <code>Position</code>.
-<code>Path</code> is the serialized Merkle path for the <code>MAST Script</code>. Size of <code>Path</code> must be a multiple of 32 bytes, and not more than 1024 bytes (which allows 32 levels). If the size of <code>Path</code> is zero, the double-SHA256 of the <code>MAST Script</code> must match the <code>MAST Root</code>.
+<code>Path</code> is the serialized Merkle path for the <code>MAST Script</code>. Size of <code>Path</code> must be a multiple of 32 bytes, and not more than 1024 bytes (which allows 32 levels). Each 32 byte word is a double-SHA256 merkle node in the merkle branch connecting to the <code> MAST Root</code>. If the size of <code>Path</code> is zero, the double-SHA256 of the <code>MAST Script</code> must match the <code>MAST Root</code>.
-<code>Position</code> indicates the location of the <code>MAST Script</code> in the Merkle tree, with zero means the leftmost position. It is an unsigned little-endian integer with not more than 4 bytes. It must be encoded in the most parsimonious way possible, with no leading zero and not larger than the maximum number of items allowed by the depth of the tree (as implied by the size of <code>Path</code>).
+<code>Position</code> indicates the location of the <code>MAST Script</code> in the Merkle tree, with zero indicating the leftmost position. It is an unsigned little-endian integer with not more than 4 bytes. It must be encoded in the most parsimonious way possible, with no leading zero and not larger than the maximum number of items allowed by the depth of the tree (as implied by the size of <code>Path</code>).
The <code>MAST Script</code> is then deserialized, and executed after normal script evaluation with the remaining witness stack (≤ TBD bytes for each stack item). The script must not fail, and result in exactly a single TRUE on the stack.