Failure Of Proposing
Under situation: |
|
- Proposer is selected after INIT stage.
- Proposer node does not propose the proposal within a given time.
- Timed out in a given time, each node fails to get the proposal from the proposer.
|
Expected actions: |
|
- Each node tries to move the next round.
- Each node broadcasts next INIT ballots for next round.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | global:
modules:
suffrage:
name: ConditionSuffrage
conditions:
# set proposer to n3 when height, 12
- condition: suffrage.height="13"
actions:
- action: fixed-proposer
value: n3
proposal_maker:
name: ConditionProposalMaker
delay: 1s
conditions:
nodes:
n3:
modules:
proposal_maker:
name: ConditionProposalMaker
delay: 1s
conditions:
# will not make proposal when height, 12 and round, 0
- condition: proposal.height="13" AND proposal.round in (0)
actions:
- action: empty-proposal
conditions:
all:
- current_state="booting" AND new_state="joining"
- current_state="joining" AND new_state="consensus"
# move to next round
# {
# "level": "debug",
# "module": "proposal-timeout",
# "count": 0,
# "limit": 0,
# "callbacks": 1,
# "elapsed": 15.210288,
# "m": "callback executed"
# }
- module="proposal-timeout" AND m LIKE "callback executed" AND elapsed < 50
- m="check majority" AND height="13" AND round=1 AND stage="INIT" AND is_finished=true
# new block created
- m="new block created" AND block.height="13" AND block.round=1
|
| $ ./contest run failure-proposing.yml --log ./contest-failure-proposing
$ echo $?
0
|
To verify how each node did the consensus process,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 | $ cat ./contest-failure-voting-init-under-blocking-number/n0.log | \
grep -i 'check majority' | \
jq -c '[.height, .round, .stage, .total, .threshold, .is_finished, .m]' | \
column -s ',' -t
["n1" "12" 0 "ACCEPT" 4 3 false "check majority"]
["n2" "12" 0 "ACCEPT" 4 3 false "check majority"]
["n3" "12" 0 "ACCEPT" 4 3 false "check majority"]
["n0" "12" 0 "ACCEPT" 4 3 false "check majority"]
...
["n2" "12" 0 "ACCEPT" 4 3 true "check majority but closed"]
["n2" "13" 0 "INIT" 4 3 false "check majority"]
["n0" "13" 0 "INIT" 4 3 false "check majority"]
["n1" "13" 0 "INIT" 4 3 false "check majority"]
["n3" "13" 0 "INIT" 4 3 false "check majority"]
["n2" "13" 0 "INIT" 4 3 false "check majority"]
["n0" "13" 0 "INIT" 4 3 false "check majority"]
["n0" "13" 0 "INIT" 4 3 true "check majority"]
["n1" "13" 0 "INIT" 4 3 false "check majority"]
["n3" "13" 0 "INIT" 4 3 false "check majority"]
["n3" "13" 0 "INIT" 4 3 true "check majority"]
["n3" "13" 0 "INIT" 4 3 true "check majority but closed"]
["n1" "13" 0 "INIT" 4 3 true "check majority"]
["n2" "13" 0 "INIT" 4 3 true "check majority"]
["n2" "13" 0 "INIT" 4 3 true "check majority but closed"]
["n0" "13" 1 "INIT" 4 3 false "check majority"]
["n3" "13" 1 "INIT" 4 3 false "check majority"]
["n2" "13" 1 "INIT" 4 3 false "check majority"]
["n1" "13" 1 "INIT" 4 3 false "check majority"]
["n0" "13" 1 "INIT" 4 3 false "check majority"]
["n3" "13" 1 "INIT" 4 3 false "check majority"]
["n1" "13" 1 "INIT" 4 3 false "check majority"]
["n1" "13" 1 "INIT" 4 3 true "check majority"]
["n3" "13" 1 "INIT" 4 3 true "check majority"]
["n2" "13" 1 "INIT" 4 3 false "check majority"]
["n2" "13" 1 "INIT" 4 3 true "check majority"]
["n0" "13" 1 "INIT" 4 3 true "check majority"]
["n3" "13" 1 "SIGN" 4 3 false "check majority"]
["n1" "13" 1 "SIGN" 4 3 false "check majority"]
["n3" "13" 1 "SIGN" 4 3 false "check majority"]
["n0" "13" 1 "SIGN" 4 3 false "check majority"]
...
["n3" "13" 1 "SIGN" 4 3 true "check majority"]
|
The fixed proposer, n3
did not propose the proposal for height, 13
, round, 0
, the other nodes moved to the next round, 11
for the height, 13
, and then eventually all the nodes did keep the consensus process.