This question was asked on Reddit a while ago:
Where is the state data actually stored though? On the hard drive of each node? Separate from or within the blockchain? — Reddit: Basic Questions About the Ethereum EVM and State Storage
This question was asked on Reddit a while ago:
Where is the state data actually stored though? On the hard drive of each node? Separate from or within the blockchain? — Reddit: Basic Questions About the Ethereum EVM and State Storage
Conceptually, there are 2 important components of an account-based blockchain:
A "full/archival" node might store all transactions and resulting state transitions for all block heights in a local data store. This would include all historical states, even those no longer valid. This allows clients to query the state of the blockchain at any time in the past without having to re-calculate everything from the beginning. This will likely require very large amounts of disk storage and because it is not strictly necessary, conceptually blockchain data can be separated:
While all chain data will be needed to ensure the cryptographic chain-of-custody and that nothing has been tampered with, old state data can be discarded (known as "pruning"). This is because state data is implicit data. That is, its value is known only from calculation, not from the actual information communicated. By contrast, chain data is explicit and stored as the block chain itself.
So currently, while both chain and state data are stored locally on the node's disk, only the chain data is strictly necessary. State data is can be ephemeral.
Technically the states are assembled into a state tree (patricia-tree) linked to the account (balance in case of EAOs and balance and storage in case of contract's account) and to the blocks (figures bellow). Physically the states are part of the blockchain so you could find them in the .ethereum folder (in a leveldb database) of each full node . For more detail,please visit this link .
@Badr Ballaj
your link is not working. Presumably it should be blog.ethereum.org/2015/06/26/state-tree-pruning .
Commented
Aug 13, 2016 at 0:15
Fusing nuggets of information from multiple sources (primarily, this and this):