Bitcoin Mining

With bitcoin, all transactions are publicly recorded; however, the public details only lead to a public key/wallet, not an actual person. People can generate as many wallets/addresses as needed. This is in contrast to the traditional system where anonymity is achieved by the public trusting a third party who in turn trusts its users and controls their information for them. Further, the identity of the user is not necessarily needed as only the public/private key pair is required to complete the transaction. By cutting out the third party “middle men” in the form of Paypal and credit card companies, the user is able to better control their personally identifiable information on the Internet. In the wake of numerous Internet attacks in which financial institutions and merchant websites were hacked and their customers’ information was leaked to the public, being able to control what information (if any) businesses get is a good thing. Stolen databases and outdated security on even the most well respected companies has proven that they cannot be fully trusted to protect one’s information; therefore, the inherent ability of bitcoin to put the user in control of their private information is positive.

The Bitcoin pdf outlines how coins are transferred from one user to another using public and private key encryption. The hashes build upon each other to create a chain that is stored as public record.

The public record of transactions across the bitcoin network is known as the block chain. As transactions are made within the network, the coins are signed and the network is notified of the change. The bitcoin wallet will then display the transaction as unconfirmed. Within a few hours; however, the bitcoin network will pick up these transactions and verify them. The transactions are confirmed once they have been verified by at least six computers on the network and have been added to the block chain. This block chain is the culmination of every transaction across the bitcoin network and is composed of blocks which are then composed of transactions. These transactions are sequentially identified by the network and are incorporated into a chained proof of work system which secures the transactions from being modified. The longest block chain on the bitcoin network is the record of transactions that the bitcoin wallets trust and query to confirm a transactions’  status. This method is very secure as an attacker would have to harness more computing power than the entire bitcoin network, and generate a new block chain from scratch, and then catch up to and surpass the ever growing honest chain, which is an extremely unlikely scenario as the computational power of the bitcoin network currently rivals that of the world’s fastest super computers. The attacker would have to do this because of the chained proof of work aspect mentioned above.  This property requires that every transaction builds upon the previous one. If even a single transaction in block chain is modified, the hashes from that point on would not match the honest chain and would then cause that chain to be discarded. This property of the block chain is the reason why it becomes more trusted the longer it becomes, and why bitcoin wallets only trust the longest chain.

The programs that perform these proof of work calculations to confirm transactions and incorporate all of the known transactions into a new block (which is further incorporated into a block chain) are known as miners. Mining programs use brute force methods to find and verify pending transactions by increasing a number such as 1 until that number in addition to the transaction data will match certain special properties when hashed using SHA2. While the correct result is relatively easy to verify, it is computationally intensive to calculate. Only a single call is required to determine that the specific nonce, or number, that the miner has paired with the transaction data is correct; however, the trial and error of, for example, starting with the so called payload data and sequentially increasing that number until the correct one is found is very computationally intensive, and takes much longer than it does to verify the correct result (which is unknown to the miner until it is discovered by trial and error). The miner is able to determine a correct result when the hash of the nonce and payload data have certain specific properties, most notably a certain number of zeros. Graphics cards and specialized hardware are especially suited for the highly parallel brute force mining calculations and are many times faster and cheaper to run from a hashing power per kilowatt hour cost standpoint than even the fastest consumer grade CPUs. The “hashing power” is reported by the mining programs as mhash/s, and represents the raw processing power of the hardware in calculating a million hashes per second.

8-bit-coin.  Get it?

In addition to securing the network and verifying pending transactions by generating the longest honest block chain, mining is also the method that is used to place Bitcoin into circulation. Bitcoins, of which there will only ever be 21 million, are given as a reward to the first miner to find a block and verify the transactions. Currently that reward is 50 BTC (bitcoin) plus any transaction fees, and will decrease over time until all bitcoins are in circulation. At that point, miners will be rewarded with the transaction fees included in the transactions they are verifying. Due to the need to control the number of bitcoins that enter circulation so that they are released over time and not all at once (and are allowed to grow with the adoption rate of BTC and the network size), the difficulty of finding a block is adjusted every 2016 blocks to either increase or decrease difficulty according to the current hashing power of the entire bitcoin network. The network adjusts the difficulty such that these 2016 blocks are found within a two week time frame, which amounts to 6 blocks per hour. These difficulty increases have made GPUs the only viable and cost-conscious decision as CPUs simply do not have enough hashing power to justify the electricity cost of running them.

GRAPHIC: Diagram of pool mining made up of individual contributors

As competition between miners began to rise as they attempted to amass the most processing power so that they would be more likely to find a block first, pool mining was born. Pool mining consists of many individuals contributing their computational power to a pool, which then allows them to work together to find blocks. The reward for finding that block is then distributed among everyone who contributed to the pool based on varying methods; the most common distribution methods being a proportional percentage, a flat pay per share payment, or a score based percentage. Mining in a pool allows individuals a smaller, more steady stream of bitcoin then mining solo which has a higher payoff (as one gets to keep the entire 50 BTC reward instead of only a percentage of it) but is much more sporadic. Both solo miners and pools are both susceptible to “luck” which is a representation of the total number of blocks found during that day versus the number that they found and thus were rewarded for. Due to the much higher computational power of the pooled resources of the mining pools, they have a better chance of finding a block.

« PreviousNext »