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

new(tests): EIP-2537: BLS12-381 Precompiles #499

Merged
merged 42 commits into from
May 24, 2024
Merged

new(tests): EIP-2537: BLS12-381 Precompiles #499

merged 42 commits into from
May 24, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Apr 9, 2024

πŸ—’οΈ Description

Tests for the BLS12-381 Precompiles added in EIP-2537.

At the moment this PR only contains vectors included in the EIP: https://eips.ethereum.org/assets/eip-2537/test-vectors

  • Add gas calculation tests
  • Add negative tests
  • Add incorrectly formatted input tests

Updated to commit: ethereum/EIPs@57638c1

πŸ”— Related Issues

#498

βœ… Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@marioevz marioevz added the type:test Type: Test label Apr 9, 2024
@marioevz marioevz marked this pull request as ready for review April 16, 2024 14:25
@marioevz
Copy link
Member Author

marioevz commented Apr 16, 2024

Compiled fixtures:
fixtures_develop.tar.gz

These do not contain any other EIP for Prague, and therefore could fail on clients that do implement other EIPs in the same branch.

@marioevz marioevz changed the title [WIP] EIP-2537: BLS12-381 Precompiles Tests new(tests): EIP-2537: BLS12-381 Precompiles Apr 16, 2024
@marioevz marioevz force-pushed the eip-2537 branch 2 times, most recently from 8729572 to 432281c Compare May 17, 2024 12:40
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I commeted a couple of tiny things.

As for extra tests, we could think about adding transition tests. Making sure the precompiles aren't accessible at Cancun but are at Prague. Or rather a single test that tries to use the precompiles correctly before the transition and after the transition.

@marioevz
Copy link
Member Author

As for extra tests, we could think about adding transition tests. Making sure the precompiles aren't accessible at Cancun but are at Prague. Or rather a single test that tries to use the precompiles correctly before the transition and after the transition.

Added in latest commit πŸ‘

@marioevz marioevz merged commit 11d3069 into main May 24, 2024
9 checks passed
@marioevz marioevz deleted the eip-2537 branch May 24, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:test Type: Test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants