TLA+ verified Raft consensus
-
Download and install TLA+ toolbox
-
Download and install sedeve-kit
git clone https://github.com/scuptio/sedeve-kit.git cd sedeve-kit cargo install --path .
Model setup, filling constant
Constant example MC
After checking finish, output state database.
Use the state database the toolbox output, generate trace file.
Example,
cd scupt-raft
sedeve_trace_gen \
--state-db-path /tmp/raft_action.db \
--out-trace-db-path /tmp/raft_trace.db \
--map-const-path ./data/raft_map_const.json
After finish executing, the output trace would be store in database file '/tmp/raft_trace.db'
Write test code
Example test_raft.rs
cd docker
docker build .