By Matt Hussey
4 min read
Much like regular mining, in cryptocurrency mining a miner’s job is to unearth resources. The reward for extracting resources out of the ground is the cash value of the resource.
For blockchain miners however, things are a bit more complicated. A crypto-miner is rewarded by cracking a fiendishly difficult puzzle.
Before we get into that, let's explore how information is shared on the network.
On cryptocurrency networks there are traditionally two types of nodes:
A node is a computer that shares information with other nodes on the network. When someone makes a transaction on the network - one person sends another person some currency for example - the nearest node documents the transaction and sends it to others, so every node is on the same page.
These nodes take all the transactions passed around by the regular nodes and groups them together to form the blocks that make up the blockchain.
When you combine the two you have the fundamentals to a functioning cryptocurrency network.
Mining computers or nodes are trying to guess a number. This is trickier than it sounds.
It doesn’t matter whether the information is a single letter, a word, a sentence, or an entire encyclopaedia, that number, called a digest number is always the same length.
But if you change just one bit of the information, the resulting number that comes out of the hash function will be completely different.
Information in ➕hash function ➡️ One long number out.
Miners have to guess that one long number to ‘solve’ the block. How?
Miners are trying to combine all of the transactions in the existing block, push it through a hash function and try to create a number that’s within a certain range in order to be right.
This takes a lot of work. 👔
If they get it right, the network confirms that the number is accurate. The software the currency is built on closes the block, rewards the victor with some currency and all the miners in the network try again on the next block. ✅
But there’s more.
Remember those maths exams in school when they asked you to show your working out? Well, cryptocurrency networks are much the same.
For trivia lovers, the number miners are trying to guess is called a "nonce", which is a concatenation of "number used once." In Bitcoin, the nonce is a whole number somewhere between 0 and 4,294,967,296.
For miners, the proof-of-work is designed to ensure people aren’t sneakily changing transactions or details already in the blockchain. It’s a nifty tool that also helps protect the ledger from being hacked.
The proof-of-work is one of the main reasons everyone talks about how much electricity cryptocurrency networks like Bitcoin use.
How do you stop nodes mining blocks sent by the network that may be wrong or someone attempting to hack in? Difficulty.
The software that cryptocurrencies run on sets a difficulty level every time a new block is created. This does two things:
Allows crypto miners to tell whether the block they’ve been sent in order to work out the solution to the next block is difficult enough. If the block doesn’t meet the requirements established by the network, the miner can ignore it.
Allows the steady production of currency. In Bitcoin’s case, a new block is created every 10 minutes.
If the amount of miners on the network goes down, the difficulty drops.
Cryptocurrency mining is an energy intensive business. It also creates potential problems as more and more people start to use networks built on mining. But there are signs that the days of mining may be numbered.
Ethereum is planning on switching how transactions are verified some time in 2018. IOTA meanwhile, another cryptocurrency is planning on getting rid of mining all together!
If Bitcoin wants to be able to cater for more users, it will need to find a more energy efficient way of verifying transactions.
Decrypt-a-cookie
This website or its third-party tools use cookies. Cookie policy By clicking the accept button, you agree to the use of cookies.