-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Remove k256 crate from frame-support dependencies #14452
Conversation
Please merge in master and format the code with nightly to get the CI green. |
Interestingly this annoys my machine - seems to not find the right includes when building secp256k1-sys v0.6.1. I thought I would mention it in case it's not just my machine. (if anyone has a nix-shell or flake that builds this do please throw me a link) |
I reproduced this issue with AppleClang shipped with Xcode. AppleClang doesn't include wasm32 target, so build will fail with the error In Intel Mac, the This can be solved by setting environment variables like: export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
export AR=/opt/homebrew/opt/llvm/bin/llvm-ar If using Intel Mac, but the error is export AR=/usr/local/opt/llvm/bin/llvm-ar |
@liamaharon Can you share the result of I thought that I can look into the issue further, but if it hinders the development, feel free to revert the commit. I am sorry for annoying. |
Could we switch the native dep with https://github.com/paritytech/libsecp256k1 to get round these problems? (I see this is mentioned here: #13624 ) |
@conr2d I checked LDFLAGS is also set correctly. Is anyone else running a Macbook Pro M2 Max able to confirm they're having the same issue as me? |
I figured it out, it was a local config issue. I had |
Yeah let's revert it: #14499 |
* Add test for to_eth_address * Replace k256 with secp256k1 * Bump Cargo.lock * Reformat
* Revert "Remove k256 crate from frame-support dependencies (paritytech#14452)" This reverts commit 75be6e2. * Keep the test
Description
This PR removes
k256
crate fromframe-support
dependencies.k256
is used only for converting a compressed secp256k1 public key of Substrate to an uncompressed one to derive Ethereum address. This also can be donesecp256k1
crate that is already used bysp-core
. This PR removes redundant dependency.Checklist
A
,B
,C
andD
required)