https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf
Ethereum has a world state, which can be said as a storage place or a permanent state place where all the NFT, DEFI, Tokens, Current Account Balances resides or captured in, called as
World State .
At one time ethereum has only one World state, which is a current world state. There is a history of world state which are called historical world states which we can see but normally we only care about the Current world state and changes. World state transits from one world state to the most current world state whenever the new Block is mined.
Block which is mined contains bunch of transactions in it , each transactions represent a change in the world state. so when block is applied on the system it changes the world state from previous one to the most current one. EVM plays the role to compute the state transitions. EVM takes these transactions from the starting state and compute to latest state.
Basically all those defi , nft and etc etc are just accounts and their balances in the world state.
There are two types of accounts, externally owned accounts and contract accounts. externally owned accounts contain nonce and balance only , just two numbers, But contract account state also contains storage hash linking to storage and code hash linking to code . EOA is controlled by private key and cannot contain EVM code. contract contains EVM code and is controlled by EVM code.
Entire World state contains these accounts either EOA or Contract accounts.
The way ethereum client implement the root state carrying both type of accounts, sorting, quick accessing of these accounts is that they store it in Merkle Patricia Trie . It is a Data Structure, having all of the accounts in it. EOA and Contract Accounts are the leafs of the trees. EOA accounts only contains nonce and balances so there is no more additional thing attached to their trees means they just end their But the Contract Accounts have Storage associated with them so their leafs are extending with their own Merkle Patricia Trie as an account state.
THAT WHOLE Giant DS IS AN ETHEREUM STATE
EVM computes and do the changes in this Giant Data structure whenever the new transaction appears and is processed . Whenever even a single account changes it effects the whole state root being changes because all the accounts , balances etc are Hashed together. so whenever the new block is mined and is applied on ethereum client it changes the state root and it is all done by the help of computation done by EVM. (EVM: It computes the state changes).
Ethereum Virtual machine layer :
Ethereum node (geth, parity , …) which is a software , a runtime system for evm and it runs on any hardware like on processor. Within the ethereum node we have evm.
