diff --git a/Cargo.lock b/Cargo.lock index 2232476f7..4e43c426e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -650,7 +650,7 @@ dependencies = [ "grin_wallet 0.3.0", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -688,7 +688,7 @@ dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -702,7 +702,7 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "grin_util 0.3.0", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", @@ -726,7 +726,7 @@ dependencies = [ "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -744,7 +744,7 @@ dependencies = [ "grin_store 0.3.0", "grin_util 0.3.0", "grin_wallet 0.3.0", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -774,7 +774,7 @@ dependencies = [ "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -796,7 +796,7 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -809,8 +809,8 @@ dependencies = [ "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.7.1 (git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "secp256k1zkp 0.7.1 (git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23a)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -838,7 +838,7 @@ dependencies = [ "grin_util 0.3.0", "hyper 0.12.10 (registry+https://github.com/rust-lang/crates.io-index)", "prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1836,12 +1836,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "secp256k1zkp" version = "0.7.1" -source = "git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23#6f599fcc17b98340d0c4c9d87cc48d51f29d3816" +source = "git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23a#0248d26f309ec7b1da0b0944de62a96cdef51fbd" dependencies = [ "arrayvec 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2726,7 +2726,7 @@ dependencies = [ "checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum secp256k1zkp 0.7.1 (git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23)" = "" +"checksum secp256k1zkp 0.7.1 (git+https://github.com/mimblewimble/rust-secp256k1-zkp?tag=grin_integration_23a)" = "" "checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" "checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" diff --git a/chain/Cargo.toml b/chain/Cargo.toml index 3771a16af..ac543e565 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -26,4 +26,4 @@ grin_util = { path = "../util" } [dev-dependencies] grin_wallet = { path = "../wallet" } env_logger = "0.5" -rand = "0.3" +rand = "0.5" diff --git a/core/Cargo.toml b/core/Cargo.toml index fb1e2edc0..ba46283d7 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -15,7 +15,7 @@ failure_derive = "0.1" lazy_static = "1" lru-cache = "0.1" num-bigint = "0.2" -rand = "0.3" +rand = "0.5" serde = "1" serde_derive = "1" siphasher = "0.2" diff --git a/core/src/core/compact_block.rs b/core/src/core/compact_block.rs index eb0b1b1c7..eb23c15fe 100644 --- a/core/src/core/compact_block.rs +++ b/core/src/core/compact_block.rs @@ -14,7 +14,7 @@ //! Compact Blocks. -use rand::{thread_rng, Rng}; +use rand::{thread_rng, RngCore}; use consensus::VerifySortOrder; use core::block::{Block, BlockHeader, Error}; diff --git a/keychain/Cargo.toml b/keychain/Cargo.toml index 506a26df6..495f655c0 100644 --- a/keychain/Cargo.toml +++ b/keychain/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] byteorder = "1" blake2-rfc = "0.2" -rand = "0.3" +rand = "0.5" slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] } serde = "1" serde_derive = "1" diff --git a/keychain/src/keychain.rs b/keychain/src/keychain.rs index 248a2aeab..fc2fba9fb 100644 --- a/keychain/src/keychain.rs +++ b/keychain/src/keychain.rs @@ -14,6 +14,7 @@ /// Implementation of the Keychain trait based on an extended key derivation /// scheme. +use rand::distributions::Alphanumeric; use rand::{thread_rng, Rng}; use std::collections::HashMap; use std::sync::{Arc, RwLock}; @@ -50,7 +51,7 @@ impl Keychain for ExtKeychain { /// For testing - probably not a good idea to use outside of tests. fn from_random_seed() -> Result { - let seed: String = thread_rng().gen_ascii_chars().take(16).collect(); + let seed: String = thread_rng().sample_iter(&Alphanumeric).take(16).collect(); let seed = blake2::blake2b::blake2b(32, &[], seed.as_bytes()); ExtKeychain::from_seed(seed.as_bytes()) } diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index fc1457d1e..a02561d4a 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -12,7 +12,7 @@ enum_primitive = "0.1" lmdb-zero = "0.4.4" net2 = "0.2" num = "0.1" -rand = "0.3" +rand = "0.5" serde = "1" serde_derive = "1" slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] } diff --git a/p2p/src/handshake.rs b/p2p/src/handshake.rs index e69a248cf..03553111f 100644 --- a/p2p/src/handshake.rs +++ b/p2p/src/handshake.rs @@ -17,7 +17,7 @@ use std::net::{SocketAddr, TcpStream}; use std::sync::{Arc, RwLock}; use rand::os::OsRng; -use rand::Rng; +use rand::RngCore; use core::core::hash::Hash; use core::core::target::Difficulty; diff --git a/pool/Cargo.toml b/pool/Cargo.toml index 1bc03e3ed..147a8839c 100644 --- a/pool/Cargo.toml +++ b/pool/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] blake2-rfc = "0.2" -rand = "0.3" +rand = "0.5" serde = "1" serde_derive = "1" slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] } diff --git a/servers/Cargo.toml b/servers/Cargo.toml index 1a23bfe56..715c5d755 100644 --- a/servers/Cargo.toml +++ b/servers/Cargo.toml @@ -12,7 +12,7 @@ http = "0.1" hyper-staticfile = "0.3" itertools = "0.7" lmdb-zero = "0.4.4" -rand = "0.3" +rand = "0.5" slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] } serde = "1" serde_derive = "1" diff --git a/store/Cargo.toml b/store/Cargo.toml index 70ac31c35..bab58e345 100644 --- a/store/Cargo.toml +++ b/store/Cargo.toml @@ -23,4 +23,4 @@ grin_util = { path = "../util" } [dev-dependencies] chrono = "0.4.4" -rand = "0.3" +rand = "0.5" diff --git a/util/Cargo.toml b/util/Cargo.toml index ae2200dc8..4322ebe0d 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -9,7 +9,7 @@ publish = false backtrace = "0.3" byteorder = "1" lazy_static = "1" -rand = "0.3" +rand = "0.5" serde = "1" serde_derive = "1" slog = { version = "~2.3", features = ["max_level_trace", "release_max_level_trace"] } @@ -20,6 +20,6 @@ zip = "0.4" [dependencies.secp256k1zkp] git = "https://github.com/mimblewimble/rust-secp256k1-zkp" -tag = "grin_integration_23" +tag = "grin_integration_23a" #path = "../../rust-secp256k1-zkp" features = ["bullet-proof-sizing"] diff --git a/wallet/Cargo.toml b/wallet/Cargo.toml index 80d412df4..cbc8b7b88 100644 --- a/wallet/Cargo.toml +++ b/wallet/Cargo.toml @@ -13,7 +13,7 @@ failure_derive = "0.1" futures = "0.1" hyper = "0.12" prettytable-rs = "0.7" -rand = "0.3" +rand = "0.5" serde = "1" serde_derive = "1" serde_json = "1"