This is a project of formal specifications built to gain intuition into various blockchain protocols. It uses Quint, a modern wrapper around TLA+.
- Exhaustive verification - Model checkers explore all possible states, not just test cases you thought of
- Find edge cases - Discover bugs in rare interleavings before they hit production
- Precise documentation - Specs are unambiguous, executable documentation
- Design validation - Verify protocol properties before writing code
npm install -g @informalsystems/quint| Spec | Description | Status |
|---|---|---|
| engine-api | Ethereum Engine API (CL/EL interaction) | |
| bft-voting | BFT quorum voting | |
| bft-proposal | BFT with leader proposal phase | |
| bft-locking | BFT with multi-round locking | |
| pbft | Practical BFT (3-phase protocol) |
make help # see all commands
make test # test all specs
make test SPEC=bft-voting # test one spec
make verify SPEC=pbft # verify safety properties
make run SPEC=bft-locking # random simulationThe BFT specs form a progression, each building on the previous:
- bft-voting - Why 2f+1 quorums guarantee agreement
- bft-proposal - Why BFT needs a leader to coordinate
- bft-locking - Why nodes must remember across rounds
- pbft - How the 3-phase protocol ties it together
- Create a new directory for your spec
- Include a
README.mdexplaining the protocol - Document safety properties and what they mean
- Quint README - How to write Quint specs
- Quint Documentation
- Quint GitHub