0

I am beginning to understand the mechanism of bitcoin blockchain, and I was wondering something.

The transactions history represents the 'state' of the bitcoin at any point (or EVM according to the Ethereum whitepaper).

Blockchains address the problem of double spending by recording ALL transactions ever done using the particular currency in the blockchain, from genesis till date. Inevitably the size of the chain keeps increasing and will continue to do so indefinitely.

My question is, why is there a need to track transactions? Why cant we just track the balance in every account?

I understand the problem of double spending, and how a person can try to spend the same money twice. We associate the balance of an account with a public key of the account. the transaction history provides us with a way to track the balances.

But why cant we discard the transaction, and just store the remaining balance after verifying the transaction? Why does the 'how the money got there' important?

Why is double spending an issue with this approach (because if a transaction is verified, then the balance in the account must go down?) What I am asking is, why cant we track ALL ACCOUNTS instead of ALL TRANSACTIONS? (this way the blockchain size is a function of number of nodes, not number of transactions)

0

why is there a need to track transactions? Why cant we just track the balance in every account?

Well, for a start, the Bitcoin protocol has no concept of accounts or balances.

To change Bitcoin to work on the basis of balances would throw up some interesting problems

  • how does a node calculate the balance in the first place?
  • how do we relate transactions to balances?
  • how are accounts created, managed and authenticated in a global trustless peer to peer system?

Any cryptocurrency that addresses these is clearly so vastly different to Bitcoin that it couldn't reasonably be named Bitcoin.


A bitcoin node doesn't need to store the whole transaction history. This is why there are pruning nodes. However a pruning node needs to have processed all transactions so that it can discard transactions whose outputs have all been subsequently spent. In your hypothetical account-based cryptocurrency a node would also have to process all transactions to calculate the correct balance. The main alternative is to trust some other nodes run by other people and hope that they are honest.


Double spending also poses some interesting problems for an account based peer-to-peer cryptocurrency. A global network of nodes can't guarantee that all nodes see the same blocks or transactions in the same order. There has to be a deterministic method of reconciling differences that are guaranteed to converge on a common outcome.

If one node receives first a transaction that reduces some other person's account (e.g. A gives 4 of their 5 BTC to B) and a different node first receives a conflicting transaction (e.g. A gives 3 of their 5 BTC to C) , the first node presumably rejects the A-C transaction (insufficient balance) while the second node rejects the A-B transaction for the same reason.


Storing a list of all transactions with unspent outputs may seem like a chore. But having each node storing and continuously updating at least one account balance for each of 7 billion people might also be a challenge.


There will be cryptocurrencies that address these issues but those are not Bitcoin. So it isn't really sensible to ask whether Bitcoin could do this. If it did it wouldn't be Bitcoin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.