Probably by now you are aware of the term BITCOIN and if any of you still have a doubt and want to know what it is and how it is used feel free to click here and watch the video on my YouTube channel. so, if you are coming here after watching that video and if you already know what a bitcoin is then lets just see how it is mined?

### What Is A Blockchain ?

Putting the transaction on the blockchain or solving math problems and helping in updating the blockchain this process is called mining. In early 2018s the size of that blockchain is around 150 gigabytes and is still increasing. Blockchain has all the transactions that has ever happened on the bitcoin network and this is what makes it secure.

So, let’s say you are 4 friends and you are playing a game of 1vs1 football and you have decided that all of you will play 10 games in total and the one with most wins will win the entire series. You don’t trust any of your friends and so all 4 of your friends maintain a separate winning table so each of you writes down each win and each loss of every player and after 10 games all of you can compare and see the wins and losses at one place and if any of you four has cheated will be caught as only he’ll have a different record. If you play many games say 100 games eventually you’ll have a bunch of pages and each page is called a block and eventually if you have a chain of pages then it’ll be called a blockchain.

The same is the case with bitcoins 1000’s of people are maintaining this blockchain and helping to update it with their powerful machines. So, whenever each person sends a bitcoin he needs to announce that he’s doing the same so then all the miners can update their record or blockchain (ledger).

### How Is Mining Done ?

Some people exchange money and other just keeps its ledger. when someone sends a bitcoin only 3 details are passed the wallet or account number of the sender the wallet or account number of the receiver and the money or the bitcoin he wants to send. then the ledger keepers make a record of it and in order to add this ledger to the global blockchain the miner needs to solve a math problem created by the cryptographic hash function known as SHA256 secure hash algorithm 256 bits.

It inputs a hash of any size and makes it of a fix size .so let’s say you have a math problem 1+2+3+4=10 and it is easy to find the output if you have the input vales that is 1,2,3,4 and it will be very difficult to find the input vales if you have only the output i.e. 10. A lot of numbers will sum up to 10 1+9,2+8,3+7…. And for this simple equation we have a lot of inputs and hash functions are usually very long so one needs to solve these hashes using a hit and a trail method in order to get a correct input and this is how bitcoins transfers are kept secured. The first person to solve this problem gets to add to the blockchain and this is how mining is done.

### Who Pays When You Mine ?

So, if people are spending thousands of dollars to buy these machines to update the blockchain new 12.5 bitcoins are generated and it keeps of decreasing by half. So, when you mine you get a very little amount of that transaction and if you keep on solving hashes this amount might add to a big number and you may get some profit as well. A computer that is specially designed to solve these math problems take around 10 minutes to solve one problem. there are plenty of mining devices available and you can use your computer to mine as well

Yes, most systems relying on cryptography in general are, including traditional banking systems. However, quantum computers don’t yet exist and probably won’t for a while. In the event that quantum computing could be an imminent threat to Bitcoin, the protocol could be upgraded to use post-quantum algorithms. Given the importance that this update would have, it can be safely expected that it would be highly reviewed by developers and adopted by all Bitcoin users.

The proof of work is also designed to depend on the previous block to force a chronological order in the block chain. This makes it exponentially difficult to reverse previous transactions because this requires the recalculation of the proofs of work of all the subsequent blocks. When two blocks are found at the same time, miners work on the first block they receive and switch to the longest chain of blocks as soon as the next block is found. This allows mining to secure and maintain a global consensus based on processing power.