Carrier
At the heart of every blockchain lies a consensus protocol that allows the participants to agree on a single common history of transactions. Modern technologies, such as cryptocurrencies, require that the consensus commitee process millions of transactions every second. However, state-of-the-art implementations are unable to reach the throughput demanded by these applications.
We present Carrier, a generic optimization for a wide range of consensus protocols. Carrier is an application that takes the role of a man-in-the-middle between the users submitting transactions to the network and the committee nodes that cooperate to drive the network to agreement.
Carrier collects transactions into batches, hashes each batch and submits the hashes to the underlying committee for processing. This significantly reduces the size of the workload on the committee as each hash can represent a batch of hundreds of megabytes of size. Carrier maintains the original transactions and produces a decision that is equivalent to the decision of the committee.
This project is the first implementation of the Carrier algorithm. We show that there is indeed a performance bottleneck in state-of-the-art consensus protocols using an implementation of HotStuff, one of the most recently devised algorithms. We analyze the performance of Carrier on HotStuff and discuss the throughput-wise critical parts and limitations of the implementation. Finally, we lay out a roadmap for future work on this project.
Setup
-
Go must be installed before running Carrier.
https://go.dev/doc/install
-
The first step for running Carrier is to generate configuration files for each Carrier replica.
$ go run cmd/cobra/carrier.go generate config <params_file> <output_dir>
The command takes 2 arguments: a path to a params file and an output directory where it will dump the carrier config files.
The params file should be generated by a script that provides hosts. There are some example python scripts in /scripts that will generate a params file.
Note: only 1 params file is necessary. The config generator will interpret the information and produce n config files from 1 params file.
-
Carrier replica can be launched by running:
$ go run cmd/cobra/carrier.go <config_file>
-
A local testbed with 4 replicas is included in /test/integration and can be run by:
$ go run test/integration/run/main.go