{"id":20960423,"url":"https://github.com/anthdm/hbbft","last_synced_at":"2025-08-30T05:09:28.898Z","repository":{"id":49870427,"uuid":"133401283","full_name":"anthdm/hbbft","owner":"anthdm","description":"Practical implementation of the Honey Badger Byzantine Fault Tolerance consensus algorithm written in Go.","archived":false,"fork":false,"pushed_at":"2022-11-14T09:50:03.000Z","size":172,"stargazers_count":156,"open_issues_count":3,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-14T07:34:46.727Z","etag":null,"topics":["blockchain","consensus-algorithm","hbbft"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/anthdm.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":"2018-05-14T17:57:18.000Z","updated_at":"2025-05-01T10:09:07.000Z","dependencies_parsed_at":"2022-09-05T23:51:06.741Z","dependency_job_id":null,"html_url":"https://github.com/anthdm/hbbft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anthdm/hbbft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthdm%2Fhbbft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthdm%2Fhbbft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthdm%2Fhbbft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthdm%2Fhbbft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthdm","download_url":"https://codeload.github.com/anthdm/hbbft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthdm%2Fhbbft/sbom","scorecard":{"id":198736,"data":{"date":"2025-08-11","repo":{"name":"github.com/anthdm/hbbft","commit":"0826ffdcf567629942544b7382433aacedaf3fb3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/25 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: MIT License: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T22:21:39.636Z","repository_id":49870427,"created_at":"2025-08-16T22:21:39.636Z","updated_at":"2025-08-16T22:21:39.636Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805572,"owners_count":24995916,"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-08-30T02:00:09.474Z","response_time":77,"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":["blockchain","consensus-algorithm","hbbft"],"created_at":"2024-11-19T01:58:59.266Z","updated_at":"2025-08-30T05:09:28.877Z","avatar_url":"https://github.com/anthdm.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# hbbft [![Releases](https://img.shields.io/github/tag/anthdm/hbbft.svg?style=flat)](https://github.com/anthdm/hbbft/releases) [![Build Status](https://circleci.com/gh/anthdm/hbbft/tree/master.svg?style=shield)](https://circleci.com/gh/anthdm/hbbft/tree/master) [![Report Card](https://goreportcard.com/badge/github.com/anthdm/hbbft)](https://goreportcard.com/report/github.com/anthdm/hbbft)\n\nPractical implementation of the Honey Badger Byzantine Fault Tolerance consensus algorithm written in Go.\n\n## Summary\n\nThis package includes the building blocks for implementing a practical version of the hbbft protocol. The exposed engine can be plugged easily into existing applications. Users can choose to use the transport layer or roll their own. For implementation details take a look at the simulations which implements hbbft into a realistic scenario. The building blocks of hbbft exist out of the following sub-protocols:\n\n### Reliable broadcast (RBC)\n\nUses reedsolomon erasure encoding to disseminate an ecrypted set of transactions.\n\n### Binary Byzantine Agreement (BBA)\n\nUses a common coin to agree that a majority of the participants have a consensus that RBC has completed.\n\n### Asynchronous Common Subset (ACS)\n\nCombines RBC and BBA to agree on a set of encrypted transactions.\n\n### HoneyBadger\n\nTop level HoneyBadger protocol that implements all the above sub(protocols) into a complete --production grade-- practical consensus engine.\n\n## Usage\n\nInstall dependencies\n\n```shell\nmake deps\n```\n\nRun tests\n\n```shell\nmake test\n```\n\n### How to plug hbbft in to your existing setup\n\nCreate a new instance of HoneyBadger.\n\n```golang\n// Create a Config struct with your prefered settings.\ncfg := hbbft.Config{\n    // The number of nodes in the network.\n    N: 4,\n    // Identifier of this node.\n    ID: 101,\n    // Identifiers of the participating nodes.\n    Nodes: uint64{67, 1, 99, 101},\n    // The prefered batch size. If BatchSize is empty, an ideal batch size will\n    // be choosen for you.\n    BatchSize: 100,\n}\n\n// Create a new instance of the HoneyBadger engine and pass in the config.\nhb := hbbft.NewHoneyBadger(cfg)\n```\n\nFilling the engine with transactions. Hbbft uses an interface to make it compatible with all types of transactions, the only contract a transaction have to fullfill is the `Hash() []byte` method.\n\n```golang\n// Transaction is an interface that abstract the underlying data of the actual\n// transaction. This allows package hbbft to be easily adopted by other\n// applications.\ntype Transaction interface {\n  Hash() []byte\n}\n\nAdding new transactions can be done be calling the following method on the hb instance.\nhb.AddTransaction(tx) // can be called in routines without any problem.\n```\n\nStarting the engine.\n\n```golang\nhb.Start() // will start proposing batches of transactions in the network.\n```\n\nApplications build on top of hbbft can decide when they access commited transactions. Once consumed the output will be reset.\n\n```golang\nhb.Outputs() // returns a map of commited transactions per epoch.\n\nfor epoch, tx := range hb.Outputs() {\n  fmt.Printf(\"batch for epoch %d: %v\\n\", epoch, tx)\n}\n```\n\n\u003eA working implementation can be found in the [bench folder](https://github.com/anthdm/hbbft/tree/master/bench), where hbbft is implemented over local transport.\n\n## Current project state\n\n- [x] Reliable Broadcast Algorithm\n- [x] Binary Byzantine Agreement\n- [x] Asynchronous Common Subset\n- [x] HoneyBadger top level protocol\n\n## TODO\n\n- [ ] Threshold encryption\n- [ ] Configurable serialization for transactions\n\n## References\n\n- [The Honey Badger BFT protocols](https://eprint.iacr.org/2016/199.pdf)\n- [Practical Byzantine Fault Tolerance](http://pmg.csail.mit.edu/papers/osdi99.pdf)\n- [Threshold encryption](https://en.wikipedia.org/wiki/Threshold_cryptosystem)\n- [Shared secret](https://en.wikipedia.org/wiki/Shared_secret)\n\n## Other language implementations\n\n- [Rust](https://github.com/poanetwork/hbbft)\n- [Erlang](https://github.com/helium/erlang-hbbft)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthdm%2Fhbbft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthdm%2Fhbbft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthdm%2Fhbbft/lists"}