{"id":23658469,"url":"https://github.com/wrongbyte/rust-paxos","last_synced_at":"2025-10-09T00:41:43.386Z","repository":{"id":265508448,"uuid":"894780762","full_name":"wrongbyte/rust-paxos","owner":"wrongbyte","description":"✨ (WIP) Implementation of multi-decree Paxos algorithm in Rust, for learning purposes.","archived":false,"fork":false,"pushed_at":"2025-08-26T19:27:15.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T07:48:11.261Z","etag":null,"topics":["consensus","consensus-algorithm","distributed-systems","paxos"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wrongbyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-11-27T01:22:12.000Z","updated_at":"2025-08-26T19:27:19.000Z","dependencies_parsed_at":"2024-12-28T22:19:23.858Z","dependency_job_id":"d4f78577-468c-4d34-a038-f9d1eeedde4a","html_url":"https://github.com/wrongbyte/rust-paxos","commit_stats":null,"previous_names":["wrongbyte/silly-paxos-rust","wrongbyte/rust-paxos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wrongbyte/rust-paxos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrongbyte%2Frust-paxos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrongbyte%2Frust-paxos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrongbyte%2Frust-paxos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrongbyte%2Frust-paxos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wrongbyte","download_url":"https://codeload.github.com/wrongbyte/rust-paxos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrongbyte%2Frust-paxos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000640,"owners_count":26082879,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","consensus-algorithm","distributed-systems","paxos"],"created_at":"2024-12-29T00:16:42.063Z","updated_at":"2025-10-09T00:41:43.365Z","avatar_url":"https://github.com/wrongbyte.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"### [Paxos made simple](https://lamport.azurewebsites.net/pubs/paxos-simple.pdf)\n\nTo run, first setup the environment by running `nix develop` in the root of the repository, or allow `direnv` to do it automatically if you have it installed in your machine.\n\nNow run `run`.\nYou can use the arguments `--nodes` and `rounds` to specify a custom number of nodes and rounds for the simulation. Run `--help` to see the available commands.\n\n### Architecture\nThis is a kind of simplified version of Paxos, so for now it does not support multiple proposers and learners. It also implies that the algorithm will halt if there's no proposer os learner (which is, if their nodes die in the process).\n\nIn this implementation, the proposer performs the roles of both the proposer and learner, being the \"leader\" of the round, as stated in the \"Paxos made simple\" paper:\n\n\u003e The algorithm chooses a leader, which plays the roles of the distinguished proposer and the distinguished learner. \n\n```mermaid\nsequenceDiagram\n    participant Proposer\n    participant Acceptor\n    participant Learner\n\n    Proposer-\u003e\u003eAcceptor: Prepare(n)\n    Acceptor--\u003e\u003eProposer: Promise(n, v) (highest seen n and value)\n    Proposer-\u003e\u003eAcceptor: Accept(n, v) (proposed value)\n    Acceptor--\u003e\u003eProposer: Accepted(n, v)\n    Acceptor--\u003e\u003eLearner: Learn(v) (accepted value)\n    Learner--\u003e\u003eProposer: Acknowledged\n```\n\nTODO\n\n- [ ] auto format on pre-commit\n- [ ] set up sqlite database\n- [ ] handle `Lagged` error in broadcast. Congestion window?\n- [ ] store node ids (in case some node dies, etc)\n- [ ] decouple code\n- [ ] allow more learners\n- [ ] allow more proposers\n- [ ] remove `expect`s and `unwrap`s and improve code in general\n- [ ] use a generic interface to allow nodes to rotate positions, so that for each \"round\" nodes can be assigned different roles instead of fixed acceptors and proposers. Idk about learners\n- [ ] distributed fibonacci\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrongbyte%2Frust-paxos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwrongbyte%2Frust-paxos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrongbyte%2Frust-paxos/lists"}