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: add matter-labs based eip1962 precompile impls #1547

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Rjected
Copy link
Collaborator

@Rjected Rjected commented Jun 18, 2024

This add the EIP 196 precompile implementation based on https://github.com/matter-labs/eip1962 instead of the substrate bn library.

This still needs:

  • extensive testing
  • potentially better error conversions
  • benchmarking for ecMul and pairing precompiles

@Rjected Rjected added the feature New feature or lib ability label Jun 18, 2024
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

I would want to leave bn behind a feature gate, in case of a need to switch back easily.

@@ -63,6 +63,9 @@ serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"

# ecAdd, ecMul, ecPairing
bn = { package = "substrate-bn", version = "0.6", default-features = false }
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks unused?

@Rjected
Copy link
Collaborator Author

Rjected commented Jul 2, 2024

The matter labs repo is not no_std compatible, working on it however, so I'll probably need to change from a bn feature to a matter_labs feature, where matter labs is only selected if std is also available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or lib ability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants