Data Blocks
What a Blockhead!
SHA-256 function via Crypto.js
Note: Please configure your browser settings to access the API, or the simulation won't work.
The hash function allows us the potential of constructing data arrays in the form of blocks. Let's see what a typical block looks like - let's say my digital data to be stored is the phrase "The grass is greener on the other side of Government":
A Block of Data (a simplified version)
Mining Status: Block Not Mined
There're four sections in this block of data, and one associated action:
- Block Number: a number representing the order in which the block was created
- Nonce: "Number Only Used Once", essentially a number added to the end of your data for the purposes of "mining"
- Data: the digital data that you're interested in securing via the hash function
- Hash: a unique fingerprint for your digital data
- Mine: the act of competing for the rights to verify and add a block of data to a blockchain
So what happens when you try to mine a block of data? Well, in essence, you're guessing for the nonce that will give your resulting hash a certain number of "leading zeroes" - the larger the number of leading zeroes needed, the higher the "mining difficulty".
Try guessing the nonce yourself! Change the nonce and hit the "Try Mining" button until you successfully mine this block of data! Then pat yourself on the back for having successfully mined a block of data! You'll realise how hard mining is, see how long you take to guess.