dash-docs/img/dev/en-merkle-tree-construction.dot
David A. Harding a8f8f750c8
Dev Docs: Describe Serialized Block Header And Block Format
* Replace current description of the block header with a better
description.

    * Describe the various version numbers.

    * Describe how the merkle root is constructed.

    * Describe how nBits is parsed and how to correctly create it to
      avoid negative values.

* Describe the serialized block format used to calculate max block size.
2014-11-07 22:50:27 -05:00

42 lines
981 B
Text

digraph {
size=6.25;
rankdir=TB
//splines = ortho;
ranksep = 0.2;
nodesep = 0.3;
edge [ penwidth = 1.75, fontname="Sans" ]
node [ penwidth = 1.75, shape = "box", fontname="Sans", ]
graph [ penwidth = 1.75, fontname="Sans" ]
{
node [ shape = "none" ];
txids [ label = "Row 1: Transaction hashes (TXIDs)\n(A is coinbase; C can spend output from B)" ];
row2 [ label = "Row 2: Hashes of paired TXIDs" ];
rootrow [ label = "Merkle root" ];
txids -> row2 -> rootrow [ style = "invis" ];
}
txid_a [ label = "A" ];
txid_b [ label = "B" ];
txid_invis [ label = "C", style = "invis" ];
txid_c [ label = "C" ];
row2_ab [ label = "H(A|B)" ];
row2_cc [ label = "H(C|C)" ];
root [ label = "H(H(A|B)|H(C|C))" ];
txid_a -> row2_ab [ weight = 1 ];
txid_b -> row2_ab [ weight = 1 ];
txid_c -> row2_cc;
txid_invis -> row2_cc [ style = "invis" ];
row2_ab -> root;
row2_cc -> root;
label = "\n Example Merkle Tree Construction [Hash function H() = SHA256(SHA256())]"
}