stateright
A model checker for implementing distributed systems.
0.31.0
14M downloads/mo
#2532 most downloaded on crates.io
stateright/stateright
What this package is like to depend on
Last release 1 years ago
27 Jul 2025
Release timing varies
gaps range from 9 days to 1.2 years
Some releases are documented
notes for 11 of 44 stable releases
8 versions withdrawn
withdrawn after publishing
8 years old
52 releases · first in 2018
0 releases in the last 12 months
see the full history below
Release timeline
52 releases · Jul 2018 to Jul 2025Releases
latest 52-
0.31.027 Jul 2025Release notes
Open source →Andrew Jeffery [email protected]
- Simplify how checker waits for shutdown.
- Panic on property name collision.
cjen1 [email protected]
- Fix bug in eventually property checker.
Jonathan Nadal [email protected]
- Address nondeterministic test.
Liangrun Da [email protected]
- Add Raft protocol example.
Maurice Lam [email protected]
- Add support for random selection.
- Add an example of a last writer wins register demonstrating random selection.
Peiyang He [email protected]
- Adding missing fields to
ActorModelStateequality/serialization and correct field name typo. - Correct typos in docs.
- Add support for actor recovery and storage.
- Fix bug in Explorer.
- Update Explorer to use action index rather than state digests to reference a behavior, making the URLs more stable.
-
0.30.203 Jun 2024Release notes
Open source →Andrew Jeffery [email protected]
- Add ability to define when checking finishes via
HasDiscoveries. - Add optional checker timeout.
D. Reusche [email protected]
- Add
interaction.rsexample.
Liangrun Da [email protected]
- Fix handling of non-unique states for unordered duplicating networks.
- Add ability to define when checking finishes via
-
0.30.127 Aug 2023Release notes
Open source →Andrew Jeffery [email protected]
- Cleanly handle panics during model checking.
- Leverage
tiny_httpfor Explorer. - Print fingerprint path for discoveries in default report.
- Add names to actors and show in Explorer.
- Introduce simulation checker.
Jonathan Nadal [email protected]
- Fix unintentional spin-wait loop in real-world runtime (
spawn). - Fix nondeterministic test result.
remzi [email protected]
- Simplify
DGraph(used by tests) by eliminating unnecessary cloning.
-
0.30.028 May 2023Release notes
Open source →Notable changes follow, grouped by author.
Andrea Stedile [email protected]
- Support crash failures.
Andrew Jeffery [email protected]
- Enhance how properties are displayed in the Explorer UI.
- Introduce an "on-demand" checker for Explorer.
- Introduce depth tracking and max depth checking.
- Introduce named timers.
- Sort discoveries.
- Introduce a
join_and_reportmethod to reduce time overestimation.
David Rusu [email protected]
- Fix a bug in the new on-demand checker.
Jonathan Nadal [email protected]
- Address a bug for ordered network checking that would result in not exploring the complete state space. Thank you to Andrea Stedile for identifying this problem.
Wink Saville [email protected]
- Improve
tcpdumpusage details in the examples.
-
0.29.019 Mar 2022Release notes
Open source →This release adds support for symmetry reduction, courtesy of Chris Jensen (
@Cjen1on GitHub). It also introduces the ability to choose network semantics, which can be helpful for reducing the state space. Options are: ordered, unordered duplicating, and unordered non-duplicating.DuplicatingNetworkwas removed in favor of capturing that aspect via the newNetworktype, enabling the library to leverage the most efficient data structure for each particular use case. -
0.28.022 May 2021Release notes
Open source →Stateright now distinguishes between the number of states (including regenerated) and the number of unique states. To facilitate this,
Checker::generated_counthas been removed in favor ofstate_countandunique_state_countmethods. -
0.27.111 May 2021Release notes
Open source →This release introduces the ability to quickly navigate forward/backward along a path using
down/uporj/k. -
0.27.009 May 2021Release notes
Open source →This release introduces multiple enhancements for Stateright Explorer. Explorer now shows ignored actions. It also has labels for previous/next states that match the current state. Arguably the biggest improvement is that Explorer now shows all properties (not just properties with discoveries) and explains the checker outcomes for each property. There are also some minor styling changes in the UI.
Another small improvement is that
ActorModelnow overrides rendering of theDeliveraction with a more concise/intuitive representation.While preparing an example for a revised screenshot, I accidentally created a model with unwanted nondeterminism: my model depended on iteration order, which in turn depended upon a random seed. Root causing took a long time, so I improved the error message that shows when the checker detects unwanted nondetermism to make similar mistakes easier to debug in the future.
-
0.26.101 May 2021Release notes
Open source →This release introduces a
PathRecordervisitor and aVectorClockutility type. It also adds anActorimplementation forVec<(Id, Msg)>for any message typeMsg, which can be used as a simple client actor for exercising a system. -
0.26.005 Apr 2021Release notes
Open source →RegisterActor::Clientnow has aput_countfield that indicates how manyRegisterMsg::Puts to perform before issuing aRegisterMsg::Get. -
0.25.003 Apr 2021Release notes
Open source →I was recently asked where linearizability was specified in the actor examples. The answer was
RegisterCfg::into_model, but this question provided useful feedback: the existing structure was hiding information important for understanding each model.This release addresses that gap by removing
RegisterCfg. Instead the actor examples fully specify theirActorModels. This requirement is made less verbose by introducing two helpers,RegisterMsg::record_invocationsandRegisterMsg::record_returns.Here is a representative example prior to this release:
RegisterCfg { client_count: 2, servers: vec![ PaxosActor { peer_ids: model_peers(0, 3) }, PaxosActor { peer_ids: model_peers(1, 3) }, PaxosActor { peer_ids: model_peers(2, 3) }, ], } .into_model() .duplicating_network(DuplicatingNetwork::No) .within_boundary(within_boundary) .checker()As mentioned above,
RegisterCfg::into_modelwas implemented inside the library, thereby inadvertantly hiding important details about the resulting model. Furthermore,within_boundarylacked access to sufficient configuration:fn within_boundary<H>( _: &RegisterCfg<PaxosActor>, state: &ActorModelState<RegisterActor<PaxosActor>, H>) -> bool { state.actor_states.iter().all(|s| { if let RegisterActorState::Server(s) = &**s { s.ballot.0 <= 3 } else { true } }) }The new pattern is to introduce a model-specific configuration type, which has the added benefit of enabling additional model-specific parameters:
PaxosModelCfg { client_count: 2, server_count: 3, max_round: 3, } .into_model().checker()The same program would then specify a dedicated
into_model, thereby addressing the motivating question of this release. For example:impl PaxosModelCfg { fn into_model(self) -> ActorModel< RegisterActor<PaxosActor>, Self, LinearizabilityTester<Id, Register<Value>>> { ActorModel::new( self.clone(), LinearizabilityTester::new(Register(Value::default())) ) .actors((0..self.server_count) .map(|i| RegisterActor::Server(PaxosActor { peer_ids: model_peers(i, self.server_count), }))) .actors((0..self.client_count) .map(|_| RegisterActor::Client { server_count: self.server_count, })) .duplicating_network(DuplicatingNetwork::No) .property(Expectation::Always, "linearizable", |_, state| { state.history.serialized_history().is_some() }) .property(Expectation::Sometimes, "value chosen", |_, state| { for env in &state.network { if let RegisterMsg::GetOk(_req_id, value) = env.msg { if value != Value::default() { return true; } } } false }) .record_msg_in(RegisterMsg::record_returns) .record_msg_out(RegisterMsg::record_invocations) .within_boundary(|cfg, state| { state.actor_states.iter().all(|s| { if let RegisterActorState::Server(s) = &**s { s.ballot.0 <= cfg.max_round } else { true } }) }) } }The release also introduces a supporting
ConsistencyTestertrait generalizingLinearizabilityTesterandSequentialConsistencyTester. This new trait enables helpers (such asRegisterMsg::record_invocations) to be used with models expecting linearizability, sequential consistency, or other to-be-added consistency semantics. -
0.24.130 Mar 2021Nothing published for this version
-
0.24.030 Mar 2021Nothing published for this version
-
0.23.329 Mar 2021Nothing published for this version
-
0.23.217 Mar 2021Nothing published for this version
-
0.23.108 Mar 2021Nothing published for this version
-
0.23.022 Feb 2021Nothing published for this version
-
0.22.313 Feb 2021Nothing published for this version
-
0.22.207 Feb 2021Nothing published for this version
-
0.22.119 Jan 2021Nothing published for this version
-
0.22.016 Jan 2021Nothing published for this version
-
0.21.011 Jan 2021Nothing published for this version
-
0.20.102 Jan 2021Nothing published for this version
-
0.20.018 Dec 2020Nothing published for this version
-
0.19.012 Dec 2020Nothing published for this version
-
0.18.306 Dec 2020Nothing published for this version
-
0.18.205 Dec 2020Nothing published for this version
-
0.18.101 Dec 2020Nothing published for this version
-
0.18.023 Nov 2020Nothing published for this version
-
0.17.028 Sep 2020Nothing published for this version
-
0.16.028 Sep 2020Nothing published for this version
-
0.15.020 Sep 2020Nothing published for this version
-
0.14.014 Sep 2020Nothing published for this version
-
0.13.130 Aug 2020Nothing published for this version
-
0.13.005 Aug 2020Nothing published for this version
-
0.12.004 Aug 2020Nothing published for this version
-
0.11.227 Jul 2020Nothing published for this version
-
0.11.127 Jul 2020Nothing published for this version
-
0.11.027 Jul 2020Nothing published for this version
-
0.10.111 Jul 2020Nothing published for this version
-
0.10.011 Jul 2020Nothing published for this version
-
0.9.106 Jul 2020 withdrawnNothing published for this version
-
0.9.021 Jun 2020Nothing published for this version
-
0.8.008 Jun 2020Nothing published for this version
-
0.7.002 Jun 2020 withdrawnNothing published for this version
-
0.6.031 May 2020 withdrawnNothing published for this version
-
0.5.002 Feb 2020 withdrawnNothing published for this version
-
0.4.005 Jan 2020Nothing published for this version
-
0.3.023 Jun 2019 withdrawnNothing published for this version
-
0.2.013 Nov 2018 withdrawnNothing published for this version
-
0.1.006 Aug 2018 withdrawnNothing published for this version
-
0.0.012 Jul 2018 withdrawnNothing published for this version