Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing index into Configurations in MCccfraft.tla #5779

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tla/consensus/MCccfraft.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ INVARIANTS
MatchIndexLowerBoundNextIndexInv
CommitCommittableIndices
CommittableIndicesAreKnownSignaturesInv
\* DebugAllReconfigurationsReachableInv
\* DebugInvLeaderCannotStepDown
\* DebugInvAnyCommitted
\* DebugInvAllCommitted
Expand Down
15 changes: 12 additions & 3 deletions tla/consensus/MCccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ CCF == INSTANCE ccfraft
\* In addition to basic settings of how many nodes are to be model checked,
\* the model allows to place additional limitations on the state space of the program.
MCChangeConfigurationInt(i, newConfiguration) ==
/\ reconfigurationCount < Len(Configurations)-1
/\ reconfigurationCount < Len(Configurations)
\* +1 because TLA+ sequences are 1-index
\* +1 to lookup the *next* and not the current configuration.
/\ newConfiguration = Configurations[reconfigurationCount+2]
/\ newConfiguration = Configurations[reconfigurationCount+1]
/\ CCF!ChangeConfigurationInt(i, newConfiguration)

\* Limit the terms that can be reached. Needs to be set to at least 3 to
Expand Down Expand Up @@ -102,6 +101,16 @@ View == << reconfigurationVars, <<messages, commitsNotified>>, serverVars, candi

----

AllReconfigurationsCommitted ==
\E s \in ToServers:
\A c \in ToSet(Configurations):
\E i \in DOMAIN Committed(s):
/\ HasTypeReconfiguration(Committed(s)[i])
/\ Committed(s)[i].configuration = c

DebugAllReconfigurationsReachableInv ==
~AllReconfigurationsCommitted

\* Returns true if server i has committed value v, false otherwise
IsCommittedByServer(v,i) ==
IF commitIndex[i] = 0
Expand Down
3 changes: 2 additions & 1 deletion tla/consensus/MCccfraftWithReconfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONSTANTS
Configurations <- 3Configurations
Servers <- ToServers

MaxTermLimit = 2
MaxTermLimit = 3
MaxCommitsNotified = 2

Timeout <- MCTimeout
Expand Down Expand Up @@ -78,6 +78,7 @@ INVARIANTS
MatchIndexLowerBoundNextIndexInv
CommitCommittableIndices
CommittableIndicesAreKnownSignaturesInv
DebugAllReconfigurationsReachableInv
\* DebugInvLeaderCannotStepDown
\* DebugInvAnyCommitted
\* DebugInvAllCommitted
Expand Down
Loading