Skip to content

Architecture and deployment-files of the Blockchain-Demo Project

License

Notifications You must be signed in to change notification settings

philohsophy/blockchain-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain Demo

GitHub release (latest SemVer)

Table of Contents

  1. Outline
  2. How to run
  3. Components
  4. Architecture

Outline

This project creates a blockchain scenario utilizing multiple microservices which are orchestrated via Kubernetes.

It serves as an educational project in order to:

Disclaimer:

This project does not claim any correctness regarding topics such as Blockchain, etc.

How to run

The easiest way tu run this project is via k3d

# Create k3s cluster
./k8s/create_cluster.sh
kubectl config use-context k3d-mycluster

# Start
kubectl apply -k ./k8s/

# Teardown
kubectl delete -k ./k8s/

Components

This Project will consist of the following components:

Component Repository Status
Transaction Spawner philohsophy/transaction-spawner GitHub release (latest SemVer)
Transaction Pool philohsophy/transaction-pool GitHub release (latest SemVer)
Miners philohsophy/blockchain-miner GitHub release (latest SemVer)
Blockchain Supervisor philohsophy/blockchain-supervisor GitHub release (latest SemVer)
Models philohsophy/blockchain-models GitHub release (latest SemVer)

Additionally the following external services will be used:

Service Usage Added?
Grafana Visualization of Blockchain metrics Yes
Prometheus Monitoring of metrics, i.e.:
- amount of transactions waiting to be processed
- min/max/avg processing time for transactions
- running miner-instances
In Process
NATS Async communication between components No
fluentd Logging No
Jaeger Tracing No

Transaction Spawners

Clients for spawning transactions.

Transaction Pool

When users create transactions and submit them to the network, they are inserted into a pool. Miners can pick transactions from this pool and include them in a block.

Miners

Can use different forms of consensus algorithms, like:

  • Proof of work
  • Proof of stake
  • Proof of activity
  • ...

Blockchain Supervisor

  • Sets difficulty+Consensus
  • Reviews proof-of-work
  • Manages Blockchain (inserts new found blocks)
  • Provides information about current Block (hash+id)
  • Notifies Miners when a new valid Block has been found and accepted

Models

Repository with shared data models used by all services:

  • Transaction
  • Block

Also provides convinience functions like schema-validation for each model

Architecture

Hint: Use dark-mode (Profile → Settings → Appearance → "Default dark" / "Dark dimmed")

Building Block View


UML

Runtime View


UML

Deployment View


TODO

About

Architecture and deployment-files of the Blockchain-Demo Project

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages