...by Daniel Szego
"On a long enough timeline we will all become Satoshi Nakamoto.."
Daniel Szego

Tuesday, August 7, 2018

Adding an account to the blockchain in a balance based system

In an account/balance based blockchain solution not only the transactions but the accounts and balances are stored in the blocks as states. It is an interesting question how such a system can be implemented. As the state is built up practically by the set of <account,balance> tuples a new account should be somehow added to the state. There might be the following possibilities for that:
- explicit transaction for adding an account to the state.
- implicit transaction for adding an account to the state, with a logic, like: if account not exist in state than add with the initial data.
- some kind of a tricky hash structure that indirectly stores or the possible accounts, but not store them directly. Certainly, it is questionable if such a thing can be realized with the structure consideration of the blockchain. 

A further question arises how such an account should be deleted from the state. A simple zero initialization is surely not enough as we are not sure if that is really an intention to delete. The clearest way is to have the possibility for something as an explicit delete transaction that deletes the given account from the state.