-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ethkey doesnt compile as a Cargo dependencyΒ #10894
Description
Before filing a new issue, please provide the following information.
- Parity Ethereum version: 2.5.5
- Operating system: Linux
actual:
Building parity-ethereum as a Cargo dependency on either master or stable branch fails with the following error - while compiling ethkey (v0.3.0):
error[E0277]: the trait bound rand::OsRng: secp256k1::rand::RngCore is not satisfied
Cloning the repository and using Cargo build directly on it is successful, but adding it to another projects Cargo.toml as a dependency produces this error.
expected behavior:
Should be able to compile normally as a cargo dependency without any errors.
steps to reproduce:
- Create a dummy project.
- Add a Cargo.toml with
ethkey = { git = "https://github.com/cartesi/parity-ethereum", branch = "stable" }
dependency. - Add lib.rs with extern crate ethkey;.
- Run Cargo build
how to fix:
Modify eth-secp256k1 inside accounts/ethkey/Cargo.toml:
Change:
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" }
To:
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1", rev = "ccc06e7" }