To ensure that Ethereum works, miners play the most important role in Ethereum system.
The main purpose of mining is to produce ether, so a central issuer isn’t required. During the process of mining, Ethereum’s tokens are generated at a ratio of 5 ether/mined block. But mining is also responsible for another important fact.
In traditional currencies, banks are responsible for keeping accurate records of transactions. They make sure that money is created out of nowhere, and that consumers cannot cheat and spend their money only once.
But blockchains, bring a brand new way of record-keeping. The entire network instead, rather than an ‘authority’, verify transactions and ensures the records are accurate. Then it adds them to the public ledger.
It’s unavoidable that someone has to secure the financial records, to prevent ‘cheating’.
Mining is an amazing innovation that is able to make decentralized record-keeping possible.
Miners reach a conclusion about the transaction history while preventing ‘scam’ (multiple spending of Ethers). Before proof-of-work blockchains, that was a problem that hadn’t found a solution in decentralized currencies.
How Ethereum mining works
At the moment, Ethereum’s mining process is made almost as Bitcoin’s.
Miners with the help of computers, try to constantly guess answers to a puzzle (for a block of transactions) until one of them solves it.
More analytically, miners run the block’s unique header metadata (software version and timestamp must be included) via a hash function. This will return a fixed-length, ‘random’ string of numbers and letters. Only the ‘nonce value’ will change which only changing the ‘nonce value’, which influences the resulting hash value.
When a miner finds a hash that solves the current target, he will be awarded Ether. Then he will broadcast the block across the network for all nodes in order to validate and add to their own copy of the ledger.
When miner A finds the hash, miner B will stop the process on the current block and he will start working on the next block.
There’s almost no way for miners to cheat at this place. It’s impossible to overtake this work and bring the correct puzzle answer. That’s the reason why the puzzle-solving method is known as ‘proof-of-work’.
In addition, it takes an extremely short time for others to verify that the value of the hash is correct, which is exactly every node’s role.
How are Ethereum miners awarded?
A miner solves a puzzle about every 12 to 15 seconds. When miners start to find blocks faster or more slowly than this, the algorithm (automatically) readjusts the difficulty of the puzzle. This way miners return to approximately the 12-second solution time.
Although, these Ethers are awarded to miners randomly. Their profitability depends on the amount of computer power they are devoting to and of course, luck.
Ethereum uses a specific proof-of-work algorithm known as ‘Ethash’. It’s designed to require more memory to make it more difficult to mine Ether by using expensive ASICs (specialized mining chips that are currently the only profitable way of Bitcoin mining).
We can safely say that Ethash has succeeded in that purpose since there aren’t dedicated ASICs to mine Ether until now.
Proof-of-work change to proof of stake?
It’s possible though, that a day would come Ethereum might not need its miners anymore.
In favor of ‘proof of stake’, developers aim to ditch proof-of-work, (the algorithm the network uses at the moment to ensure which transactions are valid). That way, the owners of tokens secure the network. Additionally, proof of stake could achieve distributed consensus, using fewer resources.