Facts registry
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
stateRoot
which correctness is verified by the HeadersStore
contract. With such state root a MPT proof can be verified proving the mentioned properties of an account.These properties similarly to the
HeadersStore
can 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
StorageHash
.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.
Last modified 1yr ago