Stratus: Scaling Blockchain Consensus via Shared Mempool
Stratus is a shared Mempool protocol that effectively addresses the communication bottleneck of leader-based Byzantine fault-tolerant (BFT) consensus protocols. For technical details, please find the paper, which has been accepted to ICDE'23.
We implemented Stratus and integrated it with state-of-the-art BFT protocols, HotStuff and Streamlet, based on Bamboo, which is an open source project for prototyping, evaluating, and benchmarking BFT consensus and replication protocols. The native implementations of HotStuff and Streamlet can also be found in Bamboo.
WARNING: This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.
What is included
Protocols:
- HotStuff with a simple shared Mempool (SMP-HS)
- Stratus enabled HotStuff (S-HS)
- Stratus enabled Streamlet (S-SL)
- HotStuff with a gossip-based shared Mempoo (S-HS-G)
Features:
- Benchmarking
How to build
-
Install Go.
-
Download Bamboo-Stratus source code.
-
Build
server
andclient
.
cd bamboo/bin
go build ../server
go build ../client
How to run
Users can run the protocols in simulation (single process) or deployment.
Simulation
In simulation mode, replicas are running in separate Goroutines and messages are passing via Go channel.
-
cd bamboo/bin
-
Modify
ips.txt
with a set of IPs of each node. The number of IPs equals to the number of nodes. Here, the local IP is127.0.0.1
. Each node will be assigned by an increasing port from8070
. -
Modify configuration parameters in
config.json
. -
Modify
simulation.sh
to specify the name of the protocol you are going to run. -
Run
server
and then runclient
using scripts. Note that the number followed by therunClient.sh
is the number of clients that you wish to run.
./simulation.sh
./runClient.sh 10
- Close the simulation by stopping the client and the server in order.
./closeClient.sh
./stop.sh
Logs are produced in the local directory with the name of client/server.xxx.log
where xxx
is the pid of the process.
Deploy
Nodes can be deployed in a real network.
-
cd bamboo/bin/deploy/linux
-
Authorize remote servers (send local public key to the remote) by adding the IP list into
auth/server_auth.txt
and modifying the user name and password inauth/server_auth.json
. Then, run the script.
./auth/server_auth.sh
- Build
server
andclient
. - Specify external IPs and internal IPs of server nodes in
pub_ips.txt
andips.txt
, respectively. - IPs of machines running as clients are specified in
clients.txt
. - The type of the protocol is specified in
run.sh
. - Modify configuration parameters in
config.json
. - Upload binaries and config files onto the remote machines.
./deploy.sh
./setup_cli.sh
- Start the server nodes.
./start_server.sh
- Start the clients by specifying no. of clients running on each machine.
./start_client.sh 10
- Stop the client and server.
./exp_stop.sh
Monitor
During each run, one can view the statistics (throughput, latency, view number, etc.) at a node via a browser.
http://127.0.0.1:8070/query
where 127.0.0.1:8070
can be replaced with the actual node address.