-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Discrepancy in ecrecover
#6966
Comments
Bisected to Patching diff --git a/Cargo.lock b/Cargo.lock
index a51c4e0d..c90fa32f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4425,9 +4425,9 @@ dependencies = [
[[package]]
name = "k256"
-version = "0.13.3"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b"
+checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
dependencies = [
"cfg-if",
"ecdsa",
diff --git a/Cargo.toml b/Cargo.toml
index 8ab5b54c..99f6c60e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -190,7 +190,7 @@ toml = "0.8"
tracing = "0.1"
tracing-subscriber = "0.3"
evm-disassembler = "0.4"
-k256 = "0.13"
+k256 = "=0.13.1"
axum = "0.6"
hyper = "0.14" Makes it pass again: $ forge2 -V
forge 0.2.0 (888d349 2024-01-31T17:12:06.315793834Z)
$ forge t
[⠆] Compiling...
No files changed, compilation skipped
Running 1 test for test/Counter.t.sol:ECRecoverTest
[PASS] testEcrecover() (gas: 3675)
Traces:
[3675] ECRecoverTest::testEcrecover()
├─ [3000] PRECOMPILES::ecrecover(0x0000000000000000000000000000000000000000000000000000000000000000, 27, 112399737319495422990437385936927988781381678766989766053545082427252555802136, 107639272725494199625545639165460682519168644661731919450512484113299855167909) [staticcall]
│ └─ ← 0x0000000000000000000000005e97e234ebf6c7d44e8b63d969906f9ca22cc886
└─ ← ()
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.06ms
Ran 1 test suites: 1 tests passed, 0 failed, 0 skipped (1 total tests) |
Ahh
|
Related RustCrypto/elliptic-curves#988 Where did you get that signature from? |
It's not a real signature. I'm abusing |
OK, we should pin k256 until revm fix is released: bluealloy/revm#870 |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (a5171a4 2023-12-23T00:15:43.850312317Z) --- forge 0.2.0 (caef136 2024-01-29T00:20:25.410303708Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
ecrecover
has different behavior on recentforge
(caef136) versus an older one (a5171a4). The discrepancy exists on at least solc 0.8.21 and 0.8.23.The text was updated successfully, but these errors were encountered: