Skip to content

colyk/flask-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain

Blockchain simulation with a web interface on Flask.

How it works

Main view

Checking the integrity of 4 newly created blocks

All blocks are mined

The last block is manually corrupted in ./blocks and new block is added

What is blockchain?

Blockchain – is a continuously growing list of records, called blocks, which are linked and secured using cryptography hash. Each block typically contains a hash pointer as a link to a previous block and a timestamp. By design, blockchains are inherently resistant to modification of the data. For getting hash used SHA-256

What is POW

POW (proof of work) is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify and which satisfies certain requirements. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work system.

How to run

pip install -r requirements.txt

python server.py

Now head over to http://127.0.0.1:5000/, and you should see main page of blockchain, where you can add new block, check blocks integrity and mined blocks using POW algorithm.

About

Blockchain simulation with a web interface on Flask

Topics

Resources

Stars

Watchers

Forks