The blockchain created has various features like:
- There is self adjusting difficulty level to control the mining rate
- There is a broadcast facility to broadcast the block created to all the nodes
- There is a syncing feature that allows a newly added node to have access to all the previously mined blocks
- There is also a verification feature to check whether the block coming from the node/miner is valid or not
- It is based on the Publish-Subscribe Model
- It uses Postman app to write data onto the blocks
- There is also a feature which will automatically select the longest chain adhering to the primary feature of a blockchain
Step 1: Clone this project using git clone https://github.com/Rahul1227/MyBlockchain.git
Step 2: Install all the dependencies:
npm init -y
npm i [email protected] --save
npm i express --save
npm i nodemon --save-dev
npm i body-parser --save
npm i [email protected]
npm i [email protected] --save-dev
npm i [email protected] --save
Step 3: Download Postman app and set up it to write onto the blockchain
Step 4: Download Redis zip folder fromhttps://github.com/microsoftarchive/redis/releases
, extract it and run redis-server in the background
Step 5: Run the blockchain with the commandnpm run dev
and peer nodes usingnpm run dev-peer
Step 6: Open Postman app and provide the data in the json format to the blockchain
Step 7: Get the blocks info from
http://localhost:3000/api/blocks