- The winner is selected based on the minimum distance between the user’s address and the previous block hash in the blockchain.
- Since everyone has the address of all nodes, the winner can be found out by everyone, and hence there is no need for broadcasting to come to a consensus on the winner.
A simple relay server to relay messages in the P2P network
# Install deps
cd broadcast-server
npm install
# Run
./main.js
# Install deps
cd node
npm install
./node/main.js create [name]
./node/main.js run [name] [address]
Starts 8 nodes for testing
./node/auto.sh