Just a simple implementation of the blockchain, inspired by the article: https://hackernoon.com/learn-blockchains-by-building-one-117428612f46
- multinode miners network
- ECDSA transaction signing
- simple web UI with basic account panel
- You have to have Docker and Docker Compose installed.
- Execute following command in the project root directory to download the node docker image
docker-compose pull ui
- Start the blockchain node with UI
docker-compose up -d ui
- To start next 10 blockchain nodes:
docker-compose up -d --scale drone-node=10 drone-node
- Open url
http://localhost:8000
in browser
- You have to have Docker and Docker Compose installed.
- Execute following command in the project root directory to build the project
docker-compose run --rm build
- Build and start the blockchain UI with the beacon node
docker-compose up --build -d ui
- Open url
http://localhost:8000
in browser
Run the following command to automatically build the project & haddock documentation after file changes:
stack test -j 8 --fast --haddock-deps --file-watch
Run the following command in the blockchain-ui-fe
directory:
ng serve --open
The node is listening on 8000
port and the following endpoints are available:
Path | Description |
---|---|
GET /healthckeck |
returns health status of the node |
GET /chain |
returns whole blockchain |
POST /transactions/new |
registers a new transaction |
GET /transactions/confirmed |
lists confirmed transactions |
GET /transactions/unconfirmed |
lists unconfirmed transactions |
POST /mine |
mines a new block |
POST /nodes/all |
lists all nodes known to this one |
POST /nodes/register |
accepts a list of new nodes and add them to this one |
POST /nodes/resolve |
queries all nodes, and checks if this one has the longest correct chain |