github.com/aakash4dev/cometbft@v0.38.2/spec/light-client/accountability/MC_n4_f2_amnesia.tla (about) 1 ---------------------- MODULE MC_n4_f2_amnesia ------------------------------- 2 EXTENDS Sequences 3 4 CONSTANT 5 \* @type: $round -> $process; 6 Proposer 7 8 \* the variables declared in TendermintAcc3 9 VARIABLES 10 \* @type: $process -> $round; 11 round, \* a process round number: Corr -> Rounds 12 \* @type: $process -> $step; 13 step, \* a process step: Corr -> { "PROPOSE", "PREVOTE", "PRECOMMIT", "DECIDED" } 14 \* @type: $process -> $value; 15 decision, \* process decision: Corr -> ValuesOrNil 16 \* @type: $process -> $value; 17 lockedValue, \* a locked value: Corr -> ValuesOrNil 18 \* @type: $process -> $round; 19 lockedRound, \* a locked round: Corr -> RoundsOrNil 20 \* @type: $process -> $value; 21 validValue, \* a valid value: Corr -> ValuesOrNil 22 \* @type: $process -> $round; 23 validRound, \* a valid round: Corr -> RoundsOrNil 24 \* @type: $round -> Set($proposeMsg); 25 msgsPropose, \* PROPOSE messages broadcast in the system, Rounds -> Messages 26 \* @type: $round -> Set($preMsg); 27 msgsPrevote, \* PREVOTE messages broadcast in the system, Rounds -> Messages 28 \* @type: $round -> Set($preMsg); 29 msgsPrecommit, \* PRECOMMIT messages broadcast in the system, Rounds -> Messages 30 \* @type: Set($proposeMsg); 31 evidencePropose, \* the PROPOSE messages used by some correct processes to make transitions 32 \* @type: Set($preMsg); 33 evidencePrevote, \* the PREVOTE messages used by some correct processes to make transitions 34 \* @type: Set($preMsg); 35 evidencePrecommit, \* the PRECOMMIT messages used by some correct processes to make transitions 36 \* @type: $action; 37 action \* we use this variable to see which action was taken 38 39 \* the variable declared in TendermintAccTrace3 40 VARIABLE 41 \* @type: $trace; 42 toReplay 43 44 INSTANCE TendermintAccTrace_004_draft WITH 45 Corr <- {"c1", "c2"}, 46 Faulty <- {"f3", "f4"}, 47 N <- 4, 48 T <- 1, 49 ValidValues <- { "v0", "v1" }, 50 InvalidValues <- {"v2"}, 51 MaxRound <- 2, 52 Trace <- << 53 "UponProposalInPropose", 54 "UponProposalInPrevoteOrCommitAndPrevote", 55 "UponProposalInPrecommitNoDecision", 56 "OnRoundCatchup", 57 "UponProposalInPropose", 58 "UponProposalInPrevoteOrCommitAndPrevote", 59 "UponProposalInPrecommitNoDecision" 60 >> 61 62 \* run Apalache with --cinit=ConstInit 63 ConstInit == \* the proposer is arbitrary -- works for safety 64 Proposer \in [Rounds -> AllProcs] 65 66 =============================================================================