What is Mining?
Mining is the process where nodes in the Bitcoin Network assemble newly broadcast Bitcoin Transactions into a data structure called a block.
Nodes then compete to append their block to the public Block chain by repeatedly mutating the block's header data structure, usually by incrementing the nonce field, then hashing it in an attempt to find a value that satisfies a difficult proof-of-work.
When a node finds a valid proof-of-work hash for a block, it broadcasts the block to all nodes. Other nodes accept this block only if all the transactions in it are valid and have not yet been included in a block. Other nodes in the network then express their acceptance of the block by building upon it to create the next block in the chain.
Every block is timestamped and references the hash of the block preceding it. Blocks form a backward reinforcing, timestamped chain – a Timechain, the precursor to the term 'blockchain'.
The blockchain structures itself in a manner that is computationally and economically impractical to modify by any one entity. Due to this, transactions included in the blockchain are considered immutable. In addition to this quality, the blockchain establishes an authoritative order of these transactions throughout the network by establishing which out of any pair of conflicting transactions was seen first, thereby protecting users from attempts to re-spend coins that have already been spent elsewhere. This is the key innovation of mining and of Bitcoin.
Interactive Mining Simulator
Play around with this mining simulator that visualises what happens when you 're mining, increase the nonce/extranonce, update the timestamp and compute the block hash.