Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 299 additions & 0 deletions bip-0098.mediawiki

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions bip-0098/build.sh
Original file line number Diff line number Diff line change
@@ -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
85 changes: 85 additions & 0 deletions bip-0098/node-variants.dot
Original file line number Diff line number Diff line change
@@ -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; }
}
Binary file added bip-0098/node-variants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions bip-0098/skip-skip.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
digraph G {
A [label="???"]
A -> Al [label="L"]
Al [label="SKIP"]
A -> Ar [label="R"]
Ar [label="SKIP"]
}
Binary file added bip-0098/skip-skip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions bip-0098/traversal-example.dot
Original file line number Diff line number Diff line change
@@ -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..."]
}
Binary file added bip-0098/traversal-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions bip-0098/unbalanced-hash-tree.dot
Original file line number Diff line number Diff line change
@@ -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"]
}
Binary file added bip-0098/unbalanced-hash-tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions scripts/buildtable.pl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@
if (not $found{$field}) {
die "Unacceptable license $val in $fn" unless exists $AcceptableLicenses{$val} or ($val eq 'PD' and exists $GrandfatheredPD{$bipnum});
}
} elsif ($field eq 'License-Code') {
die "Undefined license $val in $fn" unless exists $DefinedLicenses{$val};
if (not $found{License}) {
die "Unacceptable license $val in $fn" unless exists $AcceptableLicenses{$val} or ($val eq 'PD' and exists $GrandfatheredPD{$bipnum});
}
} elsif ($field eq 'Comments-URI') {
if (not $found{'Comments-URI'}) {
my $first_comments_uri = sprintf('https://github.com/bitcoin/bips/wiki/Comments:BIP-%04d', $bipnum);
Expand Down