betegon / blokchain-from-scratch

Basic Blockchain implementation in JAVA.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Basic Blockchain implementation in JAVA. This code can be reformatted to any other language. This Blockchain consist in only three blocks. Is a must to understand that the more blocks there are, the more confirmed are the previous because you will have to hack every block until the last.

There are some things missing in this project:

  • There is no signature in the blocks.
  • There is no nonce.
  • Transactions are not really accurate.
  • And so on...

Modules

The code is inside src folder.

Main

The blockchain and its behaviour is defined here.

Also, genesis block (first block of blockchain) is coded here.

Block

Block is defined as an object and will consist of three elements:

  • List of transactions
  • Previous Hash
  • Hash

Number of transactions can be different in each block.

References

UNDERSTANDING BLOCKCHAIN

About

Basic Blockchain implementation in JAVA.


Languages

Language:Java 100.0%