Here was my primitive understanding of bitcoin mining ,and yes it is correct but I had not been able to figure out the constant saying on space about 'computers/miners have to race to find out solution of complex math problem'. What exactly was this math problem? was it Poncre Conjecture? Who was setting this question of problem?
Then there was this concept of distributed/decentralized ledger, ie. ledger/record of transactions to every one. Concepts were quite not connecting ,and I had this incomplete understanding. But all would start to fall in place once I complete this article ,and if it still does not, then you can submit your queries.
So, lets start with foolish-ly made simple situation for the clarity in understanding:
As seen, Michael has 3 btc on Deb. 10. Then he sends 0.5 btc to Abdul on Dec. 12. Michael in fact has 0.5btc ,and is valid transaction.
Now on Dec. 13, he sends 3 btc to Krishna. Now, Michael doesn't have 3 btc. and is invalid.
Recording of time of transaction is so important as if Michael's sending of 3btc to Krishna on Dec. 11 would have been valid transaction. That is called 'distributed timestamp server'.
And the one who says 1st transaction is valid and can be added to blockchain is the MINER orMINING POOL, who gets rewarded some bitcoin. It is not that someone is there deciding to reward miner but it is in bitcoin code itself that the one who appends successful transaction to chain of blocks are rewarded some btc.
Now it is not only one successful transaction that you append, but some 120+ transactions that you find out and append (and that makes one block) that miners are rewarded.
{At the time of this writing, block height has come up to 609851}.
{{Also, Michael, Krishna.. in this diagram are in fact not sender receiver like yours and my computer, but are nodes. Nodes have all ledgers, which we call blockchain by now ,and is published in blockchain.info so that we can view }}
Now what exactly is block. It is a HASH NUMBER of 120+ (do not get stuck with this 120; it is just a give-example) transactions that you (miner) find out which is added before HASHes of reverse chronological HASH NUMBERS that traces back to 1st transaction of bitcoin. [That is the reason why if you go to blockchain.info, block 400 has lot less byte size SHA string than what is of current's 609851 ]
Now what exactly is HASH? HASH is unique number (if of 256 bit length, we call it SHA256) generated by Secure Hashing Algorithm (SHA) {refer to my https://steemit.com/sha/@cryptonauthop/what-is-sha-algorithm-or-hashing-is-this-concept-only-in-crypto-world So in this case, it is that number which has that ledger of all 120+ transactions that has happened from after when previous block's timestamp has ended.
Now with many mining pools competing to add another block in chain, who gets to mine it?
Well, that's well explained in: https://blog.programster.org/bitcoins-mathematical-problem
Now, at the end of this, I as well as you might have understood that the mathematical problem is in fact finding that new hash which can reverse look up all 120+ valid transactions ,and finding that hash number is extremely computational task. Imagine with this:
a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447 is the hash of hello world
Now to find the one digit lower hash value than above hash , which is just 0 added infront, it takes 26 attempts to find out it is hello worlC. That hello worlC in real case is like new set of 120+ valid transactions in bitcoin mining.
Now, why am I explaining it to you ,and why you should bother to understand it in entirety? Well, unless this basic is not understood, all the concepts of Merkel tree, sharding, Ethereum's proof of stake outsmart algo. over btc's proof of work and many more which will be coined in space will sound alien.
This post is a thanks-giving to our 29 Cryptononians community on Christmas Eve.