{"id":16877062,"url":"https://github.com/penberg/vsr-rs","last_synced_at":"2025-03-22T07:31:52.497Z","repository":{"id":62302184,"uuid":"558741332","full_name":"penberg/vsr-rs","owner":"penberg","description":"Viewstamped Replication for Rust","archived":false,"fork":false,"pushed_at":"2023-05-06T09:07:23.000Z","size":74,"stargazers_count":67,"open_issues_count":5,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-18T09:21:47.981Z","etag":null,"topics":["consensus","distributed-systems","rust","viewstamped-replication"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/penberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-28T07:33:45.000Z","updated_at":"2025-03-07T22:44:50.000Z","dependencies_parsed_at":"2024-10-13T15:41:32.363Z","dependency_job_id":null,"html_url":"https://github.com/penberg/vsr-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penberg%2Fvsr-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penberg%2Fvsr-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penberg%2Fvsr-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penberg%2Fvsr-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/penberg","download_url":"https://codeload.github.com/penberg/vsr-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244925178,"owners_count":20532873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consensus","distributed-systems","rust","viewstamped-replication"],"created_at":"2024-10-13T15:41:28.002Z","updated_at":"2025-03-22T07:31:52.082Z","avatar_url":"https://github.com/penberg.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Viewstamped Replication for Rust\n\nThis is a _work-in-progress_ Rust implementation of the Viewstamped Replication consensus algorithm.\n\n## Getting Started\n\nRun the example:\n\n```console\ncargo run --example example\n```\n\nTo see some debug traces, use `RUST_LOG` environment variable:\n\n```console\nRUST_LOG=trace cargo run --example example\n```\n\n## ToDo\n\n* [x] Normal operation\n* [x] State transfer\n* [x] Deterministic simulator\n* [ ] View changes \n* [ ] Failed replica recovery\n* [ ] Reconfiguration\n\n## Testing\n\nYou can run the tests with:\n\n```console\ncargo test -- --nocapture\n```\n\nThe run will print out a *seed* value such as:\n\n```console\nSeed: 10693013600028533629\n```\n\nIf the simulation triggers a problem, you can reproduce the exact same run by passing a seed to the simulator:\n\n```console\nSEED=10693013600028533629 cargo test -- --nocapture\n```\n\nYou can also increase logging level to see more output of the run with:\n\n```console\nRUST_LOG=debug cargo test\n```\n\nYou can get a test coverage report with:\n\n```console\ncargo tarpaulin -o html\n```\n\n## References\n\nThe implementation of `vsr-rs` is based on the paper [Viewstamped Replication Revisited](https://pmg.csail.mit.edu/papers/vr-revisited.pdf) by Liskov and Cowling.\nHowever, the algorithm in the paper has the following known bugs:\n\n* The recovery algorithm described in Section 4.3 can result in the system being in an inconsistent state as reported by Michael et al in Appendix B1 of [Recovering Shared Objects Without Stable Storage](https://drkp.net/papers/recovery-tr17.pdf)\n* The state transfer algorithm described in Section 5.2 can cause data loss as discovered by Jack Vanlightly in https://twitter.com/vanlightly/status/1596190819421413377 and https://twitter.com/vanlightly/status/1596425599026970624.\n\nThe `vsr-rs` library does not yet implement recovery or view changes so the bugs are not addressed.\n\nFor more information on VSR, please also check out the following presentations and blog posts:\n\n* [Paper: VR Revisited - An analysis with TLA+](https://jack-vanlightly.com/analyses/2022/12/20/vr-revisited-an-analysis-with-tlaplus)\n* [Reading Group: Viewstamped Replication Revisited](http://charap.co/reading-group-viewstamped-replication-revisited/)\n* [Viewstamped Replication explained](https://blog.brunobonacci.com/2018/07/15/viewstamped-replication-explained/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenberg%2Fvsr-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpenberg%2Fvsr-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenberg%2Fvsr-rs/lists"}