What is Bitcoin mining?

Bitcoin mining is more like a gigantic lottery where individuals compete with their mining hardware against everyone on the network to earn bitcoins. Efficient  Bitcoin mining hardware will attempt more tries per second to win this lottery while the Bitcoin network adjusts itself roughly every two weeks to keep the rate of finding a winning block hash to every ten minutes. Transactions are secured in Bitcoin mining and recorded in Bitcon’s public ledger, the block chain. By conducting a random lottery where electricity and specialised equipment are the price of admission, the cost of interupting the Bitcoin network escalates with the amount of hashing power that is being used by mining participants.

Video courtesy of: www.BitcoinMining.com

Technical background

An individuals Bitcoin mining hardware runs a cryptographic hashing function (two rounds of SHA256) on what is called a block header during mining. For every new hash that’s tried, the mining software will use a different number as a random element of the block header, this is called the nonce. The hashing function will yield a hash which looks something like this depending on the nounce and what else is on the block:

93ef6f358fbb998c60802496863052290d4c63735b7fe5bdaac821de96a53a9a
You can look at this hash as a really long number. (It’s a hexadecimal number, meaning the letters A-F are the digits 10-15.) To ensure that blocks are found roughly every ten minutes, there is what’s called a difficulty target. To create a valid block your miner has to find a hash that is below the difficulty target. So if for example the difficulty target is

1000000000000000000000000000000000000000000000000000000000000000
any number that starts with a zero would be below the target, e.g.:

0787a6fd6e0782f7f8058fbef45f5c17fe89086ad4e78a1520d06505acb4522f
If we lower the target to

0100000000000000000000000000000000000000000000000000000000000000
we now need two zeros in the beginning to be under it:

00db27957bd0ba06a5af9e6c81226d74312a7028cf9a08fa125e49f15cae4979
Because the target is such an unwieldy number with tons of digits, people generally use a simpler number to express the current target. This number is called the mining difficulty. The mining difficulty expresses how much harder the current block is to generate compared to the first block. So a difficulty of 70000 means to generate the current block you have to do 70000 times more work than Satoshi Nakamoto had to do generating the first block. To be fair, back then mining hardware and algorithms were a lot slower and less optimized.

To keep blocks coming roughly every 10 minutes, the difficulty is adjusted using a shared formula every 2016 blocks. The network tries to change it such that 2016 blocks at the current global network processing power take about 14 days. That’s why, when the network power rises, the difficulty rises as well.

Information sources

https://www.bitcoinmining.com/

https://www.weusecoins.com/en/mining-guide/

Leave a Reply

Comment
Name*
Mail*
Website*