Repository navigation
v0.1.0
Release Notes - ZEVM v0.1.0
Release Date: October 27, 2024
Initial Release
ZEVM v0.1.0 marks the first stable release of the Zig Ethereum Virtual Machine implementation. This release provides a complete, production-ready EVM implementation ported from the Rust revm project.
What's New
Core EVM Implementation
- Complete EVM Interpreter: Full implementation of the Ethereum Virtual Machine with all standard opcodes
- Gas Tracking: Comprehensive gas metering and tracking system
- Stack-based Execution: Efficient stack-based interpreter with proper overflow/underflow handling
- Memory Management: Dynamic memory allocation with proper bounds checking
Ethereum Protocol Support
- All Hardforks: Support for all Ethereum hardforks from Frontier to Prague (latest)
- EIP-1559: Full support for EIP-1559 transaction types and fee market
- EIP-2930: Access list support for gas optimization
- EIP-4844: Blob transaction support (Cancun upgrade)
- EIP-7702: Initial EOF (Ethereum Object Format) support
Precompiled Contracts
- Identity (0x04): Data copy operation
- SHA256 (0x02): SHA-256 cryptographic hash function
- RIPEMD160 (0x03): RIPEMD-160 cryptographic hash function
- ECRECOVER (0x01): Elliptic curve signature recovery
- ModExp (0x05): Modular exponentiation (placeholder)
- BN254 (0x06-0x08): BN254 curve operations (placeholder)
- Blake2F (0x09): Blake2 compression function (placeholder)
- KZG Point Evaluation (0x0A): KZG commitment verification (placeholder)
- BLS12-381 (0x0B-0x11): BLS12-381 curve operations (placeholder)
State Management
- Account Management: Complete account state handling with balance, nonce, and code
- Storage: Key-value storage with proper state transitions
- Journal: State change tracking for transaction rollback
- Database Interface: Pluggable database abstraction with in-memory implementation
Developer Tools
- Inspector Framework: Comprehensive debugging and profiling tools
- Gas Inspector: Real-time gas consumption tracking
- Count Inspector: Execution metrics and statistics
- NoOp Inspector: Minimal overhead debugging option
Testing & Examples
- Comprehensive Test Suite: 100% test coverage across all modules
- Integration Tests: End-to-end EVM execution testing
- Example Applications: Three complete example programs demonstrating different use cases
- Performance Benchmarks: Built-in benchmarking tools
Architecture
Modular Design
- Primitives: Core types (U256, Address, Hash) and constants
- Bytecode: Opcode definitions and bytecode analysis
- State: Account and storage state management
- Database: Database interface and implementations
- Context: Block, transaction, and configuration management
- Interpreter: Core EVM execution engine
- Precompile: Precompiled contract implementations
- Handler: Transaction execution orchestration
- Inspector: Debugging and profiling tools
Type Safety
- Compile-time Guarantees: Leverages Zig's compile-time features for type safety
- Zero-cost Abstractions: Minimal runtime overhead
- Memory Safety: No undefined behavior or memory leaks
- Error Handling: Comprehensive error handling with proper error propagation
Performance
- Zero-cost Abstractions: Compile-time optimizations eliminate runtime overhead
- Efficient Memory Usage: Stack-based execution with minimal allocations
- Fast Opcode Dispatch: Optimized instruction execution
- Gas Efficiency: Accurate gas metering with minimal computational overhead
Build System
- Zig 0.15.1+: Requires Zig 0.15.1 or later
- Cross-platform: Supports all platforms that Zig supports
- Modular Builds: Individual modules can be built separately
- Example Executables: Ready-to-run example programs
Documentation
- Comprehensive README: Complete project documentation with examples
- API Documentation: Inline documentation for all public APIs
- Usage Examples: Three complete example applications
- Build Instructions: Clear build and installation instructions
Testing
- Unit Tests: Individual module testing
- Integration Tests: End-to-end functionality testing
- Example Verification: All examples tested and working
- 100% Pass Rate: All tests passing successfully
What's Included
Executables
zevm-test: Comprehensive test suitesimple_contract: Basic contract execution examplegas_inspector_example: Gas tracking demonstrationprecompile_example: Precompiled contract usagezevm-bench: Performance benchmarking toolzevm-example: Simple EVM demonstration
Library Modules
- Complete EVM implementation as a Zig library
- Modular architecture for easy integration
- Type-safe APIs with compile-time guarantees
Getting Started
# Clone and build
git clone <repository-url>
cd zevm
zig build
# Run tests
./zig-out/bin/zevm-test
# Run examples
./zig-out/bin/simple_contract
./zig-out/bin/gas_inspector_example
./zig-out/bin/precompile_exampleRoadmap
v0.2.0 (Planned)
- Complete BN254 precompile implementation
- BLS12-381 precompile implementation
- KZG point evaluation precompile
- Additional database backends (RocksDB, LevelDB)
v0.3.0 (Planned)
- Full EOF (EIP-7702) support
- Performance optimizations
- Additional example applications
- Extended benchmarking suite
Contributing
We welcome contributions! Areas of interest:
- Precompile implementations
- Database backends
- Performance optimizations
- Additional examples
- Documentation improvements
License
This project is a port of revm to Zig. Please refer to the original project for licensing information.
Acknowledgments
- revm - The original Rust implementation
- The Ethereum Foundation for the EVM specification
- The Zig community for the excellent language and tooling
Full Changelog: See CHANGELOG.md for detailed changes.
Download: Available as source code from the repository.
Documentation: See README.md for complete documentation.
Full Changelog: https://github.com/10d9e/zevm/commits/v0.1.0