Skip to content

๐Ÿ‰ Simple blockchain engine written with Python

Notifications You must be signed in to change notification settings

Mc01/snakechain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SnakeChain

Blockchain engine implementation in Python

Setup

docker-compose up -d

Usage

docker-compose exec node ./cli.py $command

Note: Where $command is one of following:

  • add-element
  • create-block
  • get-block
  • get-element
  • get-statistics

Environment

Following environment variables are mandatory (defined in docker-compose.yml):

  • BUFFER_HOST
  • BUFFER_PORT
  • STORAGE_HOST
  • STORAGE_USER
  • STORAGE_PASSWORD

Following environment variables are optional and have defaults:

  • STORAGE_BUCKET (default value: default)
  • NUMBER_OF_BLOCKS_IN_MEMORY (default value: 10)
  • SPACER (default value: ------*------*------*------*------*------)

Design

SnakeChain core elements are following:

  • CLI

Executes commands on blockchain node

  • Node

Listens for CLI commands

  • Buffer

Keeps recent blocks and next block elements in RAM

  • Storage

Stores all blocks on Disk

TODO checklist

  • Add unit tests
  • Introduce gRPC between CLI and Node
  • Use AsyncIO for Node and integrate with other components
  • Make more intelligent hashing (introduce Merkle Trees for example)
  • Add more crypto features (simple consensus like pBFT for example)
  • Add support for P2P broadcasting (protocol like IBC/ICS for example)

Packages

Following packages used across project:

About

๐Ÿ‰ Simple blockchain engine written with Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published