Listen for New Transactions and add them in a Block
Mine a Block
Automatically remove transactions from Memory Pool that are included in a Block.
Automatically Adjust the Mining Difficulty
Frontend to View all the Blocks in a Chronological Order
Create Transactions from the Frontend
As soon Transaction is created it will appear in Mempool.
Click on address to view the Total account Balance and complete Tx History.
Click on any TxId to view in which block that transaction was included.
The steps to run it correctly are listed below.
On your local machine, download or clone the repository.
Go to the local directory in VSCODE or any other IDE. For example, if you have this repository saved at C:/users/abc/desktop/anni maan
Run npm install from the anni maan directory. It will install all of the Project’s essential dependencies.
You’ll need a free MongoDB online atlas account. Simply create a user account. If you don’t know how to make a mongoDB account, there are numerous YouTube videos available.
You should now have an Url that you may use to connect to MongoDB on your local PC.
You must generate two .env files, one in the anni maan/Backend/core/.env directory and the other in the anni maan/Backend/database/.env directory.
That’s all there is to it; you should now be able to work on your projects.
cd backend/core and make sure you’re on anni maan.
Dummy Private Key and Public Address is already hardcoded in core/Tx.Js file to receive the mining award.
If you don’t want to use the Dummy Private Key and Public address then you generate new Private Key and Public by running wallet.js script.
Now you can update Tx.Js with the new Private Key and Public Address.
Start your Blockchain node by typing node blockchain
Voila! Your blockchain mining node is now up and running.
Steps to Start Frontend
cd frontend and create copy the .env file with database uri.
cd frontend and run npm install and then npm run dev.