This root hash is then stored on chain, as a verifiable proof of all of the data within every leaf. Allowing anyone to cryptographically verify all the off-chain data within the tree, while only actually storing a minimal amount of data on-chain. Therefore, significantly reducing the cost to store/prove large amounts of data due to this “state compression”.
Solana’s state compression used a special type of merkle tree that allows for multiple changes to any given tree to happen, while still maintaining the integrity and validity of the tree.
This special tree, known as a “concurrent merkle tree”, effectively retains a “changelog” of the tree on-chain. Allowing for multiple rapid changes to the same tree (i.e. all in the same block), before a proof is invalidated.
why do we need multiple changes to a tree in the same block?
State compression merges the two to provide verification of the ledger data via state in an account, which still retains the security and decentralization of Solana itself.