From b1625f1a448d1f89e7b9a79ea5dda11f5c9c66d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 20 Nov 2019 21:33:20 +0100 Subject: [PATCH] Fix `node-rpc-client` compilation (#4159) * Fix `node-rpc-client` compilation * Enable `alloc` feature of `zeroize` on `std` --- substrate/Cargo.lock | 10 ++-------- substrate/client/network/Cargo.toml | 2 +- substrate/primitives/core/Cargo.toml | 3 ++- substrate/primitives/timestamp/src/lib.rs | 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 8684cd7dbc..96f5050162 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -5939,7 +5939,7 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6052,7 +6052,7 @@ dependencies = [ "tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7632,11 +7632,6 @@ name = "zeroize" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "zeroize" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "zeroize" version = "1.0.0" @@ -8215,7 +8210,6 @@ dependencies = [ "checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" "checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" "checksum yamux 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2758f29014c1cb7a6e74c1b1160ac8c8203be342d35b73462fc6a13cc6385423" -"checksum zeroize 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4090487fa66630f7b166fba2bbb525e247a5449f41c468cc1d98f8ae6ac03120" "checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" "checksum zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cdc979d9b5ead18184c357c4d8a3f81b579aae264e32507223032e64715462d3" "checksum zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" diff --git a/substrate/client/network/Cargo.toml b/substrate/client/network/Cargo.toml index b00132dea9..c92410f02a 100644 --- a/substrate/client/network/Cargo.toml +++ b/substrate/client/network/Cargo.toml @@ -47,7 +47,7 @@ test_client = { package = "substrate-test-client", path = "../../test/utils/clie test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client", optional = true } erased-serde = "0.3.9" void = "1.0.2" -zeroize = "0.10.1" +zeroize = "1.0.0" babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" } [dev-dependencies] diff --git a/substrate/primitives/core/Cargo.toml b/substrate/primitives/core/Cargo.toml index ea7bffb6a5..9e6b984ac2 100644 --- a/substrate/primitives/core/Cargo.toml +++ b/substrate/primitives/core/Cargo.toml @@ -28,7 +28,7 @@ tiny-bip39 = { version = "0.6.2", optional = true } hex = { version = "0.4", default-features = false, optional = true } regex = { version = "1.3.1", optional = true } num-traits = { version = "0.2.8", default-features = false } -zeroize = { version = "0.10.1", default-features = false } +zeroize = { version = "1.0.0", default-features = false } lazy_static = { version = "1.4.0", default-features = false, optional = true } parking_lot = { version = "0.9.0", optional = true } libsecp256k1 = { version = "0.3.0", default-features = false, optional = true } @@ -93,6 +93,7 @@ std = [ "externalities", "primitives-storage/std", "runtime-interface/std", + "zeroize/alloc" ] # This feature enables all crypto primitives for `no_std` builds like microcontrollers diff --git a/substrate/primitives/timestamp/src/lib.rs b/substrate/primitives/timestamp/src/lib.rs index 4afb4f9151..028f44f378 100644 --- a/substrate/primitives/timestamp/src/lib.rs +++ b/substrate/primitives/timestamp/src/lib.rs @@ -23,7 +23,7 @@ use codec::Encode; use codec::Decode; #[cfg(feature = "std")] use inherents::ProvideInherentData; -use inherents::{InherentIdentifier, ProvideInherent, IsFatalError, InherentData}; +use inherents::{InherentIdentifier, IsFatalError, InherentData}; use sr_primitives::RuntimeString; @@ -112,4 +112,4 @@ impl ProvideInherentData for InherentDataProvider { #[impl_trait_for_tuples::impl_for_tuples(30)] pub trait OnTimestampSet { fn on_timestamp_set(moment: Moment); -} \ No newline at end of file +}