From da9cdd675931fece248e98eaf04e308f28427f67 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sun, 26 Jul 2020 14:55:16 +1000 Subject: BIP8: replace FAILING with MUST_SIGNAL This removes the FAILING state and adds compulsory signalling during a new MUST_SIGNAL phase during the last retarget period prior to the timeout height. This ensures that if a deployment occurs using bip8 with lockinontimeout=false and timeoutheight=N, that a later deployment using bip8 with lockinontimeout=true and timeoutheight=K, where K 46310 bytes bip-0008/states.svg | 132 ++++++++++++++++++++++++++-------------------------- 3 files changed, 80 insertions(+), 78 deletions(-) (limited to 'bip-0008') diff --git a/bip-0008/states.dot b/bip-0008/states.dot index 5c5a671..aa919ff 100644 --- a/bip-0008/states.dot +++ b/bip-0008/states.dot @@ -1,17 +1,19 @@ digraph { rankdir=TD; - node [style="rounded,filled,bold", shape=box, fixedsize=true, width=1.3, fontname="Arial"]; + node [style="rounded,filled,bold", shape=box, fixedsize=true, width=1.5, fontname="Arial"]; edge [weight = 100]; "DEFINED" -> "STARTED" [label="height >= start_height"]; - "STARTED" -> "FAILING" [label="height >= timeoutheight AND NOT lockinontimeout"]; - "STARTED" -> "LOCKED_IN" [label="(height < timeoutheight AND threshold reached)\nOR\n(height >= timeoutheight AND lockinontimeout)"]; + "STARTED" -> "MUST_SIGNAL" [label="height + 2016 >= timeoutheight AND lockinontimeout"]; + "STARTED" -> "FAILED" [label="height >= timeoutheight\nAND\nNOT lockinontimeout"]; "LOCKED_IN" -> "ACTIVE" [label="always"]; - "FAILING" -> "FAILED" [label="NOT all blocks signal"]; + "MUST_SIGNAL" -> "LOCKED_IN" [label="always"]; edge [weight = 1]; - "FAILING" -> "ACTIVE" [label="all blocks signal"]; + "STARTED" -> "LOCKED_IN" [label="height < timeoutheight\nAND\nthreshold reached"]; + + "FAILED" -> "LOCKED_IN" [style=invis]; "DEFINED":sw -> "DEFINED":nw; "STARTED":sw -> "STARTED":nw; @@ -19,16 +21,14 @@ digraph { "FAILED":sw -> "FAILED":nw; "STARTED" [fillcolor="#a0a0ff"]; - - "FAILING" [fillcolor="#ffffa0"]; + "MUST_SIGNAL" [fillcolor="#a0a0ff"]; "LOCKED_IN" [fillcolor="#ffffa0"]; - "ACTIVE" [fillcolor="#a0ffa0", shape=box]; - "FAILED" [fillcolor="#ffa0a0", shape=box]; - - "ACTIVE" -> "FAILED" [style=invis]; + "ACTIVE" [fillcolor="#a0ffa0"]; + "FAILED" [fillcolor="#ffa0a0"]; - { rank=same; "STARTED" "FAILING" } - { rank=sink; "ACTIVE" "FAILED" } + { 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 b6d73b7..6477ed3 100644 Binary files a/bip-0008/states.png and b/bip-0008/states.png differ diff --git a/bip-0008/states.svg b/bip-0008/states.svg index 85a0021..3503c34 100644 --- a/bip-0008/states.svg +++ b/bip-0008/states.svg @@ -4,19 +4,19 @@ - + %3 - + DEFINED - -DEFINED + +DEFINED - + DEFINED:sw->DEFINED:nw @@ -24,95 +24,97 @@ STARTED - -STARTED + +STARTED DEFINED->STARTED - - -height >= start_height + + +height >= start_height - + STARTED:sw->STARTED:nw - + -FAILING - -FAILING +MUST_SIGNAL + +MUST_SIGNAL - + -STARTED->FAILING - - -height >= timeoutheight AND NOT lockinontimeout +STARTED->MUST_SIGNAL + + +height + 2016 >= timeoutheight AND lockinontimeout - + -LOCKED_IN - -LOCKED_IN +FAILED + +FAILED - + -STARTED->LOCKED_IN - - -(height < timeoutheight AND threshold reached) -OR -(height >= timeoutheight AND lockinontimeout) +STARTED->FAILED + + +height >= timeoutheight +AND +NOT lockinontimeout - + -ACTIVE - -ACTIVE +LOCKED_IN + +LOCKED_IN - + -FAILING->ACTIVE - - -all blocks signal - - - -FAILED - -FAILED +STARTED->LOCKED_IN + + +height < timeoutheight +AND +threshold reached - + -FAILING->FAILED - - -NOT all blocks signal +MUST_SIGNAL->LOCKED_IN + + +always + + + +FAILED:sw->FAILED:nw + + + + + + +ACTIVE + +ACTIVE LOCKED_IN->ACTIVE - - -always + + +always - -ACTIVE:sw->ACTIVE:nw - - - - - -FAILED:sw->FAILED:nw - - +ACTIVE:sw->ACTIVE:nw + + -- cgit v1.2.3