Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Really basic question, what's the purpose of mining? Was it just set up as a fair way to distribute the initial coins, or is there a fundamental on-going function it serves?


The main purpose of mining is to secure the block chain. The reward is a the incentive for miners to exist.

Each block that gets mined means that in order to undo a transaction that was previously in the block chain, an attacker would have to mine a block before the network produced another block on the main chain.

So if your transaction was in block 33123, and the chain looks like

  block 41873 : [ parent : ... ]
  block 33123 : [ parent : block 41873 ]
  block 71282 : [ parent : block 33123 ]
then in order to undo block 33123, an attacker would have to produce three blocks:

  block 41234 : [ parent : block 41873 ]
  block 39834 : [ parent : block 41234 ]
  block 58762 : [ parent : block 39834 ]
before the network produced a new block on the main block chain. So the attacker would have to have 3x the computing power of the remainder of the network.


The blockchain concept is used kind of as a distributed timestamp system.

Say you send out the same coins to two different people at once, in a centralised system, that would be detected at the centralised server and the second transaction would fail. With the distributed system that's not possible, so the block chain serves as a timestamp. Whichever transaction gets into the blockchain first is the successful transaction.

However, generating the blockchain requires a lot of processing power, and therefore needs to be subsidized. Initially that is done by rewarding those who generate blocks with coins (i.e. mining). However, as the number of generated coins falls, transaction fees should make up the short-fall.


Mining means no one can create a fake block chain (version of events). To create a fake chain accepted by the network someone would have to solve all the hashing problem linking their fake blocks faster than the bitcoin network. The proof of work linking the blocks means they cant be faked.

The advantage nodes in the P2P network (people running the client software not necessarily mining) don't have to trust any other node or central serve, they just trust the longest block chain in he knowledge that's what everyone else will be doing.

As transactions are only accepted if signed by a private key, so the block chain is just an agreement of the order and time that transactions happen. Also if someone tries to double spend the same money by signing two transactions the block chain is the decision on which one is accepted and which ignored. No one can fake that decision without providing the solution to the extremely hard problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: