Skip to content

Latest commit

ย 

History

History
126 lines (85 loc) ยท 2.79 KB

File metadata and controls

126 lines (85 loc) ยท 2.79 KB

Design Decisions

  1. Stack Implementation: Used Python list with validation for 256-bit values and 1024-item limit
  2. Memory Model: Bytearray with automatic expansion and gas calculation
  3. Storage Model: Dictionary-based persistent storage
  4. Gas Metering: Tracked per-operation with dynamic costs for storage
  5. Type Safety: Pydantic models for all data structures

๐Ÿ“š Documentation


๐ŸŽ“ Learning Journey

This project was built to deeply understand Ethereum's execution layer:

  1. Started with: Basic bytecode interpreter concept
  2. Learned: EVM specifications, opcodes, gas mechanics
  3. Implemented: Full EVM with 50+ opcodes
  4. Tested: 100+ tests covering edge cases and properties
  5. Documented: Complete architecture and design decisions

Key Learnings

  • 256-bit arithmetic: Overflow/underflow handling
  • Memory expansion: Dynamic gas costs
  • Storage patterns: SLOAD/SSTORE gas mechanics
  • Stack manipulation: DUP/SWAP operations
  • Testing strategies: Property-based and fuzz testing

๐Ÿ› ๏ธ Development

Setup Development Environment

make setup

Run Tests

make test

Build Docker Image

make build

Run in Docker

make run

๐Ÿ”ฎ Future Enhancements

  • Precompiled contracts
  • CALL family opcodes
  • CREATE/CREATE2
  • Real-world bytecode execution
  • EVM trace visualization
  • Comparison with geth/execution-specs

๐Ÿ“– References


๐Ÿค Contributing

This is an educational project, but feedback and suggestions are welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for any new functionality
  4. Ensure all tests pass
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE for details


๐Ÿ‘ค Author

FILIBUS YILRIT DIMKA

Built as preparation for Ethereum Foundation internship application.


๐Ÿ™ Acknowledgments

  • Ethereum Foundation for protocol specifications
  • evm.codes for excellent opcode reference
  • Python community for amazing testing tools

If this project helped you understand the EVM, please โญ star it!