Wouldn't the same apply to sending a non-zero amount then? Or am I misunderstanding how Block Chain Pruning is planned to work. I thought that we need all the transactions leading up to a particular transaction to make sure there wasn't a double spend. Therefore, we would need to keep the transaction that had the fee attached so that there is a record of how the miner got those particular Bitcoins.
Not exactly.
Without blockchain pruning we keep all transactions so they can be traced back to the origination.
With blockchain pruning we remove transactions where the addresses involved in the transaction have no value (0 BTC) and where the subsequent transactions are "deep enough" in the block chain. Yeah I know I explained that badly. Maybe an example would help.
Say 10 BTC gets transfered like this*
Coinbase origination -> Address A -> Address B -> Address C -> Address D.
*This is simplified obviously there would be multiple branches and change address and fees but the concept doesn't change.
Currently we ensure no double spend by tracing transactions back from D to C to B to A to block origination but that is obviously costly in terms of disk space and will be continually increasing in cost.
With pruning lets say the transaciton transfering coins from B to C is behind a checkpoint (hardcoded hash in the client) and over 400 blocks deep in the block chain. The value of address C is now "secure" even without looking at subsequent transactions.
To reverse that transaction would require building a chain 400 blocks longer than the valid chain AND somehow updating majority of clients to a version of the client without the hard coded checkpoint. We can feel confident this won't happen so we can consider output of the B->C transaction to be canonical.
So we prune them the prior portion of the his sequence.
We keep
Address C -> Address D.
We remove
Address A -> Address B
&
Address B -> Address C
Key point:
No we can only prune a transaction if
a) the address no longer has any value (otherwise coins would be lost)
b) the output of the transaction has been involved in another subsequent input (address C in the example)
c) the transaction in condition b is behind a checkpoint or deep enough in the block chain (preferably both).
Thus a zero BTC transaction even w/ a fee could be pruned. When the fee gets transfered to another address and that transaction is deep enough the 0 BTC transaction is eligible for pruning.
A non zero BTC transaction which never has a subsequent transaction can never be pruned. Yes this means the the fnal transaction of "lost coins" and coins sent to nowhere will always be part of the block chain. Normally that is a limitation of pruning but here we can use that fact to ensure the transaction is never pruned.