summaryrefslogtreecommitdiff
path: root/bip-0098
diff options
context:
space:
mode:
Diffstat (limited to 'bip-0098')
-rwxr-xr-xbip-0098/build.sh6
-rw-r--r--bip-0098/node-variants.dot85
-rw-r--r--bip-0098/node-variants.pngbin0 -> 105569 bytes
-rw-r--r--bip-0098/skip-skip.dot7
-rw-r--r--bip-0098/skip-skip.pngbin0 -> 9434 bytes
-rw-r--r--bip-0098/traversal-example.dot32
-rw-r--r--bip-0098/traversal-example.pngbin0 -> 60703 bytes
-rw-r--r--bip-0098/unbalanced-hash-tree.dot11
-rw-r--r--bip-0098/unbalanced-hash-tree.pngbin0 -> 22836 bytes
9 files changed, 141 insertions, 0 deletions
diff --git a/bip-0098/build.sh b/bip-0098/build.sh
new file mode 100755
index 0000000..a8a3155
--- /dev/null
+++ b/bip-0098/build.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+dot -Tpng -o node-variants.png node-variants.dot
+dot -Tpng -o skip-skip.png skip-skip.dot
+dot -Tpng -o traversal-example.png traversal-example.dot
+dot -Tpng -o unbalanced-hash-tree.png unbalanced-hash-tree.dot
diff --git a/bip-0098/node-variants.dot b/bip-0098/node-variants.dot
new file mode 100644
index 0000000..7171346
--- /dev/null
+++ b/bip-0098/node-variants.dot
@@ -0,0 +1,85 @@
+digraph G {
+ row1 [shape=none, label=""]
+
+ A [label="000"]
+ A -> Al [label="L"]
+ Al [label="VERIFY"]
+ A -> Ar [label="R"]
+ Ar [label="SKIP"]
+
+ B [label="001"]
+ B -> Bl [label="L"]
+ Bl [label="VERIFY"]
+ B -> Br [label="R"]
+ Br [label="VERIFY"]
+
+ { rank = same; row1; A; B; }
+
+ C [label="010"]
+ C -> Cl [label="L"]
+ Cl [label="VERIFY"]
+ C -> Cr [label="R"]
+ Cr [label="DESCEND"]
+ Cr -> Crl
+ Crl [label="..."]
+ Cr -> Crr
+ Crr [label="..."]
+
+ D [label="011"]
+ D -> Dl [label="L"]
+ Dl [label="DESCEND"]
+ Dl -> Dll
+ Dll [label="..."]
+ Dl -> Dlr
+ Dlr [label="..."]
+ D -> Dr [label="R"]
+ Dr [label="SKIP"]
+
+ E [label="100"]
+ E -> El [label="L"]
+ El [label="DESCEND"]
+ El -> Ell
+ Ell [label="..."]
+ El -> Elr
+ Elr [label="..."]
+ E -> Er [label="R"]
+ Er [label="VERIFY"]
+
+ row1 -> invis [style=invis]
+ invis [shape=none, label=""]
+ invis -> C [style=invis]
+ { rank = same; C; D; E; }
+
+ F [label="101"]
+ F -> Fl [label="L"]
+ Fl [label="DESCEND"]
+ Fl -> Fll
+ Fll [label="..."]
+ Fl -> Flr
+ Flr [label="..."]
+ F -> Fr [label="R"]
+ Fr [label="DESCEND"]
+ Fr -> Frl
+ Frl [label="..."]
+ Fr -> Frr
+ Frr [label="..."]
+
+ G [label="110"]
+ G -> Gl [label="L"]
+ Gl [label="SKIP"]
+ G -> Gr [label="R"]
+ Gr [label="VERIFY"]
+
+ H [label="111"]
+ H -> Hl [label="L"]
+ Hl [label="SKIP"]
+ H -> Hr [label="R"]
+ Hr [label="DESCEND"]
+ Hr -> Hrl
+ Hrl [label="..."]
+ Hr -> Hrr
+ Hrr [label="..."]
+
+ Crl -> F [style=invis]
+ { rank = same; F; G; H; }
+}
diff --git a/bip-0098/node-variants.png b/bip-0098/node-variants.png
new file mode 100644
index 0000000..991d7bc
--- /dev/null
+++ b/bip-0098/node-variants.png
Binary files differ
diff --git a/bip-0098/skip-skip.dot b/bip-0098/skip-skip.dot
new file mode 100644
index 0000000..5e633d6
--- /dev/null
+++ b/bip-0098/skip-skip.dot
@@ -0,0 +1,7 @@
+digraph G {
+ A [label="???"]
+ A -> Al [label="L"]
+ Al [label="SKIP"]
+ A -> Ar [label="R"]
+ Ar [label="SKIP"]
+} \ No newline at end of file
diff --git a/bip-0098/skip-skip.png b/bip-0098/skip-skip.png
new file mode 100644
index 0000000..d3e7c45
--- /dev/null
+++ b/bip-0098/skip-skip.png
Binary files differ
diff --git a/bip-0098/traversal-example.dot b/bip-0098/traversal-example.dot
new file mode 100644
index 0000000..2993642
--- /dev/null
+++ b/bip-0098/traversal-example.dot
@@ -0,0 +1,32 @@
+digraph G {
+ a [label="A\n101"]
+ a -> b
+ a -> c
+
+ b [label="B\n111"]
+ b -> s0
+ s0 [label="SKIP\n0x00..."]
+ b -> d
+
+ d [label="D\n011"]
+ d -> f
+ d -> s1
+ s1 [label="SKIP\n0x22..."]
+
+ f [label="F\n000"]
+ f -> v1
+ v1 [label="VERIFY\n0x55..."]
+ f -> s2
+ s2 [label="SKIP\n0x66..."]
+
+ c [label="C\n010"]
+ c -> v2
+ v2 [label="VERIFY\n0x11..."]
+ c -> e
+
+ e [label="E\n001"]
+ e -> v3
+ v3 [label="VERIFY\n0x33..."]
+ e -> v4
+ v4 [label="VERIFY\n0x44..."]
+}
diff --git a/bip-0098/traversal-example.png b/bip-0098/traversal-example.png
new file mode 100644
index 0000000..a6a7954
--- /dev/null
+++ b/bip-0098/traversal-example.png
Binary files differ
diff --git a/bip-0098/unbalanced-hash-tree.dot b/bip-0098/unbalanced-hash-tree.dot
new file mode 100644
index 0000000..c637652
--- /dev/null
+++ b/bip-0098/unbalanced-hash-tree.dot
@@ -0,0 +1,11 @@
+digraph G {
+ 0 [label="Root\nH(A || H(B || C))"]
+ 0 -> A
+ A [label="A\nskip"]
+ 0 -> 1
+ 1 [label="Node\nH(B || C)"]
+ 1 -> B
+ B [label="B\nskip"]
+ 1 -> C
+ C [label="C\nverify"]
+}
diff --git a/bip-0098/unbalanced-hash-tree.png b/bip-0098/unbalanced-hash-tree.png
new file mode 100644
index 0000000..339bb22
--- /dev/null
+++ b/bip-0098/unbalanced-hash-tree.png
Binary files differ