pedro823 / build-your-own-blockchain

Step by step blockchain construction in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build your own blockchain

Build a blockchain from scratch!

I have never had formal introductions to blockchain, since this is a very new and hyped data structure. This is my own progress through creating a blockchain from ground zero, by learning concepts and features along the way.

One question that rises is "Why are you not just doing smart contracts on Ethereum?", and that is because you won't learn how a blockchain works by just describing it, just like you won't learn how to build a new database just by learning SQL and relations.

How to read this tutorial

Read it in order from the first folder. The folders with names "_complete" have the completed code of the lesson. If you'd like to learn just a section of the blockchain, you could just grab all the completed code from the step before, but be warned: I highly suggest you start from the beggining, so that you understand fully what you're doing.

Progress

  • Create block & blockchain - DONE
  • Add hashing function - DONE
  • Add link to previous block - DONE
  • Add mining and Proof of Work - DONE
  • Add the concept of a transaction - DONE
  • Add difficulty generation
  • Add wallets & wallet generation
  • Store & retrieve the blockchain on disk
  • Add blockchain synchronization between peers

About

Step by step blockchain construction in Python.


Languages

Language:Python 100.0%