Skip to content

Commit

Permalink
contest cases under writing
Browse files Browse the repository at this point in the history
  • Loading branch information
spikeekips committed Oct 1, 2019
1 parent 90a54a9 commit 8462fbf
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readthedocs/docs/contest/case-draw.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
================================================================================
DRAW: Voting Result Ends in Tie
================================================================================


.. todo::

This section will be describied later.
9 changes: 9 additions & 0 deletions readthedocs/docs/contest/case-sync.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
================================================================================
Sync
================================================================================


.. todo::

This section will be describied later.

66 changes: 66 additions & 0 deletions readthedocs/docs/contest/case-voting-failure-timeout.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
================================================================================
Voting Failure: Timeout
================================================================================

INIT Stage
--------------------------------------------------------------------------------

:Under situation:

* Suffrage group members votes for INIT stage.
* Some of nodes does not offer the INIT ballot,
* The number of these nodes is over *blocking number*.
* Timed out in a given time, each node fails to get enough ballots for INIT stage.

.. note::
.. glossary::
*blocking number*

In voting, to reach a majority for YES, the YES ballots must be over
threshold. *blocking number* is the minimum number to prevent to reach the majority. For example,

* there are 4 total voters,
* threshold for majority is 3,

At this condition, *blocking number* is 2. Simply to say,

.. code-block:: none
blocking number = <voters> - <threshold> + 1
:Expected actions:

* Each node stops the consensus process and changes it's state to *Joining*.
* Each node will request *VoteProof* to the others.


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.


SIGN, ACCEPT Stages
--------------------------------------------------------------------------------

:Under situation:

* Suffrage group members votes for SIGN stage.
* Some of nodes in **acting suffrage group** does not offer the SIGN ballot.
* Timed out in a given time, each node fails to get enough ballots for SIGN
stage.

:Expected actions:

* Each node stops the current vote,
* Each node broadcasts next INIT ballots for next round.
7 changes: 7 additions & 0 deletions readthedocs/docs/contest/cases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
Cases
================================================================================

Contest is written for simulating and testing ISAAC+ consensus protocol, to
find the missing points and wrong concepts. In this section, the various kind
of situations and cases will be tested by contest.

.. toctree::
:maxdepth: 1


/docs/contest/case-custom-policy
/docs/contest/case-voting-failure-timeout
/docs/contest/case-draw
/docs/contest/case-sync

0 comments on commit 8462fbf

Please sign in to comment.