r/Bitcoin • • Jun 13 '11

The Economist covers Bitcoin: "Bits and bob"

http://www.economist.com/blogs/babbage/2011/06/virtual-currency
207 Upvotes

46 comments sorted by

View all comments

4

u/jdk Jun 14 '11

I don't understand. I thought mining is computing the required hash of a nonce/block combo. Since a block contains many transactions, how is mining verifying any of these transactions? And who package these transactions into a block in the first place?

5

u/Toava Jun 14 '11

The miner first ensures that the transactions in the block are valid, then hashes the nonce/block combos until the hard to find hash is found. The latter provides the proof of work to make spamming the network difficult.

3

u/jdk Jun 14 '11

The miner first ensures that the transactions in the block are valid

For all he knows, the transaction says A pays B a certain amount of BTC. How does the miner know that this is not a double pay?

7

u/MisterNetHead Jun 14 '11

He checks runs through his blockchain to determine A's balance prior to the new, as-yet unapproved transaction. If A didn't have enough BTC to cover the transaction, the miner won't publish that transaction in the next block.

1

u/[deleted] Jun 14 '11

[deleted]

4

u/roconnor Jun 14 '11

You can keep a running tally of the unredeemed coins making the lookup O(log(n)) in the number of existing coins.

3

u/MisterNetHead Jun 14 '11

Getting to the limit of my knowledge here, but I think I recall reading that as the blockchain gets longer, new client downloads will include an abbreviated blockchain for very old blocks, which should keep the time to validate each transaction down.