Lesson #2 Cryptocurrencies mining: this info will blow your mind. Part I
As I posted before, I'm learning all about blockchain and cryptocurrencies. I grasped some basic concepts in Lesson 1 (check here), but now I'm going deeper into the famous and so erroneous term of Bitcoin mining.
What is mining?
No, you're not digging a hole and getting out the digital gold. At least that wasn't the intention of Satoshi Nakamoto. What really mining refers to is the Proof of work required to bring a new block to the blockchain.
** Proof of work?** Yup, to get a new block to the blockchain, your node has to perform calculations. These calculations are straightforward, but the difficulty is to find the correct answer.
The good part comes when a node receives 6.25 BTC as a reward, so mining becomes an exciting task, not only for you and your laptop but also for large mining farms looking intensively at that reward.
As we discussed earlier, blockchain is a sort of database, and the information of all transactions is stored in blocks. What a computer/hardware does is find a valid block that includes X number of transactions. If the block is valid(has to fulfill certain conditions), those transactions are approved and stored in the blockchain.
Why mining exist? Basically, Satoshi's electronic method was intended to solve a problem in digital transactions: double-spending.
And this is something that you need to check always in a new project: Why was this thing created?
In his paper, Satoshi states,
We propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions.
So, no, BTC wasn't created to make you rich, lol.
How the mining process works? Simple.
Imagine that you have 100 nodes in a blockchain, working on finding the next block. Every node receives transactions and starts to calculate the hash of the new block. Node 1 finds a valid hash header for the block and sends it to the rest of the 99 nodes. Those nodes confirm that the information is correct and approve the block by using it to get a new block. Node 1 receives 6.25 BTC and all fees associated with the transactions on that block.
After understanding this, I started to make some dumbs questions like:
Q1:What happens if two nodes broadcast two different valid blocks
A/ One of those blocks will be received first, and it will be used to continue the chain; the other will be dismissed.
Q2:What will happen when the reward in BTC is so little that committing fraud is easier than remain honest? In 2040, for example.
Q3: Can I mine in my old laptop?
A: Yes, you can, but probably you won't get enough money to pay for electricity. (I will address this topic in Part 2)
🤯YOU CAN ONLY MINE CRYPTOS THAT HAVE PROOF OF WORK CONSENSUS!🤯
This means that in the top 50 cryptocurrencies, according to Coinmarketcap, only 10 can actually be mined. These are BTC, ETH, LTC, BCH, DOGE, BSV, MXR, DASH, DCR, RVN.
TRX, ADA, DOT, XRP, USDT, AAVE, EOS, and many others can't be mined. I'm sure you will wonder how these coins are emitted. And that question will be answered soon in further lessons. I intend to understand the basics of all of these coins.
I hope you can understand what I tried to explain. If you want insights about the coding part that allows mining, please comment. Let me your ideas, questions; correct me if I'm wrong; I'm open to all knowledge.
- 2009 Nakamoto, S. A Peer-to-Peer Electronic Cash System. https://bitcoin.org/bitcoin.pdf
Posted Using LeoFinance Beta