/Tencent-Paxos-TLA

Specification of the consensus algorithm in Tencent storage system PaxosStore

Primary LanguageTLA

Tencent-Paxos-TLA+

A project of using TLA+ to model the consensus algorithm in the paper PaxosStore@VLDB2017 and the open-source Tencent/paxosstore.

Specification

TPaxos(the consensus algorithm above) is a variant of basic Paxos, and we uncover a crucial but sutble detail in TPaxos which is not fully clarified, called TPaxosAP. We establish refinement mapping from TPaxos to Voting and from TPaxosAP to EagerVoting(equivalent to Voting) to verify the correctness of TPaxos and TPaxosAP, Voting is a high-level spec in paper Byzantizing Paxos by Refinement.

TLA+ module

Refinement relation

Model Checking

There are three experiments we have made:

  • TPaxos and TPaxosAP satisfy Consistency.
  • TPaxos refines Voting, TPaxosAP refines EagerVoting.
  • EagerVoting refines Consensus.

TLC Parameters

  • Participant(Symmetry set): the set of all servers. e.g. {p1, p2, p3}
  • Value(Symmetry Set): the set of all value. e.g. {v1, v2}
  • Ballot(Redefine Nat): the set of ballot numbers. e.g. 0..2 or other bigger set

Invariants and Properties

  • Consistency: Invariant in model checking TPaxos and TPaxosAP satisfying Consistency.
  • SpecV => V!Spec: Properties in model checking refinement mapping.