mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-26 01:50:42 +00:00
73 lines
1.4 KiB
Plaintext
73 lines
1.4 KiB
Plaintext
// A A
|
|
// / \ / \
|
|
// B C B C
|
|
// / \ | / \ / \
|
|
// D E F D E F F
|
|
// / \ / \ / \ / \ / \ / \ / \
|
|
// 1 2 3 4 5 6 1 2 3 4 5 6 5 6
|
|
|
|
digraph MerkleTrees {
|
|
// General settings
|
|
rankdir=TB;
|
|
//node [shape=none, style=filled, color=lightblue];
|
|
node [shape=box, width=0, height=0];
|
|
ranksep=0.3;
|
|
nodesep=0.1
|
|
|
|
subgraph cluster_x {
|
|
// Merkle Tree 1
|
|
A1 [label="A"];
|
|
B1 [label="B"];
|
|
C1 [label="C"];
|
|
D1 [label="D"];
|
|
E1 [label="E"];
|
|
F1 [label="F"];
|
|
x1 [label="1"];
|
|
x2 [label="2"];
|
|
x3 [label="3"];
|
|
x4 [label="4"];
|
|
x5 [label="5"];
|
|
x6 [label="6"];
|
|
|
|
A1 -> B1;
|
|
A1 -> C1;
|
|
B1 -> D1;
|
|
B1 -> E1;
|
|
C1 -> F1;
|
|
D1 -> {x1, x2};
|
|
E1 -> {x3, x4};
|
|
F1 -> {x5, x6};
|
|
}
|
|
|
|
|
|
subgraph cluster_y {
|
|
// Merkle Tree 2
|
|
A2 [label="A"];
|
|
B2 [label="B"];
|
|
C2 [label="C"];
|
|
D2 [label="D"];
|
|
E2 [label="E"];
|
|
F2 [label="F"];
|
|
F2_dup [label = "F" ];
|
|
y1 [label="1"];
|
|
y2 [label="2"];
|
|
y3 [label="3"];
|
|
y4 [label="4"];
|
|
y5 [label="5"];
|
|
y6 [label="6"];
|
|
y5_dup [label="5"];
|
|
y6_dup [label="6"];
|
|
|
|
A2 -> B2;
|
|
A2 -> C2;
|
|
B2 -> D2;
|
|
B2 -> E2;
|
|
C2 -> {F2, F2_dup};
|
|
D2 -> {y1, y2};
|
|
E2 -> {y3, y4};
|
|
F2 -> {y5, y6};
|
|
F2_dup -> {y5_dup, y6_dup};
|
|
}
|
|
}
|
|
|