The Ethereum Virtual Machine
Simple, but Powerful
The concept of an arbitrary state transition function as implemented by the Ethereum protocol provides for a platform with unique potential; rather than being a closed-ended, single-purpose protocol intended for a specific array of applications in data storage, gambling or finance, Ethereum is open-ended by design, and we believe that it is extremely well-suited to serving as a foundational layer for a very large number of both financial and non-financial protocols in the years to come - Vitalik Buterin, The Ethereum Whitepaper
At this point of the course, you have become very familiar with the Solidity syntax and are able quite complex smart contracts. While it might appear that there is little left to teach regarding Solidity, the opposite is true; we have learned most of what smart contracts are capable of from a high level, but there is an entire world that we have yet to explore.
Therefore, it is appropriate that we cover the machine that runs your smart contract code: the Ethereum Virtual Machine (EVM). Understanding the EVM serves as a foundation for understanding the security and gas optimization practices that advanced smart contract development requires. Furthermore, learning about the EVM will allow us to introduce Yul, a low-level programming language used within Solidity that allows for low-level programming (in contrast to Solidity's high-level programming).
It is important to note that the EVM is an architecture. There does not exist an EVM; rather, there exists multiple implementations of the EVM (i.e. execution clients) which implement the necessary functionality for the client to compute data from the blockchain. Outside of this though, each execution client has the freedom to implement their version of the EVM as they wish (an obvious example of this is the language which an execution client is written in).
Learning about the EVM may seem scary at first; for many, this will be the first time learning about how a computer works (albeit, a very simple computer). Therefore, we will begin our journey of learning the EVM by first examining an elementary computer before discussing the Turing Machine, the most basic type of computer in which all computers can be reduced to. Afterwards, we will introduce the EVM by discussing the operations the EVM is capable of performing and later introducing the other components that define the EVM.
Last updated