GitXplorerGitXplorer
p

vsr-rs

public
64 stars
5 forks
5 issues

Commits

List of commits on branch main.
Unverified
64e6e31f185dc501b989b55ab7ca4ed49ab24ca9

Add send_msg_to_primary() helper

ppenberg committed 2 years ago
Unverified
e6bd6c216284536279ad6b1606dc868e8a85a0f9

Comment the normal operation flow some more

ppenberg committed 2 years ago
Unverified
104328de851a87c6b8e2a1f3532dae9519285d01

Move on_idle() definition

ppenberg committed 2 years ago
Unverified
e4d01cf495e94b539fe91cd9c836c8753ce17c4f

Drop mutex from Replica

ppenberg committed 2 years ago
Unverified
cd6a73b14ab1c21c6309144a0aad6a0f34e04a58

Drop mutex from Client

ppenberg committed 2 years ago
Unverified
81969057fa70a8ca02bae60c24920e15b6120699

Drop mutex from Config

ppenberg committed 2 years ago

README

The README file for this repository.

Viewstamped Replication for Rust

This is a work-in-progress Rust implementation of the Viewstamped Replication consensus algorithm.

Getting Started

Run the example:

cargo run --example example

To see some debug traces, use RUST_LOG environment variable:

RUST_LOG=trace cargo run --example example

ToDo

  • [x] Normal operation
  • [x] State transfer
  • [x] Deterministic simulator
  • [ ] View changes
  • [ ] Failed replica recovery
  • [ ] Reconfiguration

Testing

You can run the tests with:

cargo test -- --nocapture

The run will print out a seed value such as:

Seed: 10693013600028533629

If the simulation triggers a problem, you can reproduce the exact same run by passing a seed to the simulator:

SEED=10693013600028533629 cargo test -- --nocapture

You can also increase logging level to see more output of the run with:

RUST_LOG=debug cargo test

You can get a test coverage report with:

cargo tarpaulin -o html

References

The implementation of vsr-rs is based on the paper Viewstamped Replication Revisited by Liskov and Cowling. However, the algorithm in the paper has the following known bugs:

The vsr-rs library does not yet implement recovery or view changes so the bugs are not addressed.

For more information on VSR, please also check out the following presentations and blog posts: