What is the Ethereum Virtual Machine (EVM)? | QuickNode (2024)

5 min read

Overview

The Ethereum Virtual Machine (EVM) is a core piece of Ethereum that helps power the blockchain and smart contracts. It is vital in assisting Ethereum to achieve user adoption and decentralization. In this guide, we will take a detailed look at the EVM to learn what the EVM is and how it operates. Then, we will cover some key points to solidify our understanding.

Prefer a video walkthrough? Follow along with Sahil and learn about the Ethereum Virtual Machine (EVM) in 5 minutes.

Subscribe to our YouTube channel for more videos!

Subscribe

What You Will Need

  • Basic knowledge of Ethereum
  • Basic understanding of data structures and memory

What You Will Learn

  • What the Ethereum Virtual Machine (EVM) is
  • How the Ethereum Virtual Machine (EVM) operates
  • Key takeaways about the Ethereum Virtual Machine (EVM)

What is the EVM?

The Ethereum Virtual Machine (EVM) is the computation engine for Ethereum that manages the state of the blockchain and enables smart contract functionality. The EVM is contained within the client software (e.g., Geth, Nethermind, and more) that you need in order to run a node on Ethereum. Nodes on Ethereum keep copies of transaction data, which the EVM processes to update the distributed ledger. Generally speaking, nodes on Ethereum natively support the EVM as the client software implements this functionality.

Next, let us cover some of the tasks that the EVM performs.

The EVM participates in block creation and transaction execution. In block creation, the EVM sets standards for managing the state from block to block. These states are stored in a Merkle Patricia Trie and hold the ground truth state for Ethereum.

In transaction execution, the EVM executes tasks (e.g., function calls to a smart contract) by interpreting the instructions in Opcodes (machine instructions at a low level); however, the data is formatted in bytecode. To get the data into bytecode, you can use a programming language such as Solidity (i.e., the native programming language for smart contracts) to compile and deploy the smart contract using bytecode.

Note that when the EVM executes tasks, it is limited to the amount of gas provided by the transaction and the overall limitations of the EVM. Gas is a unit of measure for computing power on Ethereum.

To learn more about transactions, check out our guide on What are Ethereum Transactions?

Next, let us take a look at the architecture of the EVM.

How is the EVM designed?

The EVM operates off of a stack-based memory structure and contains memory components such as Memory, Storage, and Stack (which are used to read/write to the blockchain and manage state).

The EVM is considered quasi-turing complete, which means it can solve problems given a set of instructions and inputs but is limited to the amount of gas provided along with the transaction.

Now, let us cover how the EVM operates internally when a transaction's bytecode is being executed or when a new block is being created.

How does the EVM operate?

In this section, we will cover how the EVM operates. Note that this is a high level explanation and doesn't cover every operation of the EVM.

As we mentioned earlier, the EVM executes tasks formatted in bytecode which the EVM interprets in Opcodes. Let us explain how smart contract code (bytecode) is broken down into Opcodes.

For this example, we will reference the Simple storage contract (1_Storage.sol) on Remix.IDE. The simple storage contract's compiled bytecode looks like this:

608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea26469706673582212209a159a4f3847890f10bfb87871a61eba91c5dbf5ee3cf6398207e292eee22a1664736f6c63430008070033

You can see the same bytecode by going to Remix.IDE, navigating to the example 1_Storage.sol contract, and then compiling and clicking the Bytecode copy button.

Note that the EVM only uses 140 unique opcodes; however, there are a total of 256 Opcodes which are 1 byte in length. Now let us look at the bytecode for one of the functions in the contract (e.g., store()).

60003560e01c80632e64cec11461003b5780636057361d1461005957

Each byte in the example above refers to a different Opcode. For example, the first byte (e.g., 60) refers to a PUSH1 opcode, the next byte (e.g., 00) refers to the data being pushed, the third byte (60) refers to the PUSH1 opcode again, and the next byte refers to its input (e.g., e0). To see all the Opcodes for the function above, you can go to evm.codes/playground and input the bytecode into the IDE and click Run (make sure to select Bytecode in the dropdown.

Now that we know a bit more about how the EVM executes bytecode, let us move onto understanding the Ethereum state transition function.

The Ethereum State Transition Function

The Ethereum state transition function is a formula that the EVM processes every time it executes a transaction. The purpose of the function is to make sure transactions adhere to the transaction standard and are technically valid (e.g., correct nonce and valid signature). The formula is as follows:

In the formula above, Y(S, T) is the transition function that takes two arguments, S, which is the old state, and T, which is the new set of instructions. The output is signified as S'

You should now better understand how the EVM operates and is designed. Next, let us cover some key benefits of the EVM.

Key Takeaways

  • Turing complete: Ethereum being Turing complete allows it to be able to run arbitrary logic, unlike other blockchains such as Bitcoin.
  • Composability: Ethereum isn't the only EVM-compatible blockchain. Many Layer 1 (L1) and Layer 2 (L2) chains are EVM-compatible, making it easy to migrate and deploy contracts or transfer tokens between chains. Some examples are Polygon, BNB Smart Chain, Avalanche, and more.
  • Decentralization: The EVM empowers developers to deploy dApps (decentralized applications) on Ethereum.

Additional Resources

If you want to dive deeper into the EVM, check out the following resources:

Or if you're curious about creating your own smart contract, look at our An overview of how smart contracts work on Ethereum guide.

Final Thoughts

Kudos! You now understand a bit more about the EVM. Got ideas or questions, or want to show off what you have learned? Tell us on Discord or reach out to us via Twitter.

We ❤️ Feedback!

If you have any feedback or questions on this guide, let us know. We'd love to hear from you!

What is the Ethereum Virtual Machine (EVM)? | QuickNode (2024)

FAQs

What is the Ethereum Virtual Machine (EVM)? | QuickNode? ›

The Ethereum Virtual Machine (EVM) is a decentralized computation engine that powers the Ethereum blockchain. It is a Turing-complete virtual machine that executes code, enables smart contracts on Ethereum and provides the infrastructure needed for the decentralized execution of code.

What is Ethereum virtual machine evm? ›

The Ethereum Virtual Machine (EVM) is a computation engine which functions as a decentralised computer with abundant applications that can be implemented. It is the central framework in the Ethereum blockchain. The EVM is one entity upheld by numerous connected computers that perform instructions in large numbers.

What does EVM mean Ethereum? ›

The Ethereum Virtual Machine or EVM is a piece of software that executes smart contracts and computes the state of the Ethereum network after each new block is added to the chain. The EVM sits on top of Ethereum's hardware and node network layer.

What really powers the Ethereum virtual machine? ›

The EVM operates using a gas system. Gas is a measure of computational effort required to execute operations like transactions and smart contracts. Each operation has a gas cost, and users pay for gas using Ethereum's cryptocurrency, Ether.

Is EVM a computer? ›

EVM can be imagined as a decentralized computer that contains applications and runs them. Main qualities of EVM are decentralized execution, smart contract runtime environment and transaction processing.

What is EVM in simple terms? ›

EVMs are electronic voting machines that enable the voter with a button for each choice of candidate. An EVM is designed with two units: the control unit and the balloting unit. These units are joined together by a cable.

What is EVM good for? ›

EVM project management streamlines reporting and decision-making processes by providing objective, real-time data on project performance. Managers can quickly identify issues, take corrective action, and generate reports on project health to share with other stakeholders.

What does EVM tell you? ›

Earned value management (EVM) is a project management methodology that integrates schedule, costs, and scope to measure project performance. Based on planned and actual values, EVM predicts the future and enables project managers to adjust accordingly.

Which blockchains use EVM? ›

EVM compatibility is a good stepping-stone in solving this issue, proven by some of the most used blockchains currently: Avalanche, Binance Smart Chain, Fantom Opera, and Polygon.

Who controls the most Ethereum? ›

Top 10 ETH Holders
#AddressWallet Name
10x00000000…03d7705FaBeacon Deposit Contract
20xC02aaA39…83C756Cc2Wrapped Ether
30xBE0eB53F…2404d33E8Binance 7
40x8315177a…4DBd7ed3aArbitrum: Bridge
6 more rows
Jul 8, 2024

Is MetaMask an EVM wallet? ›

If you are going to transfer tokens between EVM-compatible chains,use a bridge. And remember — MetaMask is made to be your wallet no matter the EVM-compatible chain you're on.

Why is Ethereum so powerful? ›

Ethereum enables developers to build and deploy smart contracts and decentralized applications (dApps) without downtime, fraud, control, or interference from a third party.

What is the Ethereum EVM? ›

Ethereum Virtual Machine (EVM) is a software that sets the rules of computing the state of the Ethereum network from block to block. The EVM is a core part of Ethereum as it executes smart contracts, processes transactions, and updates account balances.

Which wallet is EVM? ›

An EVM (Ethereum Virtual Machine) wallet is a fundamental tool for navigating the digital world of Ethereum. It functions as the "engine" of the Ethereum blockchain, facilitating actions like payments and interactions with decentralized applications (dApps).

Where is EVM data stored? ›

Ans. After counting of votes, the EVMs are stored in the strong room; again in the presence of the candidates/their agents and the Commission's Observer.

What is an example of an EVM wallet? ›

MetaMask is a popular EVM compatible crypto wallet. Rainbow is a user-friendly wallet on Ethereum with bridging and cross-chain swaps to Layer 2s. Rabby Wallet is a wallet for Ethereum and all EVM chains. Phantom is a leading multichain crypto wallet on Solana, Ethereum, and Polygon.

Is MetaMask an EVM? ›

MetaMask is natively Ethereum which means it supports EVM networks like Ethereum Mainnet, L2s like Linea and Optimism, and even Polygon.

Is EVM an ERC20? ›

Is EVM an ERC20? No. These are two distinct concepts within the Ethereum ecosystem. The Ethereum Virtual Machine (EVM) is a decentralized environment that enables smart contract deployment and ensures Ethereum smart contracts run consistently across the network.

Top Articles
Rich Americans Are Choosing These Car Brands -- Here's Why | SoFi
8 actions qui vont exploser en 2024
Barstool Sports Gif
Lighthouse Diner Taylorsville Menu
How To Get Free Credits On Smartjailmail
Yi Asian Chinese Union
Emmalangevin Fanhouse Leak
THE 10 BEST River Retreats for 2024/2025
Craigslist Labor Gigs Albuquerque
Craigslist Pets Longview Tx
Samsung Galaxy S24 Ultra Negru dual-sim, 256 GB, 12 GB RAM - Telefon mobil la pret avantajos - Abonament - In rate | Digi Romania S.A.
Rhinotimes
Chic Lash Boutique Highland Village
Hell's Kitchen Valley Center Photos Menu
Craigslist Free Stuff Greensboro Nc
Leader Times Obituaries Liberal Ks
Xxn Abbreviation List 2023
Xomissmandi
Lehmann's Power Equipment
Ally Joann
20 Different Cat Sounds and What They Mean
Today Was A Good Day With Lyrics
U Of Arizona Phonebook
Anotherdeadfairy
Jermiyah Pryear
Southwest Flight 238
Used Patio Furniture - Craigslist
Helpers Needed At Once Bug Fables
Snohomish Hairmasters
Coindraw App
Danielle Moodie-Mills Net Worth
Wolfwalkers 123Movies
Duke University Transcript Request
How to Use Craigslist (with Pictures) - wikiHow
Craigslist Maryland Baltimore
15 Downer Way, Crosswicks, NJ 08515 - MLS NJBL2072416 - Coldwell Banker
Whas Golf Card
Microsoftlicentiespecialist.nl - Microcenter - ICT voor het MKB
Kagtwt
10 Most Ridiculously Expensive Haircuts Of All Time in 2024 - Financesonline.com
Hingham Police Scanner Wicked Local
Columbia Ms Buy Sell Trade
Bartow Qpublic
Samantha Lyne Wikipedia
Citroen | Skąd pobrać program do lexia diagbox?
Craigslist Com St Cloud Mn
Uc Davis Tech Management Minor
Ferhnvi
Sc Pick 3 Past 30 Days Midday
1990 cold case: Who killed Cheryl Henry and Andy Atkinson on Lovers Lane in west Houston?
Black Adam Showtimes Near Kerasotes Showplace 14
Arre St Wv Srj
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 5806

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.