Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

ethkey doesnt compile as a Cargo dependencyΒ #10894

@felipeargento

Description

@felipeargento

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" }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions