La máquina virtual de Ethereum
Ejecución de bytecode
La máquina virtual de Ethereum es una lección gratuita de Web3 & DApp Development Fundamentals en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Web3 & DApp Development Fundamentals, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Web3 & DApp Development Fundamentals incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
What Is the EVM?
The Ethereum Virtual Machine (EVM) is the runtime that executes smart contract code on every Ethereum node.
It is a sandboxed, deterministic computer shared by the whole network.
A Global Computer
The EVM is often called a world computer. Every full node runs the same EVM and processes the same transactions, arriving at the same result.
This shared execution is what gives Ethereum a single, agreed-upon state.
Stack-Based Machine
The EVM is a stack machine: operations push and pop values from a stack rather than using named registers.
For example, addition pops two values and pushes their sum.
PUSH1 0x05 // stack: [5]
PUSH1 0x03 // stack: [5, 3]
ADD // stack: [8]Bytecode
Smart contracts are deployed as bytecode — a compact sequence of bytes the EVM understands. Solidity source is compiled down to this bytecode.
The EVM never sees your high-level Solidity; it only runs bytecode.
Solidity source
| (compiler: solc)
v
EVM bytecode (0x6080604052...)
| (deployed)
v
EVM executes itOpcodes
Bytecode is made of opcodes — single-byte instructions like ADD, MUL, SLOAD, and JUMP.
Each opcode performs one low-level operation and has a fixed gas cost. We explore opcodes in a later lesson.
Deterministic Execution
The EVM is fully deterministic: the same inputs always produce the same outputs on every node.
This is essential — if nodes disagreed on results, the network could never reach consensus on the state.
256-bit Word Size
The EVM operates on 256-bit words (32 bytes). This large size suits cryptographic operations like hashing and elliptic-curve math.
It is unusual compared to the 32- or 64-bit words of ordinary CPUs.
Gas Metering
The EVM meters gas as it runs. Each opcode deducts its gas cost, and execution halts if gas runs out.
This guarantees termination and prevents any contract from running forever.
The Sandbox
EVM execution is sandboxed: contract code cannot access the network, filesystem, or other processes.
It can only read and write blockchain state. This isolation keeps execution predictable and secure.
EVM-Compatible Chains
Many other blockchains run the EVM or a clone of it — Polygon, BNB Chain, Avalanche C-Chain, and Arbitrum among them.
This EVM compatibility lets developers deploy the same contracts across many chains.
Putting It Together
The EVM is a deterministic, sandboxed, stack-based virtual machine that executes contract bytecode on every node, metering gas and operating on 256-bit words.
Its determinism is the foundation of network consensus.
Quick Check
Test your EVM knowledge.
Recap: The EVM
You learned that:
- The EVM runs smart contract bytecode on every node
- It is a stack-based, deterministic, sandboxed machine
- Solidity compiles to bytecode made of opcodes
- It uses 256-bit words and meters gas
Next: EVM data locations.
Preguntas frecuentes
¿La lección «La máquina virtual de Ethereum» es gratis?
Sí — el texto completo de «La máquina virtual de Ethereum» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Web3 & DApp Development Fundamentals, actualiza a CoddyKit PRO. El curso de Web3 & DApp Development Fundamentals incluye 4 lecciones en total.
¿Qué aprenderé en «La máquina virtual de Ethereum»?
Ejecución de bytecode Practicas Web3 & DApp Development Fundamentals con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Web3 & DApp Development Fundamentals?
No se requiere experiencia previa. Web3 & DApp Development Fundamentals en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.
¿Cuánto tiempo toma la lección «La máquina virtual de Ethereum»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Web3 & DApp Development Fundamentals?
Sí. Cada lección de Web3 & DApp Development Fundamentals incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- La máquina virtual de Ethereum
- Almacenamiento, memoria y pila
- Opcodes
- Cuentas y estado