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

Fix Precompile Address Width #396

Merged
merged 1 commit into from
May 2, 2024
Merged

Fix Precompile Address Width #396

merged 1 commit into from
May 2, 2024

Conversation

nlordell
Copy link
Collaborator

When looking through the code, I realized that I made a mistake in #379. Specifically, we specify that precompiles fit into a uint32, when in fact they fit into a uint16:

https://eips.ethereum.org/EIPS/eip-1352

This PR changes the code to encode the P256.Verifiers type to be a uint16 || address instead of a slightly larger uint32.

Alternatively, we could use a full 96 bits to represent the precompile address and make P256.Verifiers a uint256 (this has a small positive effect on gas usage and code size, as it gets rid of compiler generated masking code).

@nlordell nlordell requested a review from a team as a code owner April 22, 2024 12:59
@nlordell nlordell requested review from akshay-ap, mmv08 and remedcu and removed request for a team April 22, 2024 12:59
@nlordell
Copy link
Collaborator Author

cc @akshay-ap and @mmv08 as this changes the function signature yet again 🙈. I can wait for you to merge your PRs so I can make sure that I don't break anything (I think there is a small needed adjustment in the proxy implementation for example).

@akshay-ap
Copy link
Member

@nlordell there are some merge conflicts.

@nlordell nlordell force-pushed the fix-verifiers-range branch from 3a3e66b to 5104cc1 Compare May 2, 2024 08:20
@coveralls
Copy link

coveralls commented May 2, 2024

Pull Request Test Coverage Report for Build 8920797342

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 8896933042: 0.0%
Covered Lines: 39
Relevant Lines: 39

💛 - Coveralls

@nlordell nlordell merged commit dfb1433 into main May 2, 2024
15 checks passed
@nlordell nlordell deleted the fix-verifiers-range branch May 2, 2024 08:24
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants