Hacker News new | ask | show | jobs
by bradleyland 4813 days ago
Can you explain this in more detail for those of us who don't fully understand how bitcoins come in to existence, because it sounds like one of those things that violate some laws of thermodynamics, like the "hydrogen generator" that you strap to your car to increase fuel economy.

I ask because I know I've heard about people building huge computers with lots of expensive video cards for the purpose of mining bitcoins. Why would so much computing power be required to perform a simple task like processing transactions? Isn't there additional work necessitated by the intentional complexity of the mechanics of bitcoin mining?

I don't know very much about how bitcoins are mined, so I'm speaking from ignorance here, but I'm hoping you can see why the layman observer would need more of an explanation than "Because, of course!"

3 comments

Rather abstractly Bitcoin is a scheme to solve the Byzantine General problem[1]. The problem is, how can we build a trusted history of accounting without knowing which nodes in the network are trustworthy. And the way Bitcoin does this is essentially by letting every miner vote with his CPU power and the history backed by the most computing power wins. Therefore as long as the majority of miners (weighted by their computing power) is honest, you can trust the accounting.

As to the question how Bitcoins come into existence, the miners are in control of the accounting and by design whoever "finds a new block," is allowed to create some Bitcoins (currently 25) out of thin air. The advantage of this is, that even if some very large miner is considering that he could try a 50+1 % attack, he has a strong incentive to stay honest because that way he earns half of the newly mined Bitcoins.

[1] https://en.wikipedia.org/wiki/Byzantine_fault_tolerance

> Therefore as long as the majority of miners (weighted by their computing power) is honest, you can trust the accounting.

As computing power is a function of the expenditure of wealth, this is equivalent to saying "as long as you trust the people who have thrown the most money at having power over the bitcoin system are honest."

Never thought of it that way, but yes. However, those who have thrown the most money at Bitcoin are also those with the highest interest to seeing it succeed.
Sounds very familiar like trusting the entity with the largest arsenal of weapons.
What do you mean by "the history backed by the most computing power wins"? Doesn't each transaction need to be verified by at least 6 miners?

Are you saying that each transaction that is verified has many miners competing to verify it and the one with the most gpu power wins the race? And if so, does that mean that the gpu that won the race an then say it is verified even if to say it is an incorrect transaction would be the truth?

If instead you are merely referring to the 50%> effect, the solution to that is way easier than the potential for abuse intrinsic if the statement quoted above is correct, i.e. simply have more miners.

Bitcoin transactions are stored in blocks, which are then chained together by cryptographic hashes. ( That is, each block contains a hash of the previous one.) To build a valid block, a miner needs to verify that all transactions in the block are valid and solve a cryptographic problem, which requires 10 minutes for the aggregate computing power of the entire network. On the other hand, checking that the block chain is valid is a rather simple task, since it only involves checking if all the hashes are valid.

    B1 -> Bx -> Bx3 -> Bx4      branch (with non valid block Bx)
       \
         ->B2->...              branch with all valid blocks (the miners work on this one)

The trick is then, that the longest block chain (without an invalid block) is assumed to be correct, and the honest miners are all working on this longest chain. ( That is what I meant with 'backed by most computing power.') For a transaction to be verified, there is actually no hard standard but in the Bitcoin paper [1] it is suggested to wait, until the transaction is 6 blocks removed from the newest block, since a malicious transaction could be introduced into the top of the block chain, e.g. at block Bx above. But the honest miners would not accept the block, continue to try to extend B1, and eventually they will find B2. ( And extend this branch.) The attacker ( who is working on the Bx chain) can then perhaps beat the network by luck for a few blocks ( Bx3, Bx4), but assuming the honest miners control most of the computing power at some point they will win. ( It should be noted that AFAIK there are no known deterministic algorithms for creating a valid block. Because of this, who solves the next block is a probabilistic process. So it is not the guy with the most computing power, but some random guy who had a chance proportional to his computing power just like everyone else.)

[1] http://bitcoin.org/bitcoin.pdf

Yes so we are on the same page. The most computing power in the whole ecosystem i.e mining system.
The section on Wikipedia on Bitcoin mining is fairly informative: https://en.wikipedia.org/wiki/Bitcoin_mining#Bitcoin_mining

In short: no, it doesn't really need so much computing power; miners upgrade to improve their relative chances of finding the solution first (which gives them the newly minted coins), and the software automatically increases the difficulty of the process in response. The result is an arms race among miners.

Every time a block is added to the block chain, whoever "solved" that block gets a fixed number of new bitcoins (25 is the current number, I think).

A block contains several pieces of information: a list of transactions, a link to the previous block, some other stuff and a nonce. The nonce is a value used by the mining process. "Solving" a block means finding the value for the nonce that, together with the proper contents of the block, hashes to a hash value that starts with a given number of zeroes. You can't really find a correct nonce any other way than by trying new nonces until you find a correct one, hashing the block each time. This is what the mining process is, in short.