build-simple-blockchain-in-node

This is a simlest working Bitcoin Blockchain using Javascript/Node.JS. all blocks are stored in memory not in file system so its not permanent. this is part of my learning curve and i keep improving this. any contribution and suggestion will be appreciated.

Usage no npm install needed!

<script type="module">
  import buildSimpleBlockchainInNode from 'https://cdn.skypack.dev/build-simple-blockchain-in-node';
</script>

README

build-simple-blockchain-in-node

This is a simlest working Bitcoin Blockchain using Javascript/Node.JS. all blocks are stored in memory not in file system so its not permanent. this is part of my learning curve and i keep improving this. any contribution and suggestion will be appreciated.

Features implemented -

Add Peer

Broadcast peer

Add transaction

Broadcast transaction

Proof of work

Block validation

Mine the block

Broadcast the block

Features to implement in next version-

Consensus algorithm using Longest chain
using the same genesis block created by master node

How to run-

clone the project
npm install
create multiple node using following command
node server.js 3000 
node server.js 3001