What is Cubipods?
Cubipods is a minimal Ethereum Virtual Machine (EVM) written in Rust. It provides a lightweight and efficient platform for running EVM bytecode, making it ideal for learning how the EVM works, testing bytecode execution, and understanding low-level Ethereum operations. Unlike full EVM implementations that handle transactions, state management, and networking, Cubipods focuses solely on bytecode execution. This makes it an excellent educational tool and a practical utility for developers who need to test and debug EVM opcodes.Why Cubipods?
Cubipods solves several key challenges:Educational
Learn how the EVM works by executing bytecode directly and observing stack, memory, and storage states
Debugging
Test and debug EVM bytecode in isolation without deploying to a full blockchain environment
Lightweight
Minimal implementation focused on core EVM functionality without the overhead of a full node
Transparent
Verbose mode provides detailed execution history, showing exactly how opcodes modify state
Key Features
Cubipods implements the essential components of the EVM:- Lexical Analysis: Tokenizes bytecode and analyzes the included opcodes
- Stack Management: Supports standard stack operations (PUSH, POP, DUP, SWAP) enabling proper opcode execution
- Memory Handling: Implements MLOAD and MSTORE operations to replicate EVM memory behavior
- Storage Operations: Manages SLOAD and SSTORE functionalities as per EVM standards
- Bytecode Execution: Runs user-provided bytecode, processing EVM opcodes sequentially
- Verbose Output: Provides detailed output including execution history and final state of stack, memory, and storage
Supported Opcodes
Cubipods currently supports the following EVM opcodes: Arithmetic & LogicADD,MUL,SUB,DIV,MOD,EXPLT,GT,EQ,ISZEROAND,OR,XOR,NOT,BYTE
POP,PUSH0toPUSH32DUP1toDUP16SWAP1toSWAP16
MLOAD,MSTORESLOAD,SSTORE
STOP,KECCAK256
Example Use Case
Here’s a simple example of what you can do with Cubipods:- Pushes
0x03onto the stack (PUSH1 0x03) - Pushes
0x02onto the stack (PUSH1 0x02) - Adds the top two stack items (
ADD)
0x05 remains on the stack after execution.
Next Steps
Installation
Install Cubipods using Cargo and verify your setup
Quickstart
Execute your first bytecode and explore verbose mode