861 B
861 B
Blockchain 101
Simple blockchain written in python
Installation
- Make sure Python 3.6+ is installed.
- Install poetry.
- Install requirements
$ poetry install
-
Copy
.env.example
to.env
-
Start some nodes:
$ poetry run flask run -p 5000
$ poetry run flask run -p 5001
Docker
Another option for running this blockchain program is to use Docker. Follow the instructions below to create a local Docker container:
- Build the docker image
$ docker-compose build
- Run the nodes
$ docker-compose up -d
- To add more nodes, add a new service to the
docker-compose.yml
file and adjust the port number.
node2:
build: .
ports:
- 5002:80
Credits
dvf for the original blockchain code