hydrabadger/README.md

59 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2018-07-24 09:40:16 -07:00
# Hydrabadger
2018-06-30 12:29:34 -07:00
2018-07-02 19:36:12 -07:00
An experimental peer-to-peer client using the [Honey Badger Byzantine Fault
Tolerant consensus algorithm](https://github.com/poanetwork/hbbft).
2018-06-30 12:29:34 -07:00
2018-07-24 09:40:16 -07:00
## Usage
2018-06-30 12:00:23 -07:00
2018-07-24 09:40:16 -07:00
### Running a test peer
2019-08-13 00:38:55 -07:00
1. `git clone https://github.com/poanetwork/hydrabadger`
2. `cd hydrabadger`
3. `./run-node 0`
2018-07-17 08:36:11 -07:00
#### Additional peers
2019-08-13 00:38:55 -07:00
1. Open a new terminal window.
2. `cd {...}/hydrabadger`
3. `./run-node 1`
4. (Repeat 1 and 2), `./run-node 2`, `./run-node 3`, `./run-node 4`
- Note: If your terminal has tabs, open multiple tabs and use
ctrl-pgup/pgdown to cycle between tabs quickly.
Each peer will generate a number of random transactions at regular intervals,
process them accordingly, and output complete batches. If your terminal is
spammed with batch outputs, consensus is working.
2018-07-19 16:37:28 -07:00
2018-07-23 09:04:10 -07:00
Type `./run-node 0 --help` or `cargo run -- --help` for command line options.
2018-07-19 16:37:28 -07:00
See the
2018-07-24 09:40:16 -07:00
[`run-node`](https://github.com/poanetwork/hydrabadger/blob/master/run-node)
2018-07-28 15:43:13 -07:00
script for additional optional environment variables that can be set. To turn
on debug log output: `export HYDRABADGER_LOG_ADDTL=debug` and/or `echo "export
HYDRABADGER_LOG_ADDTL=debug" >> ~/.profile`.
2018-07-19 16:37:28 -07:00
### Current State
2018-07-23 09:04:10 -07:00
Network initialization node addition, transaction generation, consensus,
2018-07-19 17:24:06 -07:00
and batch outputs are all generally working. Batch outputs for each epoch are
printed to the log.
2018-07-19 16:37:28 -07:00
Overall the client is fragile and doesn't handle deviation from simple usage
very well yet.
2018-07-24 09:40:16 -07:00
### Unimplemented
2018-07-19 16:37:28 -07:00
2019-08-13 00:38:55 -07:00
- **Many edge cases and exceptions:** disconnects, reconnects, etc.
- Connecting to a network which is in the process of key generation causes
the entire network to fail. For now, wait until the network starts
outputting batches before connecting additional peer nodes.
- **Error handling** is atrocious, most errors are simply printed to the log.
- **Usage as a library** is still a work in progress as the API settles.
- **Much, much more...**
2018-07-19 17:24:06 -07:00
2018-07-19 20:47:58 -07:00
### License
[![License: LGPL v3.0](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
2019-08-13 00:38:55 -07:00
This project is licensed under the GNU Lesser General Public License v3.0. See the [LICENSE](LICENSE) file for details.