-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3854468
commit a3a578d
Showing
7 changed files
with
250 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
global: | ||
policy: | ||
threshold: 67 | ||
interval_broadcast_init_ballot_in_join: 5s | ||
timeout_wait_vote_result_in_join: 6s | ||
timeout_wait_ballot: 6s | ||
threshold: 67 | ||
interval_broadcast_init_ballot_in_join: 5s | ||
timeout_wait_vote_result_in_join: 6s | ||
timeout_wait_ballot: 6s | ||
|
||
condition: | ||
all: | ||
node_state: | ||
# { | ||
# "level": "info", | ||
# "node": "n0", | ||
# "current_state": "booting", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="booting" AND new_state="joining" | ||
# { | ||
# "level": "info", | ||
# "node": "n0", | ||
# "current_state": "joining", | ||
# "new_state": "consensus", | ||
# "m": "state changed" | ||
# } | ||
- current_state="joining" AND new_state="consensus" | ||
|
||
|
||
new_block: | ||
- m="new block created" and block.height>=12 and block.round=0 | ||
conditions: | ||
all: | ||
# { | ||
# "level": "info", | ||
# "node": "n0", | ||
# "current_state": "booting", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="booting" AND new_state="joining" | ||
# { | ||
# "level": "info", | ||
# "node": "n0", | ||
# "current_state": "joining", | ||
# "new_state": "consensus", | ||
# "m": "state changed" | ||
# } | ||
- current_state="joining" AND new_state="consensus" | ||
|
||
- m="new block created" and block.height>=12 and block.round=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
global: | ||
modules: | ||
suffrage: | ||
name: ConditionSuffrage | ||
conditions: | ||
stop: | ||
condition: suffrage.height=13 | ||
action: fixed-proposer | ||
value: n3 | ||
modules: | ||
suffrage: | ||
name: ConditionSuffrage | ||
conditions: | ||
- condition: suffrage.height=13 | ||
actions: | ||
- action: fixed-proposer | ||
value: n3 | ||
proposal_maker: | ||
name: ConditionProposalMaker | ||
delay: 1s | ||
conditions: | ||
nodes: | ||
n3: | ||
modules: | ||
proposal_maker: | ||
name: ConditionProposalMaker | ||
conditions: | ||
stop: | ||
condition: proposal.height=13 AND proposal.round in (0) | ||
action: empty-proposal | ||
|
||
condition: | ||
all: | ||
base_state: | ||
- current_state="booting" AND new_state="joining" | ||
- current_state="joining" AND new_state="consensus" | ||
|
||
move_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: | ||
- m="new block created" AND block.height=13 AND block.round=1 | ||
n3: | ||
modules: | ||
proposal_maker: | ||
name: ConditionProposalMaker | ||
delay: 1s | ||
conditions: | ||
- 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 | ||
- m="new block created" AND block.height=13 AND block.round=1 |
163 changes: 82 additions & 81 deletions
163
readthedocs/docs/contest/config/failure-voting-init-over-blocking-number.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,84 @@ | ||
nodes: | ||
n2: | ||
modules: | ||
ballot_maker: | ||
name: ConditionBallotMaker | ||
conditions: | ||
stop: | ||
# { | ||
# "ballot": { | ||
# "current_proposal": "sl:7e8sQiEQReVtoe9HcQBfAgNr4V1ZDgx18jpEstuAiA6f", | ||
# "current_round": 0, | ||
# "last_block": "bk:2Xii7H6ykkD58euEHe8DEhAZJPxT3owUEj7EHY9e5HGH", | ||
# "last_round": 0, | ||
# "next_block": "bk:8pyPKQdX78sAe83zq8EoR6NgvfCqRqKNHduBG3xZLHNJ", | ||
# "next_height": 13, | ||
# "stage": "INIT" | ||
# }, | ||
# "block": { | ||
# "height": 11, | ||
# "proposal": "sl:8QiEL44ptpYWVgRUxRr9D3KiBYknetonqeJCjHAPD8js", | ||
# "round": 0 | ||
# }, | ||
# "node": "n3", | ||
# "previousBlock": { | ||
# "height": 10, | ||
# "proposal": "pp:JC5VCGQWagkpSCAXxMa8737LCjkh1gQNkL91jGPmwCjo", | ||
# "round": 11 | ||
# }, | ||
# "state": "consensus" | ||
# } | ||
condition: ballot.next_height=13 AND ballot.stage in ("INIT") | ||
action: empty-ballot | ||
n3: | ||
modules: | ||
ballot_maker: | ||
name: ConditionBallotMaker | ||
conditions: | ||
stop: | ||
condition: ballot.next_height=13 AND ballot.stage in ("INIT") | ||
action: empty-ballot | ||
n2: | ||
modules: | ||
ballot_maker: | ||
name: ConditionBallotMaker | ||
conditions: | ||
# { | ||
# "ballot": { | ||
# "current_proposal": "sl:7e8sQiEQReVtoe9HcQBfAgNr4V1ZDgx18jpEstuAiA6f", | ||
# "current_round": 0, | ||
# "last_block": "bk:2Xii7H6ykkD58euEHe8DEhAZJPxT3owUEj7EHY9e5HGH", | ||
# "last_round": 0, | ||
# "next_block": "bk:8pyPKQdX78sAe83zq8EoR6NgvfCqRqKNHduBG3xZLHNJ", | ||
# "next_height": 13, | ||
# "stage": "INIT" | ||
# }, | ||
# "block": { | ||
# "height": 11, | ||
# "proposal": "sl:8QiEL44ptpYWVgRUxRr9D3KiBYknetonqeJCjHAPD8js", | ||
# "round": 0 | ||
# }, | ||
# "node": "n3", | ||
# "previousBlock": { | ||
# "height": 10, | ||
# "proposal": "pp:JC5VCGQWagkpSCAXxMa8737LCjkh1gQNkL91jGPmwCjo", | ||
# "round": 11 | ||
# }, | ||
# "state": "consensus" | ||
# } | ||
- condition: ballot.next_height=13 AND ballot.stage in ("INIT") | ||
actions: | ||
- action: empty-ballot | ||
n3: | ||
modules: | ||
ballot_maker: | ||
name: ConditionBallotMaker | ||
conditions: | ||
- condition: ballot.next_height=13 AND ballot.stage in ("INIT") | ||
actions: | ||
- action: empty-ballot | ||
|
||
conditions: | ||
all: | ||
# base state | ||
# { | ||
# "level": "info", | ||
# "current_state": "booting", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="booting" AND new_state="joining" | ||
|
||
condition: | ||
all: | ||
base_state: | ||
# { | ||
# "level": "info", | ||
# "current_state": "booting", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="booting" AND new_state="joining" | ||
# { | ||
# "level": "info", | ||
# "current_state": "joining", | ||
# "new_state": "consensus", | ||
# "m": "state changed" | ||
# } | ||
- current_state="joining" AND new_state="consensus" | ||
|
||
check_majority_accept: | ||
# { | ||
# "level": "debug", | ||
# "height": "12", | ||
# "round": 0, | ||
# "total": 4, | ||
# "threshold": 3, | ||
# "stage": "ACCEPT", | ||
# "set": [ | ||
# 3 | ||
# ], | ||
# "is_finished": true, | ||
# "m": "check majority" | ||
# } | ||
- m="check majority" AND height=12 AND round=0 AND stage="ACCEPT" AND is_finished=true | ||
|
||
after_failure_state: | ||
# { | ||
# "level": "info", | ||
# "current_state": "consensus", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="consensus" AND new_state="joining" | ||
# { | ||
# "level": "info", | ||
# "current_state": "joining", | ||
# "new_state": "consensus", | ||
# "m": "state changed" | ||
# } | ||
- current_state="joining" AND new_state="consensus" | ||
|
||
# check_majority_accept | ||
# { | ||
# "level": "debug", | ||
# "height": "12", | ||
# "round": 0, | ||
# "total": 4, | ||
# "threshold": 3, | ||
# "stage": "ACCEPT", | ||
# "set": [ | ||
# 3 | ||
# ], | ||
# "is_finished": true, | ||
# "m": "check majority" | ||
# } | ||
- m="check majority" AND height=12 AND round=0 AND stage="ACCEPT" AND is_finished=true | ||
|
||
# after_failure_state | ||
# { | ||
# "level": "info", | ||
# "current_state": "consensus", | ||
# "new_state": "joining", | ||
# "m": "state changed" | ||
# } | ||
- current_state="consensus" AND new_state="joining" |
Oops, something went wrong.