{"id":32618015,"url":"https://github.com/timyiu478/dolev-strong-protocol","last_synced_at":"2025-10-30T17:50:51.663Z","repository":{"id":313442729,"uuid":"1043626618","full_name":"timyiu478/dolev-strong-protocol","owner":"timyiu478","description":"A State Machine Replication built on top of Dolev-Strong Authenticated Broadcast Protocol","archived":false,"fork":false,"pushed_at":"2025-09-06T04:27:33.000Z","size":30091,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T05:37:27.305Z","etag":null,"topics":["byzantine-broadcast","consensus","distributed-systems","pki","protocol","simulation","state-machine-replication","synchrony"],"latest_commit_sha":null,"homepage":"","language":"Python","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/timyiu478.png","metadata":{"files":{"readme":"README.md","changelog":"history/0.txt","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":"2025-08-24T09:16:19.000Z","updated_at":"2025-09-06T04:27:36.000Z","dependencies_parsed_at":"2025-09-06T05:52:03.338Z","dependency_job_id":null,"html_url":"https://github.com/timyiu478/dolev-strong-protocol","commit_stats":null,"previous_names":["timyiu478/dolev-strong-protocol"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/timyiu478/dolev-strong-protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timyiu478%2Fdolev-strong-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timyiu478%2Fdolev-strong-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timyiu478%2Fdolev-strong-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timyiu478%2Fdolev-strong-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timyiu478","download_url":"https://codeload.github.com/timyiu478/dolev-strong-protocol/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timyiu478%2Fdolev-strong-protocol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281853675,"owners_count":26573095,"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-30T02:00:06.501Z","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":["byzantine-broadcast","consensus","distributed-systems","pki","protocol","simulation","state-machine-replication","synchrony"],"created_at":"2025-10-30T17:50:50.430Z","updated_at":"2025-10-30T17:50:51.657Z","avatar_url":"https://github.com/timyiu478.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\n\nThis repository shares my implementation of a toy state machine replication built on top of the dolev-strong protocol for educational purposes.\n\n---\n\n## Overall Design\n\n![](assets/overall_design.png)\n\n---\n\n## Repo Structure\n\n- **src/**: Contains the main source code for the protocol and state machine.\n- **main.py**: Run this script to start a protocol simulation.\n- **tests/**: Includes test cases for validating protocol correctness.\n- **assets/** \u0026 **recording/**: Visual resources for documentation and examples.\n\n---\n\n## Example Run\n\n### Understand The Output\n\nThe program will output the register value and history(append-only log) of each honest node for each dolev-strong protocol cycle(or epoch). We should see that all honest nodes have the same register value and history at the end of each cycle.\n\n```bash\nNode 0's register value is 0\nNode 0's history is []\nNode 3's register value is 0\nNode 3's history is []\n```\n\n### Attack Strategies\n\n- non-sender: does not participate in the protocol\n- sender: \n    - sometime, send value $v1$ to half of the non-senders and send value $v2$ to another half of the non-senders\n    - sometime, it follows the protocol correctly (it acts as an honest node)\n\n### Case 1: 2 Honest Nodes, 2 Faulty Nodes, 1 is the sender and 1 is the non-sender, fixed leader mode\n\n![2_f_n_1_sender.gif](recording/2_faulty_node_1_sender_1_non_sender.gif)\n\n### Case 2: 2 Honest Nodes, 2 Faulty Nodes, both are non-senders, fixed leader mode\n\n![2_f_n_both_non_senders.gif](recording/2_faulty_node_2_non_senders.gif)\n\n### Case 3: 2 Honest Nodes, 2 Faulty Nodes, round-robin leader election mode\n\n![rr_leader_election.gif](recording/round_robin_leader_election.gif)\n\nOccasionally, the register values of honest nodes may differ, but their histories remain identical because the executor has not yet applied the latest record.\n\n---\n\n## Dolev-Strong protocol\n\nThe dolev-Strong protocol is an authenticated protocol for solving broadcast, against any adversary controlling *t\u003cn* out of *n* parties, in *t+1* rounds.\n\n### Assumptions\n\n1. **Permissioned**: a prior known set of nodes $\\{1, 2, 3, ..., n\\}$.\n1. **Public Key Infrastructure**: each node has a pair of $pk_i$, $sk_i$ where $pk_i$ is known to all nodes upfront.\n1. **Synchronous Network**: \n    1. all nodes share a global clock, time steps from $\\{0, 1, 2, ...\\}$.\n    1. the message sent from time $t$ will be arrived at time $t+1$ (in some arbitrary order).\n1. **Node Failure**: there are $f$ number of nodes that can be byzantine.\n\n---\n\n## References\n\n1. https://decentralizedthoughts.github.io/2019-12-22-dolev-strong/\n1. https://www.cs.umd.edu/~jkatz/gradcrypto2/NOTES/lecture26.pdf\n1. https://elaineshi.com/docs/blockchain-book.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimyiu478%2Fdolev-strong-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimyiu478%2Fdolev-strong-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimyiu478%2Fdolev-strong-protocol/lists"}