-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Motivation** <!-- Why does this pull request exist? What are its goals? --> This pull request exists to implement and refine the modular exponentiation (modexp) precompile functionality as specified in EIP-198. The goal is to ensure compatibility with Ethereum Foundation (EF) tests across various forks and pass pre-merge validation for the functionality. **Description** To implement EIP-198, the following changes were made: • EIP-198: Added support for the ModExp precompile to pass tests from the eip198_modexp_precompile test directory. Current progress:140/144 (97.22%). • EIP-2028: Adjusted calldata gas cost, reducing the gas per non-zero byte from 68 to 16 while keeping the gas cost of zero bytes unchanged. This change was necessary to align with the requirements of the precompile implementation. • EIP-2929: Updated gas cost for CALL opcode to 700 to address compatibility issues for Istanbul tests. This hardcoded adjustment was required to ensure the precompile functions correctly in forks such as Istanbul. To monitor test progress, run the following command: ```Bash cargo test --release -p ef_tests-levm --test ef_tests_levm -- --tests modexp.json ``` <!-- A clear and concise general description of the changes this PR introduces --> --------- Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
- Loading branch information
1 parent
6c3701a
commit ae00775
Showing
5 changed files
with
191 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.