blockchain/README.md

861 B

Blockchain 101

Simple blockchain written in python

Installation

  1. Make sure Python 3.6+ is installed.
  2. Install poetry.
  3. Install requirements
$ poetry install
  1. Copy .env.example to .env

  2. 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:

  1. Build the docker image
$ docker-compose build
  1. Run the nodes
$ docker-compose up -d
  1. 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