{"id":51509491,"url":"https://github.com/murphsicles/vsr","last_synced_at":"2026-07-08T04:30:56.427Z","repository":{"id":363015051,"uuid":"1261658743","full_name":"murphsicles/vsr","owner":"murphsicles","description":"@consensus/vsr — Viewstamped Replication consensus for Zeta","archived":false,"fork":false,"pushed_at":"2026-06-07T02:38:49.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-07T03:40:52.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/murphsicles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T01:39:35.000Z","updated_at":"2026-06-07T01:44:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/murphsicles/vsr","commit_stats":null,"previous_names":["murphsicles/vsr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/murphsicles/vsr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fvsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fvsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fvsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fvsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murphsicles","download_url":"https://codeload.github.com/murphsicles/vsr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fvsr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35252324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"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":[],"created_at":"2026-07-08T04:30:55.912Z","updated_at":"2026-07-08T04:30:56.417Z","avatar_url":"https://github.com/murphsicles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# vsr — Viewstamped Replication consensus for Zeta\n\n**Namespace:** `@consensus/vsr`\n\nViewstamped Replication (VSR) consensus protocol implementation.\nReplica state machine, view change, prepare/commit log replication,\nand quorum-based fault tolerance.\n\n## Protocol\n\n```\nClient → Primary: REQUEST\nPrimary → Followers: PREPARE\nFollowers → Primary: PREPARE_OK\nPrimary → All: COMMIT (after quorum)\nPrimary → Client: REPLY\n\nOn failure:\nFollower → All: START_VIEW_CHANGE\nCandidates → All: DO_VIEW_CHANGE\nNew Primary → All: START_VIEW\n```\n\n## Key structs\n\n| Struct | Purpose |\n|--------|---------|\n| `Replica` | Core state machine (view, role, op, commit) |\n| `LogEntry` | Prepared operation with checksum |\n| `Prepare` | Primary-to-follower replication message |\n| `ViewChangeState` | View change tracking |\n\n## API\n\n- `Replica_new(id, cluster_size)` — create replica\n- `on_request(request, client)` — process client request on primary\n- `on_prepare(prepare)` — follower receives prepare\n- `on_prepare_ok(sender, slot, view)` — primary counts votes\n- `start_view_change()` — initiate view change\n- `do_view_change(new_view, log, sender)` — cast vote\n- `start_view(new_view, op, commit)` — accept new view\n\n## License\n\nMIT — The Zeta Foundation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fvsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurphsicles%2Fvsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fvsr/lists"}