This article focusses on Ethereum Virtual Machine (EVM)-general definition, definition from a programmer’s perspective, state in EVM and more.

Ethereum Virtual Machine (EVM) is a technical topic and before reading it please go through these articles to understand what is Ethereum, Ethereum Client and Accounts and Ethereum Transactions.

EVM-Definition

  • The Ethereum Virtual Machine (EVM) can be described as a one big virtual machine which maintains one given state (in terms of the data or information stored) at one given time.
  • When we look further closely, the EVM is made up of thousands of computers or nodes running the Ethereum client and holding a copy of the Ethereum blockchain.
    (An Ethereum client is an entity which can connect to the Ethereum blockchain and initiate transactions.).
Ethereum Virtual Machine (EVM)
  • Treat EVM as a worldwide machine or network (comprising of thousands of nodes or computers) which anyone can connect to via a Ethereum client and use it for different purposes like sending cryptocurrencies (or tokens) or building and deploying decentralized applications (Dapps). You pay a small fee in Ether to use this large machine or network.

EVM from the perspective of a programmer

  • From the perspective of a programmer EVM is a runtime environment where codes or programs can be written and executed by the network.
  • These codes or programs written in the EVM are called Smart Contracts.
  • These contracts are such that in the event of meeting some pre-defined conditions, they can transfer Ether or other tokens from one account to another. This will happen even after hundred of years (provided Ethereum is operational at the time also). In practical terms, this is because smart contracts are empowered to hold assets (ether or other tokens) in escrow and move them when the terms of the contract are met.
  • The EVM runs bytecodes. Solidity, a high level language is used to write Smart Contract codes which is compiled into bytecodes by the EVM and then executed.

‘State’ in the context of Ethereum Virtual Machine (EVM)

Before this read Merkle Trees here.

By far we have known that all the nodes in the EVM maintain the same state at a specific given time. ‘State’ in this context is a large Data Structure. This is a slightly modified version of a Merkle Tree in which the hashes of all different data are combined together which is reducible to a single root hash stored in the blockchain.

Merkle Tree with a Root Hash H(ABCDEF)

Hence in layman terms ‘State’ in the context of Ethereum is the set of data stored in a specific format or manner. In Ethereum Virtual Machine (EVM) all the discrete computers of which the EVM is composed of, maintain the same state (lets say S), which is also maintained by the larger EVM.

Conclusion

So we understood what is Ethereum Virtual Machine (EVM)-general definition, definition from a programmer’s perspective, state in EVM and more. In the next article we will dig deeper to understand the concepts around Gas and transaction fees in Ethereum.

Till then keep reading and keep learning 🙂

Leave a Reply