mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 08:41:07 +00:00
Update dependencies (#1527)
* update to latest env_logger * roundabout dependency update * Update to latest vengen * Update rand to 0.6 * Update to latest rng shuffle API * Roundabout update of dependencies * Update rustc_hex * Update wasm * Fix logging setup in tests * revert to fix test
This commit is contained in:
committed by
Bastian Köcher
parent
b187695af7
commit
ab4c70b379
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
clap = "~2.32"
|
||||
backtrace = "0.3"
|
||||
env_logger = "0.5"
|
||||
env_logger = "0.6"
|
||||
error-chain = "0.12"
|
||||
log = "0.4"
|
||||
atty = "0.2"
|
||||
|
||||
@@ -10,7 +10,7 @@ log = "0.4"
|
||||
kvdb = { git = "https://github.com/paritytech/parity-common", rev="b0317f649ab2c665b7987b8475878fc4d2e1f81d" }
|
||||
# FIXME replace with release as soon as our rocksdb changes are released upstream https://github.com/paritytech/parity-common/issues/88
|
||||
kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common", rev="b0317f649ab2c665b7987b8475878fc4d2e1f81d" }
|
||||
lru-cache = "0.1"
|
||||
lru-cache = "0.1.1"
|
||||
hash-db = { version = "0.9" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives" }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
|
||||
|
||||
@@ -21,7 +21,7 @@ futures = "0.1.17"
|
||||
tokio = "0.1.7"
|
||||
parking_lot = "0.7.1"
|
||||
error-chain = "0.12"
|
||||
log = "0.3"
|
||||
log = "0.4"
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../common" }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -30,4 +30,4 @@ substrate-executor = { path = "../../executor" }
|
||||
network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "substrate-service", path = "../../service" }
|
||||
test_client = { package = "substrate-test-client", path = "../../test-client" }
|
||||
env_logger = "0.4"
|
||||
env_logger = "0.6"
|
||||
@@ -781,7 +781,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn authoring_blocks() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = AuraTestNet::new(3);
|
||||
|
||||
net.start();
|
||||
|
||||
@@ -27,7 +27,7 @@ features = ["derive-codec"]
|
||||
substrate-network = { path = "../network", features = ["test-helpers"] }
|
||||
substrate-keyring = { path = "../keyring" }
|
||||
substrate-test-client = { path = "../test-client"}
|
||||
env_logger = "0.5"
|
||||
env_logger = "0.6"
|
||||
|
||||
[features]
|
||||
default = ["service-integration"]
|
||||
|
||||
@@ -8,7 +8,7 @@ substrate-primitives = { path = "../primitives" }
|
||||
parity-crypto = { version = "0.2", default-features = false }
|
||||
error-chain = "0.12"
|
||||
hex = "0.3"
|
||||
rand = "0.4"
|
||||
rand = "0.6"
|
||||
serde_json = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
||||
@@ -77,7 +77,7 @@ struct EncryptedKey {
|
||||
|
||||
impl EncryptedKey {
|
||||
fn encrypt(plain: &[u8; PKCS_LEN], password: &str, iterations: u32) -> Self {
|
||||
use rand::{Rng, OsRng};
|
||||
use rand::{Rng, rngs::OsRng};
|
||||
|
||||
let mut rng = OsRng::new().expect("OS Randomness available on all supported platforms; qed");
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ libp2p = { version = "0.2", default-features = false, features = ["secio-rsa", "
|
||||
parking_lot = "0.7.1"
|
||||
lazy_static = "1.2"
|
||||
log = "0.4"
|
||||
rand = "0.5.0"
|
||||
rand = "0.6"
|
||||
serde = "1.0.70"
|
||||
serde_derive = "1.0.70"
|
||||
serde_json = "1.0.24"
|
||||
|
||||
@@ -14,8 +14,8 @@ error-chain = "0.12"
|
||||
bitflags = "1.0"
|
||||
futures = "0.1.17"
|
||||
linked-hash-map = "0.5"
|
||||
rustc-hex = "1.0"
|
||||
rand = "0.5"
|
||||
rustc-hex = "2.0"
|
||||
rand = "0.6"
|
||||
substrate-primitives = { path = "../../core/primitives" }
|
||||
substrate-consensus-common = { path = "../../core/consensus/common" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
@@ -25,12 +25,12 @@ parity-codec-derive = "2.1"
|
||||
substrate-network-libp2p = { path = "../../core/network-libp2p" }
|
||||
tokio = "0.1.11"
|
||||
|
||||
env_logger = { version = "0.4", optional = true }
|
||||
env_logger = { version = "0.6", optional = true }
|
||||
substrate-keyring = { path = "../../core/keyring", optional = true }
|
||||
substrate-test-client = { path = "../../core/test-client", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = { version = "0.4" }
|
||||
env_logger = { version = "0.6" }
|
||||
substrate-keyring = { path = "../../core/keyring" }
|
||||
substrate-test-client = { path = "../../core/test-client" }
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use futures::sync::mpsc;
|
||||
use std::time::{Instant, Duration};
|
||||
use rand::{self, Rng};
|
||||
use rand::{self, seq::SliceRandom};
|
||||
use network_libp2p::NodeIndex;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, Hash, HashFor};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
@@ -125,7 +125,7 @@ impl<B: BlockT> ConsensusGossip<B> {
|
||||
.filter_map(|(id, ref peer)| if !peer.is_authority && !peer.known_messages.contains(&(topic, message_hash)) { Some(*id) } else { None })
|
||||
.collect();
|
||||
|
||||
rand::thread_rng().shuffle(&mut non_authorities);
|
||||
non_authorities.shuffle(&mut rand::thread_rng());
|
||||
let non_authorities: HashSet<_> = if non_authorities.is_empty() {
|
||||
HashSet::new()
|
||||
} else {
|
||||
|
||||
@@ -725,12 +725,12 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
||||
|
||||
fn on_remote_read_request(&self, io: &mut SyncIo, who: NodeIndex, request: message::RemoteReadRequest<B::Hash>) {
|
||||
trace!(target: "sync", "Remote read request {} from {} ({} at {})",
|
||||
request.id, who, request.key.to_hex(), request.block);
|
||||
request.id, who, request.key.to_hex::<String>(), request.block);
|
||||
let proof = match self.context_data.chain.read_proof(&request.block, &request.key) {
|
||||
Ok(proof) => proof,
|
||||
Err(error) => {
|
||||
trace!(target: "sync", "Remote read request {} from {} ({} at {}) failed with: {}",
|
||||
request.id, who, request.key.to_hex(), request.block, error);
|
||||
request.id, who, request.key.to_hex::<String>(), request.block, error);
|
||||
Default::default()
|
||||
},
|
||||
};
|
||||
@@ -766,13 +766,13 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
||||
|
||||
fn on_remote_changes_request(&self, io: &mut SyncIo, who: NodeIndex, request: message::RemoteChangesRequest<B::Hash>) {
|
||||
trace!(target: "sync", "Remote changes proof request {} from {} for key {} ({}..{})",
|
||||
request.id, who, request.key.to_hex(), request.first, request.last);
|
||||
request.id, who, request.key.to_hex::<String>(), request.first, request.last);
|
||||
let key = StorageKey(request.key);
|
||||
let proof = match self.context_data.chain.key_changes_proof(request.first, request.last, request.min, request.max, &key) {
|
||||
Ok(proof) => proof,
|
||||
Err(error) => {
|
||||
trace!(target: "sync", "Remote changes proof request {} from {} for key {} ({}..{}) failed with: {}",
|
||||
request.id, who, key.0.to_hex(), request.first, request.last, error);
|
||||
request.id, who, key.0.to_hex::<String>(), request.first, request.last, error);
|
||||
ChangesProof::<B::Header> {
|
||||
max_block: Zero::zero(),
|
||||
proof: vec![],
|
||||
|
||||
@@ -23,7 +23,7 @@ use super::*;
|
||||
|
||||
#[test]
|
||||
fn sync_from_two_peers_works() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(3);
|
||||
net.peer(1).push_blocks(100, false);
|
||||
net.peer(2).push_blocks(100, false);
|
||||
@@ -35,7 +35,7 @@ fn sync_from_two_peers_works() {
|
||||
|
||||
#[test]
|
||||
fn sync_from_two_peers_with_ancestry_search_works() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(3);
|
||||
net.peer(0).push_blocks(10, true);
|
||||
net.peer(1).push_blocks(100, false);
|
||||
@@ -57,7 +57,7 @@ fn sync_long_chain_works() {
|
||||
|
||||
#[test]
|
||||
fn sync_no_common_longer_chain_fails() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(3);
|
||||
net.peer(0).push_blocks(20, true);
|
||||
net.peer(1).push_blocks(20, false);
|
||||
@@ -67,13 +67,15 @@ fn sync_no_common_longer_chain_fails() {
|
||||
|
||||
#[test]
|
||||
fn sync_justifications() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = JustificationTestNet::new(3);
|
||||
net.peer(0).push_blocks(20, false);
|
||||
net.sync();
|
||||
|
||||
// there's currently no justification for block #10
|
||||
assert_eq!(net.peer(0).client().justification(&BlockId::Number(10)).unwrap(), None);
|
||||
assert_eq!(net.peer(1).client().justification(&BlockId::Number(10)).unwrap(), None);
|
||||
|
||||
// we finalize block #10 for peer 0 with a justification
|
||||
net.peer(0).client().finalize_block(BlockId::Number(10), Some(Vec::new()), true).unwrap();
|
||||
|
||||
@@ -88,7 +90,7 @@ fn sync_justifications() {
|
||||
|
||||
#[test]
|
||||
fn sync_after_fork_works() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(3);
|
||||
net.sync_step();
|
||||
net.peer(0).push_blocks(30, false);
|
||||
@@ -112,7 +114,7 @@ fn sync_after_fork_works() {
|
||||
|
||||
#[test]
|
||||
fn syncs_all_forks() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(4);
|
||||
net.sync_step();
|
||||
net.peer(0).push_blocks(2, false);
|
||||
@@ -129,7 +131,7 @@ fn syncs_all_forks() {
|
||||
|
||||
#[test]
|
||||
fn own_blocks_are_announced() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(3);
|
||||
net.sync(); // connect'em
|
||||
net.peer(0).generate_blocks(1, BlockOrigin::Own, |builder| builder.bake().unwrap());
|
||||
@@ -146,7 +148,7 @@ fn own_blocks_are_announced() {
|
||||
|
||||
#[test]
|
||||
fn blocks_are_not_announced_by_light_nodes() {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
let mut net = TestNet::new(0);
|
||||
|
||||
// full peer0 is connected to light peer
|
||||
|
||||
@@ -25,7 +25,7 @@ blake2-rfc = { version = "0.2.18", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-serializer = { path = "../serializer" }
|
||||
pretty_assertions = "0.4"
|
||||
pretty_assertions = "0.5"
|
||||
heapsize = "0.4"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -7,8 +7,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
tempdir = "0.3"
|
||||
tokio = "0.1.7"
|
||||
futures = "0.1"
|
||||
log = "0.3"
|
||||
env_logger = "0.4"
|
||||
log = "0.4"
|
||||
env_logger = "0.6"
|
||||
fdlimit = "0.1"
|
||||
substrate-service = { path = "../../../core/service" }
|
||||
substrate-network = { path = "../../../core/network" }
|
||||
|
||||
@@ -140,7 +140,7 @@ fn node_config<F: ServiceFactory> (
|
||||
|
||||
impl<F: ServiceFactory> TestNet<F> {
|
||||
fn new(temp: &TempDir, spec: FactoryChainSpec<F>, full: u32, light: u32, authorities: Vec<String>, base_port: u16) -> TestNet<F> {
|
||||
::env_logger::init().ok();
|
||||
let _ = ::env_logger::try_init();
|
||||
::fdlimit::raise_fd_limit();
|
||||
let runtime = Runtime::new().expect("Error creating tokio runtime");
|
||||
let mut net = TestNet {
|
||||
|
||||
@@ -11,4 +11,4 @@ parity-codec = "2.2"
|
||||
parity-codec-derive = "2.1"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.4"
|
||||
env_logger = "0.6"
|
||||
|
||||
BIN
Binary file not shown.
@@ -22,7 +22,7 @@ substrate-primitives = { path = "../primitives" }
|
||||
trie-bench = { version = "0.9" }
|
||||
trie-standardmap = { version = "0.9" }
|
||||
keccak-hasher = { version = "0.2" }
|
||||
criterion = "0.1.2"
|
||||
criterion = "0.2"
|
||||
hex-literal = "0.1.0"
|
||||
|
||||
[features]
|
||||
|
||||
Reference in New Issue
Block a user