https://github.com/jepemo/basic-blockchain
Simple extendable Blockchain implemented in Python
https://github.com/jepemo/basic-blockchain
blockchain cryptocurrency python
Last synced: 4 months ago
JSON representation
Simple extendable Blockchain implemented in Python
- Host: GitHub
- URL: https://github.com/jepemo/basic-blockchain
- Owner: jepemo
- License: gpl-3.0
- Created: 2017-09-06T08:21:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-23T17:21:43.000Z (about 7 years ago)
- Last Synced: 2026-01-03T02:30:59.896Z (6 months ago)
- Topics: blockchain, cryptocurrency, python
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# basic-blockchain
Basic cryptocurrency, based on blockchain, implemented in Python.
- [basic-blockchain](#basic-blockchain)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Use (default web implementation)](#use-default-web-implementation)
- [Development](#development)
- [Roadmap](#roadmap)
- [License](#license)
## Getting Started
### Installation
```
pip install bbchain
```
### Use (default web implementation)
```bash
# Start (default port 8000)
bbchain --start
# Start with selected host/port
bbchain --start --host 127.0.0.1 --port 8002
# Select other nodes to connect
bbchain --start --nodes ip1:port1,ip2:port2
# Add data to the blockchain
bbchain --add "data to storage" --nodes ip1:port1
# Maintenance
## Clean local storage
bbchain --clean
## Show local data
bbchain --print
```
## Development
```bash
git clone https://github.com/jepemo/basic-blockchain.git
cd basic-blockchain
python3 -m venv venv
source venv/bin/activate
pip install -e .
bbchain --help
```
Execute tests:
```
python3 setup.py test
```
[Some Blockchain implementation readings](docs/readings.md)
## Roadmap
- More tests
- Implement real consensus algorithms
- Improve default http implementation (better sync, etc.)
- Some examples: cryptocurrency, etc.
- Allow to save non-textual data
## License
[GNU GPLv3](LICENSE)
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.