summaryrefslogtreecommitdiff
path: root/bip-0008
diff options
context:
space:
mode:
Diffstat (limited to 'bip-0008')
-rw-r--r--bip-0008/states.dot35
-rw-r--r--bip-0008/states.pngbin6686 -> 60743 bytes
-rw-r--r--bip-0008/states.svg126
3 files changed, 161 insertions, 0 deletions
diff --git a/bip-0008/states.dot b/bip-0008/states.dot
new file mode 100644
index 0000000..8615978
--- /dev/null
+++ b/bip-0008/states.dot
@@ -0,0 +1,35 @@
+digraph {
+ rankdir=TD;
+
+ node [style="rounded,filled,bold", shape=box, fixedsize=true, width=1.5, fontname="Arial"];
+
+ edge [weight = 100];
+ "DEFINED" -> "STARTED" [label="height >= start_height"];
+ "STARTED" -> "MUST_SIGNAL" [label="height + 2016 >= timeoutheight AND lockinontimeout"];
+ "STARTED" -> "FAILED" [label="height >= timeoutheight\nAND\nNOT lockinontimeout"];
+ "LOCKED_IN" -> "ACTIVE" [label="height >= minimum_activation_height"];
+ "LOCKED_IN":se -> "LOCKED_IN":ne [label="height < minimum_activation_height"];
+ "MUST_SIGNAL" -> "LOCKED_IN" [label="always"];
+
+ edge [weight = 1];
+ "STARTED" -> "LOCKED_IN" [label="height < timeoutheight\nAND\nthreshold reached"];
+
+ "FAILED" -> "LOCKED_IN" [style=invis];
+
+ "DEFINED":sw -> "DEFINED":nw;
+ "STARTED":sw -> "STARTED":nw;
+ "ACTIVE":sw -> "ACTIVE":nw;
+ "FAILED":sw -> "FAILED":nw;
+
+ "STARTED" [fillcolor="#a0a0ff"];
+ "MUST_SIGNAL" [fillcolor="#a0a0ff"];
+ "LOCKED_IN" [fillcolor="#ffffa0"];
+ "ACTIVE" [fillcolor="#a0ffa0"];
+ "FAILED" [fillcolor="#ffa0a0"];
+
+ { rank=same; "STARTED" "MUST_SIGNAL" }
+ { rank=same; "FAILED" "LOCKED_IN" }
+ { rank=sink; "ACTIVE" }
+}
+
+
diff --git a/bip-0008/states.png b/bip-0008/states.png
index 13fae23..f15efdb 100644
--- a/bip-0008/states.png
+++ b/bip-0008/states.png
Binary files differ
diff --git a/bip-0008/states.svg b/bip-0008/states.svg
new file mode 100644
index 0000000..63fe634
--- /dev/null
+++ b/bip-0008/states.svg
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.46.1 (0)
+ -->
+<!-- Pages: 1 -->
+<svg width="937pt" height="348pt"
+ viewBox="0.00 0.00 937.00 348.37" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 344.37)">
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-344.37 933,-344.37 933,4 -4,4"/>
+<!-- DEFINED -->
+<g id="node1" class="node">
+<title>DEFINED</title>
+<path fill="lightgrey" stroke="black" stroke-width="2" d="M114,-333.75C114,-333.75 30,-333.75 30,-333.75 24,-333.75 18,-327.75 18,-321.75 18,-321.75 18,-309.75 18,-309.75 18,-303.75 24,-297.75 30,-297.75 30,-297.75 114,-297.75 114,-297.75 120,-297.75 126,-303.75 126,-309.75 126,-309.75 126,-321.75 126,-321.75 126,-327.75 120,-333.75 114,-333.75"/>
+<text text-anchor="middle" x="72" y="-312.05" font-family="Arial" font-size="14.00">DEFINED</text>
+</g>
+<!-- DEFINED&#45;&gt;DEFINED -->
+<g id="edge9" class="edge">
+<title>DEFINED:sw&#45;&gt;DEFINED:nw</title>
+<path fill="none" stroke="black" d="M18,-297.75C12,-287.25 0,-287.25 0,-315.75 0,-334.01 4.92,-340.57 10.04,-340.17"/>
+<polygon fill="black" stroke="black" points="12.41,-342.75 18,-333.75 8.02,-337.3 12.41,-342.75"/>
+</g>
+<!-- STARTED -->
+<g id="node2" class="node">
+<title>STARTED</title>
+<path fill="#a0a0ff" stroke="black" stroke-width="2" d="M114,-246.75C114,-246.75 30,-246.75 30,-246.75 24,-246.75 18,-240.75 18,-234.75 18,-234.75 18,-222.75 18,-222.75 18,-216.75 24,-210.75 30,-210.75 30,-210.75 114,-210.75 114,-210.75 120,-210.75 126,-216.75 126,-222.75 126,-222.75 126,-234.75 126,-234.75 126,-240.75 120,-246.75 114,-246.75"/>
+<text text-anchor="middle" x="72" y="-225.05" font-family="Arial" font-size="14.00">STARTED</text>
+</g>
+<!-- DEFINED&#45;&gt;STARTED -->
+<g id="edge1" class="edge">
+<title>DEFINED&#45;&gt;STARTED</title>
+<path fill="none" stroke="black" d="M72,-297.55C72,-285.91 72,-270.3 72,-256.99"/>
+<polygon fill="black" stroke="black" points="75.5,-256.93 72,-246.93 68.5,-256.93 75.5,-256.93"/>
+<text text-anchor="middle" x="155" y="-268.55" font-family="Times,serif" font-size="14.00">height &gt;= start_height</text>
+</g>
+<!-- STARTED&#45;&gt;STARTED -->
+<g id="edge10" class="edge">
+<title>STARTED:sw&#45;&gt;STARTED:nw</title>
+<path fill="none" stroke="black" d="M18,-210.75C12,-200.25 0,-200.25 0,-228.75 0,-247.01 4.92,-253.57 10.04,-253.17"/>
+<polygon fill="black" stroke="black" points="12.41,-255.75 18,-246.75 8.02,-250.3 12.41,-255.75"/>
+</g>
+<!-- MUST_SIGNAL -->
+<g id="node3" class="node">
+<title>MUST_SIGNAL</title>
+<path fill="#a0a0ff" stroke="black" stroke-width="2" d="M634,-246.75C634,-246.75 550,-246.75 550,-246.75 544,-246.75 538,-240.75 538,-234.75 538,-234.75 538,-222.75 538,-222.75 538,-216.75 544,-210.75 550,-210.75 550,-210.75 634,-210.75 634,-210.75 640,-210.75 646,-216.75 646,-222.75 646,-222.75 646,-234.75 646,-234.75 646,-240.75 640,-246.75 634,-246.75"/>
+<text text-anchor="middle" x="592" y="-225.05" font-family="Arial" font-size="14.00">MUST_SIGNAL</text>
+</g>
+<!-- STARTED&#45;&gt;MUST_SIGNAL -->
+<g id="edge2" class="edge">
+<title>STARTED&#45;&gt;MUST_SIGNAL</title>
+<path fill="none" stroke="black" d="M126.18,-228.75C222.75,-228.75 424.19,-228.75 527.64,-228.75"/>
+<polygon fill="black" stroke="black" points="527.94,-232.25 537.94,-228.75 527.94,-225.25 527.94,-232.25"/>
+<text text-anchor="middle" x="332" y="-235.55" font-family="Times,serif" font-size="14.00">height + 2016 &gt;= timeoutheight AND lockinontimeout</text>
+</g>
+<!-- FAILED -->
+<g id="node4" class="node">
+<title>FAILED</title>
+<path fill="#ffa0a0" stroke="black" stroke-width="2" d="M114,-129.75C114,-129.75 30,-129.75 30,-129.75 24,-129.75 18,-123.75 18,-117.75 18,-117.75 18,-105.75 18,-105.75 18,-99.75 24,-93.75 30,-93.75 30,-93.75 114,-93.75 114,-93.75 120,-93.75 126,-99.75 126,-105.75 126,-105.75 126,-117.75 126,-117.75 126,-123.75 120,-129.75 114,-129.75"/>
+<text text-anchor="middle" x="72" y="-108.05" font-family="Arial" font-size="14.00">FAILED</text>
+</g>
+<!-- STARTED&#45;&gt;FAILED -->
+<g id="edge3" class="edge">
+<title>STARTED&#45;&gt;FAILED</title>
+<path fill="none" stroke="black" d="M72,-210.28C72,-191.69 72,-161.99 72,-140.25"/>
+<polygon fill="black" stroke="black" points="75.5,-140 72,-130 68.5,-140 75.5,-140"/>
+<text text-anchor="middle" x="162.5" y="-181.55" font-family="Times,serif" font-size="14.00">height &gt;= timeoutheight</text>
+<text text-anchor="middle" x="162.5" y="-166.55" font-family="Times,serif" font-size="14.00">AND</text>
+<text text-anchor="middle" x="162.5" y="-151.55" font-family="Times,serif" font-size="14.00">NOT lockinontimeout</text>
+</g>
+<!-- LOCKED_IN -->
+<g id="node5" class="node">
+<title>LOCKED_IN</title>
+<path fill="#ffffa0" stroke="black" stroke-width="2" d="M634,-129.75C634,-129.75 550,-129.75 550,-129.75 544,-129.75 538,-123.75 538,-117.75 538,-117.75 538,-105.75 538,-105.75 538,-99.75 544,-93.75 550,-93.75 550,-93.75 634,-93.75 634,-93.75 640,-93.75 646,-99.75 646,-105.75 646,-105.75 646,-117.75 646,-117.75 646,-123.75 640,-129.75 634,-129.75"/>
+<text text-anchor="middle" x="592" y="-108.05" font-family="Arial" font-size="14.00">LOCKED_IN</text>
+</g>
+<!-- STARTED&#45;&gt;LOCKED_IN -->
+<g id="edge7" class="edge">
+<title>STARTED&#45;&gt;LOCKED_IN</title>
+<path fill="none" stroke="black" d="M126.08,-218.75C163.11,-212.29 213.23,-202.95 257,-192.75 329.78,-175.79 346.33,-165.17 419,-147.75 454.78,-139.17 495.06,-130.94 527.74,-124.62"/>
+<polygon fill="black" stroke="black" points="528.47,-128.04 537.63,-122.72 527.15,-121.17 528.47,-128.04"/>
+<text text-anchor="middle" x="503.5" y="-181.55" font-family="Times,serif" font-size="14.00">height &lt; timeoutheight</text>
+<text text-anchor="middle" x="503.5" y="-166.55" font-family="Times,serif" font-size="14.00">AND</text>
+<text text-anchor="middle" x="503.5" y="-151.55" font-family="Times,serif" font-size="14.00">threshold reached</text>
+</g>
+<!-- MUST_SIGNAL&#45;&gt;LOCKED_IN -->
+<g id="edge6" class="edge">
+<title>MUST_SIGNAL&#45;&gt;LOCKED_IN</title>
+<path fill="none" stroke="black" d="M592,-210.28C592,-191.69 592,-161.99 592,-140.25"/>
+<polygon fill="black" stroke="black" points="595.5,-140 592,-130 588.5,-140 595.5,-140"/>
+<text text-anchor="middle" x="616.5" y="-166.55" font-family="Times,serif" font-size="14.00">always</text>
+</g>
+<!-- FAILED&#45;&gt;FAILED -->
+<g id="edge12" class="edge">
+<title>FAILED:sw&#45;&gt;FAILED:nw</title>
+<path fill="none" stroke="black" d="M18,-93.75C12,-83.25 0,-83.25 0,-111.75 0,-130.01 4.92,-136.57 10.04,-136.17"/>
+<polygon fill="black" stroke="black" points="12.41,-138.75 18,-129.75 8.02,-133.3 12.41,-138.75"/>
+</g>
+<!-- FAILED&#45;&gt;LOCKED_IN -->
+<!-- LOCKED_IN&#45;&gt;LOCKED_IN -->
+<g id="edge5" class="edge">
+<title>LOCKED_IN:se&#45;&gt;LOCKED_IN:ne</title>
+<path fill="none" stroke="black" d="M646,-93.75C652,-83.25 664,-83.25 664,-111.75 664,-130.01 659.08,-136.57 653.96,-136.17"/>
+<polygon fill="black" stroke="black" points="655.98,-133.3 646,-129.75 651.59,-138.75 655.98,-133.3"/>
+<text text-anchor="middle" x="796.5" y="-108.05" font-family="Times,serif" font-size="14.00">height &lt; minimum_activation_height</text>
+</g>
+<!-- ACTIVE -->
+<g id="node6" class="node">
+<title>ACTIVE</title>
+<path fill="#a0ffa0" stroke="black" stroke-width="2" d="M634,-42.75C634,-42.75 550,-42.75 550,-42.75 544,-42.75 538,-36.75 538,-30.75 538,-30.75 538,-18.75 538,-18.75 538,-12.75 544,-6.75 550,-6.75 550,-6.75 634,-6.75 634,-6.75 640,-6.75 646,-12.75 646,-18.75 646,-18.75 646,-30.75 646,-30.75 646,-36.75 640,-42.75 634,-42.75"/>
+<text text-anchor="middle" x="592" y="-21.05" font-family="Arial" font-size="14.00">ACTIVE</text>
+</g>
+<!-- LOCKED_IN&#45;&gt;ACTIVE -->
+<g id="edge4" class="edge">
+<title>LOCKED_IN&#45;&gt;ACTIVE</title>
+<path fill="none" stroke="black" d="M592,-93.55C592,-81.91 592,-66.3 592,-52.99"/>
+<polygon fill="black" stroke="black" points="595.5,-52.93 592,-42.93 588.5,-52.93 595.5,-52.93"/>
+<text text-anchor="middle" x="730.5" y="-64.55" font-family="Times,serif" font-size="14.00">height &gt;= minimum_activation_height</text>
+</g>
+<!-- ACTIVE&#45;&gt;ACTIVE -->
+<g id="edge11" class="edge">
+<title>ACTIVE:sw&#45;&gt;ACTIVE:nw</title>
+<path fill="none" stroke="black" d="M538,-6.75C532,3.75 520,3.75 520,-24.75 520,-43.01 524.92,-49.57 530.04,-49.17"/>
+<polygon fill="black" stroke="black" points="532.41,-51.75 538,-42.75 528.02,-46.3 532.41,-51.75"/>
+</g>
+</g>
+</svg>