Skip to content

Install

Alberto Sonnino edited this page Apr 6, 2021 · 7 revisions

You first need to install Rust, make sure that you are running at least the version 1.48 (if you aren't you can update it running rustup update). You can then clone the repo and compile the codebase:

$ git clone https://github.com/asonnino/hotstuff.git
$ cd hotstuff
$ cargo build

Test your installation

To test your installation, you can run the unit tests with cargo test and quickly deploy a testbed on your local machine:

$ cargo run --bin node -- -vvv deploy --nodes 4

This commands deploys a testbed of 4 nodes but no clients, so the nodes run creating empty blocks. You can stop them pressing ctr + C (be ready, they run very fast and print many logs to stdout).

Install the dependencies to run benchmarks

HotStuff is written in Rust, but all benchmarking scripts are written in Python and run with Fabric. You can install the python dependencies using the requirements.txt file from the hotstuff/benchmark folder:

$ cd hotstuff/benchmark
$ pip install -r requirements.txt

You also need to install Clang (required by rocksdb) and tmux (which is used to run all nodes and clients in the background). The next section explains how to run a benchmark on your local machine.