Node Js Programming Environment is used here.
Testing all the commits(like Blockchain Validation, Mining function, etc)! Just to be On safe Sides 😀
Here NodeMon is used to Leverage auto run facility
With DIFFICULTY = 4 the time taken to generate the block is about 4 sec.
With DIFFICULTY = 5 there are five (0)s in the begining of the Hash and Time taken to generate the Block is about 47s.
Therefore we can observe that time increases exponentially as difficulty increases, therefore DIFFICULTY helps the Blockchain to prevent its exploitation! As more and more resource of the MINER will be utilised for mining the chain. Therefore if someone wants to replace the whole chain they will need about 51% power of the total Blockchain system and even after doing so it won't be worth it.
Here difficulty is varying according to the time taken by previous Block production.
Wallets are used to store blocks/cryptocurrencies. It helps users to protect, authenticate as well as transact their Cryptos/Blocks.
Transaction contain a unique ID, address of the sender's and the recipient's wallet, amount to be transferred.
Transaction object is divided into two parts - Input and Output.
We can verify the incoming transaction using SHA256 and keyFromPublic() function in JavaScript imported from ec module.
To make transaction object more efficient and optimised we can update it, if transaction is being made to the same user multiple times.