Fundamentals
What is a state root?

State roots

The state root is a crucial component of Ethereum's blockchain architecture.

It is a 256-bit (32 byte) hash that represents the entire state of the Ethereum network at a specific block. It acts as a cryptographic summary of all accounts, balances, contract code, and storage on the Ethereum blockchain.

A state root is the root hash of a special data structure called a Merkle Patricia Trie, which efficiently stores all state information. It allows for quick verification of the entire state of the chain without needing to download and process all of its data.

Each Ethereum block contains a block header that contains its associated state root, When transactions are processed and new blocks created, they modify the state, resulting in a new state root for the next block. This mechanism is fundamental to Ethereum's ability to maintain a secure and verifiable record of all accounts and transactions.

Other blockchains

Other blockchains such as the Layer 2 chains that we support utilize similar data structures for storing their state data. Some use the same Merkle Patricia Trie whilst others utilize modified or optimized data structures for their specific use case.

The same concept still applies in all cases - these blockchains have a state root against which the state of a specific data value within a smart contract deployed to that chain can be verified.

Unruggable Gateways works (at a high level) by verifying proofs of a contracts state against this state root.