Skip to content

Commit c6229db

Browse files
authored
Merge pull request bitcoin#610 from kallewoof/bip-fmt-mbv-tcs
BIPs 98, 116, and 117: Fast Merkle Trees; MERKLEBRANCHVERIFY; Tail Call Execution Semantics
2 parents 5c48bcc + 5df90e1 commit c6229db

13 files changed

+814
-0
lines changed

README.mediawiki

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@ Those proposing changes should consider that ultimately consent may rest with th
421421
| Standard
422422
| Final
423423
|-
424+
| [[bip-0098.mediawiki|98]]
425+
| Consensus (soft fork)
426+
| Fast Merkle Trees
427+
| Mark Friedenbach, Kalle Alm, BtcDrak
428+
| Standard
429+
| Draft
430+
|-
424431
| [[bip-0099.mediawiki|99]]
425432
|
426433
| Motivation and deployment of consensus rule changes ([soft/hard]forks)
@@ -519,6 +526,20 @@ Those proposing changes should consider that ultimately consent may rest with th
519526
| Standard
520527
| Draft
521528
|-
529+
| [[bip-0116.mediawiki|116]]
530+
| Consensus (soft fork)
531+
| MERKLEBRANCHVERIFY
532+
| Mark Friedenbach, Kalle Alm, BtcDrak
533+
| Standard
534+
| Draft
535+
|-
536+
| [[bip-0117.mediawiki|117]]
537+
| Consensus (soft fork)
538+
| Tail Call Execution Semantics
539+
| Mark Friedenbach, Kalle Alm, BtcDrak
540+
| Standard
541+
| Draft
542+
|-
522543
| [[bip-0120.mediawiki|120]]
523544
| Applications
524545
| Proof of Payment

bip-0098.mediawiki

Lines changed: 308 additions & 0 deletions
Large diffs are not rendered by default.

bip-0098/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
dot -Tpng -o node-variants.png node-variants.dot
4+
dot -Tpng -o skip-skip.png skip-skip.dot
5+
dot -Tpng -o traversal-example.png traversal-example.dot
6+
dot -Tpng -o unbalanced-hash-tree.png unbalanced-hash-tree.dot

bip-0098/node-variants.dot

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
digraph G {
2+
row1 [shape=none, label=""]
3+
4+
A [label="000"]
5+
A -> Al [label="L"]
6+
Al [label="VERIFY"]
7+
A -> Ar [label="R"]
8+
Ar [label="SKIP"]
9+
10+
B [label="001"]
11+
B -> Bl [label="L"]
12+
Bl [label="VERIFY"]
13+
B -> Br [label="R"]
14+
Br [label="VERIFY"]
15+
16+
{ rank = same; row1; A; B; }
17+
18+
C [label="010"]
19+
C -> Cl [label="L"]
20+
Cl [label="VERIFY"]
21+
C -> Cr [label="R"]
22+
Cr [label="DESCEND"]
23+
Cr -> Crl
24+
Crl [label="..."]
25+
Cr -> Crr
26+
Crr [label="..."]
27+
28+
D [label="011"]
29+
D -> Dl [label="L"]
30+
Dl [label="DESCEND"]
31+
Dl -> Dll
32+
Dll [label="..."]
33+
Dl -> Dlr
34+
Dlr [label="..."]
35+
D -> Dr [label="R"]
36+
Dr [label="SKIP"]
37+
38+
E [label="100"]
39+
E -> El [label="L"]
40+
El [label="DESCEND"]
41+
El -> Ell
42+
Ell [label="..."]
43+
El -> Elr
44+
Elr [label="..."]
45+
E -> Er [label="R"]
46+
Er [label="VERIFY"]
47+
48+
row1 -> invis [style=invis]
49+
invis [shape=none, label=""]
50+
invis -> C [style=invis]
51+
{ rank = same; C; D; E; }
52+
53+
F [label="101"]
54+
F -> Fl [label="L"]
55+
Fl [label="DESCEND"]
56+
Fl -> Fll
57+
Fll [label="..."]
58+
Fl -> Flr
59+
Flr [label="..."]
60+
F -> Fr [label="R"]
61+
Fr [label="DESCEND"]
62+
Fr -> Frl
63+
Frl [label="..."]
64+
Fr -> Frr
65+
Frr [label="..."]
66+
67+
G [label="110"]
68+
G -> Gl [label="L"]
69+
Gl [label="SKIP"]
70+
G -> Gr [label="R"]
71+
Gr [label="VERIFY"]
72+
73+
H [label="111"]
74+
H -> Hl [label="L"]
75+
Hl [label="SKIP"]
76+
H -> Hr [label="R"]
77+
Hr [label="DESCEND"]
78+
Hr -> Hrl
79+
Hrl [label="..."]
80+
Hr -> Hrr
81+
Hrr [label="..."]
82+
83+
Crl -> F [style=invis]
84+
{ rank = same; F; G; H; }
85+
}

bip-0098/node-variants.png

103 KB
Loading

bip-0098/skip-skip.dot

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
digraph G {
2+
A [label="???"]
3+
A -> Al [label="L"]
4+
Al [label="SKIP"]
5+
A -> Ar [label="R"]
6+
Ar [label="SKIP"]
7+
}

bip-0098/skip-skip.png

9.21 KB
Loading

bip-0098/traversal-example.dot

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
digraph G {
2+
a [label="A\n101"]
3+
a -> b
4+
a -> c
5+
6+
b [label="B\n111"]
7+
b -> s0
8+
s0 [label="SKIP\n0x00..."]
9+
b -> d
10+
11+
d [label="D\n011"]
12+
d -> f
13+
d -> s1
14+
s1 [label="SKIP\n0x22..."]
15+
16+
f [label="F\n000"]
17+
f -> v1
18+
v1 [label="VERIFY\n0x55..."]
19+
f -> s2
20+
s2 [label="SKIP\n0x66..."]
21+
22+
c [label="C\n010"]
23+
c -> v2
24+
v2 [label="VERIFY\n0x11..."]
25+
c -> e
26+
27+
e [label="E\n001"]
28+
e -> v3
29+
v3 [label="VERIFY\n0x33..."]
30+
e -> v4
31+
v4 [label="VERIFY\n0x44..."]
32+
}

bip-0098/traversal-example.png

59.3 KB
Loading

bip-0098/unbalanced-hash-tree.dot

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
digraph G {
2+
0 [label="Root\nH(A || H(B || C))"]
3+
0 -> A
4+
A [label="A\nskip"]
5+
0 -> 1
6+
1 [label="Node\nH(B || C)"]
7+
1 -> B
8+
B [label="B\nskip"]
9+
1 -> C
10+
C [label="C\nverify"]
11+
}

0 commit comments

Comments
 (0)