My Understanding Of How Bitcoin Prevents Double Spending
Each transaction contains references to the input transactions and ever node has to verify all transactions from time immemorial to ensure that the inputs are in fact unspent. Once this is confirmed, and subject to other conditions, the transaction can be added to the block chain.
I can not fathom the practicality of what this means, lets say there have already been 50 million transactions on bit coin, for the transaction after the 50 millionth, each input transaction reference will have been looked against 50 million rows to see if it appears anywhere as an input transactions (it shouldn't) and it was in fact an output transaction
then benefiting the now spender. This is done for all transactions being broadcast in an interval of time before miners can start working for that good looking cipher.
However to make this simple, each nodes maintains a list of unspent transaction references of all nodes (say U list), when is used as a starting point and updated every time a transaction is added and these updates are committed across the network after a transaction block is confirmed giving the starting point of the next block.
Sounds too much hard work for this to be practical.
Does it mean that every miner will have a database of those 50 million records? Isn't that a massive and expensive requirement?
Every miner will compare each input transaction references to each of those 50 million before including the new transaction in a block to ensure that it has not been spent already and was in fact valid?
however to make this simple, each nodes maintains a list of unspent transaction references of all nodes (say U list), when is used as a starting point and updated every time a transaction is added and these updates are committed across the network after a transaction block is confirmed giving the starting point of the next block
Doesn't this go against the principle of not having a book showing each node's balance? In case a node has only 2, 3, 5, or 5000 unspent input transaction references. This more or less boils down to a book of balances that needs to be referred to for each transaction before block inclusion and the new block is committed over it on confirmation (i.e. when a proof of work is found). Does it not?
Given the above post, how close am I to understanding controls over double spending? I am a CPA trying to get my head around this.
Only miners need bother about assembling transactions in blocks. Shoppers and Payers may execute transactions and simply await block confirmation. All transactions shall be broadcast to them and they need not bother recording those unless they are involved or a block confirmation is broadcast.