Blockchain Development #1: Setup a testing mining script

in #blockchain8 years ago (edited)


Today, I manage to make a Proof of Work Testing Mining Script, to simulate a mining process. For the mining basically simulate if the hash is "0000", the computer will managed to mine the hash. (This is an ideal case)

In real life, it might take longer to get the match of the hash.

About the project

I started learning blockchain development few days ago. All my learning source code is done in TypeScript, a superset language of JavaScript. The project is hosted on GitHub, and the source code are open source -superoo7/blockchain-typescript.

I planned to learn to build blockchain from scratch without any framework or smart contract. The purpose is to learn how the blockchain technology works and make a REST API layer on top of it.

Library used

  • Typescript: A superset language on top of JavaScript, which provide static type checking, OOP, Enum and avoid runtime error
  • js-sha256: A sha256 hashing algorithm library. This hashing algorithm is also used by Bitcoin.
  • nodemon: To run Node.js when there is change in source code.

If you interested about Blockchain Development, checkout my previous post

Blockchain with Ethereum


▶️ DTube
▶️ IPFS
Sort:  

Great work yoo! you are awesome @superoo7

You've been upvoted by TeamMalaysia community. Do checkout other posts made by other TeamMalaysia authors at http://steemit.com/created/teammalaysia

To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach

Vote TeamMalaysia witness bitrocker2020 using this link vote for witness

Coin Marketplace

STEEM 0.05
TRX 0.32
JST 0.082
BTC 65824.46
ETH 1792.50
USDT 1.00
SBD 0.43