Skip to content
/ vsr-rs Public
forked from penberg/vsr-rs

Viewstamped Replication for Rust

License

Notifications You must be signed in to change notification settings

seroze/vsr-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Normal operation
  • State transfer
  • 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:

About

Viewstamped Replication for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%