The overwhelming majority of bitcoin transactions take place on a cryptocurrency exchange, rather than being used in transactions with merchants. Delays processing payments through the blockchain of about ten minutes make bitcoin use very difficult in a retail setting. Prices are not usually quoted in units of bitcoin and many trades involve one, or sometimes two, conversions into conventional currencies. Merchants that do accept bitcoin payments may use payment service providers to perform the conversions.
Then two things happen. New transactions are added to the Bitcoin blockchain ledger, and the winning miner is rewarded with newly minted bitcoins. The miner also collects small fees that users voluntarily tack onto their transactions as a way of pushing them to the head of the line. It’s ultimately an exchange of electricity for coins, mediated by a whole lot of computing power. The probability of an individual miner winning the lottery depends entirely on the speed at which that miner can generate new hashes relative to the speed of all other miners combined. In this way, the lottery is more like a raffle, where the more tickets you buy in comparison to everyone else makes it more likely that your name will be pulled out of the hat.
The Bitcoin mining network difficulty is the measure of how difficult it is to find a new block compared to the easiest it can ever be. It is recalculated every 2016 blocks to a value such that the previous 2016 blocks would have been generated in exactly two weeks had everyone been mining at this difficulty. This will yield, on average, one block every ten minutes.
Many also fear that the new mines will suck up so much of the power surplus that is currently exported that local rates will have to rise. In fact, miners’ appetite for power is growing so rapidly that the three counties have instituted surcharges for extra infrastructure, and there is talk of moratoriums on new mines. There is also talk of something that would have been inconceivable just a few years ago: buying power from outside suppliers. That could mean the end of decades of ultracheap power—all for a new, highly volatile sector that some worry may not be around long anyway. Indeed, one big fear, says Dennis Bolz, a Chelan County Public Utility commissioner, is that a prolonged price collapse will cause miners to abandon the basin—and leave ratepayers with “an infrastructure that may or may not have a use.”
The Bitcoin protocol was designed to encourage the distribution of hashing power among miners rather than its concentration. The reason? Miners wield power not only over which transactions get added to the Bitcoin blockchain but over the evolution of the Bitcoin software itself. When updates are made to the protocol, it is the miners, largely, who enforce these changes. If the miners band together and choose not to deploy an update from Bitcoin’s core developers, they can stall transactions or even cause the currency to split into competing versions.
Granted, all that real-worlding and road-hitting is a little hard to visualize just now. The winter storms that have turned the Cascade Mountains a dazzling white have also turned the construction site into a reddish quagmire that drags at workers and equipment. There have also been permitting snafus, delayed utility hookups, and a lawsuit, recently settled, by impatient investors. But Carlson seems unperturbed. “They are actually making it work,” he told me earlier, referring to the mud-caked workers. “In a normal project, they might just say, ‘Let’s just wait till spring,’” Carlson adds. “But in bitcoin and blockchain, there is no stopping.” Indeed, demand for hosting services in the basin is so high that a desperate miner offered Carlson a Lamborghini if Carlson would bump him to the head of the pod waiting list. “I didn’t take the offer,” Carlson assures me. “And I like Lamborghinis!”
Let’s start with what it’s not doing. Your computer is not blasting through the cavernous depths of the internet in search of digital ore that can be fashioned into bitcoin bullion. There is no ore, and bitcoin mining doesn’t involve extracting or smelting anything. It’s called mining only because the people who do it are the ones who get new bitcoins, and because bitcoin is a finite resource liberated in small amounts over time, like gold, or anything else that is mined. (The size of each batch of coins drops by half roughly every four years, and around 2140, it will be cut to zero, capping the total number of bitcoins in circulation at 21 million.) But the analogy ends there.
Technically, during mining, the Bitcoin mining software runs two rounds of SHA256 cryptographic hashing function on the block header. The mining software uses different numbers called the nonce as the random element of the block header for each new hash that is tried. Depending on the nonce and what else is in the block the hashing function will yield a hash of a 64-bit hexadecimal number. To create a valid block, the mining software has to find a hash that is below the difficulty target.
Another advancement in mining technology was the creation of the mining pool, which is a way for individual miners to work together to solve blocks even faster. As a result of mining in a pool with others, the group solves many more blocks than each miner would on his own. Bitcoin mining pools exist because the computational power required to mine Bitcoins on a regular basis is so vast that it is beyond the financial and technical means of most people. Rather than investing a huge amount of money in mining equipment that will (hopefully) give you a return over a period of decades, a mining pool allows the individual to accumulate smaller amounts of Bitcoin more frequently.
What bitcoin miners actually do could be better described as competitive bookkeeping. Miners build and maintain a gigantic public ledger containing a record of every bitcoin transaction in history. Every time somebody wants to send bitcoins to somebody else, the transfer has to be validated by miners: They check the ledger to make sure the sender isn’t transferring money she doesn’t have. If the transfer checks out, miners add it to the ledger. Finally, to protect that ledger from getting hacked, miners seal it behind layers and layers of computational work—too much for a would-be fraudster to possibly complete.
Bitcoin mining is the process through which bitcoins are released to come into circulation. Basically, it involves solving a computationally difficult puzzle to discover a new block, which is added to the blockchain, and receiving a reward in the form of few bitcoins. The block reward was 50 new bitcoins in 2009; it decreases every four years. As more and more bitcoins are created, the difficulty of the mining process – that is, the amount of computing power involved – increases. The mining difficulty began at 1.0 with Bitcoin's debut back in 2009; at the end of the year, it was only 1.18. As of April 2017, the mining difficulty is over 4.24 billion. Once, an ordinary desktop computer sufficed for the mining process; now, to combat the difficulty level, miners must use faster hardware like Application-Specific Integrated Circuits (ASIC), more advanced processing units like Graphic Processing Units (GPUs), etc.
Transactions are defined using a Forth-like scripting language.:ch. 5 Transactions consist of one or more inputs and one or more outputs. When a user sends bitcoins, the user designates each address and the amount of bitcoin being sent to that address in an output. To prevent double spending, each input must refer to a previous unspent output in the blockchain. The use of multiple inputs corresponds to the use of multiple coins in a cash transaction. Since transactions can have multiple outputs, users can send bitcoins to multiple recipients in one transaction. As in a cash transaction, the sum of inputs (coins used to pay) can exceed the intended sum of payments. In such a case, an additional output is used, returning the change back to the payer. Any input satoshis not accounted for in the transaction outputs become the transaction fee.