I am trying to work out where the data is actually stored. If a contract is deployed with a dynamic array defined, then at the time of deployment no allocation is made for the storage.
I understand there is a sha addressing based system to a disk location for the state variables. But where is that storage? Is this part of the blockchain node?
If the persistent storage is defined based on the contract instance and the storage is dynamic, there must be some kind of pointer to storage.
My reason for asking about this, is to address the scaling question. If contracts start defining large dynamic arrays in state, then the blockchain will need to manage that across the nodes.
I know also a hash tree is kept with a root hash on each node but that does not explain how the state variables are stored in persistent storage for a contract instance.