How are wallet balances calculated on the Algorand blockchain?
Say our community is currently trying to generate block #B of the blockchain. In order to validate the transactions on block B, we need to know that the pre-payment balances of all payers involved in block B exceeds the amounts they’re paying. How these balances kept track of on the Algorand blockchain?
You could, as a starting point, say that everyone’s balance right before the genesis block was 0. But not keeping a more recent running total of everyone’s balance is very computationally inefficient. e.g. let’s suppose Algorand aspires to have the throughput of an enormous network, e.g. Visa. Then, assuming 10K transactions per second, there would be about 3.15 * 10^11 transactions each year. Assuming that high throughput, to calculate up-to-date balances from scratch would require, at the very least, reading 3.15 * 10^11 transaction lines…that becomes intractable at a certain point (in the not-too-distant future, I hope).
…you could circumvent this problem by appending an up-to-date balance sheet at the end of every block (or at least every so often).
Can anybody confirm: is calculating these up-to-date balance sheets part of the Algorand blockchain protocol? Or are balance sheets being calculated from scratch with every new block?!