{"id":19830763,"url":"https://github.com/crytic/whipstaff","last_synced_at":"2025-02-28T17:25:54.821Z","repository":{"id":43531821,"uuid":"194321904","full_name":"crytic/whipstaff","owner":"crytic","description":"A specification of the CBC Casper consensus protocols written in TLA+ and PlusCal (transpiled to TLA+)","archived":false,"fork":false,"pushed_at":"2019-08-12T15:12:49.000Z","size":31,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-11T09:51:44.768Z","etag":null,"topics":["casper","cbc","consensus-protocol"],"latest_commit_sha":null,"homepage":"","language":"TLA","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/crytic.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}},"created_at":"2019-06-28T19:05:46.000Z","updated_at":"2024-12-11T09:07:43.000Z","dependencies_parsed_at":"2022-07-10T18:20:23.348Z","dependency_job_id":null,"html_url":"https://github.com/crytic/whipstaff","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/crytic%2Fwhipstaff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fwhipstaff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fwhipstaff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fwhipstaff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crytic","download_url":"https://codeload.github.com/crytic/whipstaff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241190093,"owners_count":19924969,"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":["casper","cbc","consensus-protocol"],"created_at":"2024-11-12T11:25:17.854Z","updated_at":"2025-02-28T17:25:54.795Z","avatar_url":"https://github.com/crytic.png","language":"TLA","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whipstaff\n\nA specification of the [CBC Casper consensus protocols](https://github.com/cbc-casper/cbc-casper-paper) written in TLA+ and PlusCal (transpiled to TLA+). Currently using one member of this family of protocols, the binary consensus protocol, as an example.\n\n\n\n### Implementation Notes\n\n- Message authentication is not included in this specification due to the assumption that the validators can verify the authenticity and source of messages\n- This specification has the assumption that all messages are being successfully sent and received without time delay.\n- In this specification, equivocating validators take different subsets of all messages received, use the subsets to obtain and estimate, and send different messages to different validators.\n- The validator weights and byzantine threshold can be real numbers but they are specified as integers in this specification.\n- A temporal property `check_safety_with_oracle` checks whether finality has been reached by checking for the existence of an e-clique with a clique oracle.\n\n\n\n### How To Run This?\n\n1. Obtain [The TLA Toolbox](https://lamport.azurewebsites.net/tla/toolbox.html)\n\n2. Open the .tla file in the toolbox and build a model\n\n3. Select the desired invariants and properties to check in 'Model Overview' \n\n4. Specify the values of the constants\n\n   - validators: a range of integers from 1 to N (number of validators), inclusive\n\n   - consensus_values: a range of integers from 0 to 1, inclusive (for a binary consensus protocol)\n\n   - defaultInitValue: [ model value ]\n\n   - validator_weights: a tuple of length N specifying the weight of each validator, which are integers\n\n   - validator_initial_values: a tuple of length N specifying the initial estimate of each validator when no messages have been received\n\n   - byzantine_threshold: an integer less than the sum of the  weight of all the validators\n\n   - byzantine_fault_nodes: a set containing the names of equivocating validators\n\n   - message_ids: an integer specifying the maximum number of messages sent\n\n     Example: \n\n     ```\n     validators \u003c- 1..3\n     consensus_values \u003c- 0..1\n     defaultInitValue \u003c- [ model value ]\n     validator_weights \u003c- \u003c\u003c334, 333, 333\u003e\u003e\n     validators_initial_values \u003c- \u003c\u003c1, 0, 1\u003e\u003e\n     byzantine_threshold \u003c- 334\n     byzantine_fault_nodes \u003c- {1}\n     message_ids \u003c- 8\n     ```\n\n\n\n### Results\n\nFinality cannot be reached when more than one-third of the validators by weight are equivocating. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fwhipstaff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrytic%2Fwhipstaff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fwhipstaff/lists"}