forked from aosabook/500lines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:aosabook/500lines
Conflicts: README.md
- Loading branch information
Showing
20 changed files
with
971 additions
and
95 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
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
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,11 +1,19 @@ | ||
from collections import namedtuple | ||
|
||
Proposal = namedtuple('Proposal', ['caller', 'cid', 'input']) | ||
Ballot = namedtuple('Ballot', ['n', 'leader']) | ||
Ballot = namedtuple('Ballot', ['viewid', 'n', 'leader']) | ||
ScoutId = namedtuple('ScoutId', ['address', 'ballot_num']) | ||
CommanderId = namedtuple('CommanderId', ['address', 'slot', 'proposal']) | ||
ViewChange = namedtuple('ViewChange', ['viewid', 'peers']) | ||
|
||
HEARTBEAT_INTERVAL = 0.5 | ||
JOIN_RETRANSMIT = 0.2 | ||
REPROPOSE_INTERVAL = 0.7 | ||
HEARTBEAT_GONE_COUNT = 3 | ||
JOIN_RETRANSMIT = 0.7 | ||
CATCHUP_INTERVAL = 0.6 | ||
ACCEPT_RETRANSMIT = 1 | ||
PREPARE_RETRANSMIT = 1 | ||
ALPHA = 10 | ||
|
||
# replicas should be able to re-propose a view change before the new node | ||
# re-transmits the JOIN | ||
assert CATCHUP_INTERVAL < JOIN_RETRANSMIT |
Oops, something went wrong.