-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readme updates #64
Readme updates #64
Changes from 1 commit
bb18757
5855c4f
307c94c
aef7cee
830d48b
ace6e6e
6cb8197
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,21 @@ | |
[![Build Status](https://travis-ci.com/poanetwork/hbbft.svg?branch=master)](https://travis-ci.com/poanetwork/hbbft) | ||
[![Gitter](https://badges.gitter.im/poanetwork/hbbft.svg)](https://gitter.im/poanetwork/hbbft?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
|
||
Welcome to a [Rust](https://www.rust-lang.org/en-US/) library of the Honey Badger Byzantine Fault Tolerant (BFT) consensus algorithm. The research and protocols for this algorithm are explained in detail in "[The Honey Badger of BFT Protocols](https://eprint.iacr.org/2016/199.pdf)" by Miller et al. | ||
Welcome to a [Rust](https://www.rust-lang.org/en-US/) library of the Honey Badger Byzantine Fault Tolerant (BFT) consensus algorithm. The research and protocols for this algorithm are explained in detail in "[The Honey Badger of BFT Protocols](https://eprint.iacr.org/2016/199.pdf)" by Miller et al., 2016. | ||
|
||
This documentation is designed for Rust developers looking to use a resilient consensus algorithm on a distributed network. Following is an overview of HoneyBadger BFT and basic instructions for getting started. | ||
Our implementation modifies the protocols described in the paper in several ways: | ||
* We use a [pairing elliptic curve library](https://github.com/ebfull/pairing) to implement pairing-based cryptography rather than Gap Diffie-Hellman groups. | ||
* We add a `Terminate` message to the Binary Agreement algorithm. Termination occurs following output, preventing the algorithm from running (or staying in memory) indefinitely. ([#53](https://github.com/poanetwork/hbbft/issues/55)) | ||
* We add a `Conf` message to the Binary Agreement algorithm. An additional message phase prevents an attack if an adversary controls a network scheduler and a node. ([#37](https://github.com/poanetwork/hbbft/issues/37)) | ||
* We return additional information from the Subset and Honey Badger algorithms that specifies which node input which data. This allows for identification of potentially malicious nodes. | ||
* We run a Distributed Key Generation (DKG) protocol which does not require a trusted dealer; nodes collectively generate a secret key. This addresses the problem of single point of failure. See [Distributed Key Generation in the Wild](https://eprint.iacr.org/2012/377.pdf). | ||
|
||
**Note:** This library is a work in progress and parts of the algorithm are still in development. | ||
Following is an overview of HoneyBadger BFT and [basic instructions for getting started](#getting-started). | ||
|
||
_**Note:** This library is a work in progress and parts of the algorithm are still in development._ | ||
|
||
## What is Honey Badger? | ||
The Honey Badger consensus algorithm allows nodes in a distributed, potentially asynchronous environment (decentralized databases and blockchains) to achieve agreement on transactions. The agreement process does not require a leader node, tolerates corrupted nodes, and makes progress in adverse network conditions. | ||
The Honey Badger consensus algorithm allows nodes in a distributed, potentially asynchronous environment to achieve agreement on transactions. The agreement process does not require a leader node, tolerates corrupted nodes, and makes progress in adverse network conditions. Example use cases are decentralized databases and blockchains. | ||
|
||
Honey Badger is **Byzantine Fault Tolerant**. The protocol can reach consensus with a number of failed nodes f (including complete takeover by an attacker), as long as the total number N of nodes is greater than 3 * f. | ||
|
||
|
@@ -21,9 +28,23 @@ Honey Badger is a modular library composed of several independent algorithms. T | |
|
||
In an optimal networking environment, output includes data sent from each node. In an adverse environment, the output is an agreed upon subset of data. Either way, the resulting output contains a batch of transactions which is guaranteed to be consistent across all nodes. | ||
|
||
### Algorithms | ||
## Algorithms | ||
|
||
All algorithms in the protocol are modular. Encryption to provide censorship resistance is currently in process for the top level Honey Badger algorithm. | ||
|
||
### Algorithm naming conventions | ||
|
||
We have simplified algorithm naming conventions from the original paper. | ||
|
||
| Algorithm Name | Original Name | | ||
| ---------------- | -------------------------------- | | ||
| Honey Badger | HoneyBadgerBFT | | ||
| Subset | Asynchronous Common Subset (ACS) | | ||
| Broadcast | Reliable Broadcast (RBC) | | ||
| Binary Agreement | Binary Byzantine Agreement (BBA) | | ||
| Coin | Common Coin | | ||
|
||
All algorithms in the protocol are modular and usable. Encryption to provide censorship resistance is currently in process for the top level Honey Badger algorithm. | ||
### Algorithm short descriptions | ||
|
||
- [ ] **[Honey Badger](https://github.com/poanetwork/hbbft/blob/master/src/honey_badger.rs):** The top level protocol proceeds in epochs using the protocols below. | ||
|
||
|
@@ -36,20 +57,19 @@ All algorithms in the protocol are modular and usable. Encryption to provide cen | |
- [x] **[Coin](https://github.com/poanetwork/hbbft/blob/master/src/common_coin.rs):** A pseudorandom binary value used by the Binary Agreement protocol. | ||
|
||
|
||
### Current TODOs | ||
### Current TODOs | ||
|
||
- [ ] Honey Badger encryption | ||
- [ ] Honey Badger encryption ([#41](https://github.com/poanetwork/hbbft/issues/41)) | ||
|
||
- [ ] Dynamic Honey Badger (adding and removing nodes in a live network environment) | ||
- [ ] Dynamic Honey Badger (adding and removing nodes in a live network environment) ([#47](https://github.com/poanetwork/hbbft/issues/47#issuecomment-394640406)) | ||
|
||
- [ ] Networking example to detail Honey Badger implementation | ||
|
||
## Getting Started | ||
|
||
This Rust library requires a distributed network environment to function. Details on network requirements will be published in the [Rust package registry](https://crates.io/) once core algorithms are complete. | ||
|
||
**Note: Additional examples are currently in progress.** | ||
This Rust library requires a distributed network environment to function. Details on network requirements TBD. | ||
|
||
_**Note:** Additional examples are currently in progress._ | ||
|
||
### Build | ||
|
||
|
@@ -61,19 +81,15 @@ $ cargo build [--release] | |
|
||
### Example Network Simulation | ||
|
||
An example is included to run a simulation of a network using serialization-serde ([https://serde.rs/](https://serde.rs/)) to efficiently serialize and deserialize Rust data structures. | ||
A basic example is included to run a network simulation. | ||
|
||
``` | ||
$ cargo run --example simulation --features=serialization-serde -- -h | ||
$ cargo run --example simulation -h | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed serialization-serde - unsure if any other flags are used at this point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correct. The flag |
||
``` | ||
|
||
## Contributing | ||
|
||
Please look at [current issues](https://github.com/poanetwork/hbbft/issues) and read [CONTRIBUTING.md](CONTRIBUTING.md) for contribution and pull request protocol. | ||
|
||
## License | ||
|
||
[![License: LGPL v3]([https://img.shields.io/badge/License-LGPL%20v3-blue.svg](https://img.shields.io/badge/License-LGPL%20v3-blue.svg))]([https://www.gnu.org/licenses/lgpl-3.0](https://www.gnu.org/licenses/lgpl-3.0)) | ||
[![License: LGPL v3.0](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
This project is licensed under the GNU Lesser General Public License v3.0. See the [LICENSE](LICENSE) file for details. | ||
|
||
|
@@ -85,6 +101,10 @@ This project is licensed under the GNU Lesser General Public License v3.0. See t | |
|
||
* Other language implementations | ||
|
||
* [Python](https://github.com/amiller/HoneyBadgerBFT) | ||
|
||
* [Go](https://github.com/anthdm/hbbft) | ||
|
||
* [Erlang](https://github.com/helium/erlang-hbbft) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's also Andrew Miller's original implementation: * [Python](https://github.com/amiller/HoneyBadgerBFT) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An unfinished one:
|
||
|
||
* [Rust](https://github.com/rphmeier/honeybadger) - unfinished implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These could link to #41 (first one) and #47 (comment) (second one); once we've agreed on what the example should do, we'll also open an issue for the third one.