1

To prove a transaction is valid, you must prove that the source address has a balance at least as much as the transaction. How does one prove this in a performant manner? The block chain of bitcoin last I checked is 16G. Surely miners don't scan through 16G of data to check every block to track all transactions that address has ever had.

How do miners and clients speed this up to a fast and cheap operation?

Murch
  • 75,206
  • 34
  • 186
  • 622
Earlz
  • 1,130
  • 2
  • 11
  • 27
  • In essence, they do scan the whole block chain. But they do most of the work up front, when they initially download the chain. Everything that will be needed for verifying future transactions is indexed or cached at that time. – Nate Eldredge Mar 21 '14 at 03:57

1 Answers1

3

Bitcoin doesn't work on balances, it works on transaction inputs and outputs. A transaction's inputs must specify unspent transaction outputs (UTXO) of previous transactions. And clients maintain an index of UTXO to easily find the referenced outputs.

Meni Rosenfeld
  • 19,700
  • 37
  • 70