Bitcoin mining php 101

Jun Whenever I introduce new people to Bitcoin I tend to get asked quite a few questions about mining. Can anyone mine Bitcoin? What do I have to do to get started mining? Bitcoin mining is essentially transaction validation. When transactions are broadcast to the peer to peer network, someone or some computer needs to verify that the transaction is valid and record it the public transaction database the blockchain.

The process of verifying transactions is actually very easy to do. It only takes a computer a fraction of a second. Adding new transactions to the blockchain, however, is intentionally designed to be much more difficult. To recap, trying to get millions of Bitcoin uses around the world to agree on a single version of the transaction database is no easy task. The Bitcoin protocol requires that those wishing to add additional blocks of transactions to the blockchain provide proof that they expended a scare resource, in this case processing power.

To vote for an alternative transaction history is to waste the processing power and risk losing reward. In this case the output needs to be less than a certain difficulty target. To put it another way, the output needs to start with a minimum number of zeros.

One thought on “Bitcoin 101 [Everything You Wanted To Know About The Cryptocurrency]”

This is done over and over until one miner in the network finds a nonce that produces a valid output. Consider the following example: This is basically how the proof of work in bitcoin works. Miners run the block header through the double SHA hash function over and over, incrementing the nonce each attempt in hopes of producing a hash output that meets the difficult target.

The difficulty is automatically re-calibrated by the protocol every two weeks to target to target a block interval of 10 minutes. That is, since the output of the hash function is random, it should take an average of 10 minutes for one miner in the network to solve the proof of work for any given block of transactions.

The protocol halves the reward every four years according to the following schedule: Megahashes, Gigahashes, and Terrahashes Because the rate with which bitcoins are rewarded is regulated by the protocol, Bitcoin mining is essentially a zero-sum game.

That is, more total processing power in the network does not generate more total bitcoins, it only reduces the reward per unit of processing power. This means that the faster you can perform the SHA calculations, the greater percentage of the total block reward you will earn.