Python 3.7 is used for this project. Make sure your python version is >=3.7 by typing python3.
# for Debian-based distros
sudo apt-get install build-essential cmake python3-dev python3-venv --no-install-recommends
git submodule update --init --recursive
python3 -m venv .venv
. .venv/bin/activate
pip install wheel # For building blspy
pip install -e .
pip install -r requirements.txt
cd lib/chiavdf/fast_vdf
# Install libgmp, libboost, and libflint, and then run the following
sh install.sh
When running the servers on Mac OS, allow the application to accept incoming connections. Run the servers in the following order (you can also use ipython):
python -m src.server.start_plotter
python -m src.server.start_timelord
python -m src.server.start_farmer
python -m src.server.start_full_node "127.0.0.1" 8002 -f
python -m src.server.start_full_node "127.0.0.1" 8004 -t -u 8222
python -m src.server.start_full_node "127.0.0.1" 8005
Try running one of the full nodes a few minutes after the other ones, to test initial sync. Configuration of peers can be changed in src/config. You can also run the simulation, which runs all servers at once.
./src/simulation/simulate_network.sh
You can also ssh into the UI for the full node:
ssh -p 8222 localhost
The first time the tests are run, BlockTools will create and persist many plots. These are used for creating proofs of space during testing. The next time tests are run, this won't be necessary.
py.test tests -s -v
flake8 src
mypy src tests
- Install Python extension
- Set the environment to ./.venv/bin/python
- Install mypy plugin
- Preferences > Settings > Python > Linting > flake8 enabled
- Preferences > Settings > Python > Linting > mypy enabled
- Preferences > Settings > mypy > Targets: set to ./src and ./tests