feat: Add a wrapper for arkworks for EIP196#2305
Merged
rakita merged 44 commits intobluealloy:mainfrom Mar 25, 2025
Merged
Conversation
Contributor
Author
|
42aaa8c makes the substrate-bn implementation optional, I can also split this off into a separate PR |
CodSpeed Performance ReportMerging #2305 will improve performances by ×2.9Comparing Summary
Benchmarks breakdown
|
rakita
approved these changes
Mar 25, 2025
Member
rakita
left a comment
There was a problem hiding this comment.
lgtm, amazing work @kevaundray!
rakita
reviewed
Mar 25, 2025
This was referenced Mar 25, 2025
Closed
rakita
pushed a commit
that referenced
this pull request
Mar 26, 2025
* add read_scalar, point_add and point_mul into the wrapper * modify bn128.rs to use new api methods * preserve previous semantics * initial commit to add matter-labs wrapper * feature gate matter-labs impl -- make substrate impl still default * update revm and precompile cargo.toml file * use cfg_if * make bn an optional dependency * cfg else -> else_if so that there is no silent fallback * follow same cfg_if pattern as other precompiles * fix optimism * add back `self` import * Push empty commit to trigger CI * cargo fmt * clippy fix * make `bn` the default with revm and revme * fix typo * Update crates/revm/Cargo.toml * Update crates/revm/Cargo.toml * Update crates/precompile/src/lib.rs * Update crates/optimism/Cargo.toml * revert Cargo.toml formatting * multi: - remove bn as optional - if default-features and matter-labs-eip1962 feature is enabled, then we choose matter-labs - remove conditional configs in other parts of code since bn is always available * revert crates/optimism/src/precompiles.rs * revert crates/optimism/src/evm.rs * revert unnecessary changes in crates/precompile/src/lib.rs * revert Cargo.toml changes * revert automatic Cargo.toml formatting * revert formatting on secp256k1 in Cargo.toml * revert c-kzg formatting in Cargo.toml * revert dev key in Cargo.toml * revert c-kzg feature in Cargo.toml * Update crates/precompile/Cargo.toml * Apply suggestions from code review * initial commit of arkworks file -- replace matter-labs * add arkworks depedency * grep replace matter-labs with arkworks * make substrate-bn impl optional * propagate arkworks/std * add comment for substrate-bn impl * Update crates/precompile/src/bn128/arkworks.rs ---------
rakita
added a commit
that referenced
this pull request
Mar 26, 2025
* temp * feat: Add JournalInner * fix(ci): Still run statetests from eth/tests repo (#2306) * feat: Add a wrapper for arkworks for EIP196 (#2305) * add read_scalar, point_add and point_mul into the wrapper * modify bn128.rs to use new api methods * preserve previous semantics * initial commit to add matter-labs wrapper * feature gate matter-labs impl -- make substrate impl still default * update revm and precompile cargo.toml file * use cfg_if * make bn an optional dependency * cfg else -> else_if so that there is no silent fallback * follow same cfg_if pattern as other precompiles * fix optimism * add back `self` import * Push empty commit to trigger CI * cargo fmt * clippy fix * make `bn` the default with revm and revme * fix typo * Update crates/revm/Cargo.toml * Update crates/revm/Cargo.toml * Update crates/precompile/src/lib.rs * Update crates/optimism/Cargo.toml * revert Cargo.toml formatting * multi: - remove bn as optional - if default-features and matter-labs-eip1962 feature is enabled, then we choose matter-labs - remove conditional configs in other parts of code since bn is always available * revert crates/optimism/src/precompiles.rs * revert crates/optimism/src/evm.rs * revert unnecessary changes in crates/precompile/src/lib.rs * revert Cargo.toml changes * revert automatic Cargo.toml formatting * revert formatting on secp256k1 in Cargo.toml * revert c-kzg formatting in Cargo.toml * revert dev key in Cargo.toml * revert c-kzg feature in Cargo.toml * Update crates/precompile/Cargo.toml * Apply suggestions from code review * initial commit of arkworks file -- replace matter-labs * add arkworks depedency * grep replace matter-labs with arkworks * make substrate-bn impl optional * propagate arkworks/std * add comment for substrate-bn impl * Update crates/precompile/src/bn128/arkworks.rs --------- * feat: Add criterion to revme bench command (#2295) * temp code preview * add criterion to benchmarks * added args to fn run() calls in bins/revme/ * modifed the code inside the benchmark tests * left only .replay function inside bench_functions and added minor revisions to the rest of the code * edited comment annotation in burntpix.rs file * added comments and set different default value for warm_up_time * clear all Journal fields * doc * formating change --------- Co-authored-by: kevaundray <kevtheappdev@gmail.com> Co-authored-by: nemnem7 <115541090+nemnem7@users.noreply.github.com>
This was referenced Mar 27, 2025
Closed
Closed
Closed
Closed
Closed
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supercedes and is based off of #2266 .
It uses the same code that #2266, however it replaces the matter-labs implementaton for EIP9162 with an arkworks implementation. This arkworks implementation was benchmarked in #2285 -- the code in the arkworks.rs file in that PR was essentially copy and pasted.