You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 years ago | |
---|---|---|
blockchain | 3 years ago | |
tests | 5 years ago | |
.dockerignore | 3 years ago | |
.gitignore | 4 years ago | |
Dockerfile | 3 years ago | |
LICENSE | 6 years ago | |
README.md | 3 years ago | |
docker-compose.yml | 3 years ago | |
init | 3 years ago | |
poetry.lock | 3 years ago | |
pyproject.toml | 3 years ago | |
requirements.txt | 3 years ago | |
run.py | 3 years ago |
README.md
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