Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: mega EOF #63

Closed
wants to merge 34 commits into from
Closed

Feat: mega EOF #63

wants to merge 34 commits into from

Conversation

mrLSD
Copy link
Member

@mrLSD mrLSD commented Oct 11, 2024

EVM Object Format (EOFv1)

The EVM Object Format (EOFv1) is a significant upgrade to the Ethereum Virtual Machine (EVM) that introduces a structured, versioned container format for smart contracts. This new format aims to improve the efficiency, security, and extensibility of EVM bytecode by enabling features such as code and data separation, enhanced validation, and easier introduction of future changes.

The EOFv1 is part of the broader initiative known as the Mega EOF Endgame, which is a collection of Ethereum Improvement Proposals (EIPs) designed to evolve the EVM in a cohesive and backward-compatible manner.

You can find the detailed specifications in the "Mega EOF Endgame" Specification (EOFv1).

Key Features of EOFv1

  • Structured Bytecode Format: Introduces a well-defined structure to the EVM bytecode, allowing for better parsing and interpretation by EVM clients.
  • Versioning Support: Embeds version information within the bytecode, enabling backward compatibility and smoother upgrades.
  • Code and Data Separation: Separates code and data into distinct sections, enhancing security and enabling more efficient execution.
  • Enhanced Validation: Implements strict validation rules at deployment time, reducing runtime overhead and potential vulnerabilities.
  • Extensibility: Facilitates the introduction of new features and instructions in future EVM versions without disrupting existing contracts.

Ethereum Improvement Proposals (EIPs)

The EOFv1 encompasses several EIPs, each addressing specific aspects of the EVM's functionality. Below is a summary of these proposals:

Implementation Considerations

Implementing EOFv1 involves updates to EVM clients and tooling:

  • Client Updates: EVM clients need to support parsing, validating, and executing EOF-formatted bytecode.
  • Backward Compatibility: Existing contracts and bytecode remain functional, as EOFv1 introduces versioning to differentiate between legacy and new formats.
  • Tooling Support: Development tools, such as compilers (Soliditiy or other) and debuggers, need updates to generate and interpret EOFv1 bytecode.

Benefits of EOFv1

  • Security Enhancements: Early validation and structured bytecode reduce the attack surface and prevent common vulnerabilities.
  • Performance Improvements: Optimized instructions and better control flow lead to more efficient execution.
  • Future-Proofing: Versioning allows for the introduction of new features without breaking existing contracts, facilitating smooth network upgrades.
  • Developer Experience: Clear separation of code and data, along with new instructions, simplifies smart contract development and maintenance.

The EVM Object Format (EOFv1) represents a significant step forward in the evolution of the Ethereum Virtual Machine, laying the groundwork for future enhancements while maintaining compatibility with the existing ecosystem. By adopting EOFv1, developers and users alike can benefit from improved performance, security, and flexibility in smart contract development and execution.

@mrLSD mrLSD self-assigned this Oct 11, 2024
@mrLSD mrLSD added enhancement New feature or request hard-fork HF-Prague Prague hard fork labels Oct 11, 2024
@mrLSD mrLSD changed the base branch from master to feat/prague-hard-fork October 11, 2024 21:00
@mrLSD mrLSD mentioned this pull request Oct 19, 2024
2 tasks
mrLSD and others added 10 commits November 19, 2024 09:22
* Added Prague hard fork config

* EIP-7702 basic implementation, CI and tests changes

* Refactored Authorization. Added verifacations for Authorization behavior

* Delegation execution and refund gas cost calculation and configs

* Extend EIP-7702 gas calculation

* Added authority code detection

* Added state function for authority code

* Caching for authority

* AUthority warm gas cost calculation

* Redactore IsPrecompile

* Update EVM configs

* jsontests: added validation for EIP-7702

* Fix issies for AUthority validation and Shared state afte tests running

* Refactore warm address logic for EIP-2929

* Fix is-empty-code condition related to EIP-3607

* Fixed Authority signature tests, Added Warm basic Caller, added CI fixtures tests

* Refactore get_authority_target and loop detection

* Remove type: IsPrecompileResult

* Tests pass for EIP-7702 and fixes. Added Prague precompiles

* Fix Prague empty Create Contract issue

* Remove auth_list from CREATE

* Refactore gas cost for create
@mrLSD mrLSD changed the base branch from feat/prague-hard-fork to feat/eip-7702 December 14, 2024 03:10
@mrLSD mrLSD added HF-Osaka Osaks Hard Fork and removed HF-Prague Prague hard fork labels Dec 14, 2024
@mrLSD mrLSD deleted the branch feat/eip-7702 January 14, 2025 22:53
@mrLSD mrLSD closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hard-fork HF-Osaka Osaks Hard Fork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants