summaryrefslogtreecommitdiff
path: root/bip-0114.mediawiki
diff options
context:
space:
mode:
authorLuke-Jr <luke_github1@dashjr.org>2016-04-14 10:38:10 +0000
committerLuke-Jr <luke_github1@dashjr.org>2016-04-14 10:38:10 +0000
commit3ff0772bb2ca4260d0cb8aadcd3c078a4c8972f8 (patch)
treeffb6d91e9e6b70a4f3fb7501ced608c53385ac57 /bip-0114.mediawiki
parent6026a0b599823f38d3a6672b23ee30f0eaf9de1c (diff)
parent58409dd0e8b487bd3a4a42d6de41bc0631fe95ed (diff)
Merge pull request #369 from instagibbs/bip114clar
Some clarification on path meaning and structure
Diffstat (limited to 'bip-0114.mediawiki')
-rw-r--r--bip-0114.mediawiki4
1 files changed, 2 insertions, 2 deletions
diff --git a/bip-0114.mediawiki b/bip-0114.mediawiki
index 3688351..2d16084 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.