This is the last contract in the basic Herodotus stack, that optimises the process of accessing account properties such as:
- Nonces (If available)
- Balances (If available)
- Storage hash
- Code hash
The first level of storage in account based blockchains are the actual accounts.
Proving those requires having access to the
stateRootwhich correctness is verified by the
HeadersStorecontract. With such state root a MPT proof can be verified proving the mentioned properties of an account.
These properties similarly to the
HeadersStorecan be saved in the state in order to reduce the amount of computation needed each time to access the smart contract storage.
As mentioned above the first level of the storage are accounts. The second one is actual contract storage.
Such storage is committed in a Merkle Patricia Tree where it's root is the account's
As it is a Merkle Patricia Tree anything included inside it, can be proven.
This allows Herodotus to enable access to smart contracts storage.
Smart contracts' storage is a key value database where each key corresponds to 32 bytes of data.