6. State Management
6.1 Merkle-Patricia Trie (MPT)
Kortana uses a single Ethereum-compatible Merkle-Patricia Trie for the world state. Both EVM and KVM execution engines read and write to this exact same trie structure.
6.2 World State & Account Model
The world state maps addresses to AccountState.
- Externally Owned Accounts (EOAs): Controlled by a private key. Have a
nonceandbalance, but emptystorageRootandcodeHash. - Contract Accounts: Controlled by their code. Have a
nonce,balance,storageRoot(pointing to a sub-trie of contract data), and acodeHash.
6.3 State Proofs (EIP-1186)
Because the state trie format matches Ethereum, Kortana natively supports EIP-1186, allowing clients to request cryptographically verifiable Merkle proofs (eth_getProof) of an account's balance or storage slot.
6.4 Known Limitation: No Archive State
[!WARNING] Kortana does not currently maintain an archive state. The world state stores data by current value. State query methods (
eth_getBalance,eth_getStorageAt) accept a block parameter but will ignore historical parameters and return the current state. Tooling querying historical balances will silently receive the present balance.