/chain-net

Small blockhain pet-project created as part of the courses "Development of network applications" and "Software testing"

Primary LanguageTypeScriptMIT LicenseMIT

▫️◻️⬜ chain-net ⬜◻️▫️

Small blockchain pet-project created as part of the courses "Development of network applications" and "Software testing"

Link to the task

Blockchain CI License


Running the app (Docker)

1. Install Docker 2. Clone

git clone https://github.com/alyona-korenkovich/chain-net.git

cd chain-net 3. Run docker compose up 4. Voilà -- three nodes are started and now mining on ports 3000, 3001, 3002


Example

On the image below one can see what it looks like when containers are running in console.
>It needs to be noticed that containers require ports 3000-3002 to be available since it is a study-project, and they are hard-coded.

img.png

As we can see on the screen, all three nodes are connected to one another and have synchronized chains.


Testing

The application has been tested. The repository contains the following types of tests: * Unit tests * Integration tests * E2E tests

Test coverage:

File % Stmts % Branch % Funcs % Lines
All files 72.12 61.92 72.27 62.97
Block.ts 100 100 100 100
Blockchain.ts 100 100 100 100
const.ts 100 100 100 100