-
Notifications
You must be signed in to change notification settings - Fork 585
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
k256 later #77
Comments
It is maybe usage problem i didnt check anything. Line 21 in 76f8d00
download ethereum/tests and execute statetests (last arg is path to GeneralStateTests): cargo run --release -p revme -- statetest tests/GeneralStateTests |
Thanks! @tarcieri this is how we use k256: https://github.com/bluealloy/revm/blob/main/crates/revm_precompiles/src/secp256k1.rs#L14-L37 |
Looking at this line of code:
...it seems to be an issue with round tripping a point encoding: https://docs.rs/k256/0.10.2/src/k256/ecdsa/verify.rs.html#158 (it seems like the conversion could possibly be a bit more straightforward there, but I digress) As it were, we just fixed an issue related to point decompression: RustCrypto/elliptic-curves#530 Can you try upgrading to the latest release of |
@tarcieri it is still happening. Here is a litlle bit more info:
|
Interesting. It appears to be recovering the additive identity (a.k.a. point at infinity) for that particular signature/msg combination. Is that at all expected? This does highlight a deeper issue: the I could backport a fix which checks if the point is the identity inside of the recovery function, and returns an error if that's helpful. |
This is from eth/tests, maybe it is made expecially to test that case for consistency between implementations (will dig the test later)
This should be helpful, but let me check what exact behaviour is expected from secp256k1 lib in this case. |
This commit to the |
Tested it agains |
btw test that was failing is called: |
Start running tests on: "bins/revme/tests/GeneralStateTests/"
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░ 2418/2596
thread '' panicked at 'called
Result::unwrap()
on anErr
value: signature::Error {}', /home/rakita/.cargo/registry/src/github.com-1ecc6299db9ec823/k256-0.10.2/src/ecdsa/verify.rs:158:81Error: Statetest(SystemError)
something crashed k256 when enabled berlin/instanbul tests
The text was updated successfully, but these errors were encountered: