Mining Bitcoin for Dummies - The process of Mining is freaking Hashing

in #bitcoin7 years ago

bitcoin-miner.jpg

Image credits

The Bitcoin mining is the procedure of earning money (Bitcoins) by solving math problem with a computer

For the sake of understanding we will simplify the process

Lets imagine that we have just started mining. We look at the last block that was mined and we hash its header. For bitcoin hashing a SHA-256 algorithm is used. You can test it for yourself here, just insert any number and it will be hashed into a long string of numbers and letters with fixed 256-bit (32-byte) size.

For example, 1234 will always give you this number: 03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4

But you cannot reverse or decrypt this number into 1234 back again. To do this you would have to manually insert numbers one my one into hashing calculator and compare the results. This is quite similar to what miners are doing.

Lets see an extremely simplified example of mining

  1. We take a hashed header of last block:

    5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5

  2. Then combine it with 3 transactions that we would like to insert in our new block

    8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92
    5c69d9ac45cca700492347264d87ca2e55bf7dfeb84525f2c9ca5db416d648e0
    bd43f3349b217a3d2bf205908507c28fd943b0635bc4900898f0d116de094cb8

  3. And hash them by adding at the end any number, for example 1 then 2, then 3, (this number is called nonce) until we get at least one zeo at the beginning of our new hash:

After adding number 7 at the end we get our first 0 at the beginning:

Congratulations we mined our first block for the reward of 12.5 Bitcoin!!!

After that we broadcast our result to the blockchain and then the next race continues to find the next block. Other miners will use our new hash to find the next block. This is why it is called blockchain technology, every part of the chain is connected to each other.

Mining Farms

mining-farms.jpg
Image credits

Before it was possible to mine bitcoin even on a laptop and actually get bitcoin. However, right now the total network hashing power is so enormous that mining with a laptop is completely unprofitable even if you join a mining pool. Nowadays, there are specialized ASICs that are made specifically to mine bitcoin and you can buy them to mine bitcoin.

Companies and individuals are building so called Mining Farms with hundreds of these ASICs working together to get the bitcoin reward.

Additional rewards - Transaction fees

bitcoin-fees.jpg
Image credits

People who are sending transactions include additional rewards for miners, kind of like a tip, so that their transactions are included in the next block. Right now there are so many transactions in line that miners choose transaction in order of rewards.

Every block right now is limited to 1 MB of memory and if you don't leave a tip or leave very little, chances are your transaction will not be included in the near future. All transactions are seen on the network, but they are not confirmed until they are included in a block.


Not as easy as it sounds

To get one zero at the beginning is considered very easy, if that was the case then a block would have been found in less than a milisecond with total computational power of all the miners combined right now aprox. 5,530,742,000,000,000,000 hashes per second like we found right now.

That is why the current difficulty requires the miners to find a hash with at least 17-18 zeros at the beginning. This difficulty constantly changes by bitcoin algorithm when Hashing power changes so that blocks are found approximately every 10 minutes.

Mining pools

mining-pool.jpg
Image credits

The mining pools are sort of groups, where a group of miners gathers and work together. They are called miners because their task is to metaphorically “break” the blocks, which carry transactions. They are searching for a hash code of the block to be confirmed, which will open the way for the new blocks like we saw in the example above. But they combine their computational power to find it faster then anyone else, and then just split the reward.

When it is done, the miners share 12.5 BTC, which is around 30,000$ for every block proportionally depending on the computational power that was used by each miner. Each mining pool also takes a percent profit from each block ranging from 0 - 4%.

Here is the block distribution amongst the mining pools

As you can see Antpool is the largest mining pool.

Image is clickable

I hope that you have found this article useful and interesting and I wish you success and a bag full of bitcoin

profit-bitcoin.png
Image credits

Thank you for reading! Follow if you like and don't forget to Steem ON!


medals.jpg

upvote.gif

Sort:  

Круто! На голосе будет?
Еще бы про ноды если б ты нам рассказал для стмита и голоса- было бы класс!

Хорошая идея @dreamon, про это тоже напишу ))

Would be also nice to have a similar post about mining ETH.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by curator-whale from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, and someguy123. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you like what we're doing please upvote this comment so we can continue to build the community account that's supporting all members.

Thanks for explaining it to the more people,
I followed you please follow me back.
only 1 every 1000 people is using cryptos! it is big space for grow!

I started following you, but not because of simple follow back request. I try to follow people with interesting articles. I see no point in having many followers who don't read your blog.

very good article : ) Have read several posts about the same subject, but this is one of the most detailed and comprehensive.

I am so delighted @bymma, thank you for your support as always!

Great post! I've been in crypto for only a few months and as many times as this has been explained to me, its always difficult for me to explain it to someone else. This will definitely help!
Thanks.

I am so glad that you liked it @rdg296. I also saw somewhere on the video a guy explain the actual process of hashing. After that the puzzle was complete and I understood how it actually works.

как это все непросто, @yuriks2000! но статья классная, подробная! ))

Спасибо большое @ladyzarulem, я старался ))