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: introduce opBNB Haber fork #26

Merged
merged 2 commits into from
Jun 3, 2024
Merged

feat: introduce opBNB Haber fork #26

merged 2 commits into from
Jun 3, 2024

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented Jun 3, 2024

Description

This PR is intended to support the opBNB Haber fork.

secp256k1(P256) verify has been implemented by official revm, but has not been officially released, so just cherry-pick the secp256k1(P256) function into repo.

Rationale

bnb-chain/op-geth#112
https://github.com/bluealloy/revm/pull/1436/files

Example

n/a

Changes

  1. support opBNB Haber Fork

Notable changes:

  • secp256r1 verify supported on opBNB Haber fork.

Potential Impacts

  • no

BrianBland and others added 2 commits June 3, 2024 18:29
* feat(optimism): Add secp256r1 precompile for Fjord

* Fix docs

* Fix nostd build

* Load fjord precompiles via optimism handler register

* Remove outdated fjord() precompile spec constructor

* Document the secp256r1 feature

* Address feedback

* Handle invalid signatures

* Update crates/precompile/src/secp256r1.rs

* Update crates/precompile/src/secp256r1.rs

* Blank return on failed signature verification

* Add test case for invalid (zero) pubkey

---------

Co-authored-by: rakita <rakita@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Valgrind Results:

==5344== Cachegrind, a cache and branch-prediction profiler
==5344== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==5344== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==5344== Command: target/release/snailtracer
==5344== 
--5344-- warning: L3 cache found, using its data for the LL simulation.
==5344== brk segment overflow in thread #1: can't grow to 0x4cb4000
==5344== (see section Limitations in user manual)
==5344== NOTE: further instances of this message will not be shown
Snailtracer Host+Interpreter benchmark (5.6s) ... 1_790_054_879.000 ns/iter (1.000 R²)
==5344== 
==5344== I   refs:      1,348,427,867
==5344== I1  misses:            7,348
==5344== LLi misses:            3,058
==5344== I1  miss rate:          0.00%
==5344== LLi miss rate:          0.00%
==5344== 
==5344== D   refs:        677,299,611  (452,041,250 rd   + 225,258,361 wr)
==5344== D1  misses:        1,229,007  (    687,088 rd   +     541,919 wr)
==5344== LLd misses:          201,528  (      4,406 rd   +     197,122 wr)
==5344== D1  miss rate:           0.2% (        0.2%     +         0.2%  )
==5344== LLd miss rate:           0.0% (        0.0%     +         0.1%  )
==5344== 
==5344== LL refs:           1,236,355  (    694,436 rd   +     541,919 wr)
==5344== LL misses:           204,586  (      7,464 rd   +     197,122 wr)
==5344== LL miss rate:            0.0% (        0.0%     +         0.1%  )

@unclezoro unclezoro merged commit 42c4038 into develop Jun 3, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants