Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Tendermint safety and fork scenarios #13

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3ba7fff
copied the tendermint spec from tendermint-safety
Nov 4, 2019
6562a1f
renamed
Nov 4, 2019
c8ee6d5
starting on the fork scenarios
Nov 4, 2019
a747999
the spec by Zarko
Dec 10, 2019
964371e
removed oldEvents, as they are not used anymore
Dec 10, 2019
9f6c13e
fixed a few typos
Dec 10, 2019
9415b83
tuning the spec for model checking
Dec 20, 2019
38c9879
fixed the spec: there should be at least one execution where processe…
Dec 20, 2019
20d95bf
a few fixes
Dec 22, 2019
882a691
fixed the proposal and moved the fault logic
Dec 22, 2019
5f164bb
injecting faults before running consensus
Dec 23, 2019
f5a800d
bugfix in InsertFaultyProposalMessage
Dec 26, 2019
3d679ba
the specification that introduces faults in the initial state
Dec 28, 2019
d14fe56
split faults in three categories
Jan 7, 2020
87036f2
bugfix in StartRound + explicit NoEquivocation and Amnesia
Jan 12, 2020
f88869e
small fixes
Jan 14, 2020
576f427
wip: still working on an inductive invariant
Feb 7, 2020
3840d2a
the first inductive invariant
Feb 18, 2020
01492e5
tidying up the inductive invariants
Feb 19, 2020
be2b696
fixed the types
Feb 19, 2020
52902a8
moving things around
Mar 9, 2020
cab0784
refactored TendermintAccountabilityApa2 and made it modular
Mar 10, 2020
b33f19f
added the few missing transitions (important for liveness)
Mar 11, 2020
2da59c0
fixed the input parameters
Mar 11, 2020
71921a7
other configurations to check
Mar 11, 2020
df9683b
removed the old versions of the specs
Mar 18, 2020
6db2be3
the README
Mar 18, 2020
6cbd6d9
more benchmarks
Mar 19, 2020
2e9cff6
updated the script
Mar 20, 2020
493cb21
formalized the arguments
Mar 21, 2020
fbf4eb7
fixed the description a bit
Mar 29, 2020
e666522
fixed README too
Mar 29, 2020
ccaf2f0
copied the results
konnov Mar 29, 2020
5bd1554
fixed the script
konnov Mar 29, 2020
404a4e9
Merge branch 'igor/fork' of https://github.com/interchainio/verificat…
konnov Mar 29, 2020
3febe31
fixes after the dev session
Mar 31, 2020
9f0241c
new updates
konnov Apr 1, 2020
5e36d69
Merge branch 'igor/fork' of ssh://github.com/interchainio/verificatio…
konnov Apr 1, 2020
01268e2
link to the report
Apr 1, 2020
54dd976
updated results
konnov Apr 3, 2020
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
31 changes: 31 additions & 0 deletions spec/fork-cases/001indinv-apalache.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
no,filename,tool,timeout,init,inv,next,args
1,MC_n4_f1.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
2,MC_n4_f2.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
3,MC_n4_f3.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
4,MC_n5_f1.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
5,MC_n5_f2.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
6,MC_n7_f2.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
7,MC_n7_f3.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
8,MC_n7_f4.tla,apalache,10h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
9,MC_n10_f3.tla,apalache,24h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
10,MC_n10_f4.tla,apalache,24h,TypedInv,TypedInv,,--length=1 --cinit=ConstInit
11,MC_n4_f1.tla,apalache,10h,TypedInv,Agreement,,--length=0 --cinit=ConstInit
12,MC_n4_f2.tla,apalache,10h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
13,MC_n4_f3.tla,apalache,10h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
14,MC_n5_f1.tla,apalache,10h,TypedInv,Agreement,,--length=0 --cinit=ConstInit
15,MC_n5_f2.tla,apalache,10h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
16,MC_n7_f2.tla,apalache,10h,TypedInv,Agreement,,--length=0 --cinit=ConstInit
17,MC_n7_f3.tla,apalache,10h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
18,MC_n7_f4.tla,apalache,10h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
19,MC_n10_f3.tla,apalache,24h,TypedInv,Agreement,,--length=0 --cinit=ConstInit
20,MC_n10_f4.tla,apalache,24h,TypedInv,AgreementOrEquivocationOrAmnesia,,--length=0 --cinit=ConstInit
21,MC_n4_f1.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
22,MC_n4_f2.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
23,MC_n4_f3.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
24,MC_n5_f1.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
25,MC_n5_f2.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
26,MC_n7_f2.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
27,MC_n7_f3.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
28,MC_n7_f4.tla,apalache,10h,Init,TypedInv,,--length=0 --cinit=ConstInit
29,MC_n10_f3.tla,apalache,24h,Init,TypedInv,,--length=0 --cinit=ConstInit
30,MC_n10_f4.tla,apalache,24h,Init,TypedInv,,--length=0 --cinit=ConstInit
8 changes: 8 additions & 0 deletions spec/fork-cases/001indinv-apalache.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# a configuration file for apalache-tests/scripts/mk-run.py

[apalache-unstable]
more_args=

[apalache-card]
more_args=

26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n10_f3.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n10_f3 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3", "c4", "c5", "c6", "c7"},
Defective <- {} <: {STRING},
Byzantine <- {"f8", "f9", "f10"},
N <- 10,
T <- 3,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n10_f4.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n10_f4 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3", "c4", "c5", "c6"},
Defective <- {"f7"},
Byzantine <- {"f8", "f9", "f10"},
N <- 10,
T <- 3,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n4_f1.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n4_f1 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3"},
Defective <- {} <: {STRING},
Byzantine <- {"f1"},
N <- 4,
T <- 1,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n4_f2.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n4_f2 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2"},
Defective <- {"f3"},
Byzantine <- {"f4"},
N <- 4,
T <- 1,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n4_f3.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n4_f3 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1"},
Defective <- {"a2", "a3"},
Byzantine <- {"f4"},
N <- 4,
T <- 1,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n5_f1.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n5_f1 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3", "c4"},
Defective <- {} <: {STRING},
Byzantine <- {"f5"},
N <- 5,
T <- 1,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n5_f2.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n5_f2 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3"},
Defective <- {"a4"},
Byzantine <- {"f5"},
N <- 5,
T <- 1,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n7_f2.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n7_f2 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3", "c4", "c5"},
Defective <- {} <: {STRING},
Byzantine <- {"f6", "f7"},
N <- 7,
T <- 2,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n7_f3.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n7_f3 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3", "c4"},
Defective <- {"f5"},
Byzantine <- {"f6", "f7"},
N <- 7,
T <- 2,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
26 changes: 26 additions & 0 deletions spec/fork-cases/MC_n7_f4.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
----------------------------- MODULE MC_n7_f4 -------------------------------
CONSTANT Proposer \* the proposer function from 0..NRounds to 1..N

\* the variables declared in TendermintAcc3
VARIABLES
round, step, decision, lockedValue, lockedRound, validValue, validRound,
msgsPropose, msgsPrevote, msgsPrecommit, evidence

\* an operator for type annotations
a <: b == a

INSTANCE TendermintAccDebug3 WITH
Corr <- {"c1", "c2", "c3"},
Defective <- {"f4", "f5"},
Byzantine <- {"f6", "f7"},
N <- 7,
T <- 2,
ValidValues <- { "v0", "v1" },
InvalidValues <- {"v2"},
MaxRound <- 2

\* run Apalache with --cinit=ConstInit
ConstInit == \* the proposer is arbitrary -- works for safety
Proposer \in [Rounds -> AllProcs]

=============================================================================
Loading