
Discover how the Ethereum virtual machine (EVM) enables blockchain programmability, explain what EVM compatibility means, and connect virtual machines, distributed systems, blockchains, and smart contract execution.
Discover how the Ethereum virtual machine works and its role on the Ethereum blockchain, designed for techies and analysts with a technical background.
Begin by examining virtual machines, then explore distributed systems, blockchains, and the basics of the Ethereum blockchain. Learn about smart contract execution and the workings of the Ethereum Virtual Machine.
Explain how virtual machines create isolated runtime environments that run applications independently of the host system, enabling platform independence and identical behavior across operating systems.
Compare containers and virtual machines by contrasting lightweight dependency packaging with full hardware-level virtualization, and explore how software layers differ from hardware resources like CPU, RAM, storage, and networking.
Explain how virtualization creates software-based computers by borrowing CPU, memory, and storage from a host, and how hypervisors enable VMs, including type 1 and type 2, to run operating systems.
Explore the benefits and limitations of virtual machines, including cost efficiency, quick deployment, scalability, security through isolation, easy migration for low downtime, and slower performance with many VMs.
The lecture contrasts process and system virtual machines, explaining how the Java Virtual Machine enables platform independence, while system virtual machines are fully virtualized and managed by a hypervisor.
Explore what a distributed system is, where multiple software components on different computers run as a single entity over local or wide area networks, whether near or far.
Explore the benefits of distributed systems: scaling, fault tolerance, and low latency. Learn how horizontal scaling and distributed nodes enhance availability and reduce latency within speed-of-light limits.
Explore the cap theorem and how distributed systems trade off consistency, availability, and partition tolerance. Understand replication across nodes, open system, and security challenges along with higher deployment costs.
Understand how distributed systems rely on nodes running client software to communicate and function as a single, coordinated network.
Contrast master-slave and peer-to-peer distributed systems, showing how a master node controls decisions and slaves execute tasks, versus a peer-to-peer network with no single master and shared responsibility.
Examine use cases of distributed systems across data stores, messaging, and ledgers, highlighting NoSQL advantages and the rise of blockchains and other DLTs such as Hashgraph, DAG, and Holochain.
Explore how decentralized systems differ from distributed ones: peer-to-peer networks with no single decision maker, where each node processes all transactions and uses consensus to achieve a trustless system.
Explore how the consensus process lets nodes on the Ethereum network agree on the world state, validate transactions, prevent malicious entries, and build trust without a central authority.
Explore client diversity in distributed systems, showing Besu and Netheremind execution clients and Nimbus Lighthouse consensus clients across different operating systems, protecting Ethereum and the EVM from single-point failures.
Blockchains function as distributed ledgers, storing encrypted data on multiple nodes across locations and remaining accessible even when some nodes go offline, while ensuring identical states across all nodes.
Blocks batch transactions to ensure all nodes share the same history, with headers containing the last block's hash and bodies with encrypted transactions, created and verified at set intervals.
Explore how blockchain acts as a state machine where a state undergoes a discontinuous change with each new block through state transitions, preserving network information at a specific time.
Explore how blockchain nodes verify identical block data by computing a Merkle root and using Patricia Merkle Tree in Ethereum to ensure consistent hashing across the network.
Explore blockchain consensus mechanisms that validate transactions and secure networks against 51% attacks, covering proof-of-work, proof-of-stake, delegated proof-of-stake, proof-of-capacity, and proof-of-authority.
Explore how blockchain accounts hold crypto assets on distributed ledgers, with public addresses as hashes and private keys that grant ownership and sign transactions.
Smart contracts enable self-executing programs on blockchain networks, function as accounts that hold crypto assets, and carry out tasks as programmed.
Learn how Ethereum uses gas as the network fee and unit of computational effort; fees equal gas times gas price in Gwei and vary with complexity and speed, not value.
Explore the emergence of Ethereum as a general-purpose, turing-complete blockchain born from bitcoin’s limitations and the Mastercoin/Omni efforts, culminating in Vitalik Buterin’s 2013 whitepaper proposing flexible smart contracts.
Explore how Ethereum functions as a deterministic but practically unbounded state machine with a globally accessible singleton state and a virtual machine that executes smart contracts on a decentralized platform.
Contrast Bitcoin and Ethereum as different blockchain paradigms: Bitcoin serves as a decentralized ledger and payment platform, while Ethereum offers a generalized programming platform for diverse applications.
Understand how Ethereum maintains a single world state across all nodes. Blocks form every 12 seconds, updating the world state via the Patricia Merkle root and the EVM.
Compare externally owned and contract accounts on Ethereum. Explain how externally owned accounts use a public-private key pair, while contract accounts run code and incur deployment fees.
Learn Ethereum transactions: cryptographically signed messages that transfer Ether or invoke contracts, initiated by externally owned accounts and serialized with nonce, gas price, gas limit, recipient, value, data, and v,r,s.
Understand nonce, a counter of transactions from an address, that starts at zero and ensures proper ordering and prevents replays to secure Ethereum.
Explore the five Ethereum transaction states—pending, queued, cancelled, replaced, and failed—and how each state affects mining and gas fees.
Explore the two Ethereum transaction types: contract creation and message calls. See how an EOA deploys a smart contract and how a message call interacts with accounts.
Explore the atomicity of Ethereum transactions, which cannot be divided or interrupted and whose gas is not recoverable, while across accounts order is not guaranteed and higher fees drive inclusion.
Explore account state and world state in Ethereum, mapping addresses to nonce, balance, storage hash, and code hash; contract accounts hold EVM code and storage that executes on message calls.
Explore how Ethereum uses contract accounts to run immutable, deterministic smart contracts on the world computer, written in Solidity or Vyper.
Explore how the EVM operates on opcodes rather than high level languages, and how the Solc compiler translates code into bytecodes—series of opcode instructions.
Understand how the Ethereum virtual machine computes account state transitions for smart contracts. The EVM runs on every node, ensuring identical initial and final states, creating a single world computer.
The Ethereum virtual machine (EVM) serves as the runtime environment for deploying and executing smart contracts on Ethereum, a global decentralized computer governed by gas.
Explore how the Ethereum Virtual Machine operates as a stack machine, using a 1024-slot stack with 256-bit items, where push and pop manage data and prevent underflow or overflow.
Explore EVM opcodes and bytecode operations, including arithmetic, bitwise logic, and storage access, and learn how the EVM exposes address, balance, block number, and gas price.
Operate the EVM with a stack-based architecture, storing in-memory values on a stack, using a 256-bit world size, with immutable program code ROM, zero-initialized volatile memory, and permanent account storage.
Explore how the EVM stores smart contracts as bytecode linked to accounts. Learn contract creation and message calls, and how init code sets storage and code hash, nonce and balance.
Explore gas accounting in the Ethereum virtual machine, where gas limits halt execution and prevent runaway workflows. Learn how gas supply, memory, storage, and opcode costs drive reverts on out-of-gas.
Explore EVM compatibility for smart contracts, where byte code interpreted by the Ethereum virtual machine runs on any blockchain or L2, highlighting its status as an industry standard.
One of the most important evolutions that Ethereum has brought is programmability on blockchains. This is made possible with the use of Ethereum Virtual Machine or EVM.
Although the term EVM is known to many - how EVM really works and how EVM fits into the overall workings of the Ethereum Blockchain is not understood widely.
Also, many blockchains, L2s and other related systems claim to be EVM compatible - what does it mean? We cannot understand EVM compatibility without understanding EVMs,
To understand EVM, we need to understand virtual machines, distributed systems, blockchains, smart contract execution on Ethereum etc.
So, this course touches upon all these topics.
To be clear, this is not a programming course but this course requires some prior understanding of software systems.
So, let us dive into it.
Some topics we will touch upon in this course among others:
What is a Virtual Machine?
How do VMs work?
Benefits and Limitations of VMs
Process vs System Virtual Machines
What is a Distributed System?
Benefits and Limitation of Distributed Systems
Clients and Nodes
Models of Distributed Systems - Master-Slave and Peer-to-Peer
Distributed vs Decentralized Systems
Distributed Systems and Client Diversity
What is a Blockchain?
Understanding Blocks
State and State Transition
Blockchain Hashing - Hash Tree and Root
Consensus in Blockchains
Accounts and Smart Contracts
Network Fee - Gas
Difference between Bitcoin and Ethereum
What is Ethereum?
Ethereum Accounts - EOA and CA
Ethereum Transactions
Nonce
Contract Creation and Message Calls
Account State and World State
Smart Contracts on Ethereum and Solidity
Smart Contract Compilation - Opcodes
Role of EVM in Ethereum
What is EVM?
Stack and Stack Machine
EVM Architecture
EVM Code and Smart Contract Execution
Gas Accounting