How do miners/clients prove a transaction is valid?

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?

Earlz

Posted 2014-03-20T00:00:27.703

Reputation: 980

Question was closed 2014-03-21T03:55:12.740

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 2014-03-21T03:57:15.667

Answers

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

Posted 2014-03-20T00:00:27.703

Reputation: 18 542

Other than for ease of computation, is there a reason for this? Also, I'm finding this question illuminating

Earlz 2014-03-20T00:09:06.997

@Earlz: I guess it boils down to ease of computation.Meni Rosenfeld 2014-03-20T00:22:14.337