Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdediego/blockchain
Blockchain written in Python3
https://github.com/sdediego/blockchain
api asynchronous backend blockchain consensus-algorithm cryptocurrency cryptography fastapi frontend javascript mining peer-to-peer proof-of-work python react transaction transaction-pool wallet websocket-server
Last synced: about 1 month ago
JSON representation
Blockchain written in Python3
- Host: GitHub
- URL: https://github.com/sdediego/blockchain
- Owner: sdediego
- License: mit
- Created: 2020-01-07T20:04:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-11T18:00:04.000Z (over 3 years ago)
- Last Synced: 2023-03-02T23:33:06.478Z (almost 2 years ago)
- Topics: api, asynchronous, backend, blockchain, consensus-algorithm, cryptocurrency, cryptography, fastapi, frontend, javascript, mining, peer-to-peer, proof-of-work, python, react, transaction, transaction-pool, wallet, websocket-server
- Language: Python
- Size: 502 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blockchain
### Backend
#### Activate virtualenv
Create a virtual environment called blockchain.
Then execute:
```sh
source .virtualenvs/blockchain/bin/activate
```#### Install dependencies
Make sure that the virtual environment is activated.
From the backend directory:
```sh
pip install -r requirements.txt
```#### Run tests
Make sure that the virtual environment is activated.
From the backend directory:To run the complete tests suite execute:
```sh
tox
```To run a particular test case execute:
```sh
python -m unittest tests...
```#### Run application
Make sure that the virtual environment is activated.
Start several application instances in localhost.
From the backend directory in different terminals:
```sh
python -m src.bin.www -ap 5000 -pp 6000
python -m src.bin.www -ap 5001 -pp 6001 -n "ws://127.0.0.1:6000"
python -m src.bin.www -ap 5002 -pp 6002 -n "ws://127.0.0.1:6000, ws://127.0.0.1:6001"
```
where
ap = api port
pp = p2p server port
n = already known p2p nodes uris