Zed's blockchain, inspired by jackschultz/jbc.
Wanted to do a few things differently:
- Python 3 (written on 3.6.3)
- No dependencies - standard libs only.
- No linking directories.
python main.py
Options:
-gcreate the genesis block.-mmine, if not given node will just listen.-p PORTport number to use (between 3000-3007). Uses 3000 if not given.
Blocks are stored under /chain/<PORT>.
From a fresh clone, in one terminal do:
python main.py -g -m
This starts the first node on 3000, creates the genesis block, and starts mining.
In a second terminal do:
python main.py -p 3001
This starts another node on 3001 that syncs up the longest chain then just listens for broadcast blocks.
In a third terminal do:
python main.py -p 3002 -m
This starts another node on 3002 that syncs up the longest chain then competes for mining blocks.
Etc..