Skip to content

Commit

Permalink
Limiting the terms reached by ProposeVote (#6535)
Browse files Browse the repository at this point in the history
  • Loading branch information
heidihoward authored Oct 7, 2024
1 parent 261602d commit 9e7fb2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tla/consensus/MCccfraft.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONSTANTS
Servers <- ToServers

Timeout <- MCTimeout
RcvProposeVoteRequest <- MCRcvProposeVoteRequest
Send <- MCSend
ClientRequest <- MCClientRequest
SignCommittableMessages <- MCSignCommittableMessages
Expand Down
5 changes: 5 additions & 0 deletions tla/consensus/MCccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ MCTimeout(i) ==
/\ Cardinality({ s \in GetServerSetForIndex(i, commitIndex[i]) : leadershipState[s] = Candidate}) < 1
/\ CCF!Timeout(i)

\* Limit the number of terms that can be reached
MCRcvProposeVoteRequest(i, j) ==
/\ currentTerm[i] < StartTerm + TermCount
/\ CCF!RcvProposeVoteRequest(i, j)

\* Limit number of requests (new entries) that can be made
MCClientRequest(i) ==
\* Allocation-free variant of Len(SelectSeq(log[i], LAMBDA e: e.contentType = TypeEntry)) <= RequestCount
Expand Down

0 comments on commit 9e7fb2d

Please sign in to comment.