The demo folder contains scripts allowing you to run benchmarking tests on Lachesis. It includes the following:
-
start.sh: Starts upNnumber of nodes (default=5). This parameter can be changed on line 9:N=5. Nodes are connected as a ring. Thedatadiris created at/tmp/lachesis-demo, where a separate data folder is created per node. -
stop.sh: stops all Lachesis nodes from running. The/tmp/lachesis-demodirectory with node data is deleted.
The start_dyn_first.sh and start_dyn_second.sh scripts are used in combination to test dynamic participation:
-
start_dyn_first.sh: StartsNnumber of nodes specified at runtime, connected together as a ring -
start_dyn_second.sh: StartsM numberof nodes, which are then connected together as a ring to the existingNnumber node network created bystart_dyn_first.sh.
Tx-generators are used to generate simple account balance transactions for the network: The tx-generator files (which create and destroy tx-generators) are as follows:
-
./txstorm-start.sh: Starts the tx-generators, the number of transaction generated per second are specified on line 37:--rate=<number of transactions per second. -
./txstorm-stop.sh: Destroys the tx-generators
Run go build -o ./build/tx-storm ./cmd/tx-storm
You should now have lachesis and tx-storm under the go-lachesis/build folder
Under demo directory:
-
Run
./start.sh -
Wait for the nodes to connect
-
Run
./txstorm-start.sh
Transactions will be continuously send to the network, until stopped.
logs are generated under go-lachesis/txstorm_logs for each node
Under demo directory:
-
Run
.\start_dyn_first.sh: This creates the firstNnodes of the network -
Wait for the nodes to connect
-
Run
.\start_dyn_second.sh: This createsMnodes and attaches to the network created by.\start_dyn_first.sh -
Wait for the nodes to connect
-
Run
.\txstorm-start.sh
Under demo directory
-
Run
txstorm-stop.sh: Destroy the tx-generators. Note that this can be restarted at any time afterwards, and the network will start to receieve transactions again (assuming the network is still running) -
Run
stop.sh: Destroys the network, and deletes the/tmp/lachesis-demodirectory
start.sh:
N=X: Specifies X nodes to startup
txstorm-start.sh:
--rate=Y: Specfies Y transactions to generate per start_dyn_second
- Minimum emit interval for event blocks
In go-lachesis/gossip/config_emitter.go:
MinEmitInterval: Z * time.Millisecond: Set the minimum time Z it takes to emit an event blocks (in Milliseconds)