Hacker News new | ask | show | jobs
by yk 4809 days ago
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

1 comments

Yes so we are on the same page. The most computing power in the whole ecosystem i.e mining system.