UBC CPSC 416 2021w2 Project
Group members: Zhongze Chen, Eric Lyu, Mingyang Ye, Xinyi Ye, Yitong Zhao
-
Start coord (clean start):
go run cmd/coord/main.go
-
Restart coord:
go run cmd/coord/main.go -r true
To interrupt coord, use Ctrl + C
. A txns.txt
file and a votes.txt
file will be generated upon keyboard interrupt.
-
Start a single miner using terminal:
go run cmd/miner/main.go
-
Start and kill multiple miners using the Python script:
python scripts/miner.py -n [number of initial miners]
Follow instructions printed by the script to start more miners or kill existing miners.
To see miner outputs, go to
logs
folder and look forminer[x].txt
-
Start a single client using terminal:
go run cmd/client/main.go
Three
.txt
files will be generated after the client sending all transactions to miners. -
Start multiple clients using the Python script:
python scripts/client.py -n [number of clients]
To see client outputs, go to
logs
folder and look forclient[x].txt
- All valid transactions are committed and appear exactly once
- All invalid transactions will not be committed
- Each group of conflicting transactions can only have exactly one committed
- Vote counts are correct
To use the checker script, you will need txns.txt
and votes.txt
files generated by coord
and client[x]valid.txt
, client[x]invalid.txt
, client[x]conflict.txt
files generated by each client.
Then run command:
python scripts/checker.py -n [number of clients]
To test the system, you can start coord, miners, clients in any order. Please make sure that at least 4 blocks with no transaction are received by coord after the last block that has transaction. Then you can safely terminate everything and run the checker script.