From b5b5c32895c046767827b8264f868e80b22965ad Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 11 Apr 2019 14:49:17 +0100 Subject: [PATCH 001/206] Introduce `ext_println` to contract runtime (#2239) * Implement `ext_println` in contract runtime * Only allow contracts to import `ext_println` on dev chains * Configure dev chain to allow contracts with `ext_println` * Increment spec version * Docs * Rename config to the more specific enable_println --- node/cli/src/chain_spec.rs | 33 ++++++++++++++++----------- node/runtime/src/lib.rs | 2 +- srml/contract/src/lib.rs | 5 ++++ srml/contract/src/wasm/prepare.rs | 38 +++++++++++++++++++++++++++++++ srml/contract/src/wasm/runtime.rs | 11 +++++++++ 5 files changed, 75 insertions(+), 14 deletions(-) diff --git a/node/cli/src/chain_spec.rs b/node/cli/src/chain_spec.rs index a5ddd5ab81..217d3b1312 100644 --- a/node/cli/src/chain_spec.rs +++ b/node/cli/src/chain_spec.rs @@ -216,6 +216,7 @@ pub fn testnet_genesis( initial_authorities: Vec<(AccountId, AccountId, AuthorityId)>, root_key: AccountId, endowed_accounts: Option>, + enable_println: bool, ) -> GenesisConfig { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| { vec![ @@ -237,6 +238,22 @@ pub fn testnet_genesis( const STASH: u128 = 1 << 20; const ENDOWMENT: u128 = 1 << 20; + let mut contract_config = ContractConfig { + transaction_base_fee: 1, + transaction_byte_fee: 0, + transfer_fee: 0, + creation_fee: 0, + contract_fee: 21, + call_base_fee: 135, + create_base_fee: 175, + gas_price: 1, + max_depth: 1024, + block_gas_limit: 10_000_000, + current_schedule: Default::default(), + }; + // this should only be enabled on development chains + contract_config.current_schedule.enable_println = enable_println; + GenesisConfig { consensus: Some(ConsensusConfig { code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm").to_vec(), @@ -308,19 +325,7 @@ pub fn testnet_genesis( spend_period: 12 * 60 * 24, burn: Permill::from_percent(50), }), - contract: Some(ContractConfig { - transaction_base_fee: 1, - transaction_byte_fee: 0, - transfer_fee: 0, - creation_fee: 0, - contract_fee: 21, - call_base_fee: 135, - create_base_fee: 175, - gas_price: 1, - max_depth: 1024, - block_gas_limit: 10_000_000, - current_schedule: Default::default(), - }), + contract: Some(contract_config), sudo: Some(SudoConfig { key: root_key, }), @@ -337,6 +342,7 @@ fn development_config_genesis() -> GenesisConfig { ], get_account_id_from_seed("Alice"), None, + true, ) } @@ -353,6 +359,7 @@ fn local_testnet_genesis() -> GenesisConfig { ], get_account_id_from_seed("Alice"), None, + false, ) } diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 32ba893c66..e9764ef1c0 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 58, + spec_version: 59, impl_version: 59, apis: RUNTIME_API_VERSIONS, }; diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index c919439d54..c471451253 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -527,6 +527,10 @@ pub struct Schedule { /// What is the maximal memory pages amount is allowed to have for /// a contract. pub max_memory_pages: u32, + + /// Whether the `ext_println` function is allowed to be used contracts. + /// MUST only be enabled for `dev` chains, NOT for production chains + pub enable_println: bool, } impl> Default for Schedule { @@ -543,6 +547,7 @@ impl> Default for Schedule { sandbox_data_write_cost: Gas::sa(1), max_stack_height: 64 * 1024, max_memory_pages: 16, + enable_println: false, } } } diff --git a/srml/contract/src/wasm/prepare.rs b/srml/contract/src/wasm/prepare.rs index 50edff3297..15922c3d99 100644 --- a/srml/contract/src/wasm/prepare.rs +++ b/srml/contract/src/wasm/prepare.rs @@ -239,6 +239,12 @@ impl<'a, Gas: 'a + As + Clone> ContractModule<'a, Gas> { .get(*type_idx as usize) .ok_or_else(|| "validation: import entry points to a non-existent type")?; + // We disallow importing `ext_println` unless debug features are enabled, + // which should only be allowed on a dev chain + if !self.schedule.enable_println && import.field().as_bytes() == b"ext_println" { + return Err("module imports `ext_println` but debug features disabled"); + } + // We disallow importing `gas` function here since it is treated as implementation detail. if import.field().as_bytes() == b"gas" || !C::can_satisfy(import.field().as_bytes(), func_ty) @@ -347,6 +353,8 @@ mod tests { gas(_ctx, _amount: u32) => { unreachable!(); }, nop(_ctx, _unused: u64) => { unreachable!(); }, + + ext_println(_ctx, _ptr: u32, _len: u32) => { unreachable!(); }, ); macro_rules! prepare_test { @@ -572,6 +580,36 @@ mod tests { "#, Err("module imports a non-existent function") ); + + prepare_test!(ext_println_debug_disabled, + r#" + (module + (import "env" "ext_println" (func $ext_println (param i32 i32))) + + (func (export "call")) + (func (export "deploy")) + ) + "#, + Err("module imports `ext_println` but debug features disabled") + ); + + #[test] + fn ext_println_debug_enabled() { + let wasm = wabt::Wat2Wasm::new().validate(false).convert( + r#" + (module + (import "env" "ext_println" (func $ext_println (param i32 i32))) + + (func (export "call")) + (func (export "deploy")) + ) + "# + ).unwrap(); + let mut schedule = Schedule::::default(); + schedule.enable_println = true; + let r = prepare_contract::(wasm.as_ref(), &schedule); + assert_matches!(r, Ok(_)); + } } mod entrypoints { diff --git a/srml/contract/src/wasm/runtime.rs b/srml/contract/src/wasm/runtime.rs index 37ab9fa887..1c48d248d2 100644 --- a/srml/contract/src/wasm/runtime.rs +++ b/srml/contract/src/wasm/runtime.rs @@ -628,4 +628,15 @@ define_env!(Env, , Ok(()) }, + + // Prints utf8 encoded string from the data buffer. + // Only available on `--dev` chains. + // This function may be removed at any time, superseded by a more general contract debugging feature. + ext_println(ctx, str_ptr: u32, str_len: u32) => { + let data = read_sandbox_memory(ctx, str_ptr, str_len)?; + if let Ok(utf8) = core::str::from_utf8(&data) { + runtime_io::print(utf8); + } + Ok(()) + }, ); -- GitLab From d39e718f126dc76769c46fd357deeba0cccb8f50 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 11 Apr 2019 20:33:43 +0100 Subject: [PATCH 002/206] Replace error-chain for client error (#2231) * WIP: convert client error * Remove error_chain for client error * Ignore tx-pool error deprecation warning * Update Cargo.lock files * Fix tests * Increment impl_version * Derive From impls, remove allow(missing_docs) * Remove space * Remove redundant into()s * Blockchain Error source * Bump impl version --- Cargo.lock | 14 +- core/basic-authorship/src/basic_authorship.rs | 2 +- core/cli/src/error.rs | 4 +- core/client/Cargo.toml | 4 +- core/client/db/src/cache/list_cache.rs | 6 +- core/client/db/src/cache/list_storage.rs | 18 +- core/client/db/src/lib.rs | 22 +- core/client/db/src/light.rs | 10 +- core/client/db/src/utils.rs | 14 +- .../client/src/block_builder/block_builder.rs | 6 +- core/client/src/blockchain.rs | 10 +- core/client/src/call_executor.rs | 2 +- core/client/src/children.rs | 6 +- core/client/src/cht.rs | 14 +- core/client/src/client.rs | 17 +- core/client/src/error.rs | 224 +++++++----------- core/client/src/in_mem.rs | 14 +- core/client/src/leaves.rs | 4 +- core/client/src/light/backend.rs | 10 +- core/client/src/light/blockchain.rs | 24 +- core/client/src/light/call_executor.rs | 16 +- core/client/src/light/fetcher.rs | 14 +- core/consensus/aura/slots/src/lib.rs | 2 +- core/finality-grandpa/src/aux_schema.rs | 8 +- core/finality-grandpa/src/finality_proof.rs | 18 +- core/finality-grandpa/src/justification.rs | 16 +- core/network/src/error.rs | 5 +- core/network/src/on_demand.rs | 16 +- core/rpc/src/author/error.rs | 4 +- core/rpc/src/chain/error.rs | 4 +- core/rpc/src/state/error.rs | 4 +- core/rpc/src/state/tests.rs | 2 +- core/service/src/error.rs | 4 +- core/sr-api-macros/src/decl_runtime_apis.rs | 2 +- core/test-runtime/wasm/Cargo.lock | 14 +- core/transaction-pool/src/error.rs | 8 +- node-template/runtime/wasm/Cargo.lock | 14 +- node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 14 +- 39 files changed, 300 insertions(+), 292 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7afec8f6a..a3d4a00f88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -623,6 +623,17 @@ name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "derive_more" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "difference" version = "2.0.0" @@ -3670,7 +3681,7 @@ dependencies = [ name = "substrate-client" version = "1.0.0" dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5160,6 +5171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dae47cc3529cdab597dbc8b606e565707209b506e55848f3c15679214a56c956" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +"checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" diff --git a/core/basic-authorship/src/basic_authorship.rs b/core/basic-authorship/src/basic_authorship.rs index e9b6c909ad..bab86ea420 100644 --- a/core/basic-authorship/src/basic_authorship.rs +++ b/core/basic-authorship/src/basic_authorship.rs @@ -232,7 +232,7 @@ impl Proposer where Ok(()) => { debug!("[{:?}] Pushed to the block.", pending.hash); } - Err(error::Error(error::ErrorKind::ApplyExtrinsicFailed(ApplyError::FullBlock), _)) => { + Err(error::Error::ApplyExtrinsicFailed(ApplyError::FullBlock)) => { if is_first { debug!("[{:?}] Invalid transaction: FullBlock on empty block", pending.hash); unqueue_invalid.push(pending.hash.clone()); diff --git a/core/cli/src/error.rs b/core/cli/src/error.rs index e368cc6d96..07d14eb479 100644 --- a/core/cli/src/error.rs +++ b/core/cli/src/error.rs @@ -29,9 +29,7 @@ error_chain! { Io(::std::io::Error) #[doc="IO error"]; Cli(::clap::Error) #[doc="CLI error"]; Service(::service::Error) #[doc="Substrate service error"]; - } - links { - Client(client::error::Error, client::error::ErrorKind) #[doc="Client error"]; + Client(client::error::Error) #[doc="Client error"]; } errors { /// Input error. diff --git a/core/client/Cargo.toml b/core/client/Cargo.toml index d36468c4d7..f1b7a903ff 100644 --- a/core/client/Cargo.toml +++ b/core/client/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -error-chain = { version = "0.12", optional = true } +derive_more = { version = "0.14.0", optional = true } fnv = { version = "1.0", optional = true } log = { version = "0.4", optional = true } parking_lot = { version = "0.7.1", optional = true } @@ -44,7 +44,7 @@ std = [ "hash-db/std", "consensus", "parking_lot", - "error-chain", + "derive_more", "fnv", "log", "hex", diff --git a/core/client/db/src/cache/list_cache.rs b/core/client/db/src/cache/list_cache.rs index 1e641534f9..67e09b580d 100644 --- a/core/client/db/src/cache/list_cache.rs +++ b/core/client/db/src/cache/list_cache.rs @@ -43,7 +43,7 @@ use std::collections::BTreeSet; use log::warn; -use client::error::{ErrorKind as ClientErrorKind, Result as ClientResult}; +use client::error::{Error as ClientError, Result as ClientResult}; use runtime_primitives::traits::{Block as BlockT, NumberFor, As, Zero}; use crate::cache::{CacheItemT, ComplexBlockId}; @@ -537,10 +537,10 @@ mod chain { ) -> ClientResult { let (begin, end) = if block1 > block2 { (block2, block1) } else { (block1, block2) }; let mut current = storage.read_header(&end.hash)? - .ok_or_else(|| ClientErrorKind::UnknownBlock(format!("{}", end.hash)))?; + .ok_or_else(|| ClientError::UnknownBlock(format!("{}", end.hash)))?; while *current.number() > begin.number { current = storage.read_header(current.parent_hash())? - .ok_or_else(|| ClientErrorKind::UnknownBlock(format!("{}", current.parent_hash())))?; + .ok_or_else(|| ClientError::UnknownBlock(format!("{}", current.parent_hash())))?; } Ok(begin.hash == current.hash()) diff --git a/core/client/db/src/cache/list_storage.rs b/core/client/db/src/cache/list_storage.rs index 659a30507e..6271f892bc 100644 --- a/core/client/db/src/cache/list_storage.rs +++ b/core/client/db/src/cache/list_storage.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use kvdb::{KeyValueDB, DBTransaction}; -use client::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}; +use client::error::{Error as ClientError, Result as ClientResult}; use parity_codec::{Encode, Decode}; use runtime_primitives::generic::BlockId; use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; @@ -59,7 +59,7 @@ pub trait Storage { self.read_entry(at) .and_then(|entry| entry .ok_or_else(|| ClientError::from( - ClientErrorKind::Backend(format!("Referenced cache entry at {:?} is not found", at))))) + ClientError::Backend(format!("Referenced cache entry at {:?} is not found", at))))) } } @@ -151,7 +151,7 @@ impl Storage for DbStorage { .map_err(db_err) .and_then(|entry| match entry { Some(entry) => StorageEntry::::decode(&mut &entry[..]) - .ok_or_else(|| ClientErrorKind::Backend("Failed to decode cache entry".into()).into()) + .ok_or_else(|| ClientError::Backend("Failed to decode cache entry".into())) .map(Some), None => Ok(None), }) @@ -236,9 +236,9 @@ mod meta { pub fn decode(encoded: &[u8]) -> ClientResult> { let input = &mut &*encoded; let finalized: Option> = Decode::decode(input) - .ok_or_else(|| ClientError::from(ClientErrorKind::Backend("Error decoding cache meta".into())))?; + .ok_or_else(|| ClientError::from(ClientError::Backend("Error decoding cache meta".into())))?; let unfinalized: Vec> = Decode::decode(input) - .ok_or_else(|| ClientError::from(ClientErrorKind::Backend("Error decoding cache meta".into())))?; + .ok_or_else(|| ClientError::from(ClientError::Backend("Error decoding cache meta".into())))?; Ok(Metadata { finalized, unfinalized }) } @@ -253,19 +253,19 @@ pub mod tests { impl Storage for FaultyStorage { fn read_id(&self, _at: NumberFor) -> ClientResult> { - Err(ClientErrorKind::Backend("TestError".into()).into()) + Err(ClientError::Backend("TestError".into())) } fn read_header(&self, _at: &Block::Hash) -> ClientResult> { - Err(ClientErrorKind::Backend("TestError".into()).into()) + Err(ClientError::Backend("TestError".into())) } fn read_meta(&self) -> ClientResult> { - Err(ClientErrorKind::Backend("TestError".into()).into()) + Err(ClientError::Backend("TestError".into())) } fn read_entry(&self, _at: &ComplexBlockId) -> ClientResult>> { - Err(ClientErrorKind::Backend("TestError".into()).into()) + Err(ClientError::Backend("TestError".into())) } } diff --git a/core/client/db/src/lib.rs b/core/client/db/src/lib.rs index ac22bcbb01..d876296546 100644 --- a/core/client/db/src/lib.rs +++ b/core/client/db/src/lib.rs @@ -225,7 +225,7 @@ impl client::blockchain::Backend for BlockchainDb { match read_db(&*self.db, columns::KEY_LOOKUP, columns::BODY, id)? { Some(body) => match Decode::decode(&mut &body[..]) { Some(body) => Ok(Some(body)), - None => return Err(client::error::ErrorKind::Backend("Error decoding body".into()).into()), + None => return Err(client::error::Error::Backend("Error decoding body".into())), } None => Ok(None), } @@ -235,7 +235,7 @@ impl client::blockchain::Backend for BlockchainDb { match read_db(&*self.db, columns::KEY_LOOKUP, columns::JUSTIFICATION, id)? { Some(justification) => match Decode::decode(&mut &justification[..]) { Some(justification) => Ok(Some(justification)), - None => return Err(client::error::ErrorKind::Backend("Error decoding justification".into()).into()), + None => return Err(client::error::Error::Backend("Error decoding justification".into())), } None => Ok(None), } @@ -326,14 +326,14 @@ where Block: BlockT, fn reset_storage(&mut self, mut top: StorageOverlay, children: ChildrenStorageOverlay) -> Result { if top.iter().any(|(k, _)| well_known_keys::is_child_storage_key(k)) { - return Err(client::error::ErrorKind::GenesisInvalid.into()); + return Err(client::error::Error::GenesisInvalid.into()); } let mut transaction: PrefixedMemoryDB = Default::default(); for (child_key, child_map) in children { if !well_known_keys::is_child_storage_key(&child_key) { - return Err(client::error::ErrorKind::GenesisInvalid.into()); + return Err(client::error::Error::GenesisInvalid.into()); } let (root, is_default, update) = self.old_state.child_storage_root(&child_key, child_map.into_iter().map(|(k, v)| (k, Some(v)))); @@ -684,7 +684,7 @@ impl> Backend { (&r.number, &r.hash) ); - return Err(::client::error::ErrorKind::NotInFinalizedChain.into()); + return Err(::client::error::Error::NotInFinalizedChain.into()); } retracted.push(r.hash.clone()); @@ -726,7 +726,7 @@ impl> Backend { ) -> Result<(), client::error::Error> { let last_finalized = last_finalized.unwrap_or_else(|| self.blockchain.meta.read().finalized_hash); if *header.parent_hash() != last_finalized { - return Err(::client::error::ErrorKind::NonSequentialFinalization( + return Err(::client::error::Error::NonSequentialFinalization( format!("Last finalized {:?} not parent of {:?}", last_finalized, header.hash()), ).into()); } @@ -926,7 +926,7 @@ impl> Backend { (number.clone(), hash.clone()) )?; } else { - return Err(client::error::ErrorKind::UnknownBlock(format!("Cannot set head {:?}", set_head)).into()) + return Err(client::error::Error::UnknownBlock(format!("Cannot set head {:?}", set_head))) } } @@ -1138,12 +1138,12 @@ impl client::backend::Backend for Backend whe Some(commit) => { apply_state_commit(&mut transaction, commit); let removed = self.blockchain.header(BlockId::Number(best))?.ok_or_else( - || client::error::ErrorKind::UnknownBlock( + || client::error::Error::UnknownBlock( format!("Error reverting to {}. Block hash not found.", best)))?; best -= As::sa(1); // prev block let hash = self.blockchain.hash(best)?.ok_or_else( - || client::error::ErrorKind::UnknownBlock( + || client::error::Error::UnknownBlock( format!("Error reverting to {}. Block hash not found.", best)))?; let key = utils::number_and_hash_to_lookup_key(best.clone(), &hash); transaction.put(columns::META, meta_keys::BEST_BLOCK, &key); @@ -1185,10 +1185,10 @@ impl client::backend::Backend for Backend whe let state = DbState::new(self.storage.clone(), root); Ok(CachingState::new(state, self.shared_cache.clone(), Some(hash))) } else { - Err(client::error::ErrorKind::UnknownBlock(format!("State already discarded for {:?}", block)).into()) + Err(client::error::Error::UnknownBlock(format!("State already discarded for {:?}", block))) } }, - Ok(None) => Err(client::error::ErrorKind::UnknownBlock(format!("Unknown state for block {:?}", block)).into()), + Ok(None) => Err(client::error::Error::UnknownBlock(format!("Unknown state for block {:?}", block))), Err(e) => Err(e), } } diff --git a/core/client/db/src/light.rs b/core/client/db/src/light.rs index 62b6486f54..a571ffe142 100644 --- a/core/client/db/src/light.rs +++ b/core/client/db/src/light.rs @@ -26,7 +26,7 @@ use client::blockchain::{BlockStatus, Cache as BlockchainCache, HeaderBackend as BlockchainHeaderBackend, Info as BlockchainInfo}; use client::cht; use client::leaves::{LeafSet, FinalizationDisplaced}; -use client::error::{ErrorKind as ClientErrorKind, Result as ClientResult}; +use client::error::{Error as ClientError, Result as ClientResult}; use client::light::blockchain::Storage as LightBlockchainStorage; use parity_codec::{Decode, Encode}; use primitives::Blake2Hasher; @@ -256,7 +256,7 @@ impl LightStorage { ) -> ClientResult<()> { let meta = self.meta.read(); if &meta.finalized_hash != header.parent_hash() { - return Err(::client::error::ErrorKind::NonSequentialFinalization( + return Err(::client::error::Error::NonSequentialFinalization( format!("Last finalized {:?} not parent of {:?}", meta.finalized_hash, hash), ).into()) @@ -330,7 +330,7 @@ impl LightStorage { cht_size: u64, block: NumberFor ) -> ClientResult { - let no_cht_for_block = || ClientErrorKind::Backend(format!("CHT for block {} not exists", block)).into(); + let no_cht_for_block = || ClientError::Backend(format!("CHT for block {} not exists", block)); let cht_number = cht::block_to_cht_number(cht_size, block).ok_or_else(no_cht_for_block)?; let cht_start = cht::start_number(cht_size, cht_number); @@ -474,7 +474,7 @@ impl LightBlockchainStorage for LightStorage self.db.write(transaction).map_err(db_err)?; Ok(()) } else { - Err(ClientErrorKind::UnknownBlock(format!("Cannot set head {:?}", id)).into()) + Err(ClientError::UnknownBlock(format!("Cannot set head {:?}", id))) } } @@ -514,7 +514,7 @@ impl LightBlockchainStorage for LightStorage Ok(()) } else { - Err(ClientErrorKind::UnknownBlock(format!("Cannot finalize block {:?}", id)).into()) + Err(ClientError::UnknownBlock(format!("Cannot finalize block {:?}", id))) } } diff --git a/core/client/db/src/utils.rs b/core/client/db/src/utils.rs index ce843a93a2..b51faae6de 100644 --- a/core/client/db/src/utils.rs +++ b/core/client/db/src/utils.rs @@ -105,7 +105,7 @@ pub fn number_and_hash_to_lookup_key(number: N, hash: H) -> Vec where /// all block lookup keys start with the block number. pub fn lookup_key_to_number(key: &[u8]) -> client::error::Result where N: As { if key.len() < 4 { - return Err(client::error::ErrorKind::Backend("Invalid block key".into()).into()); + return Err(client::error::Error::Backend("Invalid block key".into())); } Ok((key[0] as u64) << 24 | (key[1] as u64) << 16 @@ -187,21 +187,21 @@ pub fn block_id_to_lookup_key( /// Maps database error to client error pub fn db_err(err: io::Error) -> client::error::Error { use std::error::Error; - client::error::ErrorKind::Backend(err.description().into()).into() + client::error::Error::Backend(err.description().into()) } /// Open RocksDB database. pub fn open_database(config: &DatabaseSettings, col_meta: Option, db_type: &str) -> client::error::Result> { let mut db_config = DatabaseConfig::with_columns(Some(NUM_COLUMNS)); db_config.memory_budget = config.cache_size; - let path = config.path.to_str().ok_or_else(|| client::error::ErrorKind::Backend("Invalid database path".into()))?; + let path = config.path.to_str().ok_or_else(|| client::error::Error::Backend("Invalid database path".into()))?; let db = Database::open(&db_config, &path).map_err(db_err)?; // check database type match db.get(col_meta, meta_keys::TYPE).map_err(db_err)? { Some(stored_type) => { if db_type.as_bytes() != &*stored_type { - return Err(client::error::ErrorKind::Backend( + return Err(client::error::Error::Backend( format!("Unexpected database type. Expected: {}", db_type)).into()); } }, @@ -237,7 +237,7 @@ pub fn read_header( Some(header) => match Block::Header::decode(&mut &header[..]) { Some(header) => Ok(Some(header)), None => return Err( - client::error::ErrorKind::Backend("Error decoding header".into()).into() + client::error::Error::Backend("Error decoding header".into()) ), } None => Ok(None), @@ -252,7 +252,7 @@ pub fn require_header( id: BlockId, ) -> client::error::Result { read_header(db, col_index, col, id) - .and_then(|header| header.ok_or_else(|| client::error::ErrorKind::UnknownBlock(format!("{}", id)).into())) + .and_then(|header| header.ok_or_else(|| client::error::Error::UnknownBlock(format!("{}", id)))) } /// Read meta from the database. @@ -266,7 +266,7 @@ pub fn read_meta(db: &KeyValueDB, col_meta: Option, col_header: Opti let genesis_hash: Block::Hash = match db.get(col_meta, meta_keys::GENESIS_HASH).map_err(db_err)? { Some(h) => match Decode::decode(&mut &h[..]) { Some(h) => h, - None => return Err(client::error::ErrorKind::Backend("Error decoding genesis hash".into()).into()), + None => return Err(client::error::Error::Backend("Error decoding genesis hash".into())), }, None => return Ok(Meta { best_hash: Default::default(), diff --git a/core/client/src/block_builder/block_builder.rs b/core/client/src/block_builder/block_builder.rs index fd1ce4aefb..5c168b2f05 100644 --- a/core/client/src/block_builder/block_builder.rs +++ b/core/client/src/block_builder/block_builder.rs @@ -51,11 +51,11 @@ where /// build upon. pub fn at_block(block_id: &BlockId, api: &'a A) -> error::Result { let number = api.block_number_from_id(block_id)? - .ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))? + .ok_or_else(|| error::Error::UnknownBlock(format!("{}", block_id)))? + One::one(); let parent_hash = api.block_hash_from_id(block_id)? - .ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?; + .ok_or_else(|| error::Error::UnknownBlock(format!("{}", block_id)))?; let header = <::Header as HeaderT>::new( number, Default::default(), @@ -89,7 +89,7 @@ where Ok(()) } Err(e) => { - Err(error::ErrorKind::ApplyExtrinsicFailed(e).into()) + Err(error::Error::ApplyExtrinsicFailed(e)) } } }) diff --git a/core/client/src/blockchain.rs b/core/client/src/blockchain.rs index 5d7b2a9c23..b0e7c2943a 100644 --- a/core/client/src/blockchain.rs +++ b/core/client/src/blockchain.rs @@ -23,7 +23,7 @@ use runtime_primitives::generic::BlockId; use runtime_primitives::Justification; use consensus::well_known_cache_keys; -use crate::error::{ErrorKind, Result}; +use crate::error::{Error, Result}; /// Blockchain database header backend. Does not perform any validation. pub trait HeaderBackend: Send + Sync { @@ -56,19 +56,19 @@ pub trait HeaderBackend: Send + Sync { /// Get block header. Returns `UnknownBlock` error if block is not found. fn expect_header(&self, id: BlockId) -> Result { - self.header(id)?.ok_or_else(|| ErrorKind::UnknownBlock(format!("{}", id)).into()) + self.header(id)?.ok_or_else(|| Error::UnknownBlock(format!("{}", id))) } /// Convert an arbitrary block ID into a block number. Returns `UnknownBlock` error if block is not found. fn expect_block_number_from_id(&self, id: &BlockId) -> Result> { self.block_number_from_id(id) - .and_then(|n| n.ok_or_else(|| ErrorKind::UnknownBlock(format!("{}", id)).into())) + .and_then(|n| n.ok_or_else(|| Error::UnknownBlock(format!("{}", id)))) } /// Convert an arbitrary block ID into a block hash. Returns `UnknownBlock` error if block is not found. fn expect_block_hash_from_id(&self, id: &BlockId) -> Result { self.block_hash_from_id(id) - .and_then(|n| n.ok_or_else(|| ErrorKind::UnknownBlock(format!("{}", id)).into())) + .and_then(|n| n.ok_or_else(|| Error::UnknownBlock(format!("{}", id)))) } } @@ -196,7 +196,7 @@ pub fn tree_route>( let load_header = |id: BlockId| { match backend.header(id) { Ok(Some(hdr)) => Ok(hdr), - Ok(None) => Err(ErrorKind::UnknownBlock(format!("Unknown block {:?}", id)).into()), + Ok(None) => Err(Error::UnknownBlock(format!("Unknown block {:?}", id))), Err(e) => Err(e), } }; diff --git a/core/client/src/call_executor.rs b/core/client/src/call_executor.rs index b0bf9b4c2c..4f6f02c94c 100644 --- a/core/client/src/call_executor.rs +++ b/core/client/src/call_executor.rs @@ -274,7 +274,7 @@ where let mut overlay = OverlayedChanges::default(); let state = self.backend.state_at(*id)?; let mut ext = Ext::new(&mut overlay, &state, self.backend.changes_trie_storage(), NeverOffchainExt::new()); - self.executor.runtime_version(&mut ext).ok_or(error::ErrorKind::VersionInvalid.into()) + self.executor.runtime_version(&mut ext).ok_or(error::Error::VersionInvalid.into()) } fn call_at_state< diff --git a/core/client/src/children.rs b/core/client/src/children.rs index 48b39d18cd..3a9f0a6bea 100644 --- a/core/client/src/children.rs +++ b/core/client/src/children.rs @@ -32,7 +32,7 @@ pub fn read_children< let raw_val_opt = match db.get(column, &buf[..]) { Ok(raw_val_opt) => raw_val_opt, - Err(_) => return Err(error::ErrorKind::Backend("Error reading value from database".into()).into()), + Err(_) => return Err(error::Error::Backend("Error reading value from database".into())), }; let raw_val = match raw_val_opt { @@ -42,7 +42,7 @@ pub fn read_children< let children: Vec = match Decode::decode(&mut &raw_val[..]) { Some(children) => children, - None => return Err(error::ErrorKind::Backend("Error decoding children".into()).into()), + None => return Err(error::Error::Backend("Error decoding children".into())), }; Ok(children) @@ -118,4 +118,4 @@ mod tests { assert_eq!(r1, vec![1_3, 1_5]); assert_eq!(r2.len(), 0); } -} \ No newline at end of file +} diff --git a/core/client/src/cht.rs b/core/client/src/cht.rs index d8e7ffbff3..13db1c67eb 100644 --- a/core/client/src/cht.rs +++ b/core/client/src/cht.rs @@ -35,7 +35,7 @@ use state_machine::backend::InMemory as InMemoryState; use state_machine::{MemoryDB, TrieBackend, Backend as StateBackend, prove_read_on_trie_backend, read_proof_check, read_proof_check_on_proving_backend}; -use crate::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}; +use crate::error::{Error as ClientError, Result as ClientResult}; /// The size of each CHT. This value is passed to every CHT-related function from /// production code. Other values are passed from tests. @@ -160,11 +160,11 @@ fn do_check_proof( let root: Hasher::Out = convert_hash(&local_root); let local_cht_key = encode_cht_key(local_number); let local_cht_value = checker(root, &local_cht_key)?; - let local_cht_value = local_cht_value.ok_or_else(|| ClientErrorKind::InvalidCHTProof)?; - let local_hash = decode_cht_value(&local_cht_value).ok_or_else(|| ClientErrorKind::InvalidCHTProof)?; + let local_cht_value = local_cht_value.ok_or_else(|| ClientError::InvalidCHTProof)?; + let local_hash = decode_cht_value(&local_cht_value).ok_or_else(|| ClientError::InvalidCHTProof)?; match &local_hash[..] == remote_hash.as_ref() { true => Ok(()), - false => Err(ClientErrorKind::InvalidCHTProof.into()), + false => Err(ClientError::InvalidCHTProof.into()), } } @@ -186,7 +186,7 @@ pub fn for_each_cht_group( for block in blocks { let new_cht_num = match block_to_cht_number(cht_size, block.as_()) { Some(new_cht_num) => new_cht_num, - None => return Err(ClientErrorKind::Backend(format!( + None => return Err(ClientError::Backend(format!( "Cannot compute CHT root for the block #{}", block)).into() ), }; @@ -234,7 +234,7 @@ fn build_pairs( let mut hash_number = start_num; for hash in hashes.into_iter().take(cht_size as usize) { let hash = hash?.ok_or_else(|| ClientError::from( - ClientErrorKind::MissingHashRequiredForCHT(cht_num.as_(), hash_number.as_()) + ClientError::MissingHashRequiredForCHT(cht_num.as_(), hash_number.as_()) ))?; pairs.push(( encode_cht_key(hash_number).to_vec(), @@ -246,7 +246,7 @@ fn build_pairs( if pairs.len() as u64 == cht_size { Ok(pairs) } else { - Err(ClientErrorKind::MissingHashRequiredForCHT(cht_num.as_(), hash_number.as_()).into()) + Err(ClientError::MissingHashRequiredForCHT(cht_num.as_(), hash_number.as_())) } } diff --git a/core/client/src/client.rs b/core/client/src/client.rs index 041933cfff..89896fb6eb 100644 --- a/core/client/src/client.rs +++ b/core/client/src/client.rs @@ -57,7 +57,7 @@ use executor::{RuntimeVersion, RuntimeInfo}; use crate::notifications::{StorageNotifications, StorageEventStream}; use crate::light::{call_executor::prove_execution, fetcher::ChangesProof}; use crate::cht; -use crate::error::{self, ErrorKind}; +use crate::error; use crate::in_mem; use crate::block_builder::{self, api::BlockBuilder as BlockBuilderAPI}; use crate::genesis; @@ -65,7 +65,6 @@ use consensus; use substrate_telemetry::{telemetry, SUBSTRATE_INFO}; use log::{info, trace, warn}; -use error_chain::bail; /// Type that implements `futures::Stream` of block import events. pub type ImportNotifications = mpsc::UnboundedReceiver>; @@ -383,7 +382,7 @@ impl Client where /// Reads given header and generates CHT-based header proof for CHT of given size. pub fn header_proof_with_cht_size(&self, id: &BlockId, cht_size: u64) -> error::Result<(Block::Header, Vec>)> { - let proof_error = || error::ErrorKind::Backend(format!("Failed to generate header proof for {:?}", id)); + let proof_error = || error::Error::Backend(format!("Failed to generate header proof for {:?}", id)); let header = self.backend.blockchain().expect_header(*id)?; let block_num = *header.number(); let cht_num = cht::block_to_cht_number(cht_size, block_num).ok_or_else(proof_error)?; @@ -409,7 +408,7 @@ impl Client where let first = first.as_(); let last_num = self.backend.blockchain().expect_block_number_from_id(&last)?.as_(); if first > last_num { - return Err(error::ErrorKind::ChangesTrieAccessFailed("Invalid changes trie range".into()).into()); + return Err(error::Error::ChangesTrieAccessFailed("Invalid changes trie range".into())); } let finalized_number = self.backend.blockchain().info()?.finalized_number; let oldest = storage.oldest_changes_trie_block(&config, finalized_number.as_()); @@ -440,7 +439,7 @@ impl Client where self.backend.blockchain().info()?.best_number.as_(), &key.0) .and_then(|r| r.map(|r| r.map(|(block, tx)| (As::sa(block), tx))).collect::>()) - .map_err(|err| error::ErrorKind::ChangesTrieAccessFailed(err).into()) + .map_err(|err| error::Error::ChangesTrieAccessFailed(err)) } /// Get proof for computation of (block, extrinsic) pairs where key has been changed at given blocks range. @@ -532,7 +531,7 @@ impl Client where max_number.as_(), &key.0 ) - .map_err(|err| error::Error::from(error::ErrorKind::ChangesTrieAccessFailed(err)))?; + .map_err(|err| error::Error::from(error::Error::ChangesTrieAccessFailed(err)))?; // now gather proofs for all changes tries roots that were touched during key_changes_proof // execution AND are unknown (i.e. replaced with CHT) to the requester @@ -586,7 +585,7 @@ impl Client where let storage = self.backend.changes_trie_storage(); match (config, storage) { (Some(config), Some(storage)) => Ok((config, storage)), - _ => Err(error::ErrorKind::ChangesTriesNotSupported.into()), + _ => Err(error::Error::ChangesTriesNotSupported.into()), } } @@ -910,7 +909,7 @@ impl Client where warn!("Safety violation: attempted to revert finalized block {:?} which is not in the \ same chain as last finalized {:?}", retracted, last_finalized); - bail!(error::ErrorKind::NotInFinalizedChain); + return Err(error::Error::NotInFinalizedChain); } let route_from_best = crate::blockchain::tree_route( @@ -1241,7 +1240,7 @@ impl Client where let load_header = |id: Block::Hash| -> error::Result { match self.backend.blockchain().header(BlockId::Hash(id))? { Some(hdr) => Ok(hdr), - None => Err(ErrorKind::UnknownBlock(format!("Unknown block {:?}", id)).into()), + None => Err(Error::UnknownBlock(format!("Unknown block {:?}", id))), } }; diff --git a/core/client/src/error.rs b/core/client/src/error.rs index 3ee3c0e2a1..050f867dfc 100644 --- a/core/client/src/error.rs +++ b/core/client/src/error.rs @@ -16,159 +16,117 @@ //! Substrate client possible errors. -// Silence: `use of deprecated item 'std::error::Error::cause': replaced by Error::source, which can support downcasting` -// https://github.com/paritytech/substrate/issues/1547 -#![allow(deprecated)] -#![allow(missing_docs)] - -use std; +use std::{self, error, result}; use state_machine; use runtime_primitives::ApplyError; use consensus; -use error_chain::*; - -error_chain! { - links { - Consensus(consensus::Error, consensus::ErrorKind); - } - errors { - /// Backend error. - Backend(s: String) { - description("Unrecoverable backend error"), - display("Backend error: {}", s), - } - - /// Unknown block. - UnknownBlock(h: String) { - description("unknown block"), - display("UnknownBlock: {}", &*h), - } - - /// Applying extrinsic error. - ApplyExtrinsicFailed(e: ApplyError) { - description("Extrinsic error"), - display("Extrinsic error: {:?}", e), - } - - /// Execution error. - Execution(e: Box) { - description("execution error"), - display("Execution: {}", e), - } - - /// Blockchain error. - Blockchain(e: Box) { - description("Blockchain error"), - display("Blockchain: {}", e), - } - - /// Could not get runtime version. - VersionInvalid { - description("Runtime version error"), - display("On-chain runtime does not specify version"), - } - - /// Genesis config is invalid. - GenesisInvalid { - description("Genesis config error"), - display("Genesis config provided is invalid"), - } - - /// Bad justification for header. - BadJustification(h: String) { - description("bad justification for header"), - display("bad justification for header: {}", &*h), - } - - /// Not available on light client. - NotAvailableOnLightClient { - description("not available on light client"), - display("This method is not currently available when running in light client mode"), - } - - /// Invalid remote CHT-based proof. - InvalidCHTProof { - description("invalid header proof"), - display("Remote node has responded with invalid header proof"), - } - - /// Remote fetch has been cancelled. - RemoteFetchCancelled { - description("remote fetch cancelled"), - display("Remote data fetch has been cancelled"), - } - - /// Remote fetch has been failed. - RemoteFetchFailed { - description("remote fetch failed"), - display("Remote data fetch has been failed"), - } - - /// Error decoding call result. - CallResultDecode(method: &'static str) { - description("Error decoding call result") - display("Error decoding call result of {}", method) - } - - /// Error converting a parameter between runtime and node. - RuntimeParamConversion(param: &'static str) { - description("Error converting parameter between runtime and node") - display("Error converting `{}` between runtime and node", param) - } - - /// Changes tries are not supported. - ChangesTriesNotSupported { - description("changes tries are not supported"), - display("Changes tries are not supported by the runtime"), - } - - /// Key changes query has failed. - ChangesTrieAccessFailed(e: String) { - description("invalid changes proof"), - display("Failed to check changes proof: {}", e), - } - - /// Last finalized block not parent of current. - NonSequentialFinalization(s: String) { - description("Did not finalize blocks in sequential order."), - display("Did not finalize blocks in sequential order."), - } - - /// Safety violation: new best block not descendent of last finalized. - NotInFinalizedChain { - description("Potential long-range attack: block not in finalized chain."), - display("Potential long-range attack: block not in finalized chain."), - } +use derive_more::{Display, From}; + +/// Client Result type alias +pub type Result = result::Result; + +/// Substrate Client error +#[derive(Debug, Display, From)] +pub enum Error { + /// Consensus Error + #[display(fmt = "Consensus: {}", _0)] + Consensus(consensus::Error), + /// Backend error. + #[display(fmt = "Backend error: {}", _0)] + Backend(String), + /// Unknown block. + #[display(fmt = "UnknownBlock: {}", _0)] + UnknownBlock(String), + /// Applying extrinsic error. + #[display(fmt = "Extrinsic error: {:?}", _0)] + ApplyExtrinsicFailed(ApplyError), + /// Execution error. + #[display(fmt = "Execution: {}", _0)] + Execution(Box), + /// Blockchain error. + #[display(fmt = "Blockchain: {}", _0)] + Blockchain(Box), + /// Invalid authorities set received from the runtime. + #[display(fmt = "Current state of blockchain has invalid authorities set")] + InvalidAuthoritiesSet, + /// Could not get runtime version. + #[display(fmt = "On-chain runtime does not specify version")] + VersionInvalid, + /// Genesis config is invalid. + #[display(fmt = "Genesis config provided is invalid")] + GenesisInvalid, + /// Bad justification for header. + #[display(fmt = "bad justification for header: {}", _0)] + BadJustification(String), + /// Not available on light client. + #[display(fmt = "This method is not currently available when running in light client mode")] + NotAvailableOnLightClient, + /// Invalid remote CHT-based proof. + #[display(fmt = "Remote node has responded with invalid header proof")] + InvalidCHTProof, + /// Remote fetch has been cancelled. + #[display(fmt = "Remote data fetch has been cancelled")] + RemoteFetchCancelled, + /// Remote fetch has been failed. + #[display(fmt = "Remote data fetch has been failed")] + RemoteFetchFailed, + /// Error decoding call result. + #[display(fmt = "Error decoding call result of {}", _0)] + CallResultDecode(&'static str), + /// Error converting a parameter between runtime and node. + #[display(fmt = "Error converting `{}` between runtime and node", _0)] + RuntimeParamConversion(&'static str), + /// Changes tries are not supported. + #[display(fmt = "Changes tries are not supported by the runtime")] + ChangesTriesNotSupported, + /// Key changes query has failed. + #[display(fmt = "Failed to check changes proof: {}", _0)] + ChangesTrieAccessFailed(String), + /// Last finalized block not parent of current. + #[display(fmt = "Did not finalize blocks in sequential order.")] + NonSequentialFinalization(String), + /// Safety violation: new best block not descendent of last finalized. + #[display(fmt = "Potential long-range attack: block not in finalized chain.")] + NotInFinalizedChain, + /// Hash that is required for building CHT is missing. + #[display(fmt = "Failed to get hash of block#{} for building CHT#{}", _0, _1)] + MissingHashRequiredForCHT(u64, u64), + /// A convenience variant for String + #[display(fmt = "{}", _0)] + Msg(String), +} - /// Hash that is required for building CHT is missing. - MissingHashRequiredForCHT(cht_num: u64, block_number: u64) { - description("missed hash required for building CHT"), - display("Failed to get hash of block#{} for building CHT#{}", block_number, cht_num), +impl error::Error for Error { + fn source(&self) -> Option<&(error::Error + 'static)> { + match self { + Error::Consensus(e) => Some(e), + Error::Blockchain(e) => Some(e), + _ => None, } } } -impl From> for Error { - fn from(e: Box) -> Self { - ErrorKind::Execution(e).into() +impl From for Error { + fn from(s: String) -> Self { + Error::Msg(s) } } -impl From for Error { - fn from(e: state_machine::backend::Void) -> Self { - match e {} +impl<'a> From<&'a str> for Error { + fn from(s: &'a str) -> Self { + Error::Msg(s.into()) } } impl Error { /// Chain a blockchain error. - pub fn from_blockchain(e: Box) -> Self { - ErrorKind::Blockchain(e).into() + pub fn from_blockchain(e: Box) -> Self { + Error::Blockchain(e) } /// Chain a state error. pub fn from_state(e: Box) -> Self { - ErrorKind::Execution(e).into() + Error::Execution(e) } } diff --git a/core/client/src/in_mem.rs b/core/client/src/in_mem.rs index 29256169f9..5d436b0c89 100644 --- a/core/client/src/in_mem.rs +++ b/core/client/src/in_mem.rs @@ -207,7 +207,7 @@ impl Blockchain { pub fn set_head(&self, id: BlockId) -> error::Result<()> { let header = match self.header(id)? { Some(h) => h, - None => return Err(error::ErrorKind::UnknownBlock(format!("{}", id)).into()), + None => return Err(error::Error::UnknownBlock(format!("{}", id))), }; self.apply_head(&header) @@ -258,7 +258,7 @@ impl Blockchain { fn finalize_header(&self, id: BlockId, justification: Option) -> error::Result<()> { let hash = match self.header(id)? { Some(h) => h.hash(), - None => return Err(error::ErrorKind::UnknownBlock(format!("{}", id)).into()), + None => return Err(error::Error::UnknownBlock(format!("{}", id))), }; let mut storage = self.storage.write(); @@ -416,12 +416,12 @@ impl light::blockchain::Storage for Blockchain fn header_cht_root(&self, _cht_size: u64, block: NumberFor) -> error::Result { self.storage.read().header_cht_roots.get(&block).cloned() - .ok_or_else(|| error::ErrorKind::Backend(format!("Header CHT for block {} not exists", block)).into()) + .ok_or_else(|| error::Error::Backend(format!("Header CHT for block {} not exists", block))) } fn changes_trie_cht_root(&self, _cht_size: u64, block: NumberFor) -> error::Result { self.storage.read().changes_trie_cht_roots.get(&block).cloned() - .ok_or_else(|| error::ErrorKind::Backend(format!("Changes trie CHT for block {} not exists", block)).into()) + .ok_or_else(|| error::Error::Backend(format!("Changes trie CHT for block {} not exists", block))) } fn cache(&self) -> Option>> { @@ -665,7 +665,7 @@ where match self.blockchain.id(block).and_then(|id| self.states.read().get(&id).cloned()) { Some(state) => Ok(state), - None => Err(error::ErrorKind::UnknownBlock(format!("{}", block)).into()), + None => Err(error::Error::UnknownBlock(format!("{}", block))), } } @@ -717,11 +717,11 @@ impl state_machine::ChangesTrieStorage for ChangesTrieStorage w /// Check that genesis storage is valid. pub fn check_genesis_storage(top: &StorageOverlay, children: &ChildrenStorageOverlay) -> error::Result<()> { if top.iter().any(|(k, _)| well_known_keys::is_child_storage_key(k)) { - return Err(error::ErrorKind::GenesisInvalid.into()); + return Err(error::Error::GenesisInvalid.into()); } if children.keys().any(|child_key| !well_known_keys::is_child_storage_key(&child_key)) { - return Err(error::ErrorKind::GenesisInvalid.into()); + return Err(error::Error::GenesisInvalid.into()); } Ok(()) diff --git a/core/client/src/leaves.rs b/core/client/src/leaves.rs index cc906d59a4..144237f777 100644 --- a/core/client/src/leaves.rs +++ b/core/client/src/leaves.rs @@ -85,11 +85,11 @@ impl LeafSet where let raw_hash = &mut &key[prefix.len()..]; let hash = match Decode::decode(raw_hash) { Some(hash) => hash, - None => return Err(error::ErrorKind::Backend("Error decoding hash".into()).into()), + None => return Err(error::Error::Backend("Error decoding hash".into())), }; let number = match Decode::decode(&mut &value[..]) { Some(number) => number, - None => return Err(error::ErrorKind::Backend("Error decoding number".into()).into()), + None => return Err(error::Error::Backend("Error decoding number".into())), }; storage.entry(Reverse(number)).or_insert_with(Vec::new).push(hash); } diff --git a/core/client/src/light/backend.rs b/core/client/src/light/backend.rs index b4b805f3c6..b0e0aa3687 100644 --- a/core/client/src/light/backend.rs +++ b/core/client/src/light/backend.rs @@ -28,7 +28,7 @@ use runtime_primitives::traits::{Block as BlockT, NumberFor, Zero, Header}; use crate::in_mem::{self, check_genesis_storage}; use crate::backend::{AuxStore, Backend as ClientBackend, BlockImportOperation, RemoteBackend, NewBlockState}; use crate::blockchain::HeaderBackend as BlockchainHeaderBackend; -use crate::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}; +use crate::error::{Error as ClientError, Result as ClientResult}; use crate::light::blockchain::{Blockchain, Storage as BlockchainStorage}; use crate::light::fetcher::{Fetcher, RemoteReadRequest}; use hash_db::Hasher; @@ -208,7 +208,7 @@ impl ClientBackend for Backend where } fn revert(&self, _n: NumberFor) -> ClientResult> { - Err(ClientErrorKind::NotAvailableOnLightClient.into()) + Err(ClientError::NotAvailableOnLightClient.into()) } } @@ -323,13 +323,13 @@ where let mut header = self.cached_header.read().clone(); if header.is_none() { let cached_header = self.blockchain.upgrade() - .ok_or_else(|| ClientErrorKind::UnknownBlock(format!("{}", self.block)).into()) + .ok_or_else(|| ClientError::UnknownBlock(format!("{}", self.block))) .and_then(|blockchain| blockchain.expect_header(BlockId::Hash(self.block)))?; header = Some(cached_header.clone()); *self.cached_header.write() = Some(cached_header); } - self.fetcher.upgrade().ok_or(ClientErrorKind::NotAvailableOnLightClient)? + self.fetcher.upgrade().ok_or(ClientError::NotAvailableOnLightClient)? .remote_read(RemoteReadRequest { block: self.block, header: header.expect("if block above guarantees that header is_some(); qed"), @@ -340,7 +340,7 @@ where } fn child_storage(&self, _storage_key: &[u8], _key: &[u8]) -> ClientResult>> { - Err(ClientErrorKind::NotAvailableOnLightClient.into()) + Err(ClientError::NotAvailableOnLightClient.into()) } fn for_keys_with_prefix(&self, _prefix: &[u8], _action: A) { diff --git a/core/client/src/light/blockchain.rs b/core/client/src/light/blockchain.rs index e081c14d1a..b43247034f 100644 --- a/core/client/src/light/blockchain.rs +++ b/core/client/src/light/blockchain.rs @@ -29,7 +29,7 @@ use crate::backend::{AuxStore, NewBlockState}; use crate::blockchain::{Backend as BlockchainBackend, BlockStatus, Cache as BlockchainCache, HeaderBackend as BlockchainHeaderBackend, Info as BlockchainInfo, ProvideCache}; use crate::cht; -use crate::error::{ErrorKind as ClientErrorKind, Result as ClientResult}; +use crate::error::{Error as ClientError, Result as ClientResult}; use crate::light::fetcher::{Fetcher, RemoteHeaderRequest}; /// Light client blockchain storage. @@ -114,7 +114,7 @@ impl BlockchainHeaderBackend for Blockchain where Bloc return Ok(None); } - self.fetcher().upgrade().ok_or(ClientErrorKind::NotAvailableOnLightClient)? + self.fetcher().upgrade().ok_or(ClientError::NotAvailableOnLightClient)? .remote_header(RemoteHeaderRequest { cht_root: self.storage.header_cht_root(cht::SIZE, number)?, block: number, @@ -202,22 +202,22 @@ pub mod tests { impl BlockchainHeaderBackend for DummyStorage { fn header(&self, _id: BlockId) -> ClientResult> { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn info(&self) -> ClientResult> { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn status(&self, _id: BlockId) -> ClientResult { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn number(&self, hash: Hash) -> ClientResult>> { if hash == Default::default() { Ok(Some(Default::default())) } else { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } } @@ -225,7 +225,7 @@ pub mod tests { if number == 0 { Ok(Some(Default::default())) } else { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } } } @@ -261,26 +261,26 @@ pub mod tests { } fn set_head(&self, _block: BlockId) -> ClientResult<()> { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn finalize_header(&self, _block: BlockId) -> ClientResult<()> { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn last_finalized(&self) -> ClientResult { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn header_cht_root(&self, _cht_size: u64, _block: u64) -> ClientResult { - Err(ClientErrorKind::Backend("Test error".into()).into()) + Err(ClientError::Backend("Test error".into())) } fn changes_trie_cht_root(&self, cht_size: u64, block: u64) -> ClientResult { cht::block_to_cht_number(cht_size, block) .and_then(|cht_num| self.changes_tries_cht_roots.get(&cht_num)) .cloned() - .ok_or_else(|| ClientErrorKind::Backend( + .ok_or_else(|| ClientError::Backend( format!("Test error: CHT for block #{} not found", block) ).into()) } diff --git a/core/client/src/light/call_executor.rs b/core/client/src/light/call_executor.rs index 1e50d3398e..6fcd2f4052 100644 --- a/core/client/src/light/call_executor.rs +++ b/core/client/src/light/call_executor.rs @@ -31,7 +31,7 @@ use hash_db::Hasher; use crate::backend::RemoteBackend; use crate::blockchain::Backend as ChainBackend; use crate::call_executor::CallExecutor; -use crate::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}; +use crate::error::{Error as ClientError, Result as ClientResult}; use crate::light::fetcher::{Fetcher, RemoteCallRequest}; use executor::{RuntimeVersion, NativeVersion}; use heapsize::HeapSizeOf; @@ -126,7 +126,7 @@ where ) -> ClientResult> where ExecutionManager: Clone { // it is only possible to execute contextual call if changes are empty if !changes.is_empty() || initialized_block.is_some() { - return Err(ClientErrorKind::NotAvailableOnLightClient.into()); + return Err(ClientError::NotAvailableOnLightClient.into()); } self.call(at, method, call_data, (&execution_manager).into(), side_effects_handler).map(NativeOrEncoded::Encoded) @@ -135,7 +135,7 @@ where fn runtime_version(&self, id: &BlockId) -> ClientResult { let call_result = self.call(id, "version", &[], ExecutionStrategy::NativeElseWasm, NeverOffchainExt::new())?; RuntimeVersion::decode(&mut call_result.as_slice()) - .ok_or_else(|| ClientErrorKind::VersionInvalid.into()) + .ok_or_else(|| ClientError::VersionInvalid.into()) } fn call_at_state< @@ -156,7 +156,7 @@ where _native_call: Option, _side_effects_handler: Option<&mut O>, ) -> ClientResult<(NativeOrEncoded, S::Transaction, Option>)> { - Err(ClientErrorKind::NotAvailableOnLightClient.into()) + Err(ClientError::NotAvailableOnLightClient.into()) } fn prove_at_trie_state>( @@ -166,7 +166,7 @@ where _method: &str, _call_data: &[u8] ) -> ClientResult<(Vec, Vec>)> { - Err(ClientErrorKind::NotAvailableOnLightClient.into()) + Err(ClientError::NotAvailableOnLightClient.into()) } fn native_runtime_version(&self) -> Option<&NativeVersion> { @@ -275,7 +275,7 @@ impl CallExecutor for ExecutionManager::NativeWhenPossible, native_call, side_effects_handler, - ).map_err(|e| ClientErrorKind::Execution(Box::new(e.to_string())).into()), + ).map_err(|e| ClientError::Execution(Box::new(e.to_string()))), false => CallExecutor::contextual_call::< _, _, @@ -296,7 +296,7 @@ impl CallExecutor for ExecutionManager::NativeWhenPossible, native_call, side_effects_handler, - ).map_err(|e| ClientErrorKind::Execution(Box::new(e.to_string())).into()), + ).map_err(|e| ClientError::Execution(Box::new(e.to_string()))), } } @@ -346,7 +346,7 @@ impl CallExecutor for ExecutionManager::NativeWhenPossible, native_call, side_effects_handler, - ).map_err(|e| ClientErrorKind::Execution(Box::new(e.to_string())).into()) + ).map_err(|e| ClientError::Execution(Box::new(e.to_string()))) } fn prove_at_trie_state>( diff --git a/core/client/src/light/fetcher.rs b/core/client/src/light/fetcher.rs index 4cbbc819b3..3f724c31c4 100644 --- a/core/client/src/light/fetcher.rs +++ b/core/client/src/light/fetcher.rs @@ -29,7 +29,7 @@ use state_machine::{CodeExecutor, ChangesTrieRootsStorage, ChangesTrieAnchorBloc TrieBackend, read_proof_check, key_changes_proof_check, create_proof_check_backend_storage}; use crate::cht; -use crate::error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}; +use crate::error::{Error as ClientError, Result as ClientResult}; use crate::light::blockchain::{Blockchain, Storage as BlockchainStorage}; use crate::light::call_executor::check_execution_proof; @@ -193,7 +193,7 @@ impl, F> LightDataChecker remote node can't use max block greater that one that we have passed if remote_proof.max_block > request.max_block.0 || remote_proof.max_block < request.last_block.0 { - return Err(ClientErrorKind::ChangesTrieAccessFailed(format!( + return Err(ClientError::ChangesTrieAccessFailed(format!( "Invalid max_block used by the remote node: {}. Local: {}..{}..{}", remote_proof.max_block, request.first_block.0, request.last_block.0, request.max_block.0, )).into()); @@ -209,7 +209,7 @@ impl, F> LightDataChecker= request.tries_roots.0) .unwrap_or(false); if is_extra_first_root || is_extra_last_root { - return Err(ClientErrorKind::ChangesTrieAccessFailed(format!( + return Err(ClientError::ChangesTrieAccessFailed(format!( "Extra changes tries roots proofs provided by the remote node: [{:?}..{:?}]. Expected in range: [{}; {})", remote_proof.roots.keys().next(), remote_proof.roots.keys().next_back(), request.first_block.0, request.tries_roots.0, @@ -247,7 +247,7 @@ impl, F> LightDataChecker, F> LightDataChecker FetchChecker for LightDataChecker> ) -> ClientResult { let remote_header = remote_header.ok_or_else(|| - ClientError::from(ClientErrorKind::InvalidCHTProof))?; + ClientError::from(ClientError::InvalidCHTProof))?; let remote_header_hash = remote_header.hash(); cht::check_proof::( request.cht_root, @@ -473,7 +473,7 @@ pub mod tests { let builder = remote_client.new_block().unwrap(); remote_client.import(BlockOrigin::Own, builder.bake().unwrap()).unwrap(); local_headers_hashes.push(remote_client.block_hash(i + 1) - .map_err(|_| ClientErrorKind::Backend("TestError".into()).into())); + .map_err(|_| ClientError::Backend("TestError".into()))); } // 'fetch' header proof from remote node diff --git a/core/consensus/aura/slots/src/lib.rs b/core/consensus/aura/slots/src/lib.rs index cfad5b69cd..cca8732b78 100644 --- a/core/consensus/aura/slots/src/lib.rs +++ b/core/consensus/aura/slots/src/lib.rs @@ -226,7 +226,7 @@ impl SlotDuration { match client.get_aux(SLOT_KEY)? { Some(v) => u64::decode(&mut &v[..]) .map(SlotDuration) - .ok_or_else(|| ::client::error::ErrorKind::Backend( + .ok_or_else(|| ::client::error::Error::Backend( format!("Aura slot duration kept in invalid format"), ).into()), None => { diff --git a/core/finality-grandpa/src/aux_schema.rs b/core/finality-grandpa/src/aux_schema.rs index 104284538c..99cecb98d5 100644 --- a/core/finality-grandpa/src/aux_schema.rs +++ b/core/finality-grandpa/src/aux_schema.rs @@ -20,7 +20,7 @@ use std::fmt::Debug; use std::sync::Arc; use parity_codec::{Encode, Decode}; use client::backend::AuxStore; -use client::error::{Result as ClientResult, Error as ClientError, ErrorKind as ClientErrorKind}; +use client::error::{Result as ClientResult, Error as ClientError}; use fork_tree::ForkTree; use grandpa::round::State as RoundState; use runtime_primitives::traits::{Block as BlockT, NumberFor}; @@ -109,7 +109,7 @@ fn load_decode(backend: &B, key: &[u8]) -> ClientResult< None => Ok(None), Some(t) => T::decode(&mut &t[..]) .ok_or_else( - || ClientErrorKind::Backend(format!("GRANDPA DB is corrupted.")).into(), + || ClientError::Backend(format!("GRANDPA DB is corrupted.")), ) .map(Some) } @@ -314,8 +314,8 @@ pub(crate) fn load_persistent( set_state: set_state.into(), }); } - }, - Some(other) => return Err(ClientErrorKind::Backend( + } + Some(other) => return Err(ClientError::Backend( format!("Unsupported GRANDPA DB version: {:?}", other) ).into()), } diff --git a/core/finality-grandpa/src/finality_proof.rs b/core/finality-grandpa/src/finality_proof.rs index 2a28cca3a8..a3147ce338 100644 --- a/core/finality-grandpa/src/finality_proof.rs +++ b/core/finality-grandpa/src/finality_proof.rs @@ -33,7 +33,7 @@ use grandpa::voter_set::VoterSet; use client::{ blockchain::Backend as BlockchainBackend, - error::{Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult}, + error::{Error as ClientError, Result as ClientResult}, light::fetcher::RemoteCallRequest, }; use parity_codec::{Encode, Decode}; @@ -73,7 +73,7 @@ pub fn prove_finality( // early-return if we sure that the block is NOT a part of canonical chain let canonical_block = blockchain.expect_block_hash_from_id(&BlockId::Number(block_number))?; if block != canonical_block { - return Err(ClientErrorKind::Backend( + return Err(ClientError::Backend( "Cannot generate finality proof for non-canonical block".into() ).into()); } @@ -111,7 +111,7 @@ pub fn prove_finality( } } - Err(ClientErrorKind::Backend( + Err(ClientError::Backend( "cannot find justification for finalized block".into() ).into()) } @@ -156,16 +156,16 @@ fn do_check_finality_proof, C, J>( { // decode finality proof let proof = FinalityProof::::decode(&mut &remote_proof[..]) - .ok_or_else(|| ClientErrorKind::BadJustification("failed to decode finality proof".into()))?; + .ok_or_else(|| ClientError::BadJustification("failed to decode finality proof".into()))?; // check that the first header in finalization path is the block itself { let finalized_header = proof.finalization_path.first() - .ok_or_else(|| ClientError::from(ClientErrorKind::BadJustification( + .ok_or_else(|| ClientError::from(ClientError::BadJustification( "finality proof: finalized path is empty".into() )))?; if *finalized_header.number() != block.0 || finalized_header.hash() != block.1 { - return Err(ClientErrorKind::BadJustification( + return Err(ClientError::BadJustification( "finality proof: block is not a part of finalized path".into() ).into()); } @@ -177,7 +177,7 @@ fn do_check_finality_proof, C, J>( let finalized_header = proof.finalization_path.last() .expect("checked above that proof.finalization_path is not empty; qed"); if *finalized_header.number() != just_block.0 || finalized_header.hash() != just_block.1 { - return Err(ClientErrorKind::BadJustification( + return Err(ClientError::BadJustification( "finality proof: target justification block is not a part of finalized path".into() ).into()); } @@ -192,7 +192,7 @@ fn do_check_finality_proof, C, J>( retry_count: None, })?; let grandpa_authorities: Vec<(AuthorityId, u64)> = Decode::decode(&mut &grandpa_authorities[..]) - .ok_or_else(|| ClientErrorKind::BadJustification("failed to decode GRANDPA authorities set proof".into()))?; + .ok_or_else(|| ClientError::BadJustification("failed to decode GRANDPA authorities set proof".into()))?; // and now check justification proof.justification.verify(set_id, &grandpa_authorities.into_iter().collect())?; @@ -392,7 +392,7 @@ mod tests { fn target_block(&self) -> (u64, H256) { (3, header(3).hash()) } fn verify(&self, _set_id: u64, _authorities: &VoterSet) -> ClientResult<()> { - Err(ClientErrorKind::Backend("test error".into()).into()) + Err(ClientError::Backend("test error".into())) } } diff --git a/core/finality-grandpa/src/justification.rs b/core/finality-grandpa/src/justification.rs index 57ea3a344c..5b55acec85 100644 --- a/core/finality-grandpa/src/justification.rs +++ b/core/finality-grandpa/src/justification.rs @@ -19,7 +19,7 @@ use std::collections::{HashMap, HashSet}; use client::{CallExecutor, Client}; use client::backend::Backend; use client::blockchain::HeaderBackend; -use client::error::{Error as ClientError, ErrorKind as ClientErrorKind}; +use client::error::Error as ClientError; use parity_codec::{Encode, Decode}; use grandpa::voter_set::VoterSet; use grandpa::{Error as GrandpaError}; @@ -64,7 +64,7 @@ impl> GrandpaJustification { let error = || { let msg = "invalid precommits for target commit".to_string(); - Err(Error::Client(ClientErrorKind::BadJustification(msg).into())) + Err(Error::Client(ClientError::BadJustification(msg))) }; for signed in commit.precommits.iter() { @@ -104,12 +104,12 @@ impl> GrandpaJustification { { let justification = GrandpaJustification::::decode(&mut &*encoded).ok_or_else(|| { let msg = "failed to decode grandpa justification".to_string(); - ClientError::from(ClientErrorKind::BadJustification(msg)) + ClientError::from(ClientError::BadJustification(msg)) })?; if (justification.commit.target_hash, justification.commit.target_number) != finalized_target { let msg = "invalid commit target in grandpa justification".to_string(); - Err(ClientErrorKind::BadJustification(msg).into()) + Err(ClientError::BadJustification(msg)) } else { justification.verify(set_id, voters).map(|_| justification) } @@ -132,7 +132,7 @@ impl> GrandpaJustification { Ok(ref result) if result.ghost().is_some() => {}, _ => { let msg = "invalid commit in grandpa justification".to_string(); - return Err(ClientErrorKind::BadJustification(msg).into()); + return Err(ClientError::BadJustification(msg)); } } @@ -145,7 +145,7 @@ impl> GrandpaJustification { self.round, set_id, ) { - return Err(ClientErrorKind::BadJustification( + return Err(ClientError::BadJustification( "invalid signature for precommit in grandpa justification".to_string()).into()); } @@ -162,7 +162,7 @@ impl> GrandpaJustification { } }, _ => { - return Err(ClientErrorKind::BadJustification( + return Err(ClientError::BadJustification( "invalid precommit ancestry proof in grandpa justification".to_string()).into()); }, } @@ -174,7 +174,7 @@ impl> GrandpaJustification { .collect(); if visited_hashes != ancestry_hashes { - return Err(ClientErrorKind::BadJustification( + return Err(ClientError::BadJustification( "invalid precommit ancestries in grandpa justification with unused headers".to_string()).into()); } diff --git a/core/network/src/error.rs b/core/network/src/error.rs index bf687f9969..87b967765c 100644 --- a/core/network/src/error.rs +++ b/core/network/src/error.rs @@ -27,10 +27,7 @@ use client; error_chain! { foreign_links { Io(IoError) #[doc = "IO error."]; - } - - links { - Client(client::error::Error, client::error::ErrorKind) #[doc="Client error"]; + Client(client::error::Error) #[doc="Client error"]; } errors { diff --git a/core/network/src/on_demand.rs b/core/network/src/on_demand.rs index e02355cb5e..ca2d04a662 100644 --- a/core/network/src/on_demand.rs +++ b/core/network/src/on_demand.rs @@ -25,7 +25,7 @@ use futures::sync::oneshot::{channel, Receiver, Sender as OneShotSender}; use linked_hash_map::LinkedHashMap; use linked_hash_map::Entry; use parking_lot::Mutex; -use client::{error::{Error as ClientError, ErrorKind as ClientErrorKind}}; +use client::error::Error as ClientError; use client::light::fetcher::{Fetcher, FetchChecker, RemoteHeaderRequest, RemoteCallRequest, RemoteReadRequest, RemoteChangesRequest, ChangesProof}; use crate::message; @@ -121,7 +121,7 @@ impl Future for RemoteResponse { fn poll(&mut self) -> Poll { self.receiver.poll() - .map_err(|_| ClientErrorKind::RemoteFetchCancelled.into()) + .map_err(|_| ClientError::RemoteFetchCancelled.into()) .and_then(|r| match r { Async::Ready(Ok(ready)) => Ok(Async::Ready(ready)), Async::Ready(Err(error)) => Err(error), @@ -194,7 +194,7 @@ impl OnDemand where (retry_count - 1, Some(retry_request_data)) } else { trace!(target: "sync", "Failed to get remote {} response for given number of retries", rtype); - retry_request_data.fail(ClientErrorKind::RemoteFetchFailed.into()); + retry_request_data.fail(ClientError::RemoteFetchFailed.into()); (0, None) } }, @@ -527,7 +527,7 @@ pub mod tests { use std::time::Instant; use futures::Future; use runtime_primitives::traits::NumberFor; - use client::{error::{ErrorKind as ClientErrorKind, Result as ClientResult}}; + use client::{error::{Error as ClientError, Result as ClientResult}}; use client::light::fetcher::{Fetcher, FetchChecker, RemoteHeaderRequest, RemoteCallRequest, RemoteReadRequest, RemoteChangesRequest, ChangesProof}; use crate::config::Roles; @@ -549,28 +549,28 @@ pub mod tests { ) -> ClientResult
{ match self.ok { true if header.is_some() => Ok(header.unwrap()), - _ => Err(ClientErrorKind::Backend("Test error".into()).into()), + _ => Err(ClientError::Backend("Test error".into())), } } fn check_read_proof(&self, _: &RemoteReadRequest
, _: Vec>) -> ClientResult>> { match self.ok { true => Ok(Some(vec![42])), - false => Err(ClientErrorKind::Backend("Test error".into()).into()), + false => Err(ClientError::Backend("Test error".into())), } } fn check_execution_proof(&self, _: &RemoteCallRequest
, _: Vec>) -> ClientResult> { match self.ok { true => Ok(vec![42]), - false => Err(ClientErrorKind::Backend("Test error".into()).into()), + false => Err(ClientError::Backend("Test error".into())), } } fn check_changes_proof(&self, _: &RemoteChangesRequest
, _: ChangesProof
) -> ClientResult, u32)>> { match self.ok { true => Ok(vec![(100, 2)]), - false => Err(ClientErrorKind::Backend("Test error".into()).into()), + false => Err(ClientError::Backend("Test error".into())), } } } diff --git a/core/rpc/src/author/error.rs b/core/rpc/src/author/error.rs index 9c1ec23225..0084c4da8f 100644 --- a/core/rpc/src/author/error.rs +++ b/core/rpc/src/author/error.rs @@ -24,9 +24,11 @@ use crate::rpc; use crate::errors; error_chain! { + foreign_links { + Client(client::error::Error) #[doc = "Client error"]; + } links { Pool(txpool::error::Error, txpool::error::ErrorKind) #[doc = "Pool error"]; - Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"]; } errors { /// Not implemented yet diff --git a/core/rpc/src/chain/error.rs b/core/rpc/src/chain/error.rs index c52d44eddc..81fe01a19d 100644 --- a/core/rpc/src/chain/error.rs +++ b/core/rpc/src/chain/error.rs @@ -20,8 +20,8 @@ use crate::rpc; use crate::errors; error_chain! { - links { - Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"]; + foreign_links { + Client(client::error::Error) #[doc = "Client error"]; } errors { /// Not implemented yet diff --git a/core/rpc/src/state/error.rs b/core/rpc/src/state/error.rs index bd85664099..d4b3013abb 100644 --- a/core/rpc/src/state/error.rs +++ b/core/rpc/src/state/error.rs @@ -20,8 +20,8 @@ use crate::rpc; use crate::errors; error_chain! { - links { - Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"]; + foreign_links { + Client(client::error::Error) #[doc = "Client error"]; } errors { diff --git a/core/rpc/src/state/tests.rs b/core/rpc/src/state/tests.rs index a63b8489eb..09ef303a64 100644 --- a/core/rpc/src/state/tests.rs +++ b/core/rpc/src/state/tests.rs @@ -44,7 +44,7 @@ fn should_call_contract() { assert_matches!( client.call("balanceOf".into(), Bytes(vec![1,2,3]), Some(genesis_hash).into()), - Err(Error(ErrorKind::Client(client::error::ErrorKind::Execution(_)), _)) + Err(Error(ErrorKind::Client(client::error::Error::Execution(_)), _)) ) } diff --git a/core/service/src/error.rs b/core/service/src/error.rs index 4832efb2ab..3155d781ad 100644 --- a/core/service/src/error.rs +++ b/core/service/src/error.rs @@ -28,12 +28,12 @@ use error_chain::*; error_chain! { foreign_links { + Client(client::error::Error) #[doc="Client error"]; Io(::std::io::Error) #[doc="IO error"]; } links { - Client(client::error::Error, client::error::ErrorKind) #[doc="Client error"]; - Consensus(consensus_common::Error, consensus_common::ErrorKind) #[doc="Consesus error"]; + Consensus(consensus_common::Error, consensus_common::ErrorKind) #[doc="Consensus error"]; Network(network::error::Error, network::error::ErrorKind) #[doc="Network error"]; Keystore(keystore::Error, keystore::ErrorKind) #[doc="Keystore error"]; } diff --git a/core/sr-api-macros/src/decl_runtime_apis.rs b/core/sr-api-macros/src/decl_runtime_apis.rs index 1f390267a9..109b37d875 100644 --- a/core/sr-api-macros/src/decl_runtime_apis.rs +++ b/core/sr-api-macros/src/decl_runtime_apis.rs @@ -637,7 +637,7 @@ impl<'a> ToClientSideDecl<'a> { #crate_::runtime_api::NativeOrEncoded::Encoded(r) => { <#ret_type as #crate_::runtime_api::Decode>::decode(&mut &r[..]) .ok_or_else(|| - #crate_::error::ErrorKind::CallResultDecode( + #crate_::error::Error::CallResultDecode( #function_name ).into() ) diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index 7df0a26524..bcc431c828 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -435,6 +435,17 @@ name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "derive_more" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "digest" version = "0.6.2" @@ -2259,7 +2270,7 @@ dependencies = [ name = "substrate-client" version = "1.0.0" dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3052,6 +3063,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +"checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" diff --git a/core/transaction-pool/src/error.rs b/core/transaction-pool/src/error.rs index e1223c537d..d4cc0acee8 100644 --- a/core/transaction-pool/src/error.rs +++ b/core/transaction-pool/src/error.rs @@ -16,6 +16,10 @@ //! Transaction pool error. +// Silence: `use of deprecated item 'std::error::Error::cause': replaced by Error::source, which can support downcasting` +// https://github.com/paritytech/substrate/issues/1547 +#![allow(deprecated)] + use client; use txpool; use error_chain::{ @@ -23,8 +27,10 @@ use error_chain::{ }; error_chain! { + foreign_links { + Client(client::error::Error) #[doc = "Client error"]; + } links { - Client(client::error::Error, client::error::ErrorKind) #[doc = "Client error"]; Pool(txpool::error::Error, txpool::error::ErrorKind) #[doc = "Pool error"]; } } diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 9d6c917b15..a427ab7690 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -435,6 +435,17 @@ name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "derive_more" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "digest" version = "0.6.2" @@ -2421,7 +2432,7 @@ dependencies = [ name = "substrate-client" version = "1.0.0" dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3179,6 +3190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +"checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index e9764ef1c0..432a8119ff 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -60,7 +60,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 59, - impl_version: 59, + impl_version: 60, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 792c68b39e..f525b16073 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -435,6 +435,17 @@ name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "derive_more" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "digest" version = "0.6.2" @@ -2564,7 +2575,7 @@ dependencies = [ name = "substrate-client" version = "1.0.0" dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3333,6 +3344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +"checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" -- GitLab From 5fd1b10a45a3c1b0db0d3b33c46b6e77c13fc577 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Fri, 12 Apr 2019 10:32:00 +0300 Subject: [PATCH 003/206] fix race in sync tests (#2259) --- core/consensus/aura/src/lib.rs | 2 +- core/consensus/common/Cargo.toml | 4 + core/consensus/common/src/import_queue.rs | 54 ++- core/finality-grandpa/Cargo.toml | 1 + core/finality-grandpa/src/tests.rs | 10 +- core/network/Cargo.toml | 1 + core/network/src/protocol.rs | 30 +- core/network/src/service.rs | 5 + core/network/src/test/mod.rs | 422 ++++++++++++---------- core/network/src/test/sync.rs | 14 +- 10 files changed, 309 insertions(+), 234 deletions(-) diff --git a/core/consensus/aura/src/lib.rs b/core/consensus/aura/src/lib.rs index 9849594686..c51730b114 100644 --- a/core/consensus/aura/src/lib.rs +++ b/core/consensus/aura/src/lib.rs @@ -950,7 +950,7 @@ mod tests { let drive_to_completion = ::tokio::timer::Interval::new_interval(TEST_ROUTING_INTERVAL) .for_each(move |_| { net.lock().send_import_notifications(); - net.lock().route_fast(); + net.lock().sync_without_disconnects(); Ok(()) }) .map(|_| ()) diff --git a/core/consensus/common/Cargo.toml b/core/consensus/common/Cargo.toml index eb0061a133..4989a1eb94 100644 --- a/core/consensus/common/Cargo.toml +++ b/core/consensus/common/Cargo.toml @@ -20,3 +20,7 @@ parity-codec = { version = "3.3", features = ["derive"] } [dev-dependencies] test_client = { package = "substrate-test-client", path = "../../test-client" } + +[features] +default = [] +test-helpers = [] \ No newline at end of file diff --git a/core/consensus/common/src/import_queue.rs b/core/consensus/common/src/import_queue.rs index 7a418ae9f4..d1c5c69d02 100644 --- a/core/consensus/common/src/import_queue.rs +++ b/core/consensus/common/src/import_queue.rs @@ -149,6 +149,18 @@ impl BasicQueue { sender: importer_sender, } } + + /// Send synchronization request to the block import channel. + /// + /// The caller should wait for Link::synchronized() call to ensure that it has synchronized + /// with ImportQueue. + #[cfg(any(test, feature = "test-helpers"))] + pub fn synchronize(&self) { + self + .sender + .send(BlockImportMsg::Synchronize) + .expect("1. self is holding a sender to the Importer, 2. Importer should handle messages while there are senders around; qed"); + } } impl ImportQueue for BasicQueue { @@ -191,6 +203,8 @@ pub enum BlockImportMsg { ImportJustification(Origin, B::Hash, NumberFor, Justification), Start(Box>, Sender>), Stop, + #[cfg(any(test, feature = "test-helpers"))] + Synchronize, } pub enum BlockImportWorkerMsg { @@ -201,6 +215,8 @@ pub enum BlockImportWorkerMsg { B::Hash, )>, ), + #[cfg(any(test, feature = "test-helpers"))] + Synchronize, } enum ImportMsgType { @@ -279,13 +295,32 @@ impl BlockImporter { let _ = sender.send(Ok(())); }, BlockImportMsg::Stop => return false, + #[cfg(any(test, feature = "test-helpers"))] + BlockImportMsg::Synchronize => { + self.worker_sender + .send(BlockImportWorkerMsg::Synchronize) + .expect("1. This is holding a sender to the worker, 2. the worker should not quit while a sender is still held; qed"); + }, } true } fn handle_worker_msg(&mut self, msg: BlockImportWorkerMsg) -> bool { + let link = match self.link.as_ref() { + Some(link) => link, + None => { + trace!(target: "sync", "Received import result while import-queue has no link"); + return true; + }, + }; + let results = match msg { BlockImportWorkerMsg::Imported(results) => (results), + #[cfg(any(test, feature = "test-helpers"))] + BlockImportWorkerMsg::Synchronize => { + link.synchronized(); + return true; + }, _ => unreachable!("Import Worker does not send ImportBlocks message; qed"), }; let mut has_error = false; @@ -301,14 +336,6 @@ impl BlockImporter { has_error = true; } - let link = match self.link.as_ref() { - Some(link) => link, - None => { - trace!(target: "sync", "Received import result for {} while import-queue has no link", hash); - return true; - }, - }; - match result { Ok(BlockImportResult::ImportedKnown(number)) => link.block_imported(&hash, number), Ok(BlockImportResult::ImportedUnknown(number, aux, who)) => { @@ -403,8 +430,12 @@ impl> BlockImportWorker { // Working until all senders have been dropped... match msg { BlockImportWorkerMsg::ImportBlocks(origin, blocks) => { - worker.import_a_batch_of_blocks(origin, blocks) - } + worker.import_a_batch_of_blocks(origin, blocks); + }, + #[cfg(any(test, feature = "test-helpers"))] + BlockImportWorkerMsg::Synchronize => { + let _ = worker.result_sender.send(BlockImportWorkerMsg::Synchronize); + }, _ => unreachable!("Import Worker does not receive the Imported message; qed"), } } @@ -480,6 +511,9 @@ pub trait Link: Send { fn note_useless_and_restart_sync(&self, _who: Origin, _reason: &str) {} /// Restart sync. fn restart(&self) {} + /// Synchronization request has been processed. + #[cfg(any(test, feature = "test-helpers"))] + fn synchronized(&self) {} } /// Block import successful result. diff --git a/core/finality-grandpa/Cargo.toml b/core/finality-grandpa/Cargo.toml index 4dcf199e1e..5ae9d0197f 100644 --- a/core/finality-grandpa/Cargo.toml +++ b/core/finality-grandpa/Cargo.toml @@ -25,6 +25,7 @@ fg_primitives = { package = "substrate-finality-grandpa-primitives", path = "pri grandpa = { package = "finality-grandpa", version = "0.7.1", features = ["derive-codec"] } [dev-dependencies] +consensus_common = { package = "substrate-consensus-common", path = "../consensus/common", features = ["test-helpers"] } network = { package = "substrate-network", path = "../network", features = ["test-helpers"] } keyring = { package = "substrate-keyring", path = "../keyring" } test_client = { package = "substrate-test-client", path = "../test-client"} diff --git a/core/finality-grandpa/src/tests.rs b/core/finality-grandpa/src/tests.rs index b4a5d40bf9..eea03a34a2 100644 --- a/core/finality-grandpa/src/tests.rs +++ b/core/finality-grandpa/src/tests.rs @@ -419,7 +419,7 @@ fn run_to_completion_with( .for_each(move |_| { net.lock().send_import_notifications(); net.lock().send_finality_notifications(); - net.lock().route_fast(); + net.lock().sync_without_disconnects(); Ok(()) }) .map(|_| ()) @@ -515,7 +515,7 @@ fn finalize_3_voters_1_observer() { .map_err(|_| ()); let drive_to_completion = ::tokio::timer::Interval::new_interval(TEST_ROUTING_INTERVAL) - .for_each(move |_| { net.lock().route_fast(); Ok(()) }) + .for_each(move |_| { net.lock().sync_without_disconnects(); Ok(()) }) .map(|_| ()) .map_err(|_| ()); @@ -680,7 +680,7 @@ fn transition_3_voters_twice_1_observer() { .for_each(move |_| { net.lock().send_import_notifications(); net.lock().send_finality_notifications(); - net.lock().route_fast(); + net.lock().sync_without_disconnects(); Ok(()) }) .map(|_| ()) @@ -789,7 +789,7 @@ fn sync_justifications_on_change_blocks() { // the last peer should get the justification by syncing from other peers while net.lock().peer(3).client().justification(&BlockId::Number(21)).unwrap().is_none() { - net.lock().route_fast(); + net.lock().sync_without_disconnects(); } } @@ -1198,7 +1198,7 @@ fn voter_persists_its_votes() { .for_each(move |_| { net.lock().send_import_notifications(); net.lock().send_finality_notifications(); - net.lock().route_fast(); + net.lock().sync_without_disconnects(); Ok(()) }) .map(|_| ()) diff --git a/core/network/Cargo.toml b/core/network/Cargo.toml index a477373d6d..6899243eea 100644 --- a/core/network/Cargo.toml +++ b/core/network/Cargo.toml @@ -36,6 +36,7 @@ test_client = { package = "substrate-test-client", path = "../../core/test-clien env_logger = { version = "0.6" } keyring = { package = "substrate-keyring", path = "../../core/keyring" } test_client = { package = "substrate-test-client", path = "../../core/test-client" } +consensus = { package = "substrate-consensus-common", path = "../../core/consensus/common", features = ["test-helpers"] } [features] default = [] diff --git a/core/network/src/protocol.rs b/core/network/src/protocol.rs index 99520ea99a..2d3e81daa3 100644 --- a/core/network/src/protocol.rs +++ b/core/network/src/protocol.rs @@ -187,25 +187,25 @@ struct ContextData { } /// A task, consisting of a user-provided closure, to be executed on the Protocol thread. -pub trait SpecTask> { - fn call_box(self: Box, spec: &mut S, context: &mut Context); +pub trait SpecTask> { + fn call_box(self: Box, spec: &mut S, context: &mut Context); } impl, F: FnOnce(&mut S, &mut Context)> SpecTask for F { - fn call_box(self: Box, spec: &mut S, context: &mut Context) { - (*self)(spec, context) - } + fn call_box(self: Box, spec: &mut S, context: &mut Context) { + (*self)(spec, context) + } } /// A task, consisting of a user-provided closure, to be executed on the Protocol thread. -pub trait GossipTask { - fn call_box(self: Box, gossip: &mut ConsensusGossip, context: &mut Context); +pub trait GossipTask { + fn call_box(self: Box, gossip: &mut ConsensusGossip, context: &mut Context); } impl, &mut Context)> GossipTask for F { - fn call_box(self: Box, gossip: &mut ConsensusGossip, context: &mut Context) { - (*self)(gossip, context) - } + fn call_box(self: Box, gossip: &mut ConsensusGossip, context: &mut Context) { + (*self)(gossip, context) + } } /// Messages sent to Protocol from elsewhere inside the system. @@ -246,6 +246,9 @@ pub enum ProtocolMsg> { Stop, /// Tell protocol to perform regular maintenance. Tick, + /// Synchronization request. + #[cfg(any(test, feature = "test-helpers"))] + Synchronize, } /// Messages sent to Protocol from Network-libp2p. @@ -258,6 +261,9 @@ pub enum FromNetworkMsg { CustomMessage(PeerId, Message), /// Let protocol know a peer is currenlty clogged. PeerClogged(PeerId, Option>), + /// Synchronization request. + #[cfg(any(test, feature = "test-helpers"))] + Synchronize, } enum Incoming> { @@ -408,6 +414,8 @@ impl, H: ExHashT> Protocol { self.stop(); return false; }, + #[cfg(any(test, feature = "test-helpers"))] + ProtocolMsg::Synchronize => self.network_chan.send(NetworkMsg::Synchronized), } true } @@ -420,6 +428,8 @@ impl, H: ExHashT> Protocol { FromNetworkMsg::CustomMessage(who, message) => { self.on_custom_message(who, message) }, + #[cfg(any(test, feature = "test-helpers"))] + FromNetworkMsg::Synchronize => self.network_chan.send(NetworkMsg::Synchronized), } true } diff --git a/core/network/src/service.rs b/core/network/src/service.rs index 7244080bf7..9964286f30 100644 --- a/core/network/src/service.rs +++ b/core/network/src/service.rs @@ -466,6 +466,9 @@ pub enum NetworkMsg { Outgoing(PeerId, Message), /// Report a peer. ReportPeer(PeerId, Severity), + /// Synchronization response. + #[cfg(any(test, feature = "test-helpers"))] + Synchronized, } /// Starts the background thread that handles the networking. @@ -548,6 +551,8 @@ fn run_thread( }, } }, + #[cfg(any(test, feature = "test-helpers"))] + NetworkMsg::Synchronized => (), } Ok(()) }) diff --git a/core/network/src/test/mod.rs b/core/network/src/test/mod.rs index 6f50967bba..97b56e1cb7 100644 --- a/core/network/src/test/mod.rs +++ b/core/network/src/test/mod.rs @@ -21,11 +21,9 @@ mod block_import; #[cfg(test)] mod sync; -use std::collections::{HashMap, HashSet}; +use std::collections::{HashMap, HashSet, VecDeque}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; -use std::thread; -use std::time::Duration; use log::trace; use client; @@ -36,7 +34,7 @@ use consensus::import_queue::{Link, SharedBlockImport, SharedJustificationImport use consensus::{Error as ConsensusError, ErrorKind as ConsensusErrorKind}; use consensus::{BlockOrigin, ForkChoiceStrategy, ImportBlock, JustificationImport}; use crate::consensus_gossip::{ConsensusGossip, MessageRecipient as GossipMessageRecipient, TopicNotification}; -use crossbeam_channel::{self as channel, Sender, select}; +use crossbeam_channel::{Sender, RecvError}; use futures::Future; use futures::sync::{mpsc, oneshot}; use crate::message::Message; @@ -119,62 +117,28 @@ pub type PeersClient = client::Client> { - import_done: Arc, - hash: Arc>, link: NetworkLink, - protocol_sender: Sender>, - network_sender: NetworkChan, + network_to_protocol_sender: Sender>, } impl> TestLink { fn new( protocol_sender: Sender>, + network_to_protocol_sender: Sender>, network_sender: NetworkChan ) -> TestLink { TestLink { - protocol_sender: protocol_sender.clone(), - network_sender: network_sender.clone(), - import_done: Arc::new(AtomicBool::new(false)), - hash: Arc::new(Mutex::new(Default::default())), + network_to_protocol_sender, link: NetworkLink { protocol_sender, network_sender, } } } - - fn clone_link(&self) -> Self { - TestLink { - protocol_sender: self.protocol_sender.clone(), - network_sender: self.network_sender.clone(), - import_done: self.import_done.clone(), - hash: self.hash.clone(), - link: NetworkLink { - protocol_sender: self.protocol_sender.clone(), - network_sender: self.network_sender.clone(), - } - } - } - - /// Set the hash which will be awaited for import. - fn with_hash(&self, hash: Hash) { - self.import_done.store(false, Ordering::SeqCst); - *self.hash.lock() = hash; - } - - /// Simulate a synchronous import. - fn wait_for_import(&self) { - while !self.import_done.load(Ordering::SeqCst) { - thread::sleep(Duration::from_millis(20)); - } - } } impl> Link for TestLink { fn block_imported(&self, hash: &Hash, number: NumberFor) { - if hash == &*self.hash.lock() { - self.import_done.store(true, Ordering::SeqCst); - } self.link.block_imported(hash, number); } @@ -201,6 +165,10 @@ impl> Link for TestLink { fn restart(&self) { self.link.restart(); } + + fn synchronized(&self) { + let _ = self.network_to_protocol_sender.send(FromNetworkMsg::Synchronize); + } } pub struct Peer> { @@ -209,43 +177,137 @@ pub struct Peer> { pub peers: Arc>>>, pub peer_id: PeerId, client: Arc, - network_to_protocol_sender: Sender>, - pub protocol_sender: Sender>, - network_link: TestLink, - network_port: Arc>>, - pub import_queue: Box>, + net_proto_channel: ProtocolChannel, + pub import_queue: Box>, pub data: D, best_hash: Mutex>, finalized_hash: Mutex>, } +type MessageFilter = Fn(&NetworkMsg) -> bool; + +struct ProtocolChannel> { + buffered_messages: Mutex>>, + network_to_protocol_sender: Sender>, + client_to_protocol_sender: Sender>, + protocol_to_network_receiver: NetworkPort, +} + +impl> ProtocolChannel { + /// Create new buffered network port. + pub fn new( + network_to_protocol_sender: Sender>, + client_to_protocol_sender: Sender>, + protocol_to_network_receiver: NetworkPort, + ) -> Self { + ProtocolChannel { + buffered_messages: Mutex::new(VecDeque::new()), + network_to_protocol_sender, + client_to_protocol_sender, + protocol_to_network_receiver, + } + } + + /// Send message from network to protocol. + pub fn send_from_net(&self, message: FromNetworkMsg) { + let _ = self.network_to_protocol_sender.send(message); + + let _ = self.network_to_protocol_sender.send(FromNetworkMsg::Synchronize); + let _ = self.wait_sync(); + } + + /// Send message from client to protocol. + pub fn send_from_client(&self, message: ProtocolMsg) { + let _ = self.client_to_protocol_sender.send(message); + + let _ = self.client_to_protocol_sender.send(ProtocolMsg::Synchronize); + let _ = self.wait_sync(); + } + + /// Wait until synchronization response is generated by the protocol. + pub fn wait_sync(&self) -> Result<(), RecvError> { + loop { + match self.protocol_to_network_receiver.receiver().recv() { + Ok(NetworkMsg::Synchronized) => return Ok(()), + Err(error) => return Err(error), + Ok(msg) => self.buffered_messages.lock().push_back(msg), + } + } + } + + /// Produce the next pending message to send to another peer. + fn pending_message(&self, message_filter: &MessageFilter) -> Option> { + if let Some(message) = self.buffered_message(message_filter) { + return Some(message); + } + + while let Some(message) = self.channel_message() { + if message_filter(&message) { + return Some(message) + } else { + self.buffered_messages.lock().push_back(message); + } + } + + None + } + + /// Whether this peer is done syncing (has no messages to send). + fn is_done(&self) -> bool { + self.buffered_messages.lock().is_empty() + && self.protocol_to_network_receiver.receiver().is_empty() + } + + /// Return oldest buffered message if it exists. + fn buffered_message(&self, message_filter: &MessageFilter) -> Option> { + let mut buffered_messages = self.buffered_messages.lock(); + for i in 0..buffered_messages.len() { + if message_filter(&buffered_messages[i]) { + return buffered_messages.remove(i); + } + } + + None + } + + /// Receive message from the channel. + fn channel_message(&self) -> Option> { + self.protocol_to_network_receiver.receiver().try_recv().ok() + } +} + impl> Peer { fn new( is_offline: Arc, is_major_syncing: Arc, peers: Arc>>>, client: Arc, - import_queue: Box>, + import_queue: Box>, network_to_protocol_sender: Sender>, protocol_sender: Sender>, network_sender: NetworkChan, network_port: NetworkPort, data: D, ) -> Self { - let network_port = Arc::new(Mutex::new(network_port)); - let network_link = TestLink::new(protocol_sender.clone(), network_sender.clone()); - import_queue.start(Box::new(network_link.clone_link())).expect("Test ImportQueue always starts"); + let net_proto_channel = ProtocolChannel::new( + network_to_protocol_sender.clone(), + protocol_sender.clone(), + network_port, + ); + let network_link = TestLink::new( + protocol_sender.clone(), + network_to_protocol_sender.clone(), + network_sender.clone(), + ); + import_queue.start(Box::new(network_link)).expect("Test ImportQueue always starts"); Peer { is_offline, is_major_syncing, peers, peer_id: PeerId::random(), client, - network_to_protocol_sender, - protocol_sender, import_queue, - network_link, - network_port, + net_proto_channel, data, best_hash: Mutex::new(None), finalized_hash: Mutex::new(None), @@ -260,9 +322,7 @@ impl> Peer { .header(&BlockId::Hash(info.chain.best_hash)) .unwrap() .unwrap(); - let _ = self - .protocol_sender - .send(ProtocolMsg::BlockImported(info.chain.best_hash, header)); + self.net_proto_channel.send_from_client(ProtocolMsg::BlockImported(info.chain.best_hash, header)); } pub fn on_block_imported( @@ -270,9 +330,7 @@ impl> Peer { hash: ::Hash, header: &::Header, ) { - let _ = self - .protocol_sender - .send(ProtocolMsg::BlockImported(hash, header.clone())); + self.net_proto_channel.send_from_client(ProtocolMsg::BlockImported(hash, header.clone())); } // SyncOracle: are we connected to any peer? @@ -287,45 +345,38 @@ impl> Peer { /// Called on connection to other indicated peer. fn on_connect(&self, other: &Self) { - let _ = self.network_to_protocol_sender.send(FromNetworkMsg::PeerConnected(other.peer_id.clone(), String::new())); + self.net_proto_channel.send_from_net(FromNetworkMsg::PeerConnected(other.peer_id.clone(), String::new())); } /// Called on disconnect from other indicated peer. fn on_disconnect(&self, other: &Self) { - let _ = self - .network_to_protocol_sender - .send(FromNetworkMsg::PeerDisconnected(other.peer_id.clone(), String::new())); + self.net_proto_channel.send_from_net(FromNetworkMsg::PeerDisconnected(other.peer_id.clone(), String::new())); } /// Receive a message from another peer. Return a set of peers to disconnect. - fn receive_message(&self, from: &Self, msg: Message) { - let _ = self - .network_to_protocol_sender - .send(FromNetworkMsg::CustomMessage(from.peer_id.clone(), msg)); + fn receive_message(&self, from: &PeerId, msg: Message) { + self.net_proto_channel.send_from_net(FromNetworkMsg::CustomMessage(from.clone(), msg)); } /// Produce the next pending message to send to another peer. - fn pending_message(&self) -> Option> { - select! { - recv(self.network_port.lock().receiver()) -> msg => return msg.ok(), - // If there are no messages ready, give protocol a change to send one. - recv(channel::after(Duration::from_millis(100))) -> _ => return None, - } - } - - /// Produce the next pending message to send to another peer, without waiting. - fn pending_message_fast(&self) -> Option> { - self.network_port.lock().receiver().try_recv().ok() + fn pending_message(&self, message_filter: &MessageFilter) -> Option> { + self.net_proto_channel.pending_message(message_filter) } /// Whether this peer is done syncing (has no messages to send). fn is_done(&self) -> bool { - self.network_port.lock().receiver().is_empty() + self.net_proto_channel.is_done() + } + + /// Synchronize with import queue. + fn import_queue_sync(&self) { + self.import_queue.synchronize(); + let _ = self.net_proto_channel.wait_sync(); } /// Execute a "sync step". This is called for each peer after it sends a packet. fn sync_step(&self) { - let _ = self.protocol_sender.send(ProtocolMsg::Tick); + self.net_proto_channel.send_from_client(ProtocolMsg::Tick); } /// Send block import notifications. @@ -340,10 +391,7 @@ impl> Peer { } let header = self.client.header(&BlockId::Hash(info.chain.best_hash)).unwrap().unwrap(); - let _ = self - .protocol_sender - .send(ProtocolMsg::BlockImported(info.chain.best_hash, header)); - + self.net_proto_channel.send_from_client(ProtocolMsg::BlockImported(info.chain.best_hash, header)); *best_hash = Some(info.chain.best_hash); } @@ -359,16 +407,13 @@ impl> Peer { } let header = self.client.header(&BlockId::Hash(info.chain.finalized_hash)).unwrap().unwrap(); - let _ = self - .protocol_sender - .send(ProtocolMsg::BlockFinalized(info.chain.finalized_hash, header.clone())); - + self.net_proto_channel.send_from_client(ProtocolMsg::BlockFinalized(info.chain.finalized_hash, header.clone())); *finalized_hash = Some(info.chain.finalized_hash); } /// Restart sync for a peer. fn restart_sync(&self) { - let _ = self.protocol_sender.send(ProtocolMsg::Abort); + self.net_proto_channel.send_from_client(ProtocolMsg::Abort); } /// Push a message into the gossip network and relay to peers. @@ -380,10 +425,14 @@ impl> Peer { data: Vec, force: bool, ) { - let recipient = if force { GossipMessageRecipient::BroadcastToAll } else { GossipMessageRecipient::BroadcastNew }; - let _ = self - .protocol_sender - .send(ProtocolMsg::GossipConsensusMessage(topic, engine_id, data, recipient)); + let recipient = if force { + GossipMessageRecipient::BroadcastToAll + } else { + GossipMessageRecipient::BroadcastNew + }; + self.net_proto_channel.send_from_client( + ProtocolMsg::GossipConsensusMessage(topic, engine_id, data, recipient), + ); } pub fn consensus_gossip_collect_garbage_for_topic(&self, _topic: ::Hash) { @@ -408,22 +457,18 @@ impl> Peer { pub fn with_gossip(&self, f: F) where F: FnOnce(&mut ConsensusGossip, &mut Context) + Send + 'static { - let _ = self - .protocol_sender - .send(ProtocolMsg::ExecuteWithGossip(Box::new(f))); + self.net_proto_channel.send_from_client(ProtocolMsg::ExecuteWithGossip(Box::new(f))); } /// Announce a block to peers. pub fn announce_block(&self, block: Hash) { - let _ = self.protocol_sender.send(ProtocolMsg::AnnounceBlock(block)); + self.net_proto_channel.send_from_client(ProtocolMsg::AnnounceBlock(block)); } /// Request a justification for the given block. #[cfg(test)] fn request_justification(&self, hash: &::primitives::H256, number: NumberFor) { - let _ = self - .protocol_sender - .send(ProtocolMsg::RequestJustification(hash.clone(), number)); + self.net_proto_channel.send_from_client(ProtocolMsg::RequestJustification(hash.clone(), number)); } /// Add blocks to the peer -- edit the block before adding @@ -452,7 +497,6 @@ impl> Peer { ); let header = block.header.clone(); at = hash; - self.network_link.with_hash(hash); self.import_queue.import_blocks( origin, vec![IncomingBlock { @@ -463,9 +507,11 @@ impl> Peer { justification: None, }], ); - // Simulate a sync import. - self.network_link.wait_for_import(); + + // make sure block import has completed + self.import_queue_sync(); } + at } @@ -525,7 +571,7 @@ impl TransactionPool for EmptyTransactionPool { } pub trait SpecializationFactory { - fn create() -> Self; + fn create() -> Self; } impl SpecializationFactory for DummySpecialization { @@ -633,86 +679,86 @@ pub trait TestNetFactory: Sized { } } } - self.route(None); + + loop { + // we only deliver Status messages during start + let need_continue = self.route_single(true, None, &|msg| match *msg { + NetworkMsg::Outgoing(_, crate::message::generic::Message::Status(_)) => true, + NetworkMsg::Outgoing(_, _) => false, + NetworkMsg::ReportPeer(_, _) | NetworkMsg::Synchronized => true, + }); + if !need_continue { + break; + } + } + self.set_started(true); } - /// Do one step of routing. - fn route(&mut self, disconnected: Option>) { - self.mut_peers(move |peers| { - let mut to_disconnect = HashSet::new(); - for (peer_pos, peer) in peers.iter().enumerate() { - let packet = peer.pending_message(); - match packet { - None => continue, - Some(NetworkMsg::Outgoing(recipient, packet)) => { - let recipient = peers.iter().position(|p| p.peer_id == recipient).unwrap(); - if let Some(disconnected) = disconnected.as_ref() { - let mut current = HashSet::new(); - current.insert(peer_pos); - current.insert(recipient); - // Not routing message between "disconnected" nodes. - if disconnected.is_subset(¤t) { - continue; + /// Do single round of message routing: single message from every peer is routed. + fn route_single( + &mut self, + disconnect: bool, + disconnected: Option>, + message_filter: &MessageFilter, + ) -> bool { + let mut had_messages = false; + let mut to_disconnect = HashSet::new(); + let peers = self.peers(); + for peer in peers { + if let Some(message) = peer.pending_message(message_filter) { + match message { + NetworkMsg::Outgoing(recipient_id, packet) => { + had_messages = true; + + let sender_pos = peers.iter().position(|p| p.peer_id == peer.peer_id).unwrap(); + let recipient_pos = peers.iter().position(|p| p.peer_id == recipient_id).unwrap(); + if disconnect { + if let Some(ref disconnected) = disconnected { + let mut current = HashSet::new(); + current.insert(sender_pos); + current.insert(recipient_pos); + // Not routing message between "disconnected" nodes. + if disconnected.is_subset(¤t) { + continue; + } } } - peers[recipient].receive_message(peer, packet) - } - Some(NetworkMsg::ReportPeer(who, _)) => { - to_disconnect.insert(who); - } - } - } - for d in to_disconnect { - if let Some(d) = peers.iter().find(|p| p.peer_id == d) { - for peer in 0..peers.len() { - peers[peer].on_disconnect(d); - } + + peers[recipient_pos].receive_message(&peer.peer_id, packet); + }, + NetworkMsg::ReportPeer(who, _) => { + if disconnect { + to_disconnect.insert(who); + } + }, + _ => (), } } - }); - } + } - /// Route all pending outgoing messages, without waiting or disconnecting. - fn route_fast(&mut self) { - self.mut_peers(move |peers| { - for peer in 0..peers.len() { - while let Some(NetworkMsg::Outgoing(recipient, packet)) = peers[peer].pending_message_fast() { - if let Some(p) = peers.iter().find(|p| p.peer_id == recipient) { - p.receive_message(&peers[peer], packet) - } + for d in to_disconnect { + if let Some(d) = peers.iter().find(|p| p.peer_id == d) { + for peer in 0..peers.len() { + peers[peer].on_disconnect(d); } } - }); - } + } - /// Do a step of synchronization. - fn sync_step(&mut self) { - self.route(None); + // make sure that the protocol(s) has processed all messages that have been queued + self.peers().iter().for_each(|peer| peer.import_queue_sync()); - self.mut_peers(|peers| { - for peer in peers { - peer.sync_step(); - } - }) + had_messages } /// Send block import notifications for all peers. fn send_import_notifications(&mut self) { - self.mut_peers(|peers| { - for peer in peers { - peer.send_import_notifications(); - } - }) + self.peers().iter().for_each(|peer| peer.send_import_notifications()) } /// Send block finalization notifications for all peers. fn send_finality_notifications(&mut self) { - self.mut_peers(|peers| { - for peer in peers { - peer.send_finality_notifications(); - } - }) + self.peers().iter().for_each(|peer| peer.send_finality_notifications()) } /// Restart sync for a peer. @@ -722,48 +768,30 @@ pub trait TestNetFactory: Sized { /// Perform synchronization until complete, if provided the /// given nodes set are excluded from sync. - fn sync_with(&mut self, disconnected: Option>) -> u32 { + fn sync_with(&mut self, disconnect: bool, disconnected: Option>) { self.start(); - let mut total_steps = 0; - let mut done = 0; - - loop { - if done > 3 { break; } - if self.done() { - done += 1; - } else { - done = 0; - } - - self.sync_step(); - self.route(disconnected.clone()); - - total_steps += 1; + while self.route_single(disconnect, disconnected.clone(), &|_| true) { + // give protocol a chance to do its maintain procedures + self.peers().iter().for_each(|peer| peer.sync_step()); } - - total_steps } - /// Perform synchronization until complete. - fn sync(&mut self) -> u32 { - self.sync_with(None) + /// Deliver at most 1 pending message from every peer. + fn sync_step(&mut self) { + self.route_single(true, None, &|_| true); } - /// Perform synchronization until complete, - /// excluding sync between certain nodes. - fn sync_with_disconnected(&mut self, disconnected: HashSet) -> u32 { - self.sync_with(Some(disconnected)) + /// Deliver pending messages until there are no more. + fn sync(&mut self) { + self.sync_with(true, None) } - /// Do the given amount of sync steps. - fn sync_steps(&mut self, count: usize) { - self.start(); - for _ in 0..count { - self.sync_step(); - } + /// Deliver pending messages until there are no more. Do not disconnect nodes. + fn sync_without_disconnects(&mut self) { + self.sync_with(false, None) } - /// Whether all peers have synced. + /// Whether all peers have no pending outgoing messages. fn done(&self) -> bool { self.peers().iter().all(|p| p.is_done()) } diff --git a/core/network/src/test/sync.rs b/core/network/src/test/sync.rs index 9bbf0a32b7..94bbc68b94 100644 --- a/core/network/src/test/sync.rs +++ b/core/network/src/test/sync.rs @@ -48,8 +48,7 @@ fn sync_peers_works() { net.sync(); for peer in 0..3 { // Assert peers is up to date. - let peers = net.peer(peer).peers.read(); - assert_eq!(peers.len(), 2); + assert_eq!(net.peer(peer).peers.read().len(), 2); // And then disconnect. for other in 0..3 { if other != peer { @@ -78,9 +77,6 @@ fn sync_cycle_from_offline_to_syncing_to_offline() { // Generate blocks. net.peer(2).push_blocks(100, false); net.start(); - net.route_fast(); - thread::sleep(Duration::from_millis(100)); - net.route_fast(); for peer in 0..3 { // Online assert!(!net.peer(peer).is_offline()); @@ -102,7 +98,6 @@ fn sync_cycle_from_offline_to_syncing_to_offline() { net.peer(peer).on_disconnect(net.peer(other)); } } - thread::sleep(Duration::from_millis(100)); assert!(net.peer(peer).is_offline()); assert!(!net.peer(peer).is_major_syncing()); } @@ -116,9 +111,7 @@ fn syncing_node_not_major_syncing_when_disconnected() { // Generate blocks. net.peer(2).push_blocks(100, false); net.start(); - net.route_fast(); - thread::sleep(Duration::from_millis(100)); - net.route_fast(); + net.sync_step(); // Peer 1 is major-syncing. assert!(net.peer(1).is_major_syncing()); @@ -126,7 +119,6 @@ fn syncing_node_not_major_syncing_when_disconnected() { // Disconnect peer 1 form everyone else. net.peer(1).on_disconnect(net.peer(0)); net.peer(1).on_disconnect(net.peer(2)); - thread::sleep(Duration::from_millis(100)); // Peer 1 is not major-syncing. assert!(!net.peer(1).is_major_syncing()); @@ -363,7 +355,7 @@ fn blocks_are_not_announced_by_light_nodes() { let mut disconnected = HashSet::new(); disconnected.insert(0); disconnected.insert(2); - net.sync_with_disconnected(disconnected); + net.sync_with(true, Some(disconnected)); // peer 0 has the best chain // peer 1 has the best chain -- GitLab From 871110fed1d1023d101b8fb6f7abdbca802c69ec Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Fri, 12 Apr 2019 11:53:35 +0200 Subject: [PATCH 004/206] Update `template-node` to `node-template` (#2265) * Update `template-node` to `node-template` For substrate-up scripts * Remove random artifact --- node-template/Cargo.toml | 2 +- node-template/runtime/src/lib.rs | 4 ++-- node-template/src/main.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node-template/Cargo.toml b/node-template/Cargo.toml index 0868eebdd1..7ef20cc89f 100644 --- a/node-template/Cargo.toml +++ b/node-template/Cargo.toml @@ -6,7 +6,7 @@ build = "build.rs" edition = "2018" [[bin]] -name = "template-node" +name = "node-template" path = "src/main.rs" [dependencies] diff --git a/node-template/runtime/src/lib.rs b/node-template/runtime/src/lib.rs index a6aa01bc87..a4866b127d 100644 --- a/node-template/runtime/src/lib.rs +++ b/node-template/runtime/src/lib.rs @@ -92,8 +92,8 @@ pub mod opaque { /// This runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("template-node"), - impl_name: create_runtime_str!("template-node"), + spec_name: create_runtime_str!("node-template"), + impl_name: create_runtime_str!("node-template"), authoring_version: 3, spec_version: 3, impl_version: 0, diff --git a/node-template/src/main.rs b/node-template/src/main.rs index 7d8c3076c6..53845ddd08 100644 --- a/node-template/src/main.rs +++ b/node-template/src/main.rs @@ -14,7 +14,7 @@ fn run() -> cli::error::Result<()> { name: "Substrate Node", commit: env!("VERGEN_SHA_SHORT"), version: env!("CARGO_PKG_VERSION"), - executable_name: "template-node", + executable_name: "node-template", author: "Anonymous", description: "Template Node", support_url: "support.anonymous.an", -- GitLab From b2e6b08a8f094ee34704905a92cd47df6178901e Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Fri, 12 Apr 2019 13:01:38 +0200 Subject: [PATCH 005/206] SRML Executive Documentation (#2144) * executive docs first draft * link updates * gautam update * capitalization * typo fix --- srml/executive/src/lib.rs | 72 ++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 17 deletions(-) diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index 4c5595dc5e..a33458a910 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -14,7 +14,45 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Executive: Handles all of the top-level stuff; essentially just executing blocks/extrinsics. +//! # Executive Module +//! +//! The Executive module acts as the orchestration layer for the runtime. It dispatches incoming +//! extrinsic calls to the respective modules in the runtime. +//! +//! ## Overview +//! +//! The executive module is not a typical SRML module providing functionality around a specific feature. +//! It is a cross-cutting framework component for the SRML. It works in conjunction with the +//! [SRML System module](../srml_system/index.html) to perform these cross-cutting functions. +//! +//! The Executive module provides functions to: +//! +//! - Check transaction validity. +//! - Initialize a block. +//! - Apply extrinsics. +//! - Execute a block. +//! - Finalize a block. +//! - Start an off-chain worker. +//! +//! ### Implementations +//! +//! The Executive module provides the following implementations: +//! +//! - `ExecuteBlock`: Trait that can be used to execute a block. +//! - `Executive`: Type that can be used to make the SRML available from the runtime. +//! +//! ## Usage +//! +//! The default Substrate node template declares the [`Executive`](./struct.Executive.html) type in its library. +//! +//! ### Example +//! +//! `Executive` type declaration from the node template. +//! +//! ```ignore +//! /// Executive: handles dispatch to the various modules. +//! pub type Executive = executive::Executive; +//! ``` #![cfg_attr(not(feature = "std"), no_std)] @@ -48,9 +86,9 @@ mod internal { } } -/// Something that can be used to execute a block. +/// Trait that can be used to execute a block. pub trait ExecuteBlock { - /// Actually execute all transitioning for `block`. + /// Actually execute all transitions for `block`. fn execute_block(block: Block); } @@ -100,20 +138,20 @@ impl< fn initial_checks(block: &Block) { let header = block.header(); - // check parent_hash is correct. + // Check that `parent_hash` is correct. let n = header.number().clone(); assert!( n > System::BlockNumber::zero() && >::block_hash(n - System::BlockNumber::one()) == *header.parent_hash(), "Parent hash should be valid." ); - // check transaction trie root represents the transactions. + // Check that transaction trie root represents the transactions. let xts_root = extrinsics_root::(&block.extrinsics()); header.extrinsics_root().check_equal(&xts_root); assert!(header.extrinsics_root() == &xts_root, "Transaction trie root must be valid."); } - /// Actually execute all transitioning for `block`. + /// Actually execute all transitions for `block`. pub fn execute_block(block: Block) { Self::initialize_block(block.header()); @@ -128,11 +166,11 @@ impl< Self::final_checks(&header); } - /// Execute given extrinsics and take care of post-extrinsics book-keeping + /// Execute given extrinsics and take care of post-extrinsics book-keeping. fn execute_extrinsics_with_book_keeping(extrinsics: Vec, block_number: NumberFor) { extrinsics.into_iter().for_each(Self::apply_extrinsic_no_note); - // post-extrinsics book-keeping. + // post-extrinsics book-keeping >::note_finished_extrinsics(); >::on_finalize(block_number); } @@ -143,7 +181,7 @@ impl< >::note_finished_extrinsics(); >::on_finalize(>::block_number()); - // setup extrinsics + // set up extrinsics >::derive_extrinsics(); >::finalize() } @@ -180,7 +218,7 @@ impl< /// Actually apply an extrinsic given its `encoded_len`; this doesn't note its hash. fn apply_extrinsic_with_len(uxt: Block::Extrinsic, encoded_len: usize, to_note: Option>) -> result::Result { - // Verify the signature is good. + // Verify that the signature is good. let xt = uxt.check(&Default::default()).map_err(internal::ApplyError::BadSignature)?; // Check the size of the block if that extrinsic is applied. @@ -195,7 +233,7 @@ impl< if index < &expected_index { internal::ApplyError::Stale } else { internal::ApplyError::Future } ) } - // pay any fees. + // pay any fees Payment::make_payment(sender, encoded_len).map_err(|_| internal::ApplyError::CantPay)?; // AUDIT: Under no circumstances may this function panic from here onwards. @@ -204,13 +242,13 @@ impl< >::inc_account_nonce(sender); } - // make sure to `note_extrinsic` only after we know it's going to be executed + // Make sure to `note_extrinsic` only after we know it's going to be executed // to prevent it from leaking in storage. if let Some(encoded) = to_note { >::note_extrinsic(encoded); } - // decode parameters and dispatch + // Decode parameters and dispatch let (f, s) = xt.deconstruct(); let r = f.dispatch(s.into()); >::note_applied_extrinsic(&r, encoded_len as u32); @@ -222,10 +260,10 @@ impl< } fn final_checks(header: &System::Header) { - // remove temporaries. + // remove temporaries let new_header = >::finalize(); - // check digest. + // check digest assert_eq!( header.digest().logs().len(), new_header.digest().logs().len(), @@ -246,7 +284,7 @@ impl< /// Check a given transaction for validity. This doesn't execute any /// side-effects; it merely checks whether the transaction would panic if it were included or not. /// - /// Changes made to the storage should be discarded. + /// Changes made to storage should be discarded. pub fn validate_transaction(uxt: Block::Extrinsic) -> TransactionValidity { // Note errors > 0 are from ApplyError const UNKNOWN_ERROR: i8 = -127; @@ -267,7 +305,7 @@ impl< }; if let (Some(sender), Some(index)) = (xt.sender(), xt.index()) { - // pay any fees. + // pay any fees if Payment::make_payment(sender, encoded_len).is_err() { return TransactionValidity::Invalid(ApplyError::CantPay as i8) } -- GitLab From 2d720df79c0f3b6718d62b634ea401ff5a657322 Mon Sep 17 00:00:00 2001 From: Kian Peymani Date: Sun, 14 Apr 2019 12:42:45 +0200 Subject: [PATCH 006/206] Remove unused imports/ doc comments. (#2276) * Remove unused imports/ doc comments * Better doc for node template. --- core/client/db/src/lib.rs | 2 -- core/client/src/client.rs | 2 -- core/finality-grandpa/src/environment.rs | 4 +--- core/network/src/consensus_gossip.rs | 1 - core/network/src/message.rs | 2 +- core/network/src/test/sync.rs | 2 -- node-template/runtime/src/template.rs | 5 +++-- 7 files changed, 5 insertions(+), 13 deletions(-) diff --git a/core/client/db/src/lib.rs b/core/client/db/src/lib.rs index d876296546..483a4c0d8d 100644 --- a/core/client/db/src/lib.rs +++ b/core/client/db/src/lib.rs @@ -1122,8 +1122,6 @@ impl client::backend::Backend for Backend whe } fn revert(&self, n: NumberFor) -> Result, client::error::Error> { - use client::blockchain::HeaderBackend; - let mut best = self.blockchain.info()?.best_number; let finalized = self.blockchain.info()?.finalized_number; let revertible = best - finalized; diff --git a/core/client/src/client.rs b/core/client/src/client.rs index 89896fb6eb..4a33f3261a 100644 --- a/core/client/src/client.rs +++ b/core/client/src/client.rs @@ -675,8 +675,6 @@ impl Client where ) -> error::Result where E: CallExecutor + Send + Sync + Clone, { - use runtime_primitives::traits::Digest; - let ImportBlock { origin, header, diff --git a/core/finality-grandpa/src/environment.rs b/core/finality-grandpa/src/environment.rs index 2912cd5808..5e099a92c2 100644 --- a/core/finality-grandpa/src/environment.rs +++ b/core/finality-grandpa/src/environment.rs @@ -34,7 +34,7 @@ use grandpa::{ }; use runtime_primitives::generic::BlockId; use runtime_primitives::traits::{ - As, Block as BlockT, Header as HeaderT, NumberFor, One, Zero, + As, Block as BlockT, Header as HeaderT, NumberFor, One, Zero, BlockNumberToHash, }; use substrate_primitives::{Blake2Hasher, ed25519, H256, Pair}; use substrate_telemetry::{telemetry, CONSENSUS_INFO}; @@ -886,8 +886,6 @@ pub(crate) fn canonical_at_height, RA>( B: Backend, E: CallExecutor + Send + Sync, { - use runtime_primitives::traits::{One, Zero, BlockNumberToHash}; - if height > base.1 { return Ok(None); } diff --git a/core/network/src/consensus_gossip.rs b/core/network/src/consensus_gossip.rs index 745a644a9d..75e91e664f 100644 --- a/core/network/src/consensus_gossip.rs +++ b/core/network/src/consensus_gossip.rs @@ -416,7 +416,6 @@ impl ConsensusGossip { if let Some((topic, keep)) = validation_result { if let Some(ref mut peer) = self.peers.get_mut(&who) { - use std::collections::hash_map::Entry; peer.known_messages.insert(message_hash); if let Entry::Occupied(mut entry) = self.live_message_sinks.entry((engine_id, topic)) { debug!(target: "gossip", "Pushing consensus message to sinks for {}.", topic); diff --git a/core/network/src/message.rs b/core/network/src/message.rs index d0f697b8ab..6053d12f51 100644 --- a/core/network/src/message.rs +++ b/core/network/src/message.rs @@ -66,7 +66,7 @@ pub type BlockResponse = generic::BlockResponse< /// A set of transactions. pub type Transactions = Vec; -/// Bits of block data and associated artifacts to request. +// Bits of block data and associated artifacts to request. bitflags! { /// Node roles bitmask. pub struct BlockAttributes: u8 { diff --git a/core/network/src/test/sync.rs b/core/network/src/test/sync.rs index 94bbc68b94..9274722693 100644 --- a/core/network/src/test/sync.rs +++ b/core/network/src/test/sync.rs @@ -19,8 +19,6 @@ use client::blockchain::HeaderBackend as BlockchainHeaderBackend; use crate::config::Roles; use consensus::BlockOrigin; use std::collections::HashSet; -use std::thread; -use std::time::Duration; use super::*; fn test_ancestor_search_when_common_is(n: usize) { diff --git a/node-template/runtime/src/template.rs b/node-template/runtime/src/template.rs index fd122433da..636ee1ac09 100644 --- a/node-template/runtime/src/template.rs +++ b/node-template/runtime/src/template.rs @@ -19,16 +19,17 @@ pub trait Trait: system::Trait { type Event: From> + Into<::Event>; } -/// This module's storage items. +// This module's storage items. decl_storage! { trait Store for Module as TemplateModule { - // Just a dummy storage item. + // Just a dummy storage item. // Here we are declaring a StorageValue, `Something` as a Option // `get(something)` is the default getter which returns either the stored `u32` or `None` if nothing stored Something get(something): Option; } } +// The module's dispatchable functions. decl_module! { /// The module declaration. pub struct Module for enum Call where origin: T::Origin { -- GitLab From 2b17564a9dfd33b0f7cd3f4a77a174cb6b793b71 Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Mon, 15 Apr 2019 00:57:56 +1200 Subject: [PATCH 007/206] handle not found error in purge-chain (#2274) --- core/cli/src/lib.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/core/cli/src/lib.rs b/core/cli/src/lib.rs index 3ed7347b50..40eb15296e 100644 --- a/core/cli/src/lib.rs +++ b/core/cli/src/lib.rs @@ -39,7 +39,7 @@ use network::{ use primitives::H256; use std::{ - io::{Write, Read, stdin, stdout}, iter, fs::{self, File}, net::{Ipv4Addr, SocketAddr}, + io::{Write, Read, stdin, stdout, ErrorKind}, iter, fs::{self, File}, net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, str::FromStr, }; @@ -673,10 +673,17 @@ where } } - fs::remove_dir_all(&db_path)?; - println!("{:?} removed.", &db_path); - - Ok(()) + match fs::remove_dir_all(&db_path) { + Result::Ok(_) => { + println!("{:?} removed.", &db_path); + Ok(()) + }, + Result::Err(ref err) if err.kind() == ErrorKind::NotFound => { + println!("{:?} did not exist.", &db_path); + Ok(()) + }, + Result::Err(err) => Result::Err(err.into()) + } } fn parse_address( -- GitLab From dd2225d5c41e56541c0b1732b094166b55c8ec34 Mon Sep 17 00:00:00 2001 From: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> Date: Mon, 15 Apr 2019 01:41:07 -0400 Subject: [PATCH 008/206] Add basic BABE consensus type (#2165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add basic BABE consensus type * Update core/consensus/babe/slots/Cargo.toml Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Fix parameterization and run `rustfmt` * Respond to review comments * Update various Cargo.lock files * Revert "Update various Cargo.lock files" This reverts commit af53d7624752a744320e9cbb25749fdd8e6f46d2. * `BabeSealSignature` → `BabeSeal` * Move slot code to its own crate This was highly non-trivial, due to cyclic dependencies. * Remove redundancy between AuRa and BABE Some of the code duplication was removed using a macro. * Fix build error * Avoid non-`#[doc(hidden)]` re-exports Also, bump some library versions in `Cargo.toml`. * Remove dead code in AuRa * Remove impl_slot macro It was more trouble than it was worth. Also, delete useless dependencies on Serde. * AuRa and BABE need different DB keys * Bring back `aura::Network`, but deprecate it. * Improve docs and add `slot_duration` inherent method * Add docs to `substrate_consensus_aura::SlotDuration` * Add missing documentation and #![forbid(missing_docs, unsafe_code)] * Add a #![forbid(missing_docs)] * Remove dependency of `test-runtime` on `slots` * Update core/consensus/babe/src/lib.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Remove wrongly added file * Fix copyright notice Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Bump `impl_version` and `spec_version` * Fix deprecation version; remove spurious carets * Update Cargo.lock * Update dependencies --- Cargo.lock | 1583 +++++++++-------- Cargo.toml | 2 + core/consensus/aura/Cargo.toml | 10 +- core/consensus/aura/src/lib.rs | 56 +- core/consensus/babe/Cargo.toml | 40 + core/consensus/babe/primitives/Cargo.toml | 19 + core/consensus/babe/primitives/src/lib.rs | 76 + core/consensus/babe/src/lib.rs | 102 ++ core/consensus/{aura => }/slots/Cargo.toml | 13 +- core/consensus/{aura => }/slots/src/lib.rs | 116 +- core/consensus/{aura => }/slots/src/slots.rs | 0 core/primitives/Cargo.toml | 12 +- core/primitives/src/sr25519.rs | 6 +- core/sr-api-macros/Cargo.toml | 4 +- core/sr-primitives/src/generic/digest.rs | 5 +- core/test-runtime/src/lib.rs | 1 - node/runtime/src/lib.rs | 4 +- srml/support/procedural/Cargo.toml | 6 +- srml/support/procedural/tools/Cargo.toml | 6 +- .../procedural/tools/derive/Cargo.toml | 6 +- 20 files changed, 1234 insertions(+), 833 deletions(-) create mode 100644 core/consensus/babe/Cargo.toml create mode 100644 core/consensus/babe/primitives/Cargo.toml create mode 100644 core/consensus/babe/primitives/src/lib.rs create mode 100644 core/consensus/babe/src/lib.rs rename core/consensus/{aura => }/slots/Cargo.toml (52%) rename core/consensus/{aura => }/slots/src/lib.rs (66%) rename core/consensus/{aura => }/slots/src/slots.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index a3d4a00f88..83553ea5c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,11 +1,9 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. [[package]] name = "MacTypes-sys" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -15,7 +13,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -41,10 +39,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.9" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -52,11 +58,11 @@ name = "aio-limited" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -65,7 +71,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -105,8 +111,8 @@ name = "asn1_der_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -119,9 +125,9 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -131,15 +137,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -148,7 +154,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -189,22 +195,23 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.43.2" +version = "0.47.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -300,7 +307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -322,10 +329,10 @@ dependencies = [ [[package]] name = "cexpr" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -349,7 +356,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -403,7 +410,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -411,7 +418,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -423,17 +430,17 @@ dependencies = [ "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -459,7 +466,7 @@ dependencies = [ "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -469,7 +476,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -490,6 +497,15 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.3.1" @@ -517,6 +533,14 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.2.2" @@ -564,11 +588,13 @@ dependencies = [ [[package]] name = "csv" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -576,12 +602,21 @@ name = "csv-core" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ctor" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctr" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -594,7 +629,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -608,13 +643,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "1.0.3" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -629,9 +664,9 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -675,7 +710,7 @@ version = "1.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -683,7 +718,7 @@ dependencies = [ [[package]] name = "either" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -696,13 +731,13 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -716,16 +751,16 @@ name = "error-chain" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "exit-future" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -733,7 +768,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -743,8 +778,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -758,7 +793,7 @@ name = "fdlimit" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -766,7 +801,7 @@ name = "finality-grandpa" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -782,7 +817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -819,9 +854,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -845,7 +880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -853,8 +888,8 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -889,28 +924,28 @@ name = "globset" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -920,7 +955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hash256-std-hasher" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -945,7 +980,7 @@ name = "heapsize" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -963,16 +998,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hex-literal" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hex-literal-impl" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1009,10 +1044,10 @@ dependencies = [ [[package]] name = "http" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1040,7 +1075,7 @@ dependencies = [ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1050,26 +1085,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.23" +version = "0.12.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1098,7 +1134,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1121,7 +1157,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1130,7 +1166,7 @@ name = "itertools" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1140,74 +1176,74 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-derive" -version = "10.0.2" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1221,11 +1257,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "keccak-hasher" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1266,9 +1302,9 @@ dependencies = [ "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1289,7 +1325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.48" +version = "0.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1298,7 +1334,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1306,8 +1342,8 @@ name = "libp2p" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1329,11 +1365,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1343,27 +1379,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1376,8 +1412,8 @@ name = "libp2p-core-derive" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1385,12 +1421,12 @@ name = "libp2p-dns" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1399,16 +1435,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1417,17 +1453,17 @@ name = "libp2p-identify" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1442,9 +1478,9 @@ dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1452,11 +1488,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1469,15 +1505,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1488,14 +1524,14 @@ name = "libp2p-mplex" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1504,16 +1540,16 @@ name = "libp2p-noise" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", - "snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1523,15 +1559,15 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1541,7 +1577,7 @@ name = "libp2p-plaintext" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1552,11 +1588,11 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1566,21 +1602,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1590,12 +1626,12 @@ name = "libp2p-tcp" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1604,7 +1640,7 @@ name = "libp2p-uds" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1616,14 +1652,14 @@ name = "libp2p-websocket" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1631,23 +1667,22 @@ name = "libp2p-yamux" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librocksdb-sys" -version = "5.14.3" +version = "5.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1709,11 +1744,6 @@ dependencies = [ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "make-cmd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "matches" version = "0.1.8" @@ -1721,11 +1751,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1750,13 +1779,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "merlin" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1778,7 +1806,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1803,7 +1831,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1823,12 +1851,12 @@ name = "multistream-select" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1846,15 +1874,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1863,8 +1891,8 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1875,7 +1903,7 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1883,9 +1911,9 @@ dependencies = [ name = "node-cli" version = "1.0.0" dependencies = [ - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 1.0.0", "node-primitives 1.0.0", @@ -1893,11 +1921,11 @@ dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-basic-authorship 1.0.0", "substrate-cli 1.0.0", "substrate-client 1.0.0", - "substrate-consensus-aura 1.0.0", + "substrate-consensus-aura 1.0.1", "substrate-finality-grandpa 1.0.0", "substrate-inherents 1.0.0", "substrate-keystore 1.0.0", @@ -1907,7 +1935,7 @@ dependencies = [ "substrate-service-test 1.0.0", "substrate-telemetry 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1945,8 +1973,8 @@ version = "1.0.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -1957,13 +1985,13 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "sr-version 1.0.0", @@ -1998,9 +2026,9 @@ version = "1.0.0" dependencies = [ "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2009,14 +2037,14 @@ dependencies = [ "substrate-basic-authorship 1.0.0", "substrate-cli 1.0.0", "substrate-client 1.0.0", - "substrate-consensus-aura 1.0.0", + "substrate-consensus-aura 1.0.1", "substrate-executor 1.0.0", "substrate-inherents 1.0.0", "substrate-network 0.1.0", "substrate-primitives 1.0.0", "substrate-service 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2027,8 +2055,8 @@ version = "1.0.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2061,10 +2089,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" -version = "4.2.0" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2083,10 +2111,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2113,15 +2141,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.10.16" +version = "0.10.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2131,15 +2159,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.40" +version = "0.9.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "output_vt100" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "owning_ref" version = "0.3.3" @@ -2168,7 +2205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2178,8 +2215,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2203,7 +2240,7 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2234,7 +2271,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2277,10 +2314,10 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2288,11 +2325,11 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2300,31 +2337,31 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste-impl" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2361,6 +2398,17 @@ dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pretty_assertions" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "primitive-types" version = "0.2.1" @@ -2394,8 +2442,8 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2403,14 +2451,6 @@ name = "proc-macro-hack-impl" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "proc-macro2" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "proc-macro2" version = "0.4.27" @@ -2421,7 +2461,7 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.3.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2446,15 +2486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2465,7 +2497,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2475,10 +2507,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2488,9 +2520,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2499,16 +2531,16 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2554,31 +2586,31 @@ name = "rand_jitter" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_os" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_pcg" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2604,7 +2636,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2615,8 +2647,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2629,7 +2661,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.51" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2637,7 +2669,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2647,19 +2679,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.1.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2670,7 +2702,7 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2679,7 +2711,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2692,10 +2724,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2703,8 +2735,8 @@ name = "rocksdb" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2713,7 +2745,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2747,9 +2779,9 @@ name = "rw-stream-sink" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2780,23 +2812,40 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schnorrkel" -version = "0.1.0" +version = "0.1.1" +source = "git+https://github.com/paritytech/schnorrkel#1762df02ac48ba5c3fa8c162e19a393247079f88" +dependencies = [ + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "schnorrkel" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2825,7 +2874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2836,7 +2885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2854,27 +2903,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2952,8 +3001,8 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2969,15 +3018,12 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "snow" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2987,8 +3033,9 @@ dependencies = [ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3004,14 +3051,14 @@ dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", "substrate-client 1.0.0", "substrate-primitives 1.0.0", "substrate-state-machine 1.0.0", "substrate-test-client 1.0.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3038,9 +3085,9 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -3056,7 +3103,7 @@ dependencies = [ "sr-std 1.0.0", "substrate-primitives 1.0.0", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3072,8 +3119,8 @@ version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -3082,9 +3129,9 @@ dependencies = [ name = "srml-assets" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3097,11 +3144,11 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3119,10 +3166,10 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3136,10 +3183,10 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3154,12 +3201,12 @@ name = "srml-contract" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-sandbox 1.0.0", @@ -3177,10 +3224,10 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3195,11 +3242,11 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3213,9 +3260,9 @@ dependencies = [ name = "srml-example" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "srml-balances 1.0.0", @@ -3228,9 +3275,9 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3245,12 +3292,12 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3265,8 +3312,8 @@ name = "srml-grandpa" version = "1.0.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3283,11 +3330,11 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3302,8 +3349,8 @@ name = "srml-metadata" version = "1.0.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -3312,11 +3359,11 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3331,10 +3378,10 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3352,9 +3399,9 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3369,13 +3416,13 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3389,10 +3436,10 @@ name = "srml-support-procedural" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3401,9 +3448,9 @@ version = "1.0.0" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3411,8 +3458,8 @@ name = "srml-support-procedural-tools-derive" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3420,8 +3467,8 @@ name = "srml-support-test" version = "0.1.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "srml-support 1.0.0", "substrate-inherents 1.0.0", @@ -3432,11 +3479,11 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3448,9 +3495,9 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3464,10 +3511,10 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3494,13 +3541,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stdweb" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3510,25 +3557,25 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stdweb-internal-macros" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3556,22 +3603,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3586,8 +3633,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3598,10 +3645,10 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", "substrate-primitives 1.0.0", - "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3610,7 +3657,7 @@ version = "1.0.0" dependencies = [ "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "node-cli 1.0.0", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3634,12 +3681,12 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.2.0" -source = "git+https://github.com/paritytech/substrate-bip39#080da45923885cfec2379cef3dee4e7f43e6c260" +version = "0.2.1" +source = "git+https://github.com/paritytech/substrate-bip39#44307fda4ea17fe97aeb93af317fbc8f6ed34193" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3651,18 +3698,18 @@ dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-client 1.0.0", "substrate-keyring 1.0.0", "substrate-network 0.1.0", @@ -3671,10 +3718,10 @@ dependencies = [ "substrate-service 1.0.0", "substrate-state-machine 1.0.0", "substrate-telemetry 1.0.0", - "sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3683,10 +3730,10 @@ version = "1.0.0" dependencies = [ "derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3711,7 +3758,7 @@ dependencies = [ name = "substrate-client-db" version = "1.0.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", @@ -3734,11 +3781,11 @@ dependencies = [ [[package]] name = "substrate-consensus-aura" -version = "1.0.0" +version = "1.0.1" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3750,9 +3797,9 @@ dependencies = [ "srml-support 1.0.0", "substrate-client 1.0.0", "substrate-consensus-aura-primitives 1.0.0", - "substrate-consensus-aura-slots 1.0.0", "substrate-consensus-authorities 1.0.0", "substrate-consensus-common 1.0.0", + "substrate-consensus-slots 1.0.0", "substrate-executor 1.0.0", "substrate-inherents 1.0.0", "substrate-keyring 1.0.0", @@ -3761,7 +3808,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-telemetry 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3773,35 +3820,60 @@ dependencies = [ ] [[package]] -name = "substrate-consensus-aura-slots" +name = "substrate-consensus-authorities" +version = "1.0.0" +dependencies = [ + "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 1.0.0", + "sr-primitives 1.0.0", + "sr-std 1.0.0", + "sr-version 1.0.0", + "srml-support 1.0.0", + "substrate-client 1.0.0", + "substrate-primitives 1.0.0", +] + +[[package]] +name = "substrate-consensus-babe" version = "1.0.0" dependencies = [ + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.1 (git+https://github.com/paritytech/schnorrkel)", + "sr-io 1.0.0", "sr-primitives 1.0.0", + "sr-version 1.0.0", + "srml-consensus 1.0.0", + "srml-support 1.0.0", "substrate-client 1.0.0", - "substrate-consensus-aura-primitives 1.0.0", + "substrate-consensus-authorities 1.0.0", + "substrate-consensus-babe-primitives 1.0.0", "substrate-consensus-common 1.0.0", + "substrate-consensus-slots 1.0.0", + "substrate-executor 1.0.0", "substrate-inherents 1.0.0", + "substrate-keyring 1.0.0", + "substrate-network 0.1.0", "substrate-primitives 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-service 1.0.0", + "substrate-telemetry 1.0.0", + "substrate-test-client 1.0.0", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-consensus-authorities" +name = "substrate-consensus-babe-primitives" version = "1.0.0" dependencies = [ "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 1.0.0", "sr-primitives 1.0.0", - "sr-std 1.0.0", - "sr-version 1.0.0", - "srml-support 1.0.0", "substrate-client 1.0.0", - "substrate-primitives 1.0.0", + "substrate-consensus-slots 1.0.0", ] [[package]] @@ -3810,7 +3882,7 @@ version = "1.0.0" dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3819,7 +3891,7 @@ dependencies = [ "substrate-inherents 1.0.0", "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3827,8 +3899,8 @@ name = "substrate-consensus-rhd" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3844,7 +3916,24 @@ dependencies = [ "substrate-keyring 1.0.0", "substrate-primitives 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "substrate-consensus-slots" +version = "1.0.0" +dependencies = [ + "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", + "substrate-client 1.0.0", + "substrate-consensus-common 1.0.0", + "substrate-inherents 1.0.0", + "substrate-primitives 1.0.0", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3854,14 +3943,14 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -3871,17 +3960,17 @@ dependencies = [ "substrate-trie 1.0.0", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-finality-grandpa" version = "1.0.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "finality-grandpa 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 1.0.0", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3898,7 +3987,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-telemetry 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3926,7 +4015,7 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3941,9 +4030,9 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3955,10 +4044,10 @@ version = "0.1.0" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 1.0.0", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3975,7 +4064,7 @@ dependencies = [ "substrate-peerset 1.0.0", "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3983,23 +4072,23 @@ name = "substrate-network-libp2p" version = "1.0.0" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-peerset 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4009,8 +4098,8 @@ dependencies = [ name = "substrate-offchain" version = "0.1.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -4021,7 +4110,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4036,7 +4125,7 @@ dependencies = [ name = "substrate-panic-handler" version = "1.0.0" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4044,12 +4133,12 @@ dependencies = [ name = "substrate-peerset" version = "1.0.0" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4060,29 +4149,29 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", - "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", "substrate-serializer 1.0.0", - "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4091,18 +4180,18 @@ version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-version 1.0.0", @@ -4115,18 +4204,18 @@ dependencies = [ "substrate-test-client 1.0.0", "substrate-test-runtime 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-rpc-servers" version = "1.0.0" dependencies = [ - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-rpc 1.0.0", ] @@ -4135,8 +4224,8 @@ dependencies = [ name = "substrate-serializer" version = "1.0.0" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4144,15 +4233,15 @@ name = "substrate-service" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -4170,16 +4259,16 @@ dependencies = [ "substrate-test-client 1.0.0", "substrate-transaction-pool 1.0.0", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-service-test" version = "1.0.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", @@ -4188,14 +4277,14 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-service 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-state-db" version = "1.0.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4208,7 +4297,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4227,8 +4316,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4240,7 +4329,7 @@ dependencies = [ name = "substrate-test-client" version = "1.0.0" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", @@ -4258,12 +4347,12 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -4288,14 +4377,14 @@ name = "substrate-transaction-graph" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-primitives 1.0.0", "substrate-test-runtime 1.0.0", @@ -4306,7 +4395,7 @@ name = "substrate-transaction-pool" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4324,16 +4413,16 @@ version = "1.0.0" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", - "trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4348,11 +4437,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.26" +version = "0.15.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4362,20 +4451,20 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sysinfo" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4399,15 +4488,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4423,8 +4512,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4449,14 +4538,14 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tiny-bip39" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4481,8 +4570,8 @@ name = "tinytemplate" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4490,31 +4579,32 @@ name = "tk-listen" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.15" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4524,18 +4614,18 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4543,64 +4633,66 @@ name = "tokio-dns-unofficial" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-fs" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4608,29 +4700,28 @@ name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4639,9 +4730,9 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4649,9 +4740,17 @@ name = "tokio-tls" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-trace-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4659,13 +4758,13 @@ name = "tokio-udp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4673,16 +4772,16 @@ name = "tokio-uds" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4690,7 +4789,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4700,17 +4799,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "trie-bench" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4735,12 +4834,12 @@ dependencies = [ [[package]] name = "trie-standardmap" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4760,7 +4859,7 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4802,7 +4901,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4821,7 +4920,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4839,20 +4938,12 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unsigned-varint" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4911,9 +5002,9 @@ name = "wabt" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4933,7 +5024,7 @@ version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4942,36 +5033,35 @@ name = "want" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmi" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "websocket" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4979,10 +5069,11 @@ dependencies = [ [[package]] name = "which" -version = "1.0.5" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4992,7 +5083,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5014,7 +5105,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5027,7 +5118,7 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5037,12 +5128,12 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5060,11 +5151,11 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5083,15 +5174,15 @@ name = "yamux" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5104,7 +5195,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" "checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f10b352bc3fc08ae24dc5d2d3ddcac153678533986122dc283d747b12071000" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" @@ -5115,14 +5207,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" +"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d55aa264e822dbafa12db4d54767aff17c6ba55ea2d8559b3e17392c7d000e5d" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebecac13b3c745150d7b6c3ea7572d372f09d627c2077e893bf26c5c7f70d282" -"checksum bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d52d263eacd15d26cbcf215d254b410bd58212aaa2d3c453a04b2d3b3adcf41" +"checksum bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df683a55b54b41d5ea8ebfaebb5aa7e6b84e3f3006a78f010dadc9ca88469260" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" "checksum blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91721a6330935673395a0607df4d49a9cb90ae12d259f1b3e0a3f6e1d486872e" @@ -5136,10 +5228,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" "checksum cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "389803e36973d242e7fecb092b2de44a3d35ac62524b3b9339e51d577d668e02" -"checksum cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "644d693ecfa91955ed32dcc7eda4914e1be97a641fb6f0645a37348e20b230da" +"checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" @@ -5156,20 +5248,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum crypto-mac 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "779015233ac67d65098614aec748ac1c756ab6677fa2e14cf8b37c08dfed1198" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd1c44c58078cfbeaf11fbb3eac9ae5534c23004ed770cc4bfb48e658ae4f04" +"checksum csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f0782c7154d8dd08f4adeb5aa22ab178c10281915f7da68d10bb646f03aaee73" "checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" -"checksum ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "044f882973b245404e90c90e7e42e8ee8d7a64edfd7adf83d684fb97e8e2c1b6" +"checksum ctor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e5cc1c7c759bf979c651ce1da82d06065375e2223b65c070190b8000787da58b" +"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" "checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" -"checksum curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dae47cc3529cdab597dbc8b606e565707209b506e55848f3c15679214a56c956" +"checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" @@ -5178,12 +5273,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" "checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" -"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" +"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" -"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -"checksum exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "87559b08e99a81a92bbb867d237543e43495857749f688e0773390a20d56c61c" +"checksum exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d8013f441e38e31c670e7f34ec8f1d5d3a2bd9d303c1ff83976ca886005e8f48" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" @@ -5197,31 +5292,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "62941eff9507c8177d448bd83a44d9b9760856e184081d8cd79ba9f03dd24981" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" -"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" +"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" -"checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" +"checksum hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b2027c19ec91eb304999abae7307d225cf93be42af53b0039f76e98ed5af86" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8e04cb7a5051270ef3fa79f8c7604d581ecfa73d520e74f554e45541c4b5881a" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae0e5c30fb65e661a0e39860e37100dfbe4d39aff865e9357a6a4ed0b5bbf303" -"checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a" +"checksum hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" +"checksum hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" -"checksum http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1a10e5b573b9a0146545010f50772b9e8b1dd0a256564cc4307694c68832a2f5" +"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)" = "860faf61a9957c9cb0e23e69f1c8290e92f6eb660fcdd1f2d6777043a2ae1a46" +"checksum hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5b6658b016965ae301fa995306db965c93677880ea70765a84235a96eae896" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" @@ -5231,14 +5326,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" -"checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" -"checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" -"checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" -"checksum jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56608ed54b1b2a69f4357cb8bdfbcbd99fe1179383c03a09bb428931bd35f592" -"checksum jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5521613b31ea22d36d9f95ad642058dccec846a94ed8690957652d479f620707" -"checksum jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20b8333a5a6e6ccbcf5c90f90919de557cba4929efa164e9bd0e8e497eb20e46" +"checksum jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" +"checksum jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dae61ca8a3b047fb11309b00661bc56837085bd07e46f907b9c562c0b03e68" +"checksum jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11d2a00824306155b8ef57fe957f31b8cd8ad24262f15cf911d84dcf9a3f206d" +"checksum jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fce55133ee264d0ab42bd862efcd45ae1d062cda599f4cc12ccc4be3195f2a" +"checksum jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9527f01ef25f251d64082cbefc0c6d6f367349afe6848ef908a674e06b2bdd3" +"checksum jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3889012aa638a2f18eb1a879f46fc8b34e7e1423cbff3247cd1531de0d51084b" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a02fb74dc1b613522069b5f2023c014756ce121c6c6fb39364c139b0efc39a2d" +"checksum keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "af672553b2abac1c86c29fd62c79880638b6abc91d96db4aa42a5baab2bc1ca9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" @@ -5246,7 +5341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" +"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" "checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" @@ -5266,7 +5361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" "checksum libp2p-websocket 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "647bd8862afe6e912eb34b7614f731c0ff89e8777b57d9f2f5f0fd593ecc8d9a" "checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" -"checksum librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9024327233e7fac7982440f73301c00046d438c5b1011e8f4e394226ce19007" +"checksum librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7dfb546562f9b450237bb8df7a31961849ee9fb1186d9e356db1d7a6b7609ff2" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" @@ -5274,13 +5369,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -"checksum make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8ca8afbe8af1785e09636acb5a41e08a765f5f0340568716c18a8700ba3c0d3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7623b01a4f1b7acb7cf8e3f678f05e15e6ae26cb0b738dfeb5cc186fd6b82ef4" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a9e97b439f6d38cbe2a4a4aa93f6770c5305f62761b78b1851406c09c87ee2a" +"checksum merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "83c2dda19c01176e8e7148f7bdb88bbdf215a8db0641f89fc40e4b81736aeda5" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" @@ -5293,16 +5387,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" -"checksum nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b30adc557058ce00c9d0d7cb3c6e0b5bc6f36e2e2eabe74b0ba726d194abd588" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" -"checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" +"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" +"checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" @@ -5319,26 +5414,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f50392d1265092fbee9273414cc40eb6d47d307bd66222c477bb8450c8504f9d" -"checksum paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3cd512fe3a55e8933b2dcad913e365639db86d512e4004c3084b86864d9467a" +"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79" +"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" +"checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" "checksum primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edb92f1ebfc177432c03287b15d48c202e6e2c95993a7af3ba039abb43b1492e" "checksum proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c6cf4e5b00300d151dfffae39f529dfa5188f42eeb14201229aa420d6aad10c" "checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8" "checksum proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e90aa19cd73dedc2d0e1e8407473f073d735fef0ab521438de6da8ee449ab66" "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" -"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb" +"checksum protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "524d165d95627ddebba768db728216c4429bbb62882f7e6ab1a6c3c54a7ed830" "checksum pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "efb0dcbddbb600f47a7098d33762a00552c671992171637f5bb310b37fe1f0e4" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" @@ -5349,18 +5443,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" -"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" -"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" "checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)" = "53848511b7ee6eb9d5c3db48481aaa5779b38fc0131bc133c98cb4f2b2411928" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6" -"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" -"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" +"checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0" +"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9381ed76c1ec4e8994f1f7d2c6d7e33eed3ff7176e16fece09c2e993fc4a5a" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" @@ -5375,17 +5469,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" -"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" -"checksum schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a700659388785588c75b197cecda0f23c7112a9281ef703e8ffc651061ce014c" +"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" +"checksum schnorrkel 0.1.1 (git+https://github.com/paritytech/schnorrkel)" = "" +"checksum schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5eff518f9bed3d803a0d002af0ab96339b0ebbedde3bec98a684986134b7a39" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e" "checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" "checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" -"checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" -"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" +"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" @@ -5396,78 +5491,78 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" -"checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" -"checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "92a7e0c5e3dfb52e8fbe0e63a1b947bbb17b4036408b151353c4491374931362" -"checksum stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "461e7f2e33670b1c33f1ea22bb2f86de6136fabd0c4d27d167ed425c231143ca" +"checksum stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a3edad410e603184d656e2abded5fd4d3d6e93d5763d21130dbaf99795db74eb" "checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930" -"checksum stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "432465093692af7379dcd196ce4be398c906958d91b412fff9102a66238d6f26" +"checksum stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1635afd059cbfac7d5b1274f0c44cec110c1e013c48e8bbc22e07e52696cf887" "checksum stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a2a2f4a2eb556337b2d1a302630bbddf989ae383c70393e89b48152b9896cbda" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3" -"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04" +"checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" +"checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" "checksum strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1810e25f576e7ffce1ff5243b37066da5ded0310b3274c20baaeccb1145b2806" "checksum strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572a2f4e53dd4c3483fd79e5cc10ddd773a3acb1169bbfe8762365e107110579" -"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" +"checksum substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" +"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" -"checksum sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4da1ccc493b46042d6f5352910a7f18ed8fe81307dd7db3f2e2d8a7db6f6284" +"checksum sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a0cb7899e248ed0baa6ef6f8406352523c2f99bc7c4b1800f4cd6d5dde99eb" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff" +"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1415431cb2398d84da64173f8473c792808314427d4a6f2f3ea85ae67239fe3" +"checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" -"checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" +"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" +"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82c65483db54eb91b4ef3a9389a3364558590faf30ce473141707c0e16fda975" -"checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" -"checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" -"checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" -"checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" -"checksum tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3742b64166c1ee9121f1921aea5a726098458926a6b732d906ef23b1f3ef6f4f" +"checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" +"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" +"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" +"checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eafa32a8662c06f5bf135984bc1a12821fd38770b5c2f2f9e8750327fcbe3955" +"checksum trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba20f7d9865497ea46511860b43e05a44f4ac9a76ee089d34cd80a839a690264" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" -"checksum trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006314f54f2ea7944a878e66fd93ad7978095bc355f30a2f26ec40f664d86c86" +"checksum trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4e24277af05f38f3aaf03ac78e3a154be83f13db9c8ef0cb95bb1aa764a477b" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -"checksum twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "555cd4909480122bbbf21e34faac4cb08a171f324775670447ed116726c474af" +"checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c64cdf40b4a9645534a943668681bcb219faf51874d4b65d2e0abda1b10a2ab" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -5481,11 +5576,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a6265b25719e82598d104b3717375e37661d41753e2c84cde3f51050c7ed7e3c" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" -"checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" -"checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" -"checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" +"checksum wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f6a891b45c79e9f96fb66cc84a057211ef9cd2e5e8d093f3dbbd480e146a8758" +"checksum websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7cc2d74d89f9df981ab41ae624e33cf302fdf456b93455c6a31911a99c9f0bb8" +"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" @@ -5493,7 +5588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" +"checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" "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.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" diff --git a/Cargo.toml b/Cargo.toml index c409bbeb78..6f74742934 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,9 @@ members = [ "core/client/db", "core/consensus/common", "core/consensus/aura", + "core/consensus/babe", "core/consensus/rhd", + "core/consensus/slots", "core/executor", "core/finality-grandpa", "core/finality-grandpa/primitives", diff --git a/core/consensus/aura/Cargo.toml b/core/consensus/aura/Cargo.toml index f806dd719d..a776a92035 100644 --- a/core/consensus/aura/Cargo.toml +++ b/core/consensus/aura/Cargo.toml @@ -1,23 +1,22 @@ [package] name = "substrate-consensus-aura" -version = "1.0.0" +version = "1.0.1" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" [dependencies] -parity-codec = "3.3" -client = { package = "substrate-client", path = "../../client" } +parity-codec = "3.4" primitives = { package = "substrate-primitives", path = "../../primitives" } runtime_support = { package = "srml-support", path = "../../../srml/support" } -runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" } runtime_version = { package = "sr-version", path = "../../sr-version" } runtime_io = { package = "sr-io", path = "../../sr-io" } -aura_slots = { package = "substrate-consensus-aura-slots", path = "slots" } +slots = { package = "substrate-consensus-slots", path = "../slots" } aura_primitives = { package = "substrate-consensus-aura-primitives", path = "primitives" } inherents = { package = "substrate-inherents", path = "../../inherents" } srml-consensus = { path = "../../../srml/consensus" } srml-aura = { path = "../../../srml/aura" } +client = { package = "substrate-client", path = "../../client" } substrate-telemetry = { path = "../../telemetry" } futures = "0.1.17" tokio = "0.1.7" @@ -26,6 +25,7 @@ error-chain = "0.12" log = "0.4" consensus_common = { package = "substrate-consensus-common", path = "../common" } authorities = { package = "substrate-consensus-authorities", path = "../authorities" } +runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" } [dev-dependencies] keyring = { package = "substrate-keyring", path = "../../keyring" } diff --git a/core/consensus/aura/src/lib.rs b/core/consensus/aura/src/lib.rs index c51730b114..fd32e1501f 100644 --- a/core/consensus/aura/src/lib.rs +++ b/core/consensus/aura/src/lib.rs @@ -25,7 +25,8 @@ //! //! Blocks from future steps will be either deferred or rejected depending on how //! far in the future they are. -#![deny(deprecated)] +#![deny(warnings)] +#![forbid(missing_docs, unsafe_code)] use std::{sync::Arc, time::Duration, thread, marker::PhantomData, hash::Hash, fmt::Debug}; use parity_codec::{Encode, Decode}; @@ -34,10 +35,14 @@ use consensus_common::{self, Authorities, BlockImport, Environment, Proposer, }; use consensus_common::well_known_cache_keys; use consensus_common::import_queue::{Verifier, BasicQueue, SharedBlockImport, SharedJustificationImport}; -use client::ChainHead; -use client::block_builder::api::BlockBuilder as BlockBuilderApi; -use client::blockchain::ProvideCache; -use client::runtime_api::{ApiExt, Core as CoreApi}; +use client::{ + ChainHead, + block_builder::api::BlockBuilder as BlockBuilderApi, + blockchain::ProvideCache, + runtime_api::{ApiExt, Core as CoreApi}, + error::Result as CResult, + backend::AuxStore, +}; use aura_primitives::AURA_ENGINE_ID; use runtime_primitives::{generic, generic::BlockId, Justification}; use runtime_primitives::traits::{ @@ -47,7 +52,7 @@ use primitives::Pair; use inherents::{InherentDataProviders, InherentData, RuntimeString}; use authorities::AuthoritiesApi; -use futures::{Stream, Future, IntoFuture, future}; +use futures::{Future, IntoFuture, future, stream::Stream}; use tokio::timer::Timeout; use log::{warn, debug, info, trace}; @@ -57,9 +62,8 @@ use srml_aura::{ }; use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO}; -use aura_slots::{CheckedHeader, SlotWorker, SlotInfo, SlotCompatible}; +use slots::{CheckedHeader, SlotWorker, SlotInfo, SlotCompatible}; -pub use aura_slots::SlotDuration; pub use aura_primitives::*; pub use consensus_common::SyncOracle; @@ -70,6 +74,10 @@ type Signature

=

::Signature; /// handle to a gossip service or similar. /// /// Intended to be a lightweight handle such as an `Arc`. +#[deprecated( + since = "1.0.1", + note = "This is dead code and will be removed in a future release", +)] pub trait Network: Clone { /// A stream of input messages for a topic. type In: Stream,Error=()>; @@ -78,6 +86,25 @@ pub trait Network: Clone { fn send_message(&self, slot: u64, message: Vec); } +/// A slot duration. Create with `get_or_compute`. +pub struct SlotDuration(slots::SlotDuration); + +impl SlotDuration { + /// Either fetch the slot duration from disk or compute it from the genesis + /// state. + pub fn get_or_compute(client: &C) -> CResult + where + C: AuxStore, C: ProvideRuntimeApi, C::Api: AuraApi, + { + slots::SlotDuration::get_or_compute(client, |a, b| a.slot_duration(b)).map(Self) + } + + /// Get the slot duration in milliseconds. + pub fn get(&self) -> u64 { + self.0.get() + } +} + /// Get slot author for given block along with authorities. fn slot_author(slot_num: u64, authorities: &[AuthorityId

]) -> Option<&AuthorityId

> { if authorities.is_empty() { return None } @@ -153,6 +180,7 @@ impl CompatibleDigestItem

for generic::DigestItem( force_authoring, }; - aura_slots::start_slot_worker_thread::<_, _, _, _, AuraSlotCompatible, _>( - slot_duration, + slots::start_slot_worker_thread::<_, _, _, _, AuraSlotCompatible, u64, _>( + slot_duration.0, client, Arc::new(worker), sync_oracle, @@ -249,8 +277,8 @@ pub fn start_aura( sync_oracle: sync_oracle.clone(), force_authoring, }; - aura_slots::start_slot_worker::<_, _, _, _, AuraSlotCompatible, _>( - slot_duration, + slots::start_slot_worker::<_, _, _, _, _, AuraSlotCompatible, _>( + slot_duration.0, client, Arc::new(worker), sync_oracle, @@ -803,9 +831,9 @@ mod tests { use client::BlockchainEvents; use test_client; - type Error = ::client::error::Error; + type Error = client::error::Error; - type TestClient = ::client::Client; + type TestClient = client::Client; struct DummyFactory(Arc); struct DummyProposer(u64, Arc); diff --git a/core/consensus/babe/Cargo.toml b/core/consensus/babe/Cargo.toml new file mode 100644 index 0000000000..7cd787e02c --- /dev/null +++ b/core/consensus/babe/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "substrate-consensus-babe" +version = "1.0.0" +authors = ["Parity Technologies "] +description = "BABE consensus algorithm for substrate" +edition = "2018" + +[dependencies] +parity-codec = "3.4.0" +parity-codec-derive = "3.3.0" +babe_primitives = { package = "substrate-consensus-babe-primitives", path = "primitives" } +primitives = { package = "substrate-primitives", path = "../../primitives" } +runtime_support = { package = "srml-support", path = "../../../srml/support" } +runtime_version = { package = "sr-version", path = "../../sr-version" } +runtime_io = { package = "sr-io", path = "../../sr-io" } +inherents = { package = "substrate-inherents", path = "../../inherents" } +srml-consensus = { path = "../../../srml/consensus" } +substrate-telemetry = { path = "../../telemetry" } +client = { package = "substrate-client", path = "../../client" } +consensus_common = { package = "substrate-consensus-common", path = "../common" } +authorities = { package = "substrate-consensus-authorities", path = "../authorities" } +slots = { package = "substrate-consensus-slots", path = "../slots" } +runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" } +futures = "0.1.26" +tokio = "0.1.18" +parking_lot = "0.7.1" +error-chain = "0.12.0" +log = "0.4.6" + +[dependencies.schnorrkel] +git = "https://github.com/paritytech/schnorrkel" +branch = "master" + +[dev-dependencies] +keyring = { package = "substrate-keyring", path = "../../keyring" } +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.6.1" diff --git a/core/consensus/babe/primitives/Cargo.toml b/core/consensus/babe/primitives/Cargo.toml new file mode 100644 index 0000000000..3abe7d5e6e --- /dev/null +++ b/core/consensus/babe/primitives/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "substrate-consensus-babe-primitives" +version = "1.0.0" +authors = ["Parity Technologies "] +description = "Primitives for BABE consensus" +edition = "2018" + +[dependencies] +substrate-client = { path = "../../../client", default-features = false } +runtime_primitives = { package = "sr-primitives", path = "../../../sr-primitives", default-features = false } +slots = { package = "substrate-consensus-slots", path = "../../slots", optional = true } +parity-codec = "^3.4.0" + +[features] +default = ["std"] +std = [ + "substrate-client/std", + "slots", +] diff --git a/core/consensus/babe/primitives/src/lib.rs b/core/consensus/babe/primitives/src/lib.rs new file mode 100644 index 0000000000..4f83cce5bd --- /dev/null +++ b/core/consensus/babe/primitives/src/lib.rs @@ -0,0 +1,76 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Primitives for BABE. +#![forbid(warnings, unsafe_code, missing_docs)] +#![cfg_attr(not(feature = "std"), no_std)] + +use runtime_primitives::ConsensusEngineId; +use substrate_client::decl_runtime_apis; + +use parity_codec::{Encode, Decode}; + +/// The `ConsensusEngineId` of BABE. +pub const BABE_ENGINE_ID: ConsensusEngineId = [b'b', b'a', b'b', b'e']; + +/// Configuration data used by the BABE consensus engine. +#[derive(Copy, Clone, Hash, PartialEq, Eq, Debug, Encode, Decode)] +pub struct BabeConfiguration { + slot_duration: u64, + expected_block_time: u64, +} + +impl BabeConfiguration { + /// Return the expected block time in milliseconds for BABE. Currently, + /// only the value provided by this type at genesis will be used. + /// + /// Dynamic expected block time may be supported in the future. + pub fn expected_block_time(&self) -> u64 { + self.expected_block_time + } + + /// Return the slot duration in milliseconds for BABE. Currently, only + /// the value provided by this type at genesis will be used. + /// + /// Dynamic slot duration may be supported in the future. + pub fn slot_duration(&self) -> u64 { + self.slot_duration + } +} + +#[cfg(feature = "std")] +impl slots::SlotData for BabeConfiguration { + /// Return the slot duration in milliseconds for BABE. Currently, only + /// the value provided by this type at genesis will be used. + /// + /// Dynamic slot duration may be supported in the future. + fn slot_duration(&self) -> u64 { + self.slot_duration + } + + const SLOT_KEY: &'static [u8] = b"babe_bootstrap_data"; +} + +decl_runtime_apis! { + /// API necessary for block authorship with BABE. + pub trait BabeApi { + /// Return the configuration for BABE. Currently, + /// only the value provided by this type at genesis will be used. + /// + /// Dynamic configuration may be supported in the future. + fn startup_data() -> BabeConfiguration; + } +} diff --git a/core/consensus/babe/src/lib.rs b/core/consensus/babe/src/lib.rs new file mode 100644 index 0000000000..0881f8bb97 --- /dev/null +++ b/core/consensus/babe/src/lib.rs @@ -0,0 +1,102 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! BABE (Blind Assignment for Blockchain Extension) consensus in substrate. +#![forbid(warnings, unsafe_code, missing_docs)] + +pub use babe_primitives::*; +use parity_codec::{Decode, Encode, Input}; +use runtime_primitives::generic; +use primitives::sr25519::{ + Public, + Signature, + LocalizedSignature, +}; + +use schnorrkel::{ + SecretKey as Secret, + vrf::{VRFProof, VRF_PROOF_LENGTH}, + PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH, +}; + +/// A BABE seal. It includes: +/// +/// * The public key +/// * The VRF proof +/// * The signature +/// * The slot number +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct BabeSeal { + proof: VRFProof, + signature: LocalizedSignature, + slot_num: u64, +} + +impl Encode for BabeSeal { + fn encode(&self) -> Vec { + parity_codec::Encode::encode(&( + self.proof.to_bytes(), + self.signature.signature.0, + self.signature.signer.0, + self.slot_num, + )) + } +} + +impl Decode for BabeSeal { + fn decode(i: &mut R) -> Option { + let (public_key, proof, sig, slot_num): ( + [u8; PUBLIC_KEY_LENGTH], + [u8; VRF_PROOF_LENGTH], + [u8; SIGNATURE_LENGTH], + u64, + ) = Decode::decode(i)?; + Some(BabeSeal { + proof: VRFProof::from_bytes(&proof).ok()?, + signature: LocalizedSignature { + signature: Signature(sig), + signer: Public(public_key), + }, + slot_num, + }) + } +} + +/// A digest item which is usable with BABE consensus. +pub trait CompatibleDigestItem: Sized { + /// Construct a digest item which contains a slot number and a signature on the + /// hash. + fn babe_seal(signature: BabeSeal) -> Self; + + /// If this item is an Babe seal, return the slot number and signature. + fn as_babe_seal(&self) -> Option; +} + +impl CompatibleDigestItem for generic::DigestItem { + /// Construct a digest item which is aaAASSAAAAAASDC a slot number and a signature on the + /// hash. + fn babe_seal(signature: BabeSeal) -> Self { + generic::DigestItem::Consensus(BABE_ENGINE_ID, signature.encode()) + } + + /// If this item is an BABE seal, return the slot number and signature. + fn as_babe_seal(&self) -> Option { + match self { + generic::DigestItem::Consensus(BABE_ENGINE_ID, seal) => Decode::decode(&mut &seal[..]), + _ => None, + } + } +} diff --git a/core/consensus/aura/slots/Cargo.toml b/core/consensus/slots/Cargo.toml similarity index 52% rename from core/consensus/aura/slots/Cargo.toml rename to core/consensus/slots/Cargo.toml index 68d066191e..88e3879f7a 100644 --- a/core/consensus/aura/slots/Cargo.toml +++ b/core/consensus/slots/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-consensus-aura-slots" +name = "substrate-consensus-slots" version = "1.0.0" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" @@ -7,12 +7,11 @@ edition = "2018" [dependencies] codec = { package = "parity-codec", version = "3.2" } -client = { package = "substrate-client", path = "../../../client" } -primitives = { package = "substrate-primitives", path = "../../../primitives" } -runtime_primitives = { package = "sr-primitives", path = "../../../sr-primitives" } -aura_primitives = { package = "substrate-consensus-aura-primitives", path = "../primitives" } -consensus_common = { package = "substrate-consensus-common", path = "../../common" } -inherents = { package = "substrate-inherents", path = "../../../inherents" } +client = { package = "substrate-client", path = "../../client" } +primitives = { package = "substrate-primitives", path = "../../primitives" } +runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" } +consensus_common = { package = "substrate-consensus-common", path = "../common" } +inherents = { package = "substrate-inherents", path = "../../inherents" } futures = "0.1.17" tokio = "0.1.7" parking_lot = "0.7.1" diff --git a/core/consensus/aura/slots/src/lib.rs b/core/consensus/slots/src/lib.rs similarity index 66% rename from core/consensus/aura/slots/src/lib.rs rename to core/consensus/slots/src/lib.rs index cca8732b78..258e528f15 100644 --- a/core/consensus/aura/slots/src/lib.rs +++ b/core/consensus/slots/src/lib.rs @@ -14,25 +14,35 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . +//! Slots functionality for Substrate. +//! +//! Some consensus algorithms have a concept of *slots*, which are intervals in +//! time during which certain events can and/or must occur. This crate +//! provides generic functionality for slots. + +#![forbid(warnings, unsafe_code, missing_docs)] + mod slots; pub use slots::{Slots, SlotInfo}; use std::sync::{mpsc, Arc}; use std::thread; +use std::fmt::Debug; use futures::prelude::*; use futures::{Future, IntoFuture, future::{self, Either}}; use log::{warn, debug, info}; use runtime_primitives::generic::BlockId; -use runtime_primitives::traits::{ProvideRuntimeApi, Block}; +use runtime_primitives::traits::{ProvideRuntimeApi, Block, ApiRef}; use consensus_common::SyncOracle; use inherents::{InherentData, InherentDataProviders}; -use aura_primitives::AuraApi; use client::ChainHead; -use codec::Encode; +use codec::{Encode, Decode}; /// A worker that should be invoked at every new slot. pub trait SlotWorker { + /// The type fo the future that will be returned when a new slot is + /// triggered. type OnSlot: IntoFuture; /// Called when the proposer starts. @@ -61,8 +71,8 @@ pub fn inherent_to_common_error(err: inherents::RuntimeString) -> consensus_comm } /// Start a new slot worker in a separate thread. -pub fn start_slot_worker_thread( - slot_duration: SlotDuration, +pub fn start_slot_worker_thread( + slot_duration: SlotDuration, client: Arc, worker: Arc, sync_oracle: SO, @@ -74,7 +84,8 @@ pub fn start_slot_worker_thread( W: SlotWorker + Send + Sync + 'static, SO: SyncOracle + Send + Clone + 'static, SC: SlotCompatible + 'static, - OnExit: Future + Send + 'static + OnExit: Future + Send + 'static, + T: SlotData + Send + Clone + 'static, { use tokio::runtime::current_thread::Runtime; @@ -89,8 +100,8 @@ pub fn start_slot_worker_thread( } }; - let slot_worker_future = match start_slot_worker::<_, _, _, _, SC, _>( - slot_duration, + let slot_worker_future = match start_slot_worker::<_, _, _, _, _, SC, _>( + slot_duration.clone(), client, worker, sync_oracle, @@ -114,12 +125,12 @@ pub fn start_slot_worker_thread( let _ = runtime.block_on(slot_worker_future); }); - result_recv.recv().expect("Aura start thread result sender dropped") + result_recv.recv().expect("Slots start thread result sender dropped") } /// Start a new slot worker. -pub fn start_slot_worker( - slot_duration: SlotDuration, +pub fn start_slot_worker( + slot_duration: SlotDuration, client: Arc, worker: Arc, sync_oracle: SO, @@ -132,19 +143,20 @@ pub fn start_slot_worker( SO: SyncOracle + Send + Clone, SC: SlotCompatible, OnExit: Future, + T: SlotData + Clone, { - worker.on_start(slot_duration.0)?; + worker.on_start(slot_duration.slot_duration())?; let make_authorship = move || { let client = client.clone(); let worker = worker.clone(); let sync_oracle = sync_oracle.clone(); - let SlotDuration(slot_duration) = slot_duration; + let SlotDuration(slot_duration) = slot_duration.clone(); let inherent_data_providers = inherent_data_providers.clone(); // rather than use a timer interval, we schedule our waits ourselves - Slots::::new(slot_duration, inherent_data_providers) - .map_err(|e| debug!(target: "aura", "Faulty timer: {:?}", e)) + Slots::::new(slot_duration.slot_duration(), inherent_data_providers) + .map_err(|e| debug!(target: "slots", "Faulty timer: {:?}", e)) .for_each(move |slot_info| { let client = client.clone(); let worker = worker.clone(); @@ -152,7 +164,7 @@ pub fn start_slot_worker( // only propose when we are not syncing. if sync_oracle.is_major_syncing() { - debug!(target: "aura", "Skipping proposal slot due to sync."); + debug!(target: "slots", "Skipping proposal slot due to sync."); return Either::B(future::ok(())); } @@ -160,7 +172,7 @@ pub fn start_slot_worker( let chain_head = match client.best_block_header() { Ok(x) => x, Err(e) => { - warn!(target: "aura", "Unable to author block in slot {}. \ + warn!(target: "slots", "Unable to author block in slot {}. \ no best block header: {:?}", slot_num, e); return Either::B(future::ok(())) } @@ -168,7 +180,7 @@ pub fn start_slot_worker( Either::A( worker.on_slot(chain_head, slot_info).into_future() - .map_err(|e| debug!(target: "aura", "Encountered aura error: {:?}", e)) + .map_err(|e| debug!(target: "slots", "Encountered consensus error: {:?}", e)) ) }) }; @@ -178,13 +190,13 @@ pub fn start_slot_worker( authorship_task.catch_unwind().then(|res| { match res { Ok(Ok(())) => (), - Ok(Err(())) => warn!("Aura authorship task terminated unexpectedly. Restarting"), + Ok(Err(())) => warn!(target: "slots", "Authorship task terminated unexpectedly. Restarting"), Err(e) => { if let Some(s) = e.downcast_ref::<&'static str>() { - warn!("Aura authorship task panicked at {:?}", s); + warn!(target: "slots", "Authorship task panicked at {:?}", s); } - warn!("Restarting Aura authorship task"); + warn!(target: "slots", "Restarting authorship task"); } } @@ -207,32 +219,49 @@ pub enum CheckedHeader { Checked(H, S), } +/// A type from which a slot duration can be obtained. +pub trait SlotData { + /// Gets the slot duration. + fn slot_duration(&self) -> u64; + + /// The static slot key + const SLOT_KEY: &'static [u8]; +} + +impl SlotData for u64 { + fn slot_duration(&self) -> u64 { *self } + + const SLOT_KEY: &'static [u8] = b"aura_slot_duration"; +} + /// A slot duration. Create with `get_or_compute`. // The internal member should stay private here. -#[derive(Clone, Copy, Debug)] -pub struct SlotDuration(u64); +#[derive(Clone, Copy, Debug, Encode, Decode, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct SlotDuration(T); -impl SlotDuration { - /// Either fetch the slot duration from disk or compute it from the genesis - /// state. - pub fn get_or_compute(client: &C) -> ::client::error::Result where +impl SlotDuration { + /// Either fetch the slot duration from disk or compute it from the + /// genesis state. + /// + /// `slot_key` is marked as `'static`, as it should really be a + /// compile-time constant. + pub fn get_or_compute(client: &C, cb: CB) -> ::client::error::Result where C: client::backend::AuxStore, C: ProvideRuntimeApi, - C::Api: AuraApi, + CB: FnOnce(ApiRef, &BlockId) -> ::client::error::Result, + T: SlotData + Encode + Decode + Debug, { - use codec::Decode; - const SLOT_KEY: &[u8] = b"aura_slot_duration"; - - match client.get_aux(SLOT_KEY)? { - Some(v) => u64::decode(&mut &v[..]) + match client.get_aux(T::SLOT_KEY)? { + Some(v) => ::decode(&mut &v[..]) .map(SlotDuration) .ok_or_else(|| ::client::error::Error::Backend( - format!("Aura slot duration kept in invalid format"), + format!("slot duration kept in invalid format"), ).into()), None => { use runtime_primitives::traits::Zero; - let genesis_slot_duration = client.runtime_api() - .slot_duration(&BlockId::number(Zero::zero()))?; + let genesis_slot_duration = cb( + client.runtime_api(), + &BlockId::number(Zero::zero()))?; info!( "Loaded block-time = {:?} seconds from genesis on first-launch", @@ -240,7 +269,7 @@ impl SlotDuration { ); genesis_slot_duration.using_encoded(|s| { - client.insert_aux(&[(SLOT_KEY, &s[..])], &[]) + client.insert_aux(&[(T::SLOT_KEY, &s[..])], &[]) })?; Ok(SlotDuration(genesis_slot_duration)) @@ -248,8 +277,15 @@ impl SlotDuration { } } - /// Returns slot duration value. - pub fn get(&self) -> u64 { - self.0 + /// Returns slot data value. + pub fn get(&self) -> T { + self.0.clone() + } + + /// Get the slot duration in milliseconds + pub fn slot_duration(&self) -> u64 + where T: SlotData + { + self.0.slot_duration() } } diff --git a/core/consensus/aura/slots/src/slots.rs b/core/consensus/slots/src/slots.rs similarity index 100% rename from core/consensus/aura/slots/src/slots.rs rename to core/consensus/slots/src/slots.rs diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index b48c2f54fb..a72f8232b8 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -6,12 +6,12 @@ edition = "2018" [dependencies] rstd = { package = "sr-std", path = "../sr-std", default-features = false } -parity-codec = { version = "3.3", default-features = false, features = ["derive"] } +parity-codec = { version = "3.4.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0", default-features = false } serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } -twox-hash = { version = "1.1.0", optional = true } -byteorder = { version = "1.1", default-features = false } +twox-hash = { version = "1.2.0", optional = true } +byteorder = { version = "1.3.1", default-features = false } primitive-types = { version = "0.2", default-features = false, features = ["codec"] } impl-serde = { version = "0.1", optional = true } wasmi = { version = "0.4.3", optional = true } @@ -26,14 +26,14 @@ schnorrkel = { version = "0.1", optional = true } rand = { version = "0.6", optional = true } sha2 = { version = "0.8", optional = true } substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39", optional = true } -tiny-bip39 = { version = "0.6.0", optional = true } +tiny-bip39 = { version = "0.6.1", optional = true } hex = { version = "0.3", optional = true } regex = {version = "1.1", optional = true } [dev-dependencies] substrate-serializer = { path = "../serializer" } -pretty_assertions = "0.5" -heapsize = "0.4" +pretty_assertions = "0.6.1" +heapsize = "0.4.2" [features] default = ["std"] diff --git a/core/primitives/src/sr25519.rs b/core/primitives/src/sr25519.rs index aa17447a24..e70e35c1ae 100644 --- a/core/primitives/src/sr25519.rs +++ b/core/primitives/src/sr25519.rs @@ -231,8 +231,10 @@ pub struct LocalizedSignature { impl Signature { /// A new instance from the given 64-byte `data`. /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! + /// NOTE: No checking goes on to ensure this is a real signature. Only use + /// it if you are certain that the array actually is a signature, or if you + /// immediately verify the signature. All functions that verify signatures + /// will fail if the `Signature` is not actually a valid signature. pub fn from_raw(data: [u8; 64]) -> Signature { Signature(data) } diff --git a/core/sr-api-macros/Cargo.toml b/core/sr-api-macros/Cargo.toml index 2dfedcfe3b..eef8f8e111 100644 --- a/core/sr-api-macros/Cargo.toml +++ b/core/sr-api-macros/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" proc-macro = true [dependencies] -quote = "0.6" -syn = { version = "^0.15.22", features = [ "full", "fold", "extra-traits", "visit" ] } +quote = "0.6.12" +syn = { version = "^0.15.30", features = [ "full", "fold", "extra-traits", "visit" ] } proc-macro2 = "0.4" blake2-rfc = "0.2" proc-macro-crate = "0.1.3" diff --git a/core/sr-primitives/src/generic/digest.rs b/core/sr-primitives/src/generic/digest.rs index 8eed63900f..48f1941d69 100644 --- a/core/sr-primitives/src/generic/digest.rs +++ b/core/sr-primitives/src/generic/digest.rs @@ -72,7 +72,10 @@ pub enum DigestItem { /// trie creation. ChangesTrieRoot(Hash), /// The old way to put a Seal on it. Deprecated. - #[deprecated] + #[deprecated( + since = "1.0", + note = "New versions of Substrate will never generate this, and it will be rejected on new blockchains.", + )] Seal(u64, SealSignature), /// Put a Seal on it Consensus(ConsensusEngineId, Vec), diff --git a/core/test-runtime/src/lib.rs b/core/test-runtime/src/lib.rs index cd072b78ba..e104dd6d12 100644 --- a/core/test-runtime/src/lib.rs +++ b/core/test-runtime/src/lib.rs @@ -319,7 +319,6 @@ fn code_using_trie() -> u64 { iter_pairs.len() as u64 } - cfg_if! { if #[cfg(feature = "std")] { impl_runtime_apis! { diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 432a8119ff..1f5c76ef11 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,8 +59,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 59, - impl_version: 60, + spec_version: 62, + impl_version: 62, apis: RUNTIME_API_VERSIONS, }; diff --git a/srml/support/procedural/Cargo.toml b/srml/support/procedural/Cargo.toml index 180c4be6b6..1aaedcbf04 100644 --- a/srml/support/procedural/Cargo.toml +++ b/srml/support/procedural/Cargo.toml @@ -11,6 +11,6 @@ proc-macro = true srml-support-procedural-tools = { path = "./tools" } sr-api-macros = { path = "../../../core/sr-api-macros" } -proc-macro2 = "0.4" -quote = { version = "0.6" } -syn = { version = "0.15", features = ["full"] } +proc-macro2 = "0.4.27" +quote = { version = "0.6.12" } +syn = { version = "0.15.30", features = ["full"] } diff --git a/srml/support/procedural/tools/Cargo.toml b/srml/support/procedural/tools/Cargo.toml index fedff54c49..ef55ad1b2e 100644 --- a/srml/support/procedural/tools/Cargo.toml +++ b/srml/support/procedural/tools/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" [dependencies] srml-support-procedural-tools-derive = { path = "./derive" } -proc-macro2 = "0.4" -quote = { version = "0.6" } -syn = { version = "0.15", features = ["full"] } +proc-macro2 = "0.4.27" +quote = { version = "0.6.12" } +syn = { version = "0.15.30", features = ["full"] } proc-macro-crate = "0.1.3" diff --git a/srml/support/procedural/tools/derive/Cargo.toml b/srml/support/procedural/tools/derive/Cargo.toml index 20ced99629..5922911c67 100644 --- a/srml/support/procedural/tools/derive/Cargo.toml +++ b/srml/support/procedural/tools/derive/Cargo.toml @@ -8,6 +8,6 @@ edition = "2018" proc-macro = true [dependencies] -proc-macro2 = "0.4.24" -quote = { version = "0.6.10", features = ["proc-macro"] } -syn = { version = "0.15.21", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } +proc-macro2 = "0.4.27" +quote = { version = "0.6.12", features = ["proc-macro"] } +syn = { version = "0.15.30", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } -- GitLab From c04aabe70b7b9d80ad86aea36faf0b1e1fbff821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 15 Apr 2019 11:17:08 +0100 Subject: [PATCH 009/206] core: grandpa: persist voter set state on authority set change (#2249) --- core/finality-grandpa/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/finality-grandpa/src/lib.rs b/core/finality-grandpa/src/lib.rs index b42c329d15..83db670ac7 100644 --- a/core/finality-grandpa/src/lib.rs +++ b/core/finality-grandpa/src/lib.rs @@ -607,6 +607,8 @@ pub fn run_grandpa, N, RA>( current_round: HasVoted::No, }; + aux_schema::write_voter_set_state(&**client.backend(), &set_state)?; + let set_state: SharedVoterSetState<_> = set_state.into(); let env = Arc::new(Environment { -- GitLab From c6e8fd9cb6d421df1de4648ed7c88d7a59d0ec6a Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Mon, 15 Apr 2019 12:18:08 +0200 Subject: [PATCH 010/206] Disable gossip for peers running old version (#2245) --- core/network/src/protocol.rs | 34 ++++++++++++++++++++-------------- core/network/src/service.rs | 9 ++++++--- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/core/network/src/protocol.rs b/core/network/src/protocol.rs index 2d3e81daa3..b82088c695 100644 --- a/core/network/src/protocol.rs +++ b/core/network/src/protocol.rs @@ -50,9 +50,9 @@ const PROPAGATE_TIMEOUT: time::Duration = time::Duration::from_millis(2900); const STATUS_INTERVAL: time::Duration = time::Duration::from_millis(5000); /// Current protocol version. -pub(crate) const CURRENT_VERSION: u32 = 2; +pub(crate) const CURRENT_VERSION: u32 = 3; /// Lowest version we support -const MIN_VERSION: u32 = 2; +pub(crate) const MIN_VERSION: u32 = 2; // Maximum allowed entries in `BlockResponse` const MAX_BLOCK_DATA_RESPONSE: u32 = 128; @@ -505,11 +505,13 @@ impl, H: ExHashT> Protocol { GenericMessage::RemoteChangesRequest(request) => self.on_remote_changes_request(who, request), GenericMessage::RemoteChangesResponse(response) => self.on_remote_changes_response(who, response), GenericMessage::Consensus(msg) => { - self.consensus_gossip.on_incoming( - &mut ProtocolContext::new(&mut self.context_data, &self.network_chan), - who, - msg, - ); + if self.context_data.peers.get(&who).map_or(false, |peer| peer.info.protocol_version > 2) { + self.consensus_gossip.on_incoming( + &mut ProtocolContext::new(&mut self.context_data, &self.network_chan), + who, + msg, + ); + } } other => self.specialization.on_message( &mut ProtocolContext::new(&mut self.context_data, &self.network_chan), @@ -561,11 +563,13 @@ impl, H: ExHashT> Protocol { let removed = { self.handshaking_peers.remove(&peer); self.connected_peers.write().remove(&peer); - self.context_data.peers.remove(&peer).is_some() + self.context_data.peers.remove(&peer) }; - if removed { + if let Some(peer_data) = removed { let mut context = ProtocolContext::new(&mut self.context_data, &self.network_chan); - self.consensus_gossip.peer_disconnected(&mut context, peer.clone()); + if peer_data.info.protocol_version > 2 { + self.consensus_gossip.peer_disconnected(&mut context, peer.clone()); + } self.sync.peer_disconnected(&mut context, peer.clone()); self.specialization.on_disconnect(&mut context, peer.clone()); self.on_demand.as_ref().map(|s| s.on_disconnect(peer)); @@ -721,7 +725,7 @@ impl, H: ExHashT> Protocol { /// Called by peer to report status fn on_status_message(&mut self, who: PeerId, status: message::Status) { trace!(target: "sync", "New peer {} {:?}", who, status); - { + let protocol_version = { if self.context_data.peers.contains_key(&who) { debug!("Unexpected status packet from {}", who); return; @@ -801,15 +805,17 @@ impl, H: ExHashT> Protocol { self.context_data.peers.insert(who.clone(), peer); debug!(target: "sync", "Connected {}", who); - } + status.version + }; let mut context = ProtocolContext::new(&mut self.context_data, &self.network_chan); self.on_demand .as_ref() .map(|s| s.on_connect(who.clone(), status.roles, status.best_number)); self.sync.new_peer(&mut context, who.clone()); - self.consensus_gossip - .new_peer(&mut context, who.clone(), status.roles); + if protocol_version > 2 { + self.consensus_gossip.new_peer(&mut context, who.clone(), status.roles); + } self.specialization.on_connect(&mut context, who, status); } diff --git a/core/network/src/service.rs b/core/network/src/service.rs index 9964286f30..10367123db 100644 --- a/core/network/src/service.rs +++ b/core/network/src/service.rs @@ -178,8 +178,8 @@ impl> Service { params.transaction_pool, params.specialization, )?; - let versions = [(protocol::CURRENT_VERSION as u8)]; - let registered = RegisteredProtocol::new(protocol_id, &versions[..]); + let versions: Vec<_> = ((protocol::MIN_VERSION as u8)..=(protocol::CURRENT_VERSION as u8)).collect(); + let registered = RegisteredProtocol::new(protocol_id, &versions); let (thread, network, peerset) = start_thread( network_to_protocol_sender, network_port, @@ -568,7 +568,10 @@ fn run_thread( let network = stream::poll_fn(move || network_service.lock().poll()).for_each(move |event| { match event { NetworkServiceEvent::OpenedCustomProtocol { peer_id, version, debug_info, .. } => { - debug_assert_eq!(version, protocol::CURRENT_VERSION as u8); + debug_assert!( + version <= protocol::CURRENT_VERSION as u8 + && version >= protocol::MIN_VERSION as u8 + ); let _ = protocol_sender.send(FromNetworkMsg::PeerConnected(peer_id, debug_info)); } NetworkServiceEvent::ClosedCustomProtocol { peer_id, debug_info, .. } => { -- GitLab From 0d969834de0bd6ca19cbaa9c03398cea9aec6d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 15 Apr 2019 15:47:06 +0200 Subject: [PATCH 011/206] Remove peerset debug output test (#2267) * Remove peerset debug output test We should not test debug output, especially when it can change. * Update lock file --- Cargo.lock | 4 +++- core/peerset/Cargo.toml | 2 +- core/peerset/src/slots.rs | 42 ++------------------------------------- srml/support/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 83553ea5c3..0425fa82d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "MacTypes-sys" version = "2.1.0" @@ -3420,7 +3422,7 @@ dependencies = [ "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", diff --git a/core/peerset/Cargo.toml b/core/peerset/Cargo.toml index 1b505682d8..21d6bff69f 100644 --- a/core/peerset/Cargo.toml +++ b/core/peerset/Cargo.toml @@ -13,4 +13,4 @@ libp2p = { version = "0.6.0", default-features = false } linked-hash-map = "0.5" log = "0.4" lru-cache = "0.1.2" -serde_json = "1.0.24" +serde_json = "1.0.24" \ No newline at end of file diff --git a/core/peerset/src/slots.rs b/core/peerset/src/slots.rs index 2ea9e5199b..4c6d9fab6c 100644 --- a/core/peerset/src/slots.rs +++ b/core/peerset/src/slots.rs @@ -161,14 +161,14 @@ impl Slots { /// Marks given peer as a reserved one. pub fn mark_reserved(&mut self, peer_id: &PeerId) { - if let Some(_) = self.common.remove(peer_id) { + if self.common.remove(peer_id).is_some() { self.reserved.insert(peer_id.clone(), ()); } } /// Marks given peer as not reserved one. pub fn mark_not_reserved(&mut self, peer_id: &PeerId) { - if let Some(_) = self.reserved.remove(peer_id) { + if self.reserved.remove(peer_id).is_some() { self.common.insert(peer_id.clone(), ()); } } @@ -183,41 +183,3 @@ impl Slots { self.reserved.contains_key(peer_id) } } - -#[cfg(test)] -mod tests { - use libp2p::PeerId; - use super::{Slots, SlotType}; - - #[test] - fn test_slots_debug() { - let reserved_peer = PeerId::random(); - let reserved_peer2 = PeerId::random(); - let common_peer = PeerId::random(); - let mut slots = Slots::new(10); - - slots.add_peer(reserved_peer.clone(), SlotType::Reserved); - slots.add_peer(reserved_peer2.clone(), SlotType::Reserved); - slots.add_peer(common_peer.clone(), SlotType::Common); - - let expected = format!("Slots {{ - max_slots: 10, - reserved: [ - PeerId( - {:?} - ), - PeerId( - {:?} - ) - ], - common: [ - PeerId( - {:?} - ) - ] -}}", reserved_peer.to_base58(), reserved_peer2.to_base58(), common_peer.to_base58()); - - let s = format!("{:#?}", slots); - assert_eq!(expected, s); - } -} diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index a126160d67..06fc3633ff 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -20,7 +20,7 @@ once_cell = { version = "0.1.6", default-features = false, optional = true } bitmask = { version = "0.5", default-features = false } [dev-dependencies] -pretty_assertions = "0.5.1" +pretty_assertions = "0.6.1" [features] default = ["std"] -- GitLab From 22ea827932ed7374857636bbea0c750aaed67bb7 Mon Sep 17 00:00:00 2001 From: TriplEight Date: Mon, 15 Apr 2019 18:23:34 +0200 Subject: [PATCH 012/206] set size as a global var (#2280) --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3068547966..7edee3724d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ variables: GIT_STRATEGY: fetch CI_SERVER_NAME: "GitLab CI" CARGO_HOME: "/ci-cache/substrate/cargo/${CI_JOB_NAME}" + SCCACHE_CACHE_SIZE: 50G DOCKER_OS: "debian:stretch" ARCH: "x86_64" -- GitLab From 9631622fca89709914cec8a3680e5034c51b2519 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Tue, 16 Apr 2019 09:25:46 +0200 Subject: [PATCH 013/206] Polite-grandpa improvements (#2229) * send neighbor packets in more generic way * integrate periodic neighbor-packet rebroadcaster * integrate reporting * attach callbacks to commit messages for rebroadcasting and reporting * Tests for commit relay * crunch up some nice warnings * exit-scope sub-futures of grandpa * address small grumbles * some changes to commit handling --- .../src/communication/gossip.rs | 238 ++++++----- .../finality-grandpa/src/communication/mod.rs | 296 +++++++++++--- .../src/communication/periodic.rs | 93 +++++ .../src/communication/tests.rs | 385 ++++++++++++++++++ core/finality-grandpa/src/environment.rs | 10 +- core/finality-grandpa/src/lib.rs | 77 ++-- core/finality-grandpa/src/tests.rs | 27 +- core/finality-grandpa/src/until_imported.rs | 20 +- core/network/src/lib.rs | 5 +- core/network/src/service.rs | 26 +- 10 files changed, 933 insertions(+), 244 deletions(-) create mode 100644 core/finality-grandpa/src/communication/periodic.rs create mode 100644 core/finality-grandpa/src/communication/tests.rs diff --git a/core/finality-grandpa/src/communication/gossip.rs b/core/finality-grandpa/src/communication/gossip.rs index 720c083db7..6b45fd0745 100644 --- a/core/finality-grandpa/src/communication/gossip.rs +++ b/core/finality-grandpa/src/communication/gossip.rs @@ -73,10 +73,12 @@ use network::{config::Roles, PeerId}; use parity_codec::{Encode, Decode}; use substrate_telemetry::{telemetry, CONSENSUS_DEBUG}; -use log::{trace, debug}; +use log::{trace, debug, warn}; +use futures::prelude::*; +use futures::sync::mpsc; use crate::{CompactCommit, SignedMessage}; -use super::{Round, SetId, Network}; +use super::{cost, benefit, Round, SetId}; use std::collections::{HashMap, VecDeque}; use std::time::{Duration, Instant}; @@ -227,6 +229,12 @@ pub(super) enum GossipMessage { Neighbor(VersionedNeighborPacket>), } +impl From>> for GossipMessage { + fn from(neighbor: NeighborPacket>) -> Self { + GossipMessage::Neighbor(VersionedNeighborPacket::V1(neighbor)) + } +} + /// Network level message with topic information. #[derive(Debug, Encode, Decode)] pub(super) struct VoteOrPrecommitMessage { @@ -273,32 +281,12 @@ impl VersionedNeighborPacket { } } -// cost scalars for reporting peers. -mod cost { - pub(super) const PAST_REJECTION: i32 = -50; - pub(super) const BAD_SIGNATURE: i32 = -100; - pub(super) const MALFORMED_COMMIT: i32 = -1000; - pub(super) const FUTURE_MESSAGE: i32 = -500; - - pub(super) const INVALID_VIEW_CHANGE: i32 = -500; - pub(super) const PER_UNDECODABLE_BYTE: i32 = -5; - pub(super) const PER_SIGNATURE_CHECKED: i32 = -25; - pub(super) const PER_BLOCK_LOADED: i32 = -10; -} - -// benefit scalars for reporting peers. -mod benefit { - pub(super) const ROUND_MESSAGE: i32 = 100; - pub(super) const BASIC_VALIDATED_COMMIT: i32 = 100; - pub(super) const PER_EQUIVOCATION: i32 = 10; -} - /// Misbehavior that peers can perform. /// /// `cost` gives a cost that can be used to perform cost/benefit analysis of a /// peer. #[derive(Clone, Copy, Debug, PartialEq)] -enum Misbehavior { +pub(super) enum Misbehavior { // invalid neighbor message, considering the last one. InvalidViewChange, // could not decode neighbor message. bytes-length of the packet. @@ -315,7 +303,7 @@ enum Misbehavior { } impl Misbehavior { - fn cost(&self) -> i32 { + pub(super) fn cost(&self) -> i32 { use Misbehavior::*; match *self { @@ -402,9 +390,13 @@ impl Peers { Some(p) => p, }; - if peer.view.last_commit.as_ref() >= Some(&new_height) { + // this doesn't allow a peer to send us unlimited commits with the + // same height, because there is still a misbehavior condition based on + // sending commits that are <= the best we are aware of. + if peer.view.last_commit.as_ref() > Some(&new_height) { return Err(Misbehavior::InvalidViewChange); } + peer.view.last_commit = Some(new_height); Ok(()) @@ -416,7 +408,7 @@ impl Peers { } #[derive(Debug)] -enum Action { +pub(super) enum Action { // repropagate under given topic, to the given peers, applying cost/benefit to originator. Keep(H, i32), // discard and process. @@ -445,7 +437,9 @@ impl Inner { } /// Note a round in a set has started. - fn note_round>(&mut self, round: Round, set_id: SetId, net: &N) { + fn note_round(&mut self, round: Round, set_id: SetId, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { if self.local_view.round == round && self.local_view.set_id == set_id { return } @@ -457,24 +451,28 @@ impl Inner { self.local_view.set_id = set_id; self.live_topics.push(round, set_id); - self.multicast_neighbor_packet(net); + self.multicast_neighbor_packet(send_neighbor); } /// Note that a voter set with given ID has started. Does nothing if the last /// call to the function was with the same `set_id`. - fn note_set>(&mut self, set_id: SetId, net: &N) { + fn note_set(&mut self, set_id: SetId, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { if self.local_view.set_id == set_id { return } self.local_view.update_set(set_id); self.live_topics.push(Round(0), set_id); - self.multicast_neighbor_packet(net); + self.multicast_neighbor_packet(send_neighbor); } /// Note that we've imported a commit finalizing a given block. - fn note_commit_finalized>(&mut self, finalized: NumberFor, net: &N) { + fn note_commit_finalized(&mut self, finalized: NumberFor, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { if self.local_view.last_commit.as_ref() < Some(&finalized) { self.local_view.last_commit = Some(finalized); - self.multicast_neighbor_packet(net) + self.multicast_neighbor_packet(send_neighbor) } } @@ -520,7 +518,6 @@ impl Inner { fn validate_commit_message(&mut self, who: &PeerId, full: &FullCommitMessage) -> Action { - use grandpa::Message as GrandpaMessage; if let Err(misbehavior) = self.peers.update_commit_height(who, full.message.target_number) { return Action::Discard(misbehavior.cost()); @@ -543,28 +540,6 @@ impl Inner { return Action::Discard(cost::MALFORMED_COMMIT); } - // check signatures on all contained precommits. - for (i, (precommit, &(ref sig, ref id))) in full.message.precommits.iter() - .zip(&full.message.auth_data) - .enumerate() - { - if let Err(()) = super::check_message_sig::( - &GrandpaMessage::Precommit(precommit.clone()), - id, - sig, - full.round.0, - full.set_id.0, - ) { - debug!(target: "afg", "Bad commit message signature {}", id); - telemetry!(CONSENSUS_DEBUG; "afg.bad_commit_msg_signature"; "id" => ?id); - return Action::Discard(Misbehavior::BadCommitMessage { - signatures_checked: i as i32, - blocks_loaded: 0, - equivocations_caught: 0, - }.cost()); - } - } - // always discard commits initially and rebroadcast after doing full // checking. let topic = super::global_topic::(full.set_id.0); @@ -585,54 +560,64 @@ impl Inner { (neighbor_topics, Action::Discard(cb)) } - fn construct_neighbor_packet(&self) -> GossipMessage { + fn multicast_neighbor_packet(&self, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { let packet = NeighborPacket { round: self.local_view.round, set_id: self.local_view.set_id, commit_finalized_height: self.local_view.last_commit.unwrap_or(Zero::zero()), }; - GossipMessage::Neighbor(VersionedNeighborPacket::V1(packet)) - } - - fn multicast_neighbor_packet>(&self, net: &N) { - let packet = self.construct_neighbor_packet(); let peers = self.peers.inner.keys().cloned().collect(); - net.send_message(peers, packet.encode()); + send_neighbor(peers, packet); } } /// A validator for GRANDPA gossip messages. pub(super) struct GossipValidator { inner: parking_lot::RwLock>, + report_sender: mpsc::UnboundedSender, } impl GossipValidator { /// Create a new gossip-validator. - pub(super) fn new(config: crate::Config) -> GossipValidator { - GossipValidator { inner: parking_lot::RwLock::new(Inner::new(config)) } + pub(super) fn new(config: crate::Config) -> (GossipValidator, ReportStream) { + let (tx, rx) = mpsc::unbounded(); + let val = GossipValidator { + inner: parking_lot::RwLock::new(Inner::new(config)), + report_sender: tx, + }; + + (val, ReportStream { reports: rx }) } /// Note a round in a set has started. - pub(super) fn note_round>(&self, round: Round, set_id: SetId, net: &N) { - self.inner.write().note_round(round, set_id, net); + pub(super) fn note_round(&self, round: Round, set_id: SetId, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { + self.inner.write().note_round(round, set_id, send_neighbor); } /// Note that a voter set with given ID has started. - pub(super) fn note_set>(&self, set_id: SetId, net: &N) { - self.inner.write().note_set(set_id, net); + pub(super) fn note_set(&self, set_id: SetId, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { + self.inner.write().note_set(set_id, send_neighbor); } /// Note that we've imported a commit finalizing a given block. - pub(super) fn note_commit_finalized>(&self, finalized: NumberFor, net: &N) { - self.inner.write().note_commit_finalized(finalized, net); + pub(super) fn note_commit_finalized(&self, finalized: NumberFor, send_neighbor: F) + where F: FnOnce(Vec, NeighborPacket>) + { + self.inner.write().note_commit_finalized(finalized, send_neighbor); } - fn report(&self, _who: &PeerId, _cost_benefit: i32) { - // report + fn report(&self, who: PeerId, cost_benefit: i32) { + let _ = self.report_sender.unbounded_send(PeerReport { who, cost_benefit }); } - fn do_validate(&self, who: &PeerId, mut data: &[u8]) + pub(super) fn do_validate(&self, who: &PeerId, mut data: &[u8]) -> (Action, Vec) { let mut broadcast_topics = Vec::new(); @@ -670,7 +655,14 @@ impl network_gossip::Validator for GossipValidator let packet_data = { let mut inner = self.inner.write(); inner.peers.new_peer(who.clone()); - inner.construct_neighbor_packet().encode() + + let packet = NeighborPacket { + round: inner.local_view.round, + set_id: inner.local_view.set_id, + commit_finalized_height: inner.local_view.last_commit.unwrap_or(Zero::zero()), + }; + + GossipMessage::::from(packet).encode() }; context.send_message(who, packet_data); } @@ -691,15 +683,15 @@ impl network_gossip::Validator for GossipValidator match action { Action::Keep(topic, cb) => { - self.report(who, cb); + self.report(who.clone(), cb); network_gossip::ValidationResult::ProcessAndKeep(topic) } Action::ProcessAndDiscard(topic, cb) => { - self.report(who, cb); + self.report(who.clone(), cb); network_gossip::ValidationResult::ProcessAndDiscard(topic) } Action::Discard(cb) => { - self.report(who, cb); + self.report(who.clone(), cb); network_gossip::ValidationResult::Discard } } @@ -788,6 +780,62 @@ impl network_gossip::Validator for GossipValidator } } +struct PeerReport { + who: PeerId, + cost_benefit: i32, +} + +// wrapper around a stream of reports. +#[must_use = "The report stream must be consumed"] +pub(super) struct ReportStream { + reports: mpsc::UnboundedReceiver, +} + +impl ReportStream { + /// Consume the report stream, converting it into a future that + /// handles all reports. + pub(super) fn consume(self, net: N) + -> impl Future + Send + 'static + where + B: BlockT, + N: super::Network + Send + 'static, + { + ReportingTask { + reports: self.reports, + net, + _marker: Default::default(), + } + } +} + +/// A future for reporting peers. +#[must_use = "Futures do nothing unless polled"] +struct ReportingTask { + reports: mpsc::UnboundedReceiver, + net: N, + _marker: std::marker::PhantomData, +} + +impl> Future for ReportingTask { + type Item = (); + type Error = (); + + fn poll(&mut self) -> Poll<(), ()> { + loop { + match self.reports.poll() { + Err(_) => { + warn!(target: "afg", "Report stream terminated unexpectedly"); + return Ok(Async::Ready(())) + } + Ok(Async::Ready(None)) => return Ok(Async::Ready(())), + Ok(Async::Ready(Some(PeerReport { who, cost_benefit }))) => + self.net.report(who, cost_benefit), + Ok(Async::NotReady) => return Ok(Async::NotReady), + } + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -804,36 +852,6 @@ mod tests { } } - #[derive(Clone)] - struct StubNetwork; - - impl super::Network for StubNetwork { - type In = futures::stream::Empty; - - fn messages_for(&self, _topic: Block::Hash) -> Self::In { - futures::stream::empty() - } - - fn register_validator( - &self, - _validator: std::sync::Arc>, - ) { - - } - - fn gossip_message(&self, _topic: Block::Hash, _data: Vec, _force: bool) { - - } - - fn send_message(&self, _who: Vec, _data: Vec) { - - } - - fn announce(&self, _block: Block::Hash) { - - } - } - #[test] fn view_vote_rules() { let view = View { round: Round(100), set_id: SetId(1), last_commit: Some(1000u64) }; @@ -975,12 +993,12 @@ mod tests { #[test] fn messages_not_expired_immediately() { - let val = GossipValidator::::new(config()); + let (val, _) = GossipValidator::::new(config()); let set_id = 1; for round_num in 1u64..10 { - val.note_round(Round(round_num), SetId(set_id), &StubNetwork); + val.note_round(Round(round_num), SetId(set_id), |_, _| {}); } { @@ -989,14 +1007,12 @@ mod tests { // messages from old rounds are expired. for round_num in 1u64..last_kept_round { - println!("{} should be expired?", round_num); let topic = crate::communication::round_topic::(round_num, 1); assert!(is_expired(topic, &[1, 2, 3])); } // messages from not-too-old rounds are not expired. for round_num in last_kept_round..10 { - println!("{} should not be expired?", round_num); let topic = crate::communication::round_topic::(round_num, 1); assert!(!is_expired(topic, &[1, 2, 3])); } diff --git a/core/finality-grandpa/src/communication/mod.rs b/core/finality-grandpa/src/communication/mod.rs index 1770d41adf..4b8958f2e9 100644 --- a/core/finality-grandpa/src/communication/mod.rs +++ b/core/finality-grandpa/src/communication/mod.rs @@ -38,8 +38,8 @@ use parity_codec::{Encode, Decode}; use substrate_primitives::{ed25519, Pair}; use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_INFO}; use runtime_primitives::ConsensusEngineId; -use runtime_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor}; -use network::{consensus_gossip as network_gossip, Service as NetworkService,}; +use runtime_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT}; +use network::{consensus_gossip as network_gossip, Service as NetworkService}; use network_gossip::ConsensusMessage; use crate::{Error, Message, SignedMessage, Commit, CompactCommit}; @@ -50,15 +50,40 @@ use gossip::{ use substrate_primitives::ed25519::{Public as AuthorityId, Signature as AuthoritySignature}; pub mod gossip; +mod periodic; + +#[cfg(test)] +mod tests; /// The consensus engine ID of GRANDPA. pub const GRANDPA_ENGINE_ID: ConsensusEngineId = [b'a', b'f', b'g', b'1']; +// cost scalars for reporting peers. +mod cost { + pub(super) const PAST_REJECTION: i32 = -50; + pub(super) const BAD_SIGNATURE: i32 = -100; + pub(super) const MALFORMED_COMMIT: i32 = -1000; + pub(super) const FUTURE_MESSAGE: i32 = -500; + + pub(super) const INVALID_VIEW_CHANGE: i32 = -500; + pub(super) const PER_UNDECODABLE_BYTE: i32 = -5; + pub(super) const PER_SIGNATURE_CHECKED: i32 = -25; + pub(super) const PER_BLOCK_LOADED: i32 = -10; + pub(super) const INVALID_COMMIT: i32 = -5000; +} + +// benefit scalars for reporting peers. +mod benefit { + pub(super) const ROUND_MESSAGE: i32 = 100; + pub(super) const BASIC_VALIDATED_COMMIT: i32 = 100; + pub(super) const PER_EQUIVOCATION: i32 = 10; +} + /// A handle to the network. This is generally implemented by providing some /// handle to a gossip service or similar. /// /// Intended to be a lightweight handle such as an `Arc`. -pub trait Network: Clone { +pub trait Network: Clone + Send + 'static { /// A stream of input messages for a topic. type In: Stream; @@ -77,6 +102,9 @@ pub trait Network: Clone { /// Send a message to a bunch of specific peers, even if they've seen it already. fn send_message(&self, who: Vec, data: Vec); + /// Report a peer's cost or benefit after some action. + fn report(&self, who: network::PeerId, cost_benefit: i32); + /// Inform peers that a block with given hash should be downloaded. fn announce(&self, block: Block::Hash); } @@ -133,6 +161,10 @@ impl Network for Arc> where }) } + fn report(&self, who: network::PeerId, cost_benefit: i32) { + self.report_peer(who, cost_benefit) + } + fn announce(&self, block: B::Hash) { self.announce_block(block) } @@ -164,18 +196,49 @@ impl Stream for NetworkStream { } } +/// The result of processing a commit. +pub(crate) enum CommitProcessingOutcome { + Good, + Bad, +} + /// Bridge between the underlying network service, gossiping consensus messages and Grandpa pub(crate) struct NetworkBridge> { service: N, validator: Arc>, + neighbor_sender: periodic::NeighborPacketSender, } impl> NetworkBridge { - /// Create a new NetworkBridge to the given NetworkService - pub(crate) fn new(service: N, config: crate::Config) -> Self { - let validator = Arc::new(GossipValidator::new(config)); + /// Create a new NetworkBridge to the given NetworkService. Returns the service + /// handle and a future that must be polled to completion to finish startup. + pub(crate) fn new( + service: N, + config: crate::Config, + on_exit: impl Future + Clone + Send + 'static, + ) -> ( + Self, + impl futures::Future + Send + 'static, + ) { + + let (validator, report_stream) = GossipValidator::new(config); + let validator = Arc::new(validator); service.register_validator(validator.clone()); - NetworkBridge { service, validator: validator } + + let (rebroadcast_job, neighbor_sender) = periodic::neighbor_packet_worker(service.clone()); + let reporting_job = report_stream.consume(service.clone()); + + let bridge = NetworkBridge { service, validator, neighbor_sender }; + + let startup_work = futures::future::lazy(move || { + // lazily spawn these jobs onto their own tasks. the lazy future has access + // to tokio globals, which aren't available outside. + tokio::spawn(rebroadcast_job.select(on_exit.clone()).then(|_| Ok(()))); + tokio::spawn(reporting_job.select(on_exit.clone()).then(|_| Ok(()))); + Ok(()) + }); + + (bridge, startup_work) } /// Get the round messages for a round in a given set ID. These are signature-checked. @@ -190,7 +253,14 @@ impl> NetworkBridge { impl Stream,Error=Error>, impl Sink,SinkError=Error>, ) { - self.validator.note_round(round, set_id, &self.service); + self.validator.note_round( + round, + set_id, + |to, neighbor| self.service.send_message( + to, + GossipMessage::::from(neighbor).encode() + ), + ); let locals = local_key.and_then(|pair| { let public = pair.public(); @@ -275,61 +345,113 @@ impl> NetworkBridge { } /// Set up the global communication streams. - pub(crate) fn global_communication(&self, + pub(crate) fn global_communication( + &self, set_id: SetId, voters: Arc>, - is_voter: bool + is_voter: bool, ) -> ( - impl Stream), Error = Error>, + impl Stream, impl FnMut(CommitProcessingOutcome)), Error = Error>, impl Sink), SinkError = Error>, ) { - self.validator.note_set(set_id, &self.service); + self.validator.note_set( + set_id, + |to, neighbor| self.service.send_message(to, GossipMessage::::from(neighbor).encode()), + ); + let service = self.service.clone(); let topic = global_topic::(set_id.0); - let incoming = self.service.messages_for(topic) - .filter_map(|notification| { - // this could be optimized by decoding piecewise. - let decoded = GossipMessage::::decode(&mut ¬ification.message[..]); - if decoded.is_none() { - trace!(target: "afg", "Skipping malformed commit message {:?}", notification); - } - decoded - }) - .filter_map(move |msg| { - match msg { - GossipMessage::Commit(msg) => { - let round = msg.round; - let precommits_signed_by: Vec = - msg.message.auth_data.iter().map(move |(_, a)| { - format!("{}", a) - }).collect(); - telemetry!(CONSENSUS_INFO; "afg.received_commit"; - "contains_precommits_signed_by" => ?precommits_signed_by, - "target_number" => ?msg.message.target_number, - "target_hash" => ?msg.message.target_hash, - ); - check_compact_commit::(msg.message, &*voters).map(move |c| (round.0, c)) - }, - _ => { - debug!(target: "afg", "Skipping unknown message type"); - return None; - } - } - }) - .map_err(|()| Error::Network(format!("Failed to receive message on unbounded stream"))); + let incoming = incoming_global(service, topic, voters, self.validator.clone()); let outgoing = CommitsOut::::new( self.service.clone(), set_id.0, is_voter, + self.validator.clone(), ); (incoming, outgoing) } +} - pub(crate) fn note_commit_finalized(&self, number: NumberFor) { - self.validator.note_commit_finalized(number, &self.service); - } +fn incoming_global>( + service: N, + topic: B::Hash, + voters: Arc>, + gossip_validator: Arc>, +) -> impl Stream, impl FnMut(CommitProcessingOutcome)), Error = Error> { + service.messages_for(topic) + .filter_map(|notification| { + // this could be optimized by decoding piecewise. + let decoded = GossipMessage::::decode(&mut ¬ification.message[..]); + if decoded.is_none() { + trace!(target: "afg", "Skipping malformed commit message {:?}", notification); + } + decoded.map(move |d| (notification, d)) + }) + .filter_map(move |(notification, msg)| { + match msg { + GossipMessage::Commit(msg) => { + let precommits_signed_by: Vec = + msg.message.auth_data.iter().map(move |(_, a)| { + format!("{}", a) + }).collect(); + telemetry!(CONSENSUS_INFO; "afg.received_commit"; + "contains_precommits_signed_by" => ?precommits_signed_by, + "target_number" => ?msg.message.target_number.clone(), + "target_hash" => ?msg.message.target_hash.clone(), + ); + if let Err(cost) = check_compact_commit::( + &msg.message, + &*voters, + msg.round, + msg.set_id, + ) { + if let Some(who) = notification.sender { + service.report(who, cost); + } + None + } else { + Some((msg, notification, service.clone())) + } + }, + _ => { + debug!(target: "afg", "Skipping unknown message type"); + return None; + } + } + }) + .map(move |(msg, mut notification, service)| { + let round = msg.round.0; + let commit = msg.message; + let finalized_number = commit.target_number; + let gossip_validator = gossip_validator.clone(); + let cb = move |outcome| match outcome { + CommitProcessingOutcome::Good => { + // if it checks out, gossip it. not accounting for + // any discrepancy between the actual ghost and the claimed + // finalized number. + gossip_validator.note_commit_finalized( + finalized_number, + |to, neighbor_msg| service.send_message( + to, + GossipMessage::::from(neighbor_msg).encode(), + ), + ); + + service.gossip_message(topic, notification.message.clone(), false); + } + CommitProcessingOutcome::Bad => { + // report peer and do not gossip. + if let Some(who) = notification.sender.take() { + service.report(who, cost::INVALID_COMMIT); + } + } + }; + + (round, commit, cb) + }) + .map_err(|()| Error::Network(format!("Failed to receive message on unbounded stream"))) } impl> Clone for NetworkBridge { @@ -337,6 +459,7 @@ impl> Clone for NetworkBridge { NetworkBridge { service: self.service.clone(), validator: Arc::clone(&self.validator), + neighbor_sender: self.neighbor_sender.clone(), } } } @@ -462,41 +585,86 @@ impl> Sink for OutgoingMessages } } +// checks a compact commit. returns `None` if it was bad and fn check_compact_commit( - msg: CompactCommit, + msg: &CompactCommit, voters: &VoterSet, -) -> Option> { - if msg.precommits.len() != msg.auth_data.len() || msg.precommits.is_empty() { - debug!(target: "afg", "Skipping malformed compact commit"); - return None; - } + round: Round, + set_id: SetId, +) -> Result<(), i32> { + // 4f + 1 = equivocations from f voters. + let f = voters.total_weight() - voters.threshold(); + let full_threshold = voters.total_weight() + f; - // check signatures on all contained precommits. + // check total weight is not too high. + let mut total_weight = 0; for (_, ref id) in &msg.auth_data { - if !voters.contains_key(id) { + if let Some(weight) = voters.info(id).map(|info| info.weight()) { + total_weight += weight; + if total_weight > full_threshold { + return Err(cost::MALFORMED_COMMIT); + } + } else { debug!(target: "afg", "Skipping commit containing unknown voter {}", id); - return None; + return Err(cost::MALFORMED_COMMIT); + } + } + + if total_weight < voters.threshold() { + return Err(cost::MALFORMED_COMMIT); + } + + // check signatures on all contained precommits. + for (i, (precommit, &(ref sig, ref id))) in msg.precommits.iter() + .zip(&msg.auth_data) + .enumerate() + { + use crate::communication::gossip::Misbehavior; + use grandpa::Message as GrandpaMessage; + + if let Err(()) = check_message_sig::( + &GrandpaMessage::Precommit(precommit.clone()), + id, + sig, + round.0, + set_id.0, + ) { + debug!(target: "afg", "Bad commit message signature {}", id); + telemetry!(CONSENSUS_DEBUG; "afg.bad_commit_msg_signature"; "id" => ?id); + let cost = Misbehavior::BadCommitMessage { + signatures_checked: i as i32, + blocks_loaded: 0, + equivocations_caught: 0, + }.cost(); + + return Err(cost); } } - Some(msg) + Ok(()) } + /// An output sink for commit messages. struct CommitsOut> { network: N, set_id: SetId, is_voter: bool, - _marker: ::std::marker::PhantomData, + gossip_validator: Arc>, } impl> CommitsOut { /// Create a new commit output stream. - pub(crate) fn new(network: N, set_id: u64, is_voter: bool) -> Self { + pub(crate) fn new( + network: N, + set_id: u64, + is_voter: bool, + gossip_validator: Arc>, + ) -> Self { CommitsOut { network, set_id: SetId(set_id), is_voter, - _marker: Default::default(), + gossip_validator, } } } @@ -534,6 +702,16 @@ impl> Sink for CommitsOut { }); let topic = global_topic::(self.set_id.0); + + // the gossip validator needs to be made aware of the best commit-height we know of + // before gosipping + self.gossip_validator.note_commit_finalized( + commit.target_number, + |to, neighbor| self.network.send_message( + to, + GossipMessage::::from(neighbor).encode(), + ), + ); self.network.gossip_message(topic, message.encode(), false); Ok(AsyncSink::Ready) diff --git a/core/finality-grandpa/src/communication/periodic.rs b/core/finality-grandpa/src/communication/periodic.rs new file mode 100644 index 0000000000..c612137042 --- /dev/null +++ b/core/finality-grandpa/src/communication/periodic.rs @@ -0,0 +1,93 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Periodic rebroadcast of neighbor packets. + +use super::{gossip::{NeighborPacket, GossipMessage}, Network}; +use futures::prelude::*; +use futures::sync::mpsc; +use runtime_primitives::traits::{NumberFor, Block as BlockT}; +use network::PeerId; +use tokio::timer::Delay; +use log::warn; +use parity_codec::Encode; + +use std::time::{Instant, Duration}; + +// how often to rebroadcast, if no other +const REBROADCAST_AFTER: Duration = Duration::from_secs(2 * 60); + +fn rebroadcast_instant() -> Instant { + Instant::now() + REBROADCAST_AFTER +} + +/// A sender used to send neighbor packets to a background job. +pub(super) type NeighborPacketSender = mpsc::UnboundedSender<(Vec, NeighborPacket>)>; + +/// Does the work of sending neighbor packets, asynchronously. +/// +/// It may rebroadcast the last neighbor packet periodically when no +/// progress is made. +pub(super) fn neighbor_packet_worker(net: N) -> ( + impl Future + Send + 'static, + NeighborPacketSender, +) where + B: BlockT, + N: Network, +{ + let mut last = None; + let (tx, mut rx) = mpsc::unbounded::<(Vec, NeighborPacket>)>(); + let mut delay = Delay::new(rebroadcast_instant()); + + let work = futures::future::poll_fn(move || { + loop { + match rx.poll().expect("unbounded receivers do not error; qed") { + Async::Ready(None) => return Ok(Async::Ready(())), + Async::Ready(Some((to, packet))) => { + // send to peers. + net.send_message(to.clone(), GossipMessage::::from(packet.clone()).encode()); + + // rebroadcasting network. + delay.reset(rebroadcast_instant()); + last = Some((to, packet)); + } + Async::NotReady => break, + } + } + + // has to be done in a loop because it needs to be polled after + // re-scheduling. + loop { + match delay.poll() { + Err(e) => { + warn!(target: "afg", "Could not rebroadcast neighbor packets: {:?}", e); + delay.reset(rebroadcast_instant()); + } + Ok(Async::Ready(())) => { + delay.reset(rebroadcast_instant()); + + if let Some((ref to, ref packet)) = last { + // send to peers. + net.send_message(to.clone(), GossipMessage::::from(packet.clone()).encode()); + } + } + Ok(Async::NotReady) => return Ok(Async::NotReady), + } + } + }); + + (work, tx) +} diff --git a/core/finality-grandpa/src/communication/tests.rs b/core/finality-grandpa/src/communication/tests.rs new file mode 100644 index 0000000000..2ef6d28064 --- /dev/null +++ b/core/finality-grandpa/src/communication/tests.rs @@ -0,0 +1,385 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Tests for the communication portion of the GRANDPA crate. + +use futures::sync::mpsc; +use futures::prelude::*; +use network::consensus_gossip as network_gossip; +use network::test::{Block, Hash}; +use network_gossip::Validator; +use tokio::runtime::current_thread; +use std::sync::Arc; +use keyring::AuthorityKeyring; +use parity_codec::Encode; + +use super::gossip::{self, GossipValidator}; +use super::{AuthorityId, VoterSet, Round, SetId}; + +enum Event { + MessagesFor(Hash, mpsc::UnboundedSender), + RegisterValidator(Arc>), + GossipMessage(Hash, Vec, bool), + SendMessage(Vec, Vec), + Report(network::PeerId, i32), + Announce(Hash), +} + +#[derive(Clone)] +struct TestNetwork { + sender: mpsc::UnboundedSender, +} + +impl super::Network for TestNetwork { + type In = mpsc::UnboundedReceiver; + + /// Get a stream of messages for a specific gossip topic. + fn messages_for(&self, topic: Hash) -> Self::In { + let (tx, rx) = mpsc::unbounded(); + let _ = self.sender.unbounded_send(Event::MessagesFor(topic, tx)); + + rx + } + + /// Register a gossip validator. + fn register_validator(&self, validator: Arc>) { + let _ = self.sender.unbounded_send(Event::RegisterValidator(validator)); + } + + /// Gossip a message out to all connected peers. + /// + /// Force causes it to be sent to all peers, even if they've seen it already. + /// Only should be used in case of consensus stall. + fn gossip_message(&self, topic: Hash, data: Vec, force: bool) { + let _ = self.sender.unbounded_send(Event::GossipMessage(topic, data, force)); + } + + /// Send a message to a bunch of specific peers, even if they've seen it already. + fn send_message(&self, who: Vec, data: Vec) { + let _ = self.sender.unbounded_send(Event::SendMessage(who, data)); + } + + /// Report a peer's cost or benefit after some action. + fn report(&self, who: network::PeerId, cost_benefit: i32) { + let _ = self.sender.unbounded_send(Event::Report(who, cost_benefit)); + } + + /// Inform peers that a block with given hash should be downloaded. + fn announce(&self, block: Hash) { + let _ = self.sender.unbounded_send(Event::Announce(block)); + } +} + +struct Tester { + net_handle: super::NetworkBridge, + gossip_validator: Arc>, + events: mpsc::UnboundedReceiver, +} + +impl Tester { + fn filter_network_events(self, mut pred: F) -> impl Future + where F: FnMut(Event) -> bool + { + let mut s = Some(self); + futures::future::poll_fn(move || loop { + match s.as_mut().unwrap().events.poll().expect("concluded early") { + Async::Ready(None) => panic!("concluded early"), + Async::Ready(Some(item)) => if pred(item) { + return Ok(Async::Ready(s.take().unwrap())) + }, + Async::NotReady => return Ok(Async::NotReady), + } + }) + } +} + +// some random config (not really needed) +fn config() -> crate::Config { + crate::Config { + gossip_duration: std::time::Duration::from_millis(10), + justification_period: 256, + local_key: None, + name: None, + } +} + +// needs to run in a tokio runtime. +fn make_test_network() -> impl Future { + let (tx, rx) = mpsc::unbounded(); + let net = TestNetwork { sender: tx }; + + #[derive(Clone)] + struct Exit; + + impl Future for Exit { + type Item = (); + type Error = (); + + fn poll(&mut self) -> Poll<(), ()> { + Ok(Async::NotReady) + } + } + + let (bridge, startup_work) = super::NetworkBridge::new( + net.clone(), + config(), + Exit, + ); + + startup_work.map(move |()| Tester { + gossip_validator: bridge.validator.clone(), + net_handle: bridge, + events: rx, + }) +} + +fn make_ids(keys: &[AuthorityKeyring]) -> Vec<(AuthorityId, u64)> { + keys.iter() + .map(|key| AuthorityId(key.to_raw_public())) + .map(|id| (id, 1)) + .collect() +} + +struct NoopContext; + +impl network_gossip::ValidatorContext for NoopContext { + fn broadcast_topic(&mut self, _: Hash, _: bool) { } + fn broadcast_message(&mut self, _: Hash, _: Vec, _: bool) { } + fn send_message(&mut self, _: &network::PeerId, _: Vec) { } + fn send_topic(&mut self, _: &network::PeerId, _: Hash, _: bool) { } +} + +#[test] +fn good_commit_leads_to_relay() { + let private = [AuthorityKeyring::Alice, AuthorityKeyring::Bob, AuthorityKeyring::Charlie]; + let public = make_ids(&private[..]); + let voter_set = Arc::new(public.iter().cloned().collect::>()); + + let round = 0; + let set_id = 1; + + let commit = { + let target_hash: Hash = [1; 32].into(); + let target_number = 500; + + let precommit = grandpa::Precommit { target_hash: target_hash.clone(), target_number }; + let payload = super::localized_payload( + round, set_id, &grandpa::Message::Precommit(precommit.clone()) + ); + + let mut precommits = Vec::new(); + let mut auth_data = Vec::new(); + + for (i, key) in private.iter().enumerate() { + precommits.push(precommit.clone()); + + let signature = key.sign(&payload[..]); + auth_data.push((signature, public[i].0.clone())) + } + + grandpa::CompactCommit { + target_hash, + target_number, + precommits, + auth_data, + } + }; + + let encoded_commit = gossip::GossipMessage::::Commit(gossip::FullCommitMessage { + round: Round(round), + set_id: SetId(set_id), + message: commit, + }).encode(); + + let id = network::PeerId::random(); + let global_topic = super::global_topic::(set_id); + + let test = make_test_network() + .and_then(move |tester| { + // register a peer. + tester.gossip_validator.new_peer(&mut NoopContext, &id, network::config::Roles::FULL); + Ok((tester, id)) + }) + .and_then(move |(tester, id)| { + // start round, dispatch commit, and wait for broadcast. + let (commits_in, _) = tester.net_handle.global_communication(SetId(1), voter_set, false); + + { + let (action, _) = tester.gossip_validator.do_validate(&id, &encoded_commit[..]); + match action { + gossip::Action::ProcessAndDiscard(t, _) => assert_eq!(t, global_topic), + _ => panic!("wrong expected outcome from initial commit validation"), + } + } + + let commit_to_send = encoded_commit.clone(); + + // asking for global communication will cause the test network + // to send us an event asking us for a stream. use it to + // send a message. + let sender_id = id.clone(); + let send_message = tester.filter_network_events(move |event| match event { + Event::MessagesFor(topic, sender) => { + if topic != global_topic { return false } + let _ = sender.unbounded_send(network_gossip::TopicNotification { + message: commit_to_send.clone(), + sender: Some(sender_id.clone()), + }); + + true + } + _ => false, + }); + + // when the commit comes in, we'll tell the callback it was good. + let handle_commit = commits_in.into_future() + .map(|(item, _)| { + let (_, _, mut callback) = item.unwrap(); + (callback)(super::CommitProcessingOutcome::Good); + }) + .map_err(|_| panic!("could not process commit")); + + // once the message is sent and commit is "handled" we should have + // a repropagation event coming from the network. + send_message.join(handle_commit).and_then(move |(tester, ())| { + tester.filter_network_events(move |event| match event { + Event::GossipMessage(topic, data, false) => { + if topic == global_topic && data == encoded_commit { + true + } else { + panic!("Trying to gossip something strange") + } + } + _ => false, + }) + }) + .map_err(|_| panic!("could not watch for gossip message")) + .map(|_| ()) + }); + + current_thread::block_on_all(test).unwrap(); +} + +#[test] +fn bad_commit_leads_to_report() { + let private = [AuthorityKeyring::Alice, AuthorityKeyring::Bob, AuthorityKeyring::Charlie]; + let public = make_ids(&private[..]); + let voter_set = Arc::new(public.iter().cloned().collect::>()); + + let round = 0; + let set_id = 1; + + let commit = { + let target_hash: Hash = [1; 32].into(); + let target_number = 500; + + let precommit = grandpa::Precommit { target_hash: target_hash.clone(), target_number }; + let payload = super::localized_payload( + round, set_id, &grandpa::Message::Precommit(precommit.clone()) + ); + + let mut precommits = Vec::new(); + let mut auth_data = Vec::new(); + + for (i, key) in private.iter().enumerate() { + precommits.push(precommit.clone()); + + let signature = key.sign(&payload[..]); + auth_data.push((signature, public[i].0.clone())) + } + + grandpa::CompactCommit { + target_hash, + target_number, + precommits, + auth_data, + } + }; + + let encoded_commit = gossip::GossipMessage::::Commit(gossip::FullCommitMessage { + round: Round(round), + set_id: SetId(set_id), + message: commit, + }).encode(); + + let id = network::PeerId::random(); + let global_topic = super::global_topic::(set_id); + + let test = make_test_network() + .and_then(move |tester| { + // register a peer. + tester.gossip_validator.new_peer(&mut NoopContext, &id, network::config::Roles::FULL); + Ok((tester, id)) + }) + .and_then(move |(tester, id)| { + // start round, dispatch commit, and wait for broadcast. + let (commits_in, _) = tester.net_handle.global_communication(SetId(1), voter_set, false); + + { + let (action, _) = tester.gossip_validator.do_validate(&id, &encoded_commit[..]); + match action { + gossip::Action::ProcessAndDiscard(t, _) => assert_eq!(t, global_topic), + _ => panic!("wrong expected outcome from initial commit validation"), + } + } + + let commit_to_send = encoded_commit.clone(); + + // asking for global communication will cause the test network + // to send us an event asking us for a stream. use it to + // send a message. + let sender_id = id.clone(); + let send_message = tester.filter_network_events(move |event| match event { + Event::MessagesFor(topic, sender) => { + if topic != global_topic { return false } + let _ = sender.unbounded_send(network_gossip::TopicNotification { + message: commit_to_send.clone(), + sender: Some(sender_id.clone()), + }); + + true + } + _ => false, + }); + + // when the commit comes in, we'll tell the callback it was good. + let handle_commit = commits_in.into_future() + .map(|(item, _)| { + let (_, _, mut callback) = item.unwrap(); + (callback)(super::CommitProcessingOutcome::Bad); + }) + .map_err(|_| panic!("could not process commit")); + + // once the message is sent and commit is "handled" we should have + // a report event coming from the network. + send_message.join(handle_commit).and_then(move |(tester, ())| { + tester.filter_network_events(move |event| match event { + Event::Report(who, cost_benefit) => { + if who == id && cost_benefit == super::cost::INVALID_COMMIT { + true + } else { + panic!("reported unknown peer or unexpected cost"); + } + } + _ => false, + }) + }) + .map_err(|_| panic!("could not watch for peer report")) + .map(|_| ()) + }); + + current_thread::block_on_all(test).unwrap(); +} diff --git a/core/finality-grandpa/src/environment.rs b/core/finality-grandpa/src/environment.rs index 5e099a92c2..387673dea3 100644 --- a/core/finality-grandpa/src/environment.rs +++ b/core/finality-grandpa/src/environment.rs @@ -642,7 +642,7 @@ impl, N, RA> voter::Environment, N, RA> voter::Environment Self::Timer { diff --git a/core/finality-grandpa/src/lib.rs b/core/finality-grandpa/src/lib.rs index 83db670ac7..56b66e7026 100644 --- a/core/finality-grandpa/src/lib.rs +++ b/core/finality-grandpa/src/lib.rs @@ -337,42 +337,7 @@ pub fn block_import, RA, PRA>( )) } -fn global_communication, I, O>( - commits_in: I, - commits_out: O, -) -> ( - impl Stream< - Item = voter::CommunicationIn, AuthoritySignature, AuthorityId>, - Error = CommandOrError>, - >, - impl Sink< - SinkItem = voter::CommunicationOut, AuthoritySignature, AuthorityId>, - SinkError = CommandOrError>, - >, -) where - I: Stream< - Item = (u64, ::grandpa::CompactCommit, AuthoritySignature, AuthorityId>), - Error = CommandOrError>, - >, - O: Sink< - SinkItem = (u64, ::grandpa::Commit, AuthoritySignature, AuthorityId>), - SinkError = CommandOrError>, - >, -{ - let global_in = commits_in.map(|(round, commit)| { - voter::CommunicationIn::Commit(round, commit, voter::Callback::Blank) - }); - - // NOTE: eventually this will also handle catch-up requests - let global_out = commits_out.with(|global| match global { - voter::CommunicationOut::Commit(round, commit) => Ok((round, commit)), - _ => unimplemented!(), - }); - - (global_in, global_out) -} - -fn committer_communication, B, E, N, RA>( +fn global_communication, B, E, N, RA>( local_key: Option<&Arc>, set_id: u64, voters: &Arc>, @@ -380,11 +345,11 @@ fn committer_communication, B, E, N, RA>( network: &NetworkBridge, ) -> ( impl Stream< - Item = (u64, ::grandpa::CompactCommit, AuthoritySignature, AuthorityId>), + Item = voter::CommunicationIn, AuthoritySignature, AuthorityId>, Error = CommandOrError>, >, impl Sink< - SinkItem = (u64, ::grandpa::Commit, AuthoritySignature, AuthorityId>), + SinkItem = voter::CommunicationOut, AuthoritySignature, AuthorityId>, SinkError = CommandOrError>, >, ) where @@ -395,6 +360,7 @@ fn committer_communication, B, E, N, RA>( NumberFor: BlockNumberOps, DigestItemFor: DigestItem, { + let is_voter = local_key .map(|pair| voters.contains_key(&pair.public().into())) .unwrap_or(false); @@ -413,10 +379,26 @@ fn committer_communication, B, E, N, RA>( commit_in, ); - let commit_in = commit_in.map_err(Into::into); - let commit_out = commit_out.sink_map_err(Into::into); + let commits_in = commit_in.map_err(CommandOrError::from); + let commits_out = commit_out.sink_map_err(CommandOrError::from); + + let global_in = commits_in.map(|(round, commit, mut callback)| { + let callback = voter::Callback::Work(Box::new(move |outcome| match outcome { + voter::CommitProcessingOutcome::Good(_) => + callback(communication::CommitProcessingOutcome::Good), + voter::CommitProcessingOutcome::Bad(_) => + callback(communication::CommitProcessingOutcome::Bad), + })); + voter::CommunicationIn::Commit(round, commit, callback) + }); + + // NOTE: eventually this will also handle catch-up requests + let global_out = commits_out.with(|global| match global { + voter::CommunicationOut::Commit(round, commit) => Ok((round, commit)), + _ => unimplemented!(), + }); - (commit_in, commit_out) + (global_in, global_out) } /// Register the finality tracker inherent data provider (which is used by @@ -456,7 +438,7 @@ pub fn run_grandpa, N, RA>( link: LinkHalf, network: N, inherent_data_providers: InherentDataProviders, - on_exit: impl Future + Send + 'static, + on_exit: impl Future + Clone + Send + 'static, ) -> ::client::error::Result + Send + 'static> where Block::Hash: Ord, B: Backend + 'static, @@ -470,7 +452,7 @@ pub fn run_grandpa, N, RA>( { use futures::future::{self, Loop as FutureLoop}; - let network = NetworkBridge::new(network, config.clone()); + let (network, network_startup) = NetworkBridge::new(network, config.clone(), on_exit.clone()); let LinkHalf { client, @@ -538,7 +520,7 @@ pub fn run_grandpa, N, RA>( chain_info.chain.finalized_number, ); - let (commit_in, commit_out) = committer_communication( + let global_comms = global_communication( config.local_key.as_ref(), env.set_id, &env.voters, @@ -546,11 +528,6 @@ pub fn run_grandpa, N, RA>( &network, ); - let global_comms = global_communication::( - commit_in, - commit_out, - ); - let voters = (*env.voters).clone(); let last_completed_round = completed_rounds.last(); @@ -675,5 +652,7 @@ pub fn run_grandpa, N, RA>( telemetry!(CONSENSUS_WARN; "afg.voter_failed"; "e" => ?e); }); + let voter_work = network_startup.and_then(move |()| voter_work); + Ok(voter_work.select(on_exit).then(|_| Ok(()))) } diff --git a/core/finality-grandpa/src/tests.rs b/core/finality-grandpa/src/tests.rs index eea03a34a2..55c0d57f3a 100644 --- a/core/finality-grandpa/src/tests.rs +++ b/core/finality-grandpa/src/tests.rs @@ -204,11 +204,27 @@ impl Network for MessageRouting { }) } + fn report(&self, _who: network::PeerId, _cost_benefit: i32) { + + } + fn announce(&self, _block: Hash) { } } +#[derive(Clone)] +struct Exit; + +impl Future for Exit { + type Item = (); + type Error = (); + + fn poll(&mut self) -> Poll<(), ()> { + Ok(Async::NotReady) + } +} + #[derive(Default, Clone)] struct TestApi { genesis_authorities: Vec<(AuthorityId, u64)>, @@ -402,7 +418,7 @@ fn run_to_completion_with( link, MessageRouting::new(net.clone(), peer_id), InherentDataProviders::new(), - futures::empty(), + Exit, ).expect("all in order with client and network"); assert_send(&voter); @@ -503,7 +519,7 @@ fn finalize_3_voters_1_observer() { link, MessageRouting::new(net.clone(), peer_id), InherentDataProviders::new(), - futures::empty(), + Exit, ).expect("all in order with client and network"); runtime.spawn(voter); @@ -665,7 +681,7 @@ fn transition_3_voters_twice_1_observer() { link, MessageRouting::new(net.clone(), peer_id), InherentDataProviders::new(), - futures::empty(), + Exit, ).expect("all in order with client and network"); runtime.spawn(voter); @@ -1065,7 +1081,7 @@ fn voter_persists_its_votes() { link, MessageRouting::new(net.clone(), 0), InherentDataProviders::new(), - futures::empty(), + Exit, ).expect("all in order with client and network"); let voter = future::poll_fn(move || { @@ -1112,7 +1128,8 @@ fn voter_persists_its_votes() { name: Some(format!("peer#{}", 1)), }; let routing = MessageRouting::new(net.clone(), 1); - let network = communication::NetworkBridge::new(routing, config.clone()); + let (network, routing_work) = communication::NetworkBridge::new(routing, config.clone(), Exit); + runtime.block_on(routing_work).unwrap(); let (round_rx, round_tx) = network.round_communication( communication::Round(1), diff --git a/core/finality-grandpa/src/until_imported.rs b/core/finality-grandpa/src/until_imported.rs index 4b867c18c8..2efb827d37 100644 --- a/core/finality-grandpa/src/until_imported.rs +++ b/core/finality-grandpa/src/until_imported.rs @@ -258,13 +258,13 @@ pub(crate) type UntilVoteTargetImported = UntilImported { - inner: Arc<(AtomicUsize, Mutex)>>)>, +pub(crate) struct BlockCommitMessage { + inner: Arc<(AtomicUsize, Mutex, U)>>)>, target_number: NumberFor, } -impl BlockUntilImported for BlockCommitMessage { - type Blocked = (u64, CompactCommit); +impl BlockUntilImported for BlockCommitMessage { + type Blocked = (u64, CompactCommit, U); fn schedule_wait( input: Self::Blocked, @@ -400,11 +400,11 @@ impl BlockUntilImported for BlockCommitMessage { /// A stream which gates off incoming commit messages until all referenced /// block hashes have been imported. -pub(crate) type UntilCommitBlocksImported = UntilImported< +pub(crate) type UntilCommitBlocksImported = UntilImported< Block, Status, I, - BlockCommitMessage, + BlockCommitMessage, >; #[cfg(test)] @@ -507,7 +507,7 @@ mod tests { commit_rx.map_err(|_| panic!("should never error")), ); - commit_tx.unbounded_send((0, unknown_commit.clone())).unwrap(); + commit_tx.unbounded_send((0, unknown_commit.clone(), ())).unwrap(); let inner_chain_state = chain_state.clone(); let work = until_imported @@ -527,7 +527,7 @@ mod tests { }); let mut runtime = Runtime::new().unwrap(); - assert_eq!(runtime.block_on(work).map_err(|(e, _)| e).unwrap().0, Some((0, unknown_commit))); + assert_eq!(runtime.block_on(work).map_err(|(e, _)| e).unwrap().0, Some((0, unknown_commit, ()))); } #[test] @@ -567,11 +567,11 @@ mod tests { commit_rx.map_err(|_| panic!("should never error")), ); - commit_tx.unbounded_send((0, known_commit.clone())).unwrap(); + commit_tx.unbounded_send((0, known_commit.clone(), ())).unwrap(); let work = until_imported.into_future(); let mut runtime = Runtime::new().unwrap(); - assert_eq!(runtime.block_on(work).map_err(|(e, _)| e).unwrap().0, Some((0, known_commit))); + assert_eq!(runtime.block_on(work).map_err(|(e, _)| e).unwrap().0, Some((0, known_commit, ()))); } } diff --git a/core/network/src/lib.rs b/core/network/src/lib.rs index 0200494517..f07013004f 100644 --- a/core/network/src/lib.rs +++ b/core/network/src/lib.rs @@ -38,7 +38,10 @@ pub mod specialization; pub mod test; pub use chain::Client as ClientHandle; -pub use service::{Service, FetchFuture, TransactionPool, ManageNetwork, NetworkMsg, SyncProvider, ExHashT}; +pub use service::{ + Service, FetchFuture, TransactionPool, ManageNetwork, NetworkMsg, + SyncProvider, ExHashT, ReportHandle, +}; pub use protocol::{ProtocolStatus, PeerInfo, Context}; pub use sync::{Status as SyncStatus, SyncState}; pub use network_libp2p::{ diff --git a/core/network/src/service.rs b/core/network/src/service.rs index 10367123db..d7d2da494c 100644 --- a/core/network/src/service.rs +++ b/core/network/src/service.rs @@ -45,7 +45,6 @@ pub use network_libp2p::PeerId; /// Type that represents fetch completion future. pub type FetchFuture = oneshot::Receiver>; - /// Sync status pub trait SyncProvider: Send + Sync { /// Get a stream of sync statuses. @@ -129,6 +128,20 @@ impl> Link for NetworkLink { } } +/// A cloneable handle for reporting cost/benefits of peers. +#[derive(Clone)] +pub struct ReportHandle { + inner: PeersetHandle, // wraps it so we don't have to worry about breaking API. +} + +impl ReportHandle { + /// Report a given peer as either beneficial (+) or costly (-) according to the + /// given scalar. + pub fn report_peer(&self, who: PeerId, cost_benefit: i32) { + self.inner.report_peer(who, cost_benefit); + } +} + /// Substrate network service. Handles network IO and manages connectivity. pub struct Service> { /// Sinks to propagate status updates. @@ -268,6 +281,17 @@ impl> Service { )); } + /// Return a cloneable handle for reporting peers' benefits or misbehavior. + pub fn report_handle(&self) -> ReportHandle { + ReportHandle { inner: self.peerset.clone() } + } + + /// Report a given peer as either beneficial (+) or costly (-) according to the + /// given scalar. + pub fn report_peer(&self, who: PeerId, cost_benefit: i32) { + self.peerset.report_peer(who, cost_benefit); + } + /// Execute a closure with the chain-specific network specialization. pub fn with_spec(&self, f: F) where F: FnOnce(&mut S, &mut Context) + Send + 'static -- GitLab From b51f8f2a9d420ad3b507d57f4f4a56e33b2d8ead Mon Sep 17 00:00:00 2001 From: cheme Date: Tue, 16 Apr 2019 09:28:53 +0200 Subject: [PATCH 014/206] Fix for miscalculation of storage root (#2285) --- core/sr-io/without_std.rs | 2 +- core/state-machine/src/ext.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/sr-io/without_std.rs b/core/sr-io/without_std.rs index e4e32bd17d..08b1a3c70a 100644 --- a/core/sr-io/without_std.rs +++ b/core/sr-io/without_std.rs @@ -367,7 +367,7 @@ pub fn set_storage(key: &[u8], value: &[u8]) { pub fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { unsafe { ext_set_child_storage.get()( - storage_key.as_ptr(), key.len() as u32, + storage_key.as_ptr(), storage_key.len() as u32, key.as_ptr(), key.len() as u32, value.as_ptr(), value.len() as u32 ); diff --git a/core/state-machine/src/ext.rs b/core/state-machine/src/ext.rs index 63a5c39fef..a9411f26ad 100644 --- a/core/state-machine/src/ext.rs +++ b/core/state-machine/src/ext.rs @@ -297,7 +297,8 @@ where } let mut transaction = B::Transaction::default(); - let child_storage_keys: Vec<_> = self.overlay.prospective.children.keys().cloned().collect(); + let child_storage_keys: std::collections::BTreeSet<_> = self.overlay.prospective.children.keys().cloned() + .chain(self.overlay.committed.children.keys().cloned()).collect(); for key in child_storage_keys { let (_, t) = self.child_storage_root_transaction(&key); -- GitLab From 36f5aa55209d2e15dc8ca41e57b6439e366da4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 16 Apr 2019 12:57:51 +0200 Subject: [PATCH 015/206] Disable CORS when running in --dev (#2291) * Disable cors in dev mode, * Whitelist substrate-ui. * Fix build. * Update docs. --- core/cli/src/lib.rs | 17 ++++++++++++----- core/cli/src/params.rs | 3 ++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/core/cli/src/lib.rs b/core/cli/src/lib.rs index 40eb15296e..31a2427669 100644 --- a/core/cli/src/lib.rs +++ b/core/cli/src/lib.rs @@ -475,11 +475,18 @@ where config.rpc_ws = Some( parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)? ); - config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| Some(vec![ - "http://localhost:*".into(), - "https://localhost:*".into(), - "https://polkadot.js.org".into() - ])); + let is_dev = cli.shared_params.dev; + config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| if is_dev { + log::warn!("Running in --dev mode, RPC CORS has been disabled."); + None + } else { + Some(vec![ + "http://localhost:*".into(), + "https://localhost:*".into(), + "https://polkadot.js.org".into(), + "https://substrate-ui.parity.io".into(), + ]) + }); // Override telemetry if cli.no_telemetry { diff --git a/core/cli/src/params.rs b/core/cli/src/params.rs index 934fb15889..0c4f0bfd64 100644 --- a/core/cli/src/params.rs +++ b/core/cli/src/params.rs @@ -332,7 +332,8 @@ pub struct RunCmd { /// Specify browser Origins allowed to access the HTTP & WS RPC servers. /// It's a comma-separated list of origins (protocol://domain or special `null` value). /// Value of `all` will disable origin validation. - /// Default is to allow localhost and https://polkadot.js.org origin. + /// Default is to allow localhost, https://polkadot.js.org and https://substrate-ui.parity.io origins. + /// When running in --dev mode the default is to allow all origins. #[structopt(long = "rpc-cors", value_name = "ORIGINS", parse(try_from_str = "parse_cors"))] pub rpc_cors: Option>>, -- GitLab From 89f951f4bff3755d02201c63e08a7d0a05a1b721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 16 Apr 2019 13:17:02 +0200 Subject: [PATCH 016/206] Add `StorageValue::append` and speed-up `deposit_event` (#2282) * Adds deposit event benchmark * Add `StorageValue::append` `StorageValue::append` can be used by types that implement `EncodeAppend` to speed-up situations where you just want to append an item to storage without wanting to decode all previous items. * Stay at 100 events * Fixes compilation * Use correct year and increase spec version --- Cargo.lock | 129 +++++++------- core/executor/wasm/Cargo.lock | 26 +-- core/sr-io/Cargo.toml | 2 +- core/test-runtime/wasm/Cargo.lock | 124 +++++++------- node-template/runtime/wasm/Cargo.lock | 140 ++++++++-------- node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 158 +++++++++--------- srml/support/Cargo.toml | 2 +- srml/support/src/storage/generator.rs | 36 ++++ srml/support/src/storage/mod.rs | 33 +++- .../support/src/storage/unhashed/generator.rs | 14 ++ srml/system/Cargo.toml | 9 +- srml/system/benches/bench.rs | 99 +++++++++++ srml/system/src/lib.rs | 58 ++++--- 14 files changed, 513 insertions(+), 319 deletions(-) create mode 100644 srml/system/benches/bench.rs diff --git a/Cargo.lock b/Cargo.lock index 0425fa82d4..3577200e06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -807,7 +807,7 @@ dependencies = [ "hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -847,7 +847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "fork-tree" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1127,7 +1127,7 @@ name = "impl-codec" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1920,7 +1920,7 @@ dependencies = [ "node-executor 1.0.0", "node-primitives 1.0.0", "node-runtime 1.0.0", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1946,7 +1946,7 @@ version = "1.0.0" dependencies = [ "node-primitives 1.0.0", "node-runtime 1.0.0", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "srml-balances 1.0.0", @@ -1973,7 +1973,7 @@ dependencies = [ name = "node-primitives" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1990,7 +1990,7 @@ dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2033,7 +2033,7 @@ dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "substrate-basic-authorship 1.0.0", @@ -2055,7 +2055,7 @@ dependencies = [ name = "node-template-runtime" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2202,7 +2202,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7 [[package]] name = "parity-codec" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2715,7 +2715,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3070,7 +3070,7 @@ dependencies = [ "environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -3086,7 +3086,7 @@ dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3100,7 +3100,7 @@ name = "sr-sandbox" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -3120,7 +3120,7 @@ name = "sr-version" version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -3132,7 +3132,7 @@ name = "srml-assets" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3148,7 +3148,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3169,7 +3169,7 @@ name = "srml-balances" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3186,7 +3186,7 @@ name = "srml-consensus" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3204,7 +3204,7 @@ version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3227,7 +3227,7 @@ name = "srml-council" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3245,7 +3245,7 @@ name = "srml-democracy" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3263,7 +3263,7 @@ name = "srml-example" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3278,7 +3278,7 @@ name = "srml-executive" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3296,7 +3296,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3313,7 +3313,7 @@ dependencies = [ name = "srml-grandpa" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3333,7 +3333,7 @@ name = "srml-indices" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3350,7 +3350,7 @@ dependencies = [ name = "srml-metadata" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", @@ -3363,7 +3363,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3381,7 +3381,7 @@ name = "srml-staking" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3402,7 +3402,7 @@ name = "srml-sudo" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3420,7 +3420,7 @@ dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3468,7 +3468,7 @@ dependencies = [ name = "srml-support-test" version = "0.1.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3481,8 +3481,9 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ + "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3498,7 +3499,7 @@ name = "srml-timestamp" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3514,7 +3515,7 @@ name = "srml-treasury" version = "1.0.0" dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3669,7 +3670,7 @@ name = "substrate-basic-authorship" version = "1.0.0" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", "substrate-consensus-aura-primitives 1.0.0", @@ -3739,7 +3740,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "sr-primitives 1.0.0", @@ -3767,7 +3768,7 @@ dependencies = [ "kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", @@ -3789,7 +3790,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -3825,7 +3826,7 @@ dependencies = [ name = "substrate-consensus-authorities" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3843,7 +3844,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.1 (git+https://github.com/paritytech/schnorrkel)", @@ -3872,7 +3873,7 @@ dependencies = [ name = "substrate-consensus-babe-primitives" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", "substrate-consensus-slots 1.0.0", @@ -3887,7 +3888,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", "substrate-inherents 1.0.0", @@ -3904,7 +3905,7 @@ dependencies = [ "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3928,7 +3929,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", @@ -3949,7 +3950,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3974,7 +3975,7 @@ dependencies = [ "fork-tree 1.0.0", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -3996,7 +3997,7 @@ dependencies = [ name = "substrate-finality-grandpa-primitives" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-client 1.0.0", @@ -4007,7 +4008,7 @@ dependencies = [ name = "substrate-inherents" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -4054,7 +4055,7 @@ dependencies = [ "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4103,7 +4104,7 @@ dependencies = [ "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", "substrate-consensus-common 1.0.0", @@ -4156,7 +4157,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4188,7 +4189,7 @@ dependencies = [ "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4239,7 +4240,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4288,7 +4289,7 @@ version = "1.0.0" dependencies = [ "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", ] @@ -4301,7 +4302,7 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 1.0.0", "substrate-primitives 1.0.0", @@ -4332,7 +4333,7 @@ name = "substrate-test-client" version = "1.0.0" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", "substrate-client-db 1.0.0", @@ -4352,7 +4353,7 @@ dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -4383,7 +4384,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4399,7 +4400,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-client 1.0.0", @@ -4418,7 +4419,7 @@ dependencies = [ "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", "trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4808,7 +4809,7 @@ dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5403,7 +5404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" -"checksum parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2edd80cdaf3b9c7b7f524299586bb4eae43cc5eb20c7b41aa0cd741200000e38" +"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b9db194dfbcfe3b398d63d765437a5c7232d59906e203055f0e993f6458ff1" "checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" diff --git a/core/executor/wasm/Cargo.lock b/core/executor/wasm/Cargo.lock index dcde35579c..23841381ed 100644 --- a/core/executor/wasm/Cargo.lock +++ b/core/executor/wasm/Cargo.lock @@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.2.6" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -44,7 +44,7 @@ name = "impl-codec" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-codec 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -54,16 +54,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "parity-codec" -version = "3.3.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec-derive 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-codec-derive" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -151,7 +151,7 @@ name = "sr-io" version = "1.0.0" dependencies = [ "hash-db 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -161,7 +161,7 @@ dependencies = [ name = "sr-sandbox" version = "1.0.0" dependencies = [ - "parity-codec 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -183,10 +183,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "substrate-primitives" version = "1.0.0" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", @@ -215,7 +215,7 @@ name = "uint" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -227,15 +227,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" +"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a557e80084b05c32b455963ff565a9de6f2866da023d6671705c6aff6f65e01c" "checksum hash-db 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07463834729d0ce8d475e7dd6d302e407093ad9a9c02d77eb07fb74b5373829d" "checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum parity-codec 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0333b2a2973e75c3b4a9bc2a7b28dceacb56e3949907b4ce113ff3a53bcc6713" -"checksum parity-codec-derive 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be90eb3f1b4c02a478ccee3e0e64e5152692e7871c7258d2aa8e356359325aa7" +"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" +"checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edb92f1ebfc177432c03287b15d48c202e6e2c95993a7af3ba039abb43b1492e" "checksum proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c6cf4e5b00300d151dfffae39f529dfa5188f42eeb14201229aa420d6aad10c" "checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" diff --git a/core/sr-io/Cargo.toml b/core/sr-io/Cargo.toml index a4c4778561..68da47893f 100644 --- a/core/sr-io/Cargo.toml +++ b/core/sr-io/Cargo.toml @@ -34,4 +34,4 @@ std = [ ] nightly = [] strict = [] -wasm-nice-panic-message = [] +wasm-nice-panic-message = [] \ No newline at end of file diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index bcc431c828..b2b652afcb 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -78,8 +78,8 @@ name = "asn1_der_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -441,9 +441,9 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -529,8 +529,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -734,7 +734,7 @@ name = "impl-codec" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -877,8 +877,8 @@ name = "libp2p-core-derive" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1360,7 +1360,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7 [[package]] name = "parity-codec" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1375,8 +1375,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1492,8 +1492,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1549,8 +1549,8 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1583,7 +1583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1899,8 +1899,8 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2028,8 +2028,8 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2039,7 +2039,7 @@ dependencies = [ "environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2055,7 +2055,7 @@ dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2075,7 +2075,7 @@ name = "sr-version" version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2086,7 +2086,7 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -2099,7 +2099,7 @@ dependencies = [ name = "srml-metadata" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", @@ -2113,7 +2113,7 @@ dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2130,10 +2130,10 @@ name = "srml-support-procedural" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2142,9 +2142,9 @@ version = "1.0.0" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2152,8 +2152,8 @@ name = "srml-support-procedural-tools-derive" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2161,7 +2161,7 @@ name = "srml-system" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2205,10 +2205,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2218,12 +2218,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2251,8 +2251,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2278,7 +2278,7 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "sr-primitives 1.0.0", @@ -2306,7 +2306,7 @@ dependencies = [ name = "substrate-consensus-authorities" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2325,7 +2325,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", "substrate-inherents 1.0.0", @@ -2342,7 +2342,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2361,7 +2361,7 @@ dependencies = [ name = "substrate-inherents" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2406,7 +2406,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2418,8 +2418,8 @@ dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", - "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2440,7 +2440,7 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 1.0.0", "substrate-primitives 1.0.0", @@ -2474,7 +2474,7 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2507,7 +2507,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2525,11 +2525,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.29" +version = "0.15.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2539,8 +2539,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2569,7 +2569,7 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2820,7 +2820,7 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3156,7 +3156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" -"checksum parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2edd80cdaf3b9c7b7f524299586bb4eae43cc5eb20c7b41aa0cd741200000e38" +"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" @@ -3181,7 +3181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24d5d73d2b88fddb8b8141f2730d950d88772c940ac4f8f3e93230b9a99d92df" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" @@ -3242,12 +3242,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2" +"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1415431cb2398d84da64173f8473c792808314427d4a6f2f3ea85ae67239fe3" +"checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" "checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" @@ -3268,7 +3268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -"checksum twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "555cd4909480122bbbf21e34faac4cb08a171f324775670447ed116726c474af" +"checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index a427ab7690..ce2c4cf9a2 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -78,8 +78,8 @@ name = "asn1_der_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -441,9 +441,9 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -529,8 +529,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -734,7 +734,7 @@ name = "impl-codec" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -877,8 +877,8 @@ name = "libp2p-core-derive" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1272,7 +1272,7 @@ dependencies = [ name = "node-template-runtime" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1395,7 +1395,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7 [[package]] name = "parity-codec" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1410,8 +1410,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1527,8 +1527,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1584,8 +1584,8 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1618,7 +1618,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1934,8 +1934,8 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2063,8 +2063,8 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2074,7 +2074,7 @@ dependencies = [ "environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2090,7 +2090,7 @@ dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2110,7 +2110,7 @@ name = "sr-version" version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2122,7 +2122,7 @@ name = "srml-aura" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2139,7 +2139,7 @@ name = "srml-balances" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2154,7 +2154,7 @@ name = "srml-consensus" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2169,7 +2169,7 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -2183,7 +2183,7 @@ name = "srml-indices" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2199,7 +2199,7 @@ dependencies = [ name = "srml-metadata" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", @@ -2211,7 +2211,7 @@ name = "srml-session" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2227,7 +2227,7 @@ name = "srml-staking" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2245,7 +2245,7 @@ name = "srml-sudo" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2261,7 +2261,7 @@ dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2278,10 +2278,10 @@ name = "srml-support-procedural" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2290,9 +2290,9 @@ version = "1.0.0" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2300,8 +2300,8 @@ name = "srml-support-procedural-tools-derive" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2309,7 +2309,7 @@ name = "srml-system" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2325,7 +2325,7 @@ name = "srml-timestamp" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2367,10 +2367,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2380,12 +2380,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2413,8 +2413,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2440,7 +2440,7 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "sr-primitives 1.0.0", @@ -2468,7 +2468,7 @@ dependencies = [ name = "substrate-consensus-authorities" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2487,7 +2487,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", "substrate-inherents 1.0.0", @@ -2504,7 +2504,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2523,7 +2523,7 @@ dependencies = [ name = "substrate-inherents" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2568,7 +2568,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2580,8 +2580,8 @@ dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", - "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2602,7 +2602,7 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 1.0.0", "substrate-primitives 1.0.0", @@ -2634,7 +2634,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2652,11 +2652,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.29" +version = "0.15.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2666,8 +2666,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2696,7 +2696,7 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3283,7 +3283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" -"checksum parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2edd80cdaf3b9c7b7f524299586bb4eae43cc5eb20c7b41aa0cd741200000e38" +"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" @@ -3308,7 +3308,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24d5d73d2b88fddb8b8141f2730d950d88772c940ac4f8f3e93230b9a99d92df" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" @@ -3369,12 +3369,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2" +"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1415431cb2398d84da64173f8473c792808314427d4a6f2f3ea85ae67239fe3" +"checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" "checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" @@ -3395,7 +3395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -"checksum twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "555cd4909480122bbbf21e34faac4cb08a171f324775670447ed116726c474af" +"checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 1f5c76ef11..4c019c03c9 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -60,7 +60,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 62, - impl_version: 62, + impl_version: 63, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index f525b16073..af45815777 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -78,8 +78,8 @@ name = "asn1_der_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -441,9 +441,9 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -529,8 +529,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -734,7 +734,7 @@ name = "impl-codec" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -877,8 +877,8 @@ name = "libp2p-core-derive" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1272,7 +1272,7 @@ dependencies = [ name = "node-primitives" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -1287,7 +1287,7 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1418,7 +1418,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7 [[package]] name = "parity-codec" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1433,8 +1433,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1550,8 +1550,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1607,8 +1607,8 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1651,7 +1651,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1967,8 +1967,8 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2096,8 +2096,8 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2107,7 +2107,7 @@ dependencies = [ "environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2123,7 +2123,7 @@ dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2135,7 +2135,7 @@ dependencies = [ name = "sr-sandbox" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2154,7 +2154,7 @@ name = "sr-version" version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2166,7 +2166,7 @@ name = "srml-aura" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2183,7 +2183,7 @@ name = "srml-balances" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2198,7 +2198,7 @@ name = "srml-consensus" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2213,7 +2213,7 @@ dependencies = [ name = "srml-contract" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2232,7 +2232,7 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2249,7 +2249,7 @@ name = "srml-democracy" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2264,7 +2264,7 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -2278,7 +2278,7 @@ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2292,7 +2292,7 @@ dependencies = [ name = "srml-grandpa" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2311,7 +2311,7 @@ name = "srml-indices" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2327,7 +2327,7 @@ dependencies = [ name = "srml-metadata" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", @@ -2339,7 +2339,7 @@ name = "srml-session" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2355,7 +2355,7 @@ name = "srml-staking" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -2373,7 +2373,7 @@ name = "srml-sudo" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2389,7 +2389,7 @@ dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2406,10 +2406,10 @@ name = "srml-support-procedural" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2418,9 +2418,9 @@ version = "1.0.0" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2428,8 +2428,8 @@ name = "srml-support-procedural-tools-derive" version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2437,7 +2437,7 @@ name = "srml-system" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2453,7 +2453,7 @@ name = "srml-timestamp" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2467,7 +2467,7 @@ name = "srml-treasury" version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2510,10 +2510,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2523,12 +2523,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2556,8 +2556,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2583,7 +2583,7 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "sr-primitives 1.0.0", @@ -2611,7 +2611,7 @@ dependencies = [ name = "substrate-consensus-authorities" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2630,7 +2630,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", "substrate-inherents 1.0.0", @@ -2647,7 +2647,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2666,7 +2666,7 @@ dependencies = [ name = "substrate-finality-grandpa-primitives" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-client 1.0.0", @@ -2677,7 +2677,7 @@ dependencies = [ name = "substrate-inherents" version = "1.0.0" dependencies = [ - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2722,7 +2722,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2734,8 +2734,8 @@ dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", - "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2756,7 +2756,7 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 1.0.0", "substrate-primitives 1.0.0", @@ -2788,7 +2788,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2806,11 +2806,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.29" +version = "0.15.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2820,8 +2820,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2850,7 +2850,7 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3101,7 +3101,7 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3437,7 +3437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" -"checksum parity-codec 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2edd80cdaf3b9c7b7f524299586bb4eae43cc5eb20c7b41aa0cd741200000e38" +"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" @@ -3463,7 +3463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "efb0dcbddbb600f47a7098d33762a00552c671992171637f5bb310b37fe1f0e4" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" @@ -3524,12 +3524,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2" +"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1415431cb2398d84da64173f8473c792808314427d4a6f2f3ea85ae67239fe3" +"checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" "checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" @@ -3550,7 +3550,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -"checksum twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "555cd4909480122bbbf21e34faac4cb08a171f324775670447ed116726c474af" +"checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index 06fc3633ff..8b74b564ba 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } -parity-codec = { version = "3.4", default-features = false, features = ["derive"] } +parity-codec = { version = "3.5.1", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } sr-std = { path = "../../core/sr-std", default-features = false } runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } diff --git a/srml/support/src/storage/generator.rs b/srml/support/src/storage/generator.rs index 97bfc6dc20..3d57d200e2 100644 --- a/srml/support/src/storage/generator.rs +++ b/srml/support/src/storage/generator.rs @@ -97,6 +97,12 @@ pub trait Storage { /// Take a value from storage, deleting it after reading. fn take_or_default(&self, key: &[u8]) -> T { self.take(key).unwrap_or_default() } + + /// Get a Vec of bytes from storage. + fn get_raw(&self, key: &[u8]) -> Option>; + + /// Put a raw byte slice into storage. + fn put_raw(&self, key: &[u8], value: &[u8]); } // We use a construct like this during when genesis storage is being built. @@ -117,6 +123,14 @@ impl Storage for (crate::rstd::cell::RefCell<&mu fn kill(&self, key: &[u8]) { UnhashedStorage::kill(self, &S::hash(key)) } + + fn get_raw(&self, key: &[u8]) -> Option> { + UnhashedStorage::get_raw(self, key) + } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + UnhashedStorage::put_raw(self, key, value) + } } /// A strongly-typed value kept in storage. @@ -150,6 +164,20 @@ pub trait StorageValue { fn kill(storage: &S) { storage.kill(Self::key()) } + + /// Append the given items to the value in the storage. + /// + /// `T` is required to implement `codec::EncodeAppend`. + fn append( + items: &[I], storage: &S + ) -> Result<(), &'static str> where T: codec::EncodeAppend { + let new_val = ::append( + storage.get_raw(Self::key()).unwrap_or_default(), + items, + ).ok_or_else(|| "Could not append given item")?; + storage.put_raw(Self::key(), &new_val); + Ok(()) + } } /// A strongly-typed list in storage. @@ -576,6 +604,14 @@ mod tests { fn kill(&self, key: &[u8]) { self.borrow_mut().remove(key); } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + self.borrow_mut().insert(key.to_owned(), value.to_owned()); + } + + fn get_raw(&self, key: &[u8]) -> Option> { + self.borrow().get(key).cloned() + } } storage_items! { diff --git a/srml/support/src/storage/mod.rs b/srml/support/src/storage/mod.rs index b1b8766b90..74b55673e7 100644 --- a/srml/support/src/storage/mod.rs +++ b/srml/support/src/storage/mod.rs @@ -19,7 +19,7 @@ use crate::rstd::prelude::*; use crate::rstd::borrow::Borrow; use runtime_io::{self, twox_128}; -use crate::codec::{Codec, Encode, Decode, KeyedVec, Input}; +use crate::codec::{Codec, Encode, Decode, KeyedVec, Input, EncodeAppend}; #[macro_use] pub mod generator; @@ -153,6 +153,14 @@ impl crate::GenericStorage for RuntimeStorage { fn take(&self, key: &[u8]) -> Option { take(key) } + + fn get_raw(&self, key: &[u8]) -> Option> { + get_raw(key) + } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + put_raw(key, value) + } } impl crate::GenericUnhashedStorage for RuntimeStorage { @@ -184,6 +192,14 @@ impl crate::GenericUnhashedStorage for RuntimeStorage { fn take(&self, key: &[u8]) -> Option { unhashed::take(key) } + + fn get_raw(&self, key: &[u8]) -> Option> { + unhashed::get_raw(key) + } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + unhashed::put_raw(key, value) + } } /// A trait for working with macro-generated storage values under the substrate storage API. @@ -211,6 +227,12 @@ pub trait StorageValue { /// Take a value from storage, removing it afterwards. fn take() -> Self::Query; + + /// Append the given item to the value in the storage. + /// + /// `T` is required to implement `codec::EncodeAppend`. + fn append(items: &[I]) -> Result<(), &'static str> + where T: EncodeAppend; } impl StorageValue for U where U: generator::StorageValue { @@ -237,6 +259,11 @@ impl StorageValue for U where U: generator::StorageValue { fn take() -> Self::Query { U::take(&RuntimeStorage) } + fn append(items: &[I]) -> Result<(), &'static str> + where T: EncodeAppend + { + U::append(items, &RuntimeStorage) + } } /// A strongly-typed list in storage. @@ -560,7 +587,7 @@ pub trait StorageVec { /// child storage NOTE could replace unhashed by having only one kind of storage (root being null storage /// key (storage_key can become Option<&[u8]>). /// This module is a currently only a variant of unhashed with additional `storage_key`. -/// Note that `storage_key` must be unique and strong (strong in the sense of being long enough to +/// Note that `storage_key` must be unique and strong (strong in the sense of being long enough to /// avoid collision from a resistant hash function (which unique implies)). pub mod child { use super::{runtime_io, Codec, Decode, Vec, IncrementalChildInput}; @@ -632,7 +659,7 @@ pub mod child { runtime_io::read_child_storage(storage_key, key, &mut [0;0][..], 0).is_some() } - /// Remove all `storage_key` key/values + /// Remove all `storage_key` key/values pub fn kill_storage(storage_key: &[u8]) { runtime_io::kill_child_storage(storage_key) } diff --git a/srml/support/src/storage/unhashed/generator.rs b/srml/support/src/storage/unhashed/generator.rs index 2b046013bb..6993059c2a 100644 --- a/srml/support/src/storage/unhashed/generator.rs +++ b/srml/support/src/storage/unhashed/generator.rs @@ -55,6 +55,12 @@ pub trait UnhashedStorage { /// Take a value from storage, deleting it after reading. fn take_or_default(&self, key: &[u8]) -> T { self.take(key).unwrap_or_default() } + + /// Get a Vec of bytes from storage. + fn get_raw(&self, key: &[u8]) -> Option>; + + /// Put a raw byte slice into storage. + fn put_raw(&self, key: &[u8], value: &[u8]); } // We use a construct like this during when genesis storage is being built. @@ -82,6 +88,14 @@ impl UnhashedStorage for (crate::rstd::cell::RefCell<&mut sr_primitives::Stor !key.starts_with(prefix) }) } + + fn get_raw(&self, key: &[u8]) -> Option> { + self.0.borrow().get(key).cloned() + } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + self.0.borrow_mut().insert(key.to_vec(), value.to_vec()); + } } /// An implementation of a map with a two keys. diff --git a/srml/system/Cargo.toml b/srml/system/Cargo.toml index a39904fd5b..0b91fd3c5d 100644 --- a/srml/system/Cargo.toml +++ b/srml/system/Cargo.toml @@ -9,13 +9,16 @@ hex-literal = "0.1.0" serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} -parity-codec = { version = "3.3", default-features = false, features = ["derive"] } +parity-codec = { version = "3.5", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } +[dev-dependencies] +criterion = "0.2" + [features] default = ["std"] std = [ @@ -29,3 +32,7 @@ std = [ "srml-support/std", "primitives/std", ] + +[[bench]] +name = "bench" +harness = false \ No newline at end of file diff --git a/srml/system/benches/bench.rs b/srml/system/benches/bench.rs new file mode 100644 index 0000000000..a5a87ff2e5 --- /dev/null +++ b/srml/system/benches/bench.rs @@ -0,0 +1,99 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use criterion::{Criterion, criterion_group, criterion_main, black_box}; +use srml_system as system; +use srml_support::{decl_module, decl_event, impl_outer_origin, impl_outer_event}; +use runtime_io::{with_externalities, Blake2Hasher}; +use substrate_primitives::H256; +use primitives::{ + BuildStorage, traits::{BlakeTwo256, IdentityLookup}, + testing::{Digest, DigestItem, Header}, +}; + +mod module { + use super::*; + + pub trait Trait: system::Trait { + type Event: From + Into<::Event>; + } + + decl_module! { + pub struct Module for enum Call where origin: T::Origin { + pub fn deposit_event() = default; + } + } + + decl_event!( + pub enum Event { + Complex(Vec, u32, u16, u128), + } + ); +} + +impl_outer_origin!{ + pub enum Origin for Runtime {} +} + +impl_outer_event! { + pub enum Event for Runtime { + module, + } +} + +#[derive(Clone, Eq, PartialEq)] +pub struct Runtime; +impl system::Trait for Runtime { + type Origin = Origin; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type Digest = Digest; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type Log = DigestItem; +} + +impl module::Trait for Runtime { + type Event = Event; +} + +fn new_test_ext() -> runtime_io::TestExternalities { + system::GenesisConfig::::default().build_storage().unwrap().0.into() +} + +fn deposit_events(n: usize) { + let mut t = new_test_ext(); + with_externalities(&mut t, || { + for _ in 0..n { + module::Module::::deposit_event( + module::Event::Complex(vec![1, 2, 3], 2, 3, 899) + ); + } + }); +} + +fn sr_system_benchmark(c: &mut Criterion) { + c.bench_function("deposit 100 events", |b| { + b.iter(|| deposit_events(black_box(100))) + }); +} + +criterion_group!(benches, sr_system_benchmark); +criterion_main!(benches); diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index f226fcb7d1..97d82d9751 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -15,46 +15,46 @@ // along with Substrate. If not, see . //! # System module -//! +//! //! The system module provides low-level access to core types and cross-cutting utilities. //! It acts as the base layer for other SRML modules to interact with the Substrate framework components. //! To use it in your module, you should ensure your module's trait implies the system [`Trait`]. -//! +//! //! ## Overview -//! +//! //! The system module defines the core data types used in a Substrate runtime. //! It also provides several utility functions (see [`Module`]) for other runtime modules. -//! -//! In addition, it manages the storage items for extrinsics data, indexes, event record and digest items, +//! +//! In addition, it manages the storage items for extrinsics data, indexes, event record and digest items, //! among other things that support the execution of the current block. -//! +//! //! It also handles low level tasks like depositing logs, basic set up and take down of //! temporary storage entries and access to previous block hashes. -//! +//! //! ## Interface -//! +//! //! ### Dispatchable functions -//! +//! //! The system module does not implement any dispatchable functions. -//! +//! //! ### Public functions -//! +//! //! All public functions are available as part of the [`Module`] type. -//! +//! //! ## Usage -//! +//! //! ### Prerequisites -//! +//! //! Import the system module and derive your module's configuration trait from the system trait. -//! +//! //! ### Example - Get random seed and extrinsic count for the current block -//! +//! //! ``` //! use srml_support::{decl_module, dispatch::Result}; //! use srml_system::{self as system, ensure_signed}; -//! +//! //! pub trait Trait: system::Trait {} -//! +//! //! decl_module! { //! pub struct Module for enum Call where origin: T::Origin { //! pub fn system_module_example(origin) -> Result { @@ -135,12 +135,12 @@ pub trait Trait: 'static + Eq + Clone { type BlockNumber: Parameter + Member + MaybeSerializeDebug + MaybeDisplay + SimpleArithmetic + Default + Bounded + Copy + rstd::hash::Hash; - + /// The output of the `Hashing` function. type Hash: Parameter + Member + MaybeSerializeDebug + MaybeDisplay + SimpleBitOps + Default + Copy + CheckEqual + rstd::hash::Hash + AsRef<[u8]> + AsMut<[u8]>; - + /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). type Hashing: Hash; @@ -180,9 +180,16 @@ decl_module! { pub fn deposit_event(event: T::Event) { let extrinsic_index = Self::extrinsic_index(); let phase = extrinsic_index.map_or(Phase::Finalization, |c| Phase::ApplyExtrinsic(c)); - let mut events = Self::events(); - events.push(EventRecord { phase, event }); - >::put(events); + let event = EventRecord { phase, event }; + + // Appending can only fail if `Events` can not be decoded or + // when we try to insert more than `u32::max_value()` events. + // If one of these conditions is met, we just insert the new event. + let events = [event]; + if >::append(&events).is_err() { + let [event] = events; + >::put(vec![event]); + } } } } @@ -599,7 +606,10 @@ mod tests { System::note_finished_extrinsics(); System::deposit_event(1u16); System::finalize(); - assert_eq!(System::events(), vec![EventRecord { phase: Phase::Finalization, event: 1u16 }]); + assert_eq!( + System::events(), + vec![EventRecord { phase: Phase::Finalization, event: 1u16 }] + ); System::initialize(&2, &[0u8; 32].into(), &[0u8; 32].into()); System::deposit_event(42u16); -- GitLab From 471607944e1f43fa3a2940c618f8f485caa2e9e4 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 16 Apr 2019 13:35:04 +0200 Subject: [PATCH 017/206] add fn debug_info to peerset (#2258) --- core/peerset/src/lib.rs | 13 ++++++-- core/peerset/src/slots.rs | 69 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/core/peerset/src/lib.rs b/core/peerset/src/lib.rs index 10677b859a..570dcf5f86 100644 --- a/core/peerset/src/lib.rs +++ b/core/peerset/src/lib.rs @@ -25,7 +25,7 @@ use libp2p::PeerId; use log::trace; use lru_cache::LruCache; use slots::{SlotType, SlotState, Slots}; -pub use serde_json::Value; +use serde_json::json; const PEERSET_SCORES_CACHE_SIZE: usize = 1000; const DISCOVERED_NODES_LIMIT: u32 = 1000; @@ -407,7 +407,16 @@ impl Peerset { /// Produces a JSON object containing the state of the peerset manager, for debugging purposes. pub fn debug_info(&self) -> serde_json::Value { - serde_json::Value::Null + json!({ + "data": { + // add scores + "discovered": self.data.discovered.debug_info(), + "reserved_only": self.data.reserved_only, + "out_slots": self.data.out_slots.debug_info(), + "in_slots": self.data.in_slots.debug_info() + }, + "message_queue": self.message_queue.len(), + }) } } diff --git a/core/peerset/src/slots.rs b/core/peerset/src/slots.rs index 4c6d9fab6c..299e2c0e9d 100644 --- a/core/peerset/src/slots.rs +++ b/core/peerset/src/slots.rs @@ -17,6 +17,7 @@ use std::{fmt, mem}; use libp2p::PeerId; use linked_hash_map::LinkedHashMap; +use serde_json::json; /// Describes the nature of connection with a given peer. #[derive(Debug, PartialEq, Clone, Copy)] @@ -182,4 +183,72 @@ impl Slots { pub fn is_reserved(&self, peer_id: &PeerId) -> bool { self.reserved.contains_key(peer_id) } + + /// Produces a JSON object containing the state of slots, for debugging purposes. + pub fn debug_info(&self) -> serde_json::Value { + json!({ + "max_slots": self.max_slots, + "reserved": self.reserved.keys().map(|peer_id| peer_id.to_base58()).collect::>(), + "common": self.common.keys().map(|peer_id| peer_id.to_base58()).collect::>() + }) + } +} + +#[cfg(test)] +mod tests { + use libp2p::PeerId; + use serde_json::json; + use super::{Slots, SlotType}; + + #[test] + fn test_slots_debug_info() { + let reserved_peer = PeerId::random(); + let reserved_peer2 = PeerId::random(); + let common_peer = PeerId::random(); + let mut slots = Slots::new(10); + + slots.add_peer(reserved_peer.clone(), SlotType::Reserved); + slots.add_peer(reserved_peer2.clone(), SlotType::Reserved); + slots.add_peer(common_peer.clone(), SlotType::Common); + + let expected = json!({ + "max_slots": 10, + "reserved": vec![reserved_peer.to_base58(), reserved_peer2.to_base58()], + "common": vec![common_peer.to_base58()], + }); + + assert_eq!(expected, slots.debug_info()); + } + + #[test] + fn test_slots_debug() { + let reserved_peer = PeerId::random(); + let reserved_peer2 = PeerId::random(); + let common_peer = PeerId::random(); + let mut slots = Slots::new(10); + + slots.add_peer(reserved_peer.clone(), SlotType::Reserved); + slots.add_peer(reserved_peer2.clone(), SlotType::Reserved); + slots.add_peer(common_peer.clone(), SlotType::Common); + + let expected = format!("Slots {{ + max_slots: 10, + reserved: [ + PeerId( + {:?} + ), + PeerId( + {:?} + ) + ], + common: [ + PeerId( + {:?} + ) + ] +}}", reserved_peer.to_base58(), reserved_peer2.to_base58(), common_peer.to_base58()); + + let s = format!("{:#?}", slots); + assert_eq!(expected, s); + } } -- GitLab From c2db9dcc497f180e96f08886f501d94f58df3907 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Tue, 16 Apr 2019 15:35:21 +0200 Subject: [PATCH 018/206] Update Documentation (#2172) * timestamp * balances * balances-remove-short-example * system * sudo (+missing period in balances) * contract * staking * fix unclear definition in balances * update after review * update genesis-config-sudo link Co-Authored-By: joepetrowski <25483142+joepetrowski@users.noreply.github.com> * genesis --- srml/balances/src/lib.rs | 126 ++++++++++--------------- srml/contract/src/gas.rs | 2 +- srml/contract/src/lib.rs | 96 ++++++++++--------- srml/staking/src/lib.rs | 192 +++++++++++++++++++++----------------- srml/sudo/src/lib.rs | 21 ++--- srml/system/src/lib.rs | 52 +++++------ srml/timestamp/src/lib.rs | 43 +++++---- 7 files changed, 264 insertions(+), 268 deletions(-) diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index 721ff32cc2..5c2de04c03 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -16,29 +16,28 @@ //! # Balances Module //! -//! The balances module provides functionality for handling accounts and balances. To use the balances module, you need -//! to implement the [balances Trait](https://crates.parity.io/srml_balances/trait.Trait.html). Supported dispatchables -//! are documented in the [`Call` enum](https://crates.parity.io/srml_balances/enum.Call.html). +//! The Balances module provides functionality for handling accounts and balances. +//! To use it in your runtime, you need to implement the [`balances::Trait`](./trait.Trait.html). +//! Dispatchable functions are documented as part of the [`Call`](./enum.Call.html) enum. //! //! ## Overview //! -//! The balances module provides functions for: +//! The Balances module provides functions for: //! -//! - Getting and setting free balances -//! - Retrieving total, reserved and unreserved balances -//! - Repatriating a reserved balance to a beneficiary account that exists -//! - Transferring a balance between accounts (when not reserved) -//! - Slashing an account balance -//! - Account creation and removal -//! - Lookup of an index to reclaim an account -//! - Managing total issuance -//! - Setting and managing locks +//! - Getting and setting free balances. +//! - Retrieving total, reserved and unreserved balances. +//! - Repatriating a reserved balance to a beneficiary account that exists. +//! - Transferring a balance between accounts (when not reserved). +//! - Slashing an account balance. +//! - Account creation and removal. +//! - Managing total issuance. +//! - Setting and managing locks. //! //! ### Terminology //! //! - **Existential Deposit:** The minimum balance required to create or keep an account open. This prevents //! "dust accounts" from filling storage. -//! - **Total Issuance:** The total amount of units in existence in a system. +//! - **Total Issuance:** The total number of units in existence in a system. //! - **Reaping an account:** The act of removing an account by resetting its nonce. Happens after its balance is set //! to zero. //! - **Free Balance:** The portion of a balance that is not reserved. The free balance is the only balance that matters @@ -48,8 +47,9 @@ //! can still be slashed, but only after all of free balance has been slashed. If the reserved balance falls below the //! existential deposit then it and any related functionality will be deleted. When both it and the free balance are //! deleted, then the account is said to be dead. -//! - **Imbalance:** A condition when some funds were created or deducted without equal and opposite accounting. -//! Functions that result in an imbalance will return an object of the `Imbalance` trait that must be handled. +//! - **Imbalance:** A condition when some funds were credited or debited without equal and opposite accounting +//! (i.e. a difference between total issuance and account balances). Functions that result in an imbalance will +//! return an object of the `Imbalance` trait that must be handled. //! - **Lock:** A freeze on a specified amount of an account's free balance until a specified block number. Multiple //! locks always operate over the same funds, so they "overlay" rather than "stack". //! - **Vesting:** Similar to a lock, this is another, but independent, liquidity restriction that reduces linearly @@ -57,82 +57,64 @@ //! //! ### Implementations //! -//! The balances module provides implementations for the following traits. If these traits provide the functionality -//! that you need, then you can avoid coupling with the balances module. +//! The Balances module provides implementations for the following traits. If these traits provide the functionality +//! that you need, then you can avoid coupling with the Balances module. //! -//! - [`Currency`](https://crates.parity.io/srml_support/traits/trait.Currency.html): Functions for dealing with a +//! - [`Currency`](../srml_support/traits/trait.Currency.html): Functions for dealing with a //! fungible assets system. -//! - [`ReservableCurrency`](https://crates.parity.io/srml_support/traits/trait.ReservableCurrency.html): +//! - [`ReservableCurrency`](../srml_support/traits/trait.ReservableCurrency.html): //! Functions for dealing with assets that can be reserved from an account. -//! - [`LockableCurrency`](https://crates.parity.io/srml_support/traits/trait.LockableCurrency.html): Functions for +//! - [`LockableCurrency`](../srml_support/traits/trait.LockableCurrency.html): Functions for //! dealing with accounts that allow liquidity restrictions. -//! - [`Imbalance`](https://crates.parity.io/srml_support/traits/trait.Imbalance.html): Functions for handling +//! - [`Imbalance`](../srml_support/traits/trait.Imbalance.html): Functions for handling //! imbalances between total issuance in the system and account balances. Must be used when a function //! creates new funds (e.g. a reward) or destroys some funds (e.g. a system fee). -//! - [`MakePayment`](https://crates.parity.io/srml_support/traits/trait.MakePayment.html): Simple trait designed +//! - [`MakePayment`](../srml_support/traits/trait.MakePayment.html): Simple trait designed //! for hooking into a transaction payment. -//! - [`IsDeadAccount`](https://crates.parity.io/srml_system/trait.IsDeadAccount.html): Determiner to say whether a +//! - [`IsDeadAccount`](../srml_system/trait.IsDeadAccount.html): Determiner to say whether a //! given account is unused. //! -//! Example of using the `Currency` trait from the treasury module: -//! -//! ```rust,ignore -//! pub trait Trait: system::Trait { -//! /// The staking balance. -//! type Currency: Currency; -//! } -//! ``` -//! //! ## Interface //! //! ### Dispatchable Functions //! -//! The `Call` enum is documented [here](https://crates.parity.io/srml_balances/enum.Call.html). -//! //! - `transfer` - Transfer some liquid free balance to another account. //! - `set_balance` - Set the balances of a given account. The origin of this call must be root. //! -//! ### Public Functions +//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. //! -//! See the [module](https://crates.parity.io/srml_balances/struct.Module.html) for details on publicly available -//! functions. +//! ### Public Functions //! -//! ## Usage +//! - `vesting_balance` - Get the amount that is currently being vested and cannot be transferred out of this account. //! -//! The following examples show how to use the balances module in your custom module. +//! See the [`Module`](./struct.Module.html) struct for details of publicly available functions. //! -//! ### Import and Balance Transfer +//! ## Usage //! -//! Import the `balances` module and derive your module configuration trait with the balances trait. You can now call -//! functions from the module. +//! The following examples show how to use the Balances module in your custom module. //! -//! ```rust,ignore -//! use support::{decl_module, dispatch::Result}; -//! use system::ensure_signed; +//! ### Example from the SRML //! -//! pub trait Trait: balances::Trait {} +//! The Contract module uses the `Currency` trait to handle gas. //! -//! decl_module! { -//! pub struct Module for enum Call where origin: T::Origin { -//! fn transfer_proxy(origin, to: T::AccountId, value: T::Balance) -> Result { -//! let sender = ensure_signed(origin)?; -//! >::make_transfer(&sender, &to, value)?; +//! [(lib.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/lib.rs): //! -//! Ok(()) -//! } -//! } -//! } -//! ``` +//! ```rust,ignore +//! use srml_support::traits::Currency //! -//! ### Real Use Example +//! pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; +//! pub type NegativeImbalanceOf = <::Currency as Currency<::AccountId>>::NegativeImbalance; +//!``` //! -//! Use in the `contract` module (gas.rs): +//! [(gas.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/gas.rs): //! //! ```rust,ignore +//! use srml_support::traits::Currency +//! //! pub fn refund_unused_gas( //! transactor: &T::AccountId, //! gas_meter: GasMeter, -//! imbalance: balances::NegativeImbalance, +//! imbalance: NegativeImbalanceOf, //! ) { //! let gas_spent = gas_meter.spent(); //! let gas_left = gas_meter.gas_left(); @@ -140,10 +122,9 @@ //! // Increase total spent gas. //! >::mutate(|block_gas_spent| *block_gas_spent += gas_spent); //! -//! let refund = >::as_(gas_left) * gas_meter.gas_price; -//! // Refund gas using balances module -//! let refund_imbalance = >::deposit_creating(transactor, refund); -//! // Handle imbalance +//! // Refund gas left by the price it was bought at. +//! let refund = >>::as_(gas_left) * gas_meter.gas_price; +//! let refund_imbalance = T::Currency::deposit_creating(transactor, refund); //! if let Ok(imbalance) = imbalance.offset(refund_imbalance) { //! T::GasPayment::on_unbalanced(imbalance); //! } @@ -152,22 +133,13 @@ //! //! ## Genesis config //! -//! The following storage items depend on the genesis config: -//! -//! - `TotalIssuance` -//! - `ExistentialDeposit` -//! - `TransferFee` -//! - `CreationFee` -//! - `Vesting` -//! - `FreeBalance` -//! - `TransactionBaseFee` -//! - `TransactionByteFee` +//! The Balances module depends on the genesis configuration. See the [`GenesisConfig`](./struct.GenesisConfig.html) +//! struct for a list of attributes that can be provided. //! //! ## Related Modules //! -//! The balances module depends on the [`system`](https://crates.parity.io/srml_system/index.html) and -//! [`srml_support`](https://crates.parity.io/srml_support/index.html) modules as well as Substrate Core -//! libraries and the Rust standard library. +//! - [`system`](../srml_system/index.html) +//! - [`srml_support`](../srml_support/index.html) #![cfg_attr(not(feature = "std"), no_std)] diff --git a/srml/contract/src/gas.rs b/srml/contract/src/gas.rs index 54199042bc..b7244169c4 100644 --- a/srml/contract/src/gas.rs +++ b/srml/contract/src/gas.rs @@ -247,7 +247,7 @@ pub fn refund_unused_gas( // also has T::Gas type. >::mutate(|block_gas_spent| *block_gas_spent += gas_spent); - // Refund gas left by the price it was bought. + // Refund gas left by the price it was bought at. let refund = >>::as_(gas_left) * gas_meter.gas_price; let refund_imbalance = T::Currency::deposit_creating(transactor, refund); if let Ok(imbalance) = imbalance.offset(refund_imbalance) { diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index c471451253..9ab717bb1a 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -16,14 +16,14 @@ //! # Contract Module //! -//! The contract module provides functionality for the runtime to deploy and execute WebAssembly smart-contracts. -//! The supported dispatchable functions are documented as part of the [`Call`](./enum.Call.html) enum. +//! The Contract module provides functionality for the runtime to deploy and execute WebAssembly smart-contracts. +//! To use it in your runtime, you need to implement the [`contracts::Trait`](./trait.Trait.html). //! //! ## Overview //! -//! This module extends accounts (see `Balances` module) to have smart-contract functionality. -//! These "smart-contract accounts" have the ability to create smart-contracts and make calls to other contract -//! and non-contract accounts. +//! This module extends accounts based on the `Currency` trait to have smart-contract functionality. It can +//! be used with other modules that implement accounts based on `Currency`. These "smart-contract accounts" +//! have the ability to create smart-contracts and make calls to other contract and non-contract accounts. //! //! The smart-contract code is stored once in a `code_cache`, and later retrievable via its `code_hash`. //! This means that multiple smart-contracts can be instantiated from the same `code_cache`, without replicating @@ -33,9 +33,8 @@ //! This call can alter the storage entries of the smart-contract account, create new smart-contracts, //! or call other smart-contracts. //! -//! Finally, when the `Balances` module determines an account is dead (i.e. account balance fell below the -//! existential deposit), it reaps the account. This will delete the associated code and storage of the -//! smart-contract account. +//! Finally, when an account is reaped, its associated code and storage of the smart-contract account +//! will also be deleted. //! //! ### Gas //! @@ -57,28 +56,28 @@ //! //! ### Dispatchable functions //! -//! * `put_code` - Stores the given binary Wasm code into the chains storage and returns its `code_hash`. -//! +//! * `put_code` - Stores the given binary Wasm code into the chain's storage and returns its `code_hash`. //! * `create` - Deploys a new contract from the given `code_hash`, optionally transferring some balance. //! This creates a new smart contract account and calls its contract deploy handler to initialize the contract. -//! //! * `call` - Makes a call to an account, optionally transferring some balance. //! +//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. +//! //! ### Public functions //! -//! See the [module](./struct.Module.html) for details on publicly available functions. +//! See the [`Module`](./struct.Module.html) struct for details on publicly available functions. //! //! ## Usage //! -//! The contract module is a work in progress. The following examples show how this contract module can be +//! The Contract module is a work in progress. The following examples show how this Contract module can be //! used to create and call contracts. //! -//! * [`pDSL`](https://github.com/Robbepop/pdsl) is a domain specific language which enables writing +//! * [`pDSL`](https://github.com/Robbepop/pdsl) is a domain specific language that enables writing //! WebAssembly based smart contracts in the Rust programming language. This is a work in progress. //! //! ## Related Modules -//! * [`Balances`](https://crates.parity.io/srml_balances/index.html) //! +//! * [`Balances`](../srml_balances/index.html) #![cfg_attr(not(feature = "std"), no_std)] @@ -122,38 +121,38 @@ pub trait ComputeDispatchFee { } #[derive(Encode,Decode,Clone,Debug)] -/// Information for managing an acocunt and its sub trie abstraction. -/// This is the required info to cache for an account +/// Information for managing an account and its sub trie abstraction. +/// This is the required info to cache for an account. pub struct AccountInfo { - /// unique ID for the subtree encoded as a byte + /// Unique ID for the subtree encoded as a byte. pub trie_id: TrieId, - /// the size of stored value in octet + /// The size of stored value in octet. pub storage_size: u64, } -/// Get a trie id (trie id must be unique and collision resistant depending upon its context) -/// Note that it is different than encode because trie id should have collision resistance -/// property (being a proper uniqueid). +/// Get a trie id (trie id must be unique and collision resistant depending upon its context). +/// Note that it is different than encode because trie id should be collision resistant +/// (being a proper unique identifier). pub trait TrieIdGenerator { - /// get a trie id for an account, using reference to parent account trie id to ensure - /// uniqueness of trie id - /// The implementation must ensure every new trie id is unique: two consecutive call with the + /// Get a trie id for an account, using reference to parent account trie id to ensure + /// uniqueness of trie id. + /// The implementation must ensure every new trie id is unique: two consecutive calls with the /// same parameter needs to return different trie id values. fn trie_id(account_id: &AccountId) -> TrieId; } -/// Get trie id from `account_id` +/// Get trie id from `account_id`. pub struct TrieIdFromParentCounter(PhantomData); -/// This generator use inner counter for account id and apply hash over `AccountId + -/// accountid_counter` +/// This generator uses inner counter for account id and applies the hash over `AccountId + +/// accountid_counter`. impl TrieIdGenerator for TrieIdFromParentCounter where T::AccountId: AsRef<[u8]> { fn trie_id(account_id: &T::AccountId) -> TrieId { - // note that skipping a value due to error is not an issue here. - // we only need uniqueness, not sequence. + // Note that skipping a value due to error is not an issue here. + // We only need uniqueness, not sequence. let new_seed = >::mutate(|v| v.wrapping_add(1)); let mut buf = Vec::new(); @@ -175,7 +174,7 @@ pub trait Trait: timestamp::Trait { /// The overarching event type. type Event: From> + Into<::Event>; - // As is needed for wasm-utils + // `As` is needed for wasm-utils type Gas: Parameter + Default + Codec + SimpleArithmetic + Bounded + Copy + As> + As + As; /// A function type to get the contract address given the creator. @@ -184,7 +183,7 @@ pub trait Trait: timestamp::Trait { /// A function type that computes the fee for dispatching the given `Call`. /// /// It is recommended (though not required) for this function to return a fee that would be taken - /// by executive module for regular dispatch. + /// by the Executive module for regular dispatch. type ComputeDispatchFee: ComputeDispatchFee>; /// trieid id generator @@ -194,10 +193,10 @@ pub trait Trait: timestamp::Trait { type GasPayment: OnUnbalanced>; } -/// Simple contract address determintator. +/// Simple contract address determiner. /// -/// Address calculated from the code (of the constructor), input data to the constructor -/// and account id which requested the account creation. +/// Address calculated from the code (of the constructor), input data to the constructor, +/// and the account id that requested the account creation. /// /// Formula: `blake2_256(blake2_256(code) + blake2_256(data) + origin)` pub struct SimpleAddressDeterminator(PhantomData); @@ -218,7 +217,7 @@ where } /// The default dispatch fee computor computes the fee in the same way that -/// implementation of `MakePayment` for balances module does. +/// the implementation of `MakePayment` for the Balances module does. pub struct DefaultDispatchFeeComputor(PhantomData); impl ComputeDispatchFee> for DefaultDispatchFeeComputor { fn compute_dispatch_fee(call: &T::Call) -> BalanceOf { @@ -248,7 +247,7 @@ decl_module! { Ok(()) } - /// Stores the given binary Wasm code into the chains storage and returns its `codehash`. + /// Stores the given binary Wasm code into the chain's storage and returns its `codehash`. /// You can instantiate contracts only with stored code. fn put_code( origin, @@ -310,7 +309,7 @@ decl_module! { // Refund cost of the unused gas. // - // NOTE: this should go after the commit to the storage, since the storage changes + // NOTE: This should go after the commit to the storage, since the storage changes // can alter the balance of the caller. gas::refund_unused_gas::(&origin, gas_meter, imbalance); @@ -327,9 +326,9 @@ decl_module! { /// /// Creation is executed as follows: /// - /// - the destination address is computed based on the sender and hash of the code. - /// - the smart-contract account is created at the computed address. - /// - the `ctor_code` is executed in the context of the newly created account. Buffer returned + /// - The destination address is computed based on the sender and hash of the code. + /// - The smart-contract account is created at the computed address. + /// - The `ctor_code` is executed in the context of the newly-created account. Buffer returned /// after the execution is saved as the `code` of the account. That code will be invoked /// upon any call received by this account. /// - The contract is initialized. @@ -344,7 +343,7 @@ decl_module! { // Commit the gas upfront. // - // NOTE: it is very important to avoid any state changes before + // NOTE: It is very important to avoid any state changes before // paying for the gas. let (mut gas_meter, imbalance) = gas::buy_gas::(&origin, gas_limit)?; @@ -364,7 +363,7 @@ decl_module! { // Refund cost of the unused gas. // - // NOTE: this should go after the commit to the storage, since the storage changes + // NOTE: This should go after the commit to the storage, since the storage changes // can alter the balance of the caller. gas::refund_unused_gas::(&origin, gas_meter, imbalance); @@ -441,9 +440,9 @@ decl_storage! { pub CodeHashOf: map T::AccountId => Option>; /// A mapping from an original code hash to the original code, untouched by instrumentation. pub PristineCode: map CodeHash => Option>; - /// A mapping between an original code hash and instrumented wasm code, ready for the execution. + /// A mapping between an original code hash and instrumented wasm code, ready for execution. pub CodeStorage: map CodeHash => Option; - /// The subtrie counter + /// The subtrie counter. pub AccountCounter: u64 = 0; /// The code associated with a given account. pub AccountInfoOf: map T::AccountId => Option; @@ -494,7 +493,7 @@ pub struct Schedule { /// Version of the schedule. pub version: u32, - /// Cost of putting a byte of code into the storage. + /// Cost of putting a byte of code into storage. pub put_code_per_byte_cost: Gas, /// Gas cost of a growing memory by single page. @@ -518,14 +517,13 @@ pub struct Schedule { /// Gas cost per one byte written to the sandbox memory. pub sandbox_data_write_cost: Gas, - /// How tall the stack is allowed to grow? + /// Maximum allowed stack height. /// /// See https://wiki.parity.io/WebAssembly-StackHeight to find out /// how the stack frame cost is calculated. pub max_stack_height: u32, - /// What is the maximal memory pages amount is allowed to have for - /// a contract. + /// Maximum number of memory pages allowed for a contract. pub max_memory_pages: u32, /// Whether the `ext_println` function is allowed to be used contracts. diff --git a/srml/staking/src/lib.rs b/srml/staking/src/lib.rs index 6d905c37fb..3e85b79764 100644 --- a/srml/staking/src/lib.rs +++ b/srml/staking/src/lib.rs @@ -17,51 +17,57 @@ //! # Staking Module //! //! -//! The staking module is the means by which a set of network maintainers (known as _authorities_ in some contexts and _validators_ in others) -//! are chosen based upon those who voluntarily place funds under deposit. Under deposit, those funds are rewarded under -//! normal operation but are held at pain of _slash_ (expropriation) should the staked maintainer be found not to be -//! discharging their duties properly. +//! The Staking module is the means by which a set of network maintainers (known as _authorities_ in some contexts +//! and _validators_ in others) are chosen based upon those who voluntarily place funds under deposit. Under deposit, +//! those funds are rewarded under normal operation but are held at pain of _slash_ (expropriation) should the +//! staked maintainer be found not to be discharging its duties properly. //! -//! You can start using the Staking module by implementing the staking [`Trait`]. +//! To use the Staking module in your runtime, you need to implement the [`staking::Trait`](./trait.Trait.html). //! //! ## Overview //! //! ### Terminology //! //! -//! - Staking: The process of locking up funds for some time, placing them at risk of slashing (loss) in order to become a rewarded maintainer of the network. -//! - Validating: The process of running a node to actively maintain the network, either by producing blocks or guaranteeing finality of the chain. -//! - Nominating: The process of placing staked funds behind one or more validators in order to share in any reward, and punishment, they take. +//! - Staking: The process of locking up funds for some time, placing them at risk of slashing (loss) +//! in order to become a rewarded maintainer of the network. +//! - Validating: The process of running a node to actively maintain the network, either by producing +//! blocks or guaranteeing finality of the chain. +//! - Nominating: The process of placing staked funds behind one or more validators in order to share +//! in any reward, and punishment, they take. //! - Stash account: The account holding an owner's funds used for staking. -//! - Controller account: The account which controls an owner's funds for staking. -//! - Era: A (whole) number of sessions, which is the period that the validator set (and each validator's active nominator set) is recalculated and where rewards are paid out. -//! - Slash: The punishment of a staker by reducing their funds. +//! - Controller account: The account that controls an owner's funds for staking. +//! - Era: A (whole) number of sessions, which is the period that the validator set (and each validator's +//! active nominator set) is recalculated and where rewards are paid out. +//! - Slash: The punishment of a staker by reducing its funds. //! //! ### Goals //! //! -//! The staking system in Substrate NPoS is designed to achieve three goals: +//! The staking system in Substrate NPoS is designed to make the following possible: //! -//! - It should be possible to stake funds that are controlled by a cold wallet. -//! - It should be possible to withdraw some, or deposit more, funds without interrupting the role of an entity. -//! - It should be possible to switch between roles (nominator, validator, idle) with minimal overhead. +//! - Stake funds that are controlled by a cold wallet. +//! - Withdraw some, or deposit more, funds without interrupting the role of an entity. +//! - Switch between roles (nominator, validator, idle) with minimal overhead. //! //! ### Scenarios //! //! #### Staking //! -//! Almost any interaction with the staking module requires a process of _**bonding**_ (also known as -//! being a _staker_). To become *bonded* a fund-holding account known as the _stash account_, which holds some of all of the -//! funds that become frozen in place as part of the staking process, is paired with an active **controller** account which issues -//! instructions on how they shall be used. +//! Almost any interaction with the Staking module requires a process of _**bonding**_ (also known as +//! being a _staker_). To become *bonded*, a fund-holding account known as the _stash account_, which holds +//! some or all of the funds that become frozen in place as part of the staking process, is paired with an +//! active **controller** account, which issues instructions on how they shall be used. //! //! An account pair can become bonded using the [`bond`](./enum.Call.html#variant.bond) call. //! -//! Stash accounts can change their associated controller using the [`set_controller`](./enum.Call.html#variant.set_controller) call. +//! Stash accounts can change their associated controller using the +//! [`set_controller`](./enum.Call.html#variant.set_controller) call. //! -//! There are three possible roles that any staked account pair can be in: `Validator`, `Nominator` and `Idle` (defined in [`StakerStatus`]). There are -//! three corresponding instructions to change between roles, namely: -//! [`validate`](./enum.Call.html#variant.validate), [`nominate`](./enum.Call.html#variant.nominate) and [`chill`](./enum.Call.html#variant.chill). +//! There are three possible roles that any staked account pair can be in: `Validator`, `Nominator` and `Idle` +//! (defined in [`StakerStatus`](./enum.StakerStatus.html)). There are three corresponding instructions to change between roles, namely: +//! [`validate`](./enum.Call.html#variant.validate), [`nominate`](./enum.Call.html#variant.nominate), +//! and [`chill`](./enum.Call.html#variant.chill). //! //! #### Validating //! @@ -86,15 +92,16 @@ //! //! #### Rewards and Slash //! -//! The **reward and slashing** procedure is the core of the staking module, attempting to _embrace valid behavior_ +//! The **reward and slashing** procedure is the core of the Staking module, attempting to _embrace valid behavior_ //! while _punishing any misbehavior or lack of availability_. //! //! Slashing can occur at any point in time, once misbehavior is reported. Once slashing is determined, a value is -//! deducted from the balance of the validator and all the nominators who voted for this validator (values are deducted from the _stash_ account of the slashed entity). +//! deducted from the balance of the validator and all the nominators who voted for this validator +//! (values are deducted from the _stash_ account of the slashed entity). //! //! Similar to slashing, rewards are also shared among a validator and its associated nominators. -//! Yet, the reward funds are not always transferred to the stash account and can be configured. See [Reward Calculation](#reward-calculation) -//! for more details. +//! Yet, the reward funds are not always transferred to the stash account and can be configured. +//! See [Reward Calculation](#reward-calculation) for more details. //! //! #### Chilling //! @@ -106,43 +113,44 @@ //! //! ## Interface //! -//! ### Dispatchable +//! ### Dispatchable Functions //! -//! The Dispatchable functions of the staking module enable the steps needed for entities to accept and change their +//! The dispatchable functions of the Staking module enable the steps needed for entities to accept and change their //! role, alongside some helper functions to get/set the metadata of the module. //! -//! Please refer to the [`Call`] enum and its associated variants for a detailed list of dispatchable functions. +//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. //! -//! ### Public -//! The staking module contains many public storage items and (im)mutable functions. Please refer to the [struct list](#structs) -//! below and the [`Module`] struct definition for more details. +//! ### Public Functions //! -//! ## Usage +//! The Staking module contains many public storage items and (im)mutable functions. Please refer to the +//! [struct list](#structs) below and the [`Module`](./struct.Module.html) struct definition for more details. //! +//! ## Usage //! //! ### Snippet: Bonding and Accepting Roles //! -//! An arbitrary account pair, given that the associated stash has the required funds, can become stakers via the following call: +//! An arbitrary account pair, given that the associated stash has the required funds, +//! can become stakers via the following call: //! //! ```rust,ignore -//! // bond account 3 as stash -//! // account 4 as controller -//! // with stash value 1500 units -//! // while the rewards get transferred to the controller account. +//! // Bond account 3 as stash. +//! // Account 4 as controller. +//! // Stash value of 1500 units. +//! // Rewards get transferred to the controller account. //! Staking::bond(Origin::signed(3), 4, 1500, RewardDestination::Controller); //! ``` //! //! To state desire to become a validator: //! //! ```rust,ignore -//! // controller account 4 states desire for validation with the given preferences. +//! // Controller account 4 states desire for validation with the given preferences. //! Staking::validate(Origin::signed(4), ValidatorPrefs::default()); //! ``` //! //! Similarly, to state desire in nominating: //! //! ```rust,ignore -//! // controller account 4 nominates for account 10 and 20. +//! // Controller account 4 nominates for accounts 10 and 20. //! Staking::nominate(Origin::signed(4), vec![20, 10]); //! ``` //! @@ -153,6 +161,7 @@ //! ``` //! //! You can find the equivalent of the above calls in your [Substrate UI](https://substrate-ui.parity.io). +//! //! ### Snippet: Reporting Misbehavior //! //! ``` @@ -179,26 +188,30 @@ //! //! ### Slot Stake //! -//! The term [`SlotStake`] will be used throughout this section. It refers to a value calculated at the end of each era, -//! containing the _minimum value at stake among all validators._ Note that a validator's value at stake might be a combination of -//! The validator's own stake and the votes it received. See [`Exposure`] for more details. +//! The term [`SlotStake`](./struct.Module.html#method.slot_stake) will be used throughout this section. It refers +//! to a value calculated at the end of each era, containing the _minimum value at stake among all validators._ +//! Note that a validator's value at stake might be a combination of The validator's own stake +//! and the votes it received. See [`Exposure`](./struct.Exposure.html) for more details. //! //! ### Reward Calculation //! //! Rewards are recorded **per-session** and paid **per-era**. The value of the reward for each session is calculated at //! the end of the session based on the timeliness of the session, then accumulated to be paid later. The value of -//! the new _per-session-reward_ is calculated at the end of each era by multiplying [`SlotStake`] and [`SessionReward`] +//! the new _per-session-reward_ is calculated at the end of each era by multiplying `SlotStake` and `SessionReward` //! (`SessionReward` is the multiplication factor, represented by a number between 0 and 1). -//! Once a new era is triggered, rewards are paid to the validators and the associated nominators. +//! Once a new era is triggered, rewards are paid to the validators and their associated nominators. //! -//! The validator can declare an amount, named [`validator_payment`](./struct.ValidatorPrefs.html#structfield.validator_payment), that does not get shared with the nominators at -//! each reward payout through their [`ValidatorPrefs`]. This value gets deducted from the total reward that can be paid. -//! The remaining portion is split among the validator and all of the nominators that nominated the validator, -//! proportional to the value staked behind this validator -//! (_i.e._ dividing the [`own`](./struct.Exposure.html#structfield.own) or [`others`](./struct.Exposure.html#structfield.others) by [`total`](./struct.Exposure.html#structfield.total) in [`Exposure`]). +//! The validator can declare an amount, named +//! [`validator_payment`](./struct.ValidatorPrefs.html#structfield.validator_payment), that does not get shared +//! with the nominators at each reward payout through its [`ValidatorPrefs`](./struct.ValidatorPrefs.html). This value +//! gets deducted from the total reward that can be paid. The remaining portion is split among the validator and all +//! of the nominators that nominated the validator, proportional to the value staked behind this validator (_i.e._ +//! dividing the [`own`](./struct.Exposure.html#structfield.own) or [`others`](./struct.Exposure.html#structfield.others) +//! by [`total`](./struct.Exposure.html#structfield.total) in [`Exposure`](./struct.Exposure.html)). //! -//! All entities who receive a reward have the option to choose their reward destination, -//! through the [`Payee`] storage item (see [`set_payee`](enum.Call.html#variant.set_payee)), to be one of the following: +//! All entities who receive a reward have the option to choose their reward destination +//! through the [`Payee`](./struct.Payee.html) storage item (see [`set_payee`](enum.Call.html#variant.set_payee)), +//! to be one of the following: //! //! - Controller account, (obviously) not increasing the staked value. //! - Stash account, not increasing the staked value. @@ -206,49 +219,56 @@ //! //! ### Slashing details //! -//! A validator can be _reported_ to be offline at any point via [`on_offline_validator`](enum.Call.html#variant.on_offline_validator) public function. -//! Each validator declares how many times it can be _reported_ before it actually gets slashed via their -//! `unstake_threshold` in [`ValidatorPrefs`]. +//! A validator can be _reported_ to be offline at any point via the public function +//! [`on_offline_validator`](enum.Call.html#variant.on_offline_validator). Each validator declares how many times it +//! can be _reported_ before it actually gets slashed via its +//! [`unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold). //! -//! On top of this, staking module also introduces an [`OfflineSlashGrace`], which applies to all validators and prevents -//! them from getting immediately slashed. +//! On top of this, the Staking module also introduces an +//! [`OfflineSlashGrace`](./struct.Module.html#method.offline_slash_grace), which applies +//! to all validators and prevents them from getting immediately slashed. //! -//! Essentially, a validator gets slashed once they have been reported more than [`OfflineSlashGrace`] + [`unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold) times. -//! Getting slashed due to offline report always leads to being _unstaked_ (_i.e._ removed as a validator candidate) as the consequence. +//! Essentially, a validator gets slashed once they have been reported more than +//! [`OfflineSlashGrace`] + [`unstake_threshold`] times. Getting slashed due to offline report always leads +//! to being _unstaked_ (_i.e._ removed as a validator candidate) as the consequence. //! -//! The base slash value is computed _per slash-event_ by multiplying [`OfflineSlash`] and the `total` [`Exposure`]. This value -//! is then multiplied by `2.pow(unstake_threshold)` to obtain the final slash value. -//! All individual accounts' punishments are capped at their total stake (NOTE: This cap should never come into force in a correctly implemented, non-corrupted, well-configured system). +//! The base slash value is computed _per slash-event_ by multiplying +//! [`OfflineSlash`](./struct.Module.html#method.offline_slash) and the `total` `Exposure`. This value is then +//! multiplied by `2.pow(unstake_threshold)` to obtain the final slash value. All individual accounts' punishments are +//! capped at their total stake (NOTE: This cap should never come into force in a correctly implemented, +//! non-corrupted, well-configured system). //! //! ### Additional Fund Management Operations //! //! Any funds already placed into stash can be the target of the following operations: //! -//! The controller account can free a portion (or all) of the funds using the [`unbond`](enum.Call.html#variant.unbond) call. -//! Note that the funds are not immediately accessible. Instead, a duration denoted by [`BondingDuration`] (in number of eras) -//! must pass until the funds can actually be removed. Once the [`BondingDuration`] is over the [`withdraw_unbonded`]((enum.Call.html#variant.withdraw_unbonded)) call can be used +//! The controller account can free a portion (or all) of the funds using the [`unbond`](enum.Call.html#variant.unbond) +//! call. Note that the funds are not immediately accessible. Instead, a duration denoted by +//! [`BondingDuration`](./struct.BondingDuration.html) (in number of eras) must pass until the funds can actually be +//! removed. Once the `BondingDuration` is over, the [`withdraw_unbonded`](./enum.Call.html#variant.withdraw_unbonded) call can be used //! to actually withdraw the funds. //! -//!### Election Algorithm +//! ### Election Algorithm //! //! The current election algorithm is implemented based on Phragmén. //! The reference implementation can be found [here](https://github.com/w3f/consensus/tree/master/NPoS). //! -//! The election algorithm, aside from electing the validators with the most stake value and votes, tries to divide the nominator votes -//! among candidates in an equal manner. To further assure this, an optional post-processing can be applied that iteratively normalizes the nominator staked values -//! until the total difference among votes of a particular nominator are less than a threshold. -//! +//! The election algorithm, aside from electing the validators with the most stake value and votes, tries to divide +//! the nominator votes among candidates in an equal manner. To further assure this, an optional post-processing +//! can be applied that iteractively normalizes the nominator staked values until the total difference among +//! votes of a particular nominator are less than a threshold. //! //! ## GenesisConfig //! -//! See the [`GenesisConfig`] for a list of attributes that can be provided. +//! The Staking module depends on the genesis configuration. See the [`GenesisConfig`](./struct.GenesisConfig.html) +//! struct for a list of attributes that can be provided. //! //! ## Related Modules //! -//! - [**Balances**](https://crates.parity.io/srml_balances/index.html): Used to manage values at stake. -//! - [**Sessions**](https://crates.parity.io/srml_session/index.html): Used to manage sessions. Also, a list of new validators is also stored in the sessions module's `Validators` at the end of each era. -//! - [**System**](https://crates.parity.io/srml_system/index.html): Used to obtain block number and time, among other details. -//! +//! - [**Balances**](../srml_balances/index.html): Used to manage values at stake. +//! - [**Session**](../srml_session/index.html): Used to manage sessions. Also, a list of new validators is +//! stored in the Session module's `Validators` at the end of each era. +//! - [**System**](../srml_system/index.html): Used to obtain block number and time, among other details. #![cfg_attr(not(feature = "std"), no_std)] @@ -471,7 +491,7 @@ decl_storage! { pub Nominators get(nominators): linked_map T::AccountId => Vec; /// Nominators for a particular account that is in action right now. You can't iterate through validators here, - /// but you can find them in the `sessions` module. + /// but you can find them in the Session module. /// /// This is keyed by the stash account. pub Stakers get(stakers): map T::AccountId => Exposure>; @@ -515,7 +535,7 @@ decl_storage! { /// We are forcing a new era. pub ForcingNewEra get(forcing_new_era): Option<()>; - /// Most recent `RECENT_OFFLINE_COUNT` instances. (who it was, when it was reported, how many instances they were offline for). + /// Most recent `RECENT_OFFLINE_COUNT` instances. (Who it was, when it was reported, how many instances they were offline for). pub RecentlyOffline get(recently_offline): Vec<(T::AccountId, T::BlockNumber, u32)>; } add_extra_genesis { @@ -763,16 +783,16 @@ decl_event!( pub enum Event where Balance = BalanceOf, ::AccountId { /// All validators have been rewarded by the given balance. Reward(Balance), - /// One validator (and their nominators) has been given a offline-warning (they're still - /// within their grace). The accrued number of slashes is recorded, too. + /// One validator (and its nominators) has been given an offline-warning (it is still + /// within its grace). The accrued number of slashes is recorded, too. OfflineWarning(AccountId, u32), - /// One validator (and their nominators) has been slashed by the given amount. + /// One validator (and its nominators) has been slashed by the given amount. OfflineSlash(AccountId, Balance), } ); impl Module { - // Just force_new_era without origin check. + /// Just force_new_era without origin check. fn apply_force_new_era(apply_rewards: bool) -> Result { >::put(()); >::apply_force_new_session(apply_rewards) @@ -799,12 +819,12 @@ impl Module { >::insert(controller, ledger); } - /// Slash a given validator by a specific amount. Removes the slash from their balance by preference, + /// Slash a given validator by a specific amount. Removes the slash from the validator's balance by preference, /// and reduces the nominators' balance if needed. fn slash_validator(stash: &T::AccountId, slash: BalanceOf) { // The exposure (backing stake) information of the validator to be slashed. let exposure = Self::stakers(stash); - // The amount we are actually going to slash (can't be bigger than their total exposure) + // The amount we are actually going to slash (can't be bigger than the validator's total exposure) let slash = slash.min(exposure.total); // The amount we'll slash from the validator's stash directly. let own_slash = exposure.own.min(slash); @@ -849,7 +869,7 @@ impl Module { } } - /// Reward a given validator by a specific amount. Add the reward to their, and their nominators' + /// Reward a given validator by a specific amount. Add the reward to the validator's, and its nominators' /// balance, pro-rata based on their exposure, after having removed the validator's pre-payout cut. fn reward_validator(stash: &T::AccountId, reward: BalanceOf) { let off_the_table = reward.min(Self::validators(stash).validator_payment); @@ -940,7 +960,7 @@ impl Module { /// Select a new validator set from the assembled stakers and their role preferences. /// - /// Returns the new SlotStake value. + /// Returns the new `SlotStake` value. fn select_validators() -> BalanceOf { let maybe_elected_candidates = elect::( Self::validator_count() as usize, diff --git a/srml/sudo/src/lib.rs b/srml/sudo/src/lib.rs index 88e3a9c965..1d2e007820 100644 --- a/srml/sudo/src/lib.rs +++ b/srml/sudo/src/lib.rs @@ -18,31 +18,29 @@ //! //! ## Overview //! -//! The sudo module allows for a single account (called the "sudo key") +//! The Sudo module allows for a single account (called the "sudo key") //! to execute dispatchable functions that require a `Root` call //! or designate a new account to replace them as the sudo key. //! Only one account can be the sudo key at a time. //! -//! You can start using the sudo module by implementing the sudo [`Trait`]. -//! -//! Supported dispatchable functions are documented in the [`Call`] enum. +//! You can start using the Sudo module by implementing the [`sudo::Trait`](./trait.Trait.html). //! //! ## Interface //! //! ### Dispatchable Functions //! -//! Only the sudo key can call the dispatchable functions from the sudo module. +//! Only the sudo key can call the dispatchable functions from the Sudo module. //! //! * `sudo` - Make a `Root` call to a dispatchable function. //! * `set_key` - Assign a new account to be the sudo key. //! -//! Please refer to the [`Call`] enum and its associated variants for documentation on each function. +//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. //! //! ## Usage //! //! ### Prerequisites //! -//! To use the sudo module in your runtime, you must implement the following trait in your runtime: +//! To use the Sudo module in your runtime, you must implement the following trait in your runtime: //! //! ```ignore //! impl sudo::Trait for Runtime { @@ -59,8 +57,8 @@ //! //! ### Executing Privileged Functions //! -//! The sudo module itself is not intended to be used within other modules. -//! Instead, you can build "privileged functions" in other modules that require `Root` origin. +//! The Sudo module itself is not intended to be used within other modules. +//! Instead, you can build "privileged functions" (i.e. functions that require `Root` origin) in other modules. //! You can execute these privileged functions by calling `sudo` with the sudo key account. //! Privileged functions cannot be directly executed via an extrinsic. //! @@ -91,7 +89,7 @@ //! //! ### Example from SRML //! -//! The consensus module exposes a `set_code` privileged function +//! The Consensus module exposes a `set_code` privileged function //! that allows you to set the on-chain Wasm runtime code: //! //! ```ignore @@ -103,7 +101,8 @@ //! //! ## Genesis Config //! -//! To use the sudo module, you need to set an initial superuser account as the sudo `key`. +//! The Sudo module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). +//! You need to set an initial superuser account as the sudo `key`. //! //! ```ignore //! GenesisConfig { diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index 97d82d9751..72a8636156 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -14,38 +14,38 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! # System module +//! # System Module //! -//! The system module provides low-level access to core types and cross-cutting utilities. +//! The System module provides low-level access to core types and cross-cutting utilities. //! It acts as the base layer for other SRML modules to interact with the Substrate framework components. -//! To use it in your module, you should ensure your module's trait implies the system [`Trait`]. +//! To use it in your module, you need to implement the [`system::Trait`](./trait.Trait.html). //! //! ## Overview //! -//! The system module defines the core data types used in a Substrate runtime. -//! It also provides several utility functions (see [`Module`]) for other runtime modules. +//! The System module defines the core data types used in a Substrate runtime. +//! It also provides several utility functions (see [`Module`](./struct.Module.html)) for other runtime modules. //! -//! In addition, it manages the storage items for extrinsics data, indexes, event record and digest items, +//! In addition, it manages the storage items for extrinsics data, indexes, event records, and digest items, //! among other things that support the execution of the current block. //! -//! It also handles low level tasks like depositing logs, basic set up and take down of -//! temporary storage entries and access to previous block hashes. +//! It also handles low-level tasks like depositing logs, basic set up and take down of +//! temporary storage entries, and access to previous block hashes. //! //! ## Interface //! -//! ### Dispatchable functions +//! ### Dispatchable Functions //! -//! The system module does not implement any dispatchable functions. +//! The System module does not implement any dispatchable functions. //! -//! ### Public functions +//! ### Public Functions //! -//! All public functions are available as part of the [`Module`] type. +//! See the [`Module`](./struct.Module.html) struct for details of publicly available functions. //! //! ## Usage //! //! ### Prerequisites //! -//! Import the system module and derive your module's configuration trait from the system trait. +//! Import the System module and derive your module's configuration trait from the system trait. //! //! ### Example - Get random seed and extrinsic count for the current block //! @@ -99,7 +99,7 @@ impl OnNewAccount for () { fn on_new_account(_who: &AccountId) {} } -/// Determinator to say whether a given account is unused. +/// Determiner to say whether a given account is unused. pub trait IsDeadAccount { /// Is the given account dead? fn is_dead_account(who: &AccountId) -> bool; @@ -168,7 +168,7 @@ pub trait Trait: 'static + Eq + Clone { /// The aggregated event type of the runtime. type Event: Parameter + Member + From; - /// A piece of information which can be part of the digest (as a digest item). + /// A piece of information that can be part of the digest (as a digest item). type Log: From> + Into>; } @@ -176,7 +176,7 @@ pub type DigestItemOf = <::Digest as traits::Digest>::Item; decl_module! { pub struct Module for enum Call where origin: T::Origin { - /// Deposits an event onto this block's event record. + /// Deposits an event into this block's event record. pub fn deposit_event(event: T::Event) { let extrinsic_index = Self::extrinsic_index(); let phase = extrinsic_index.map_or(Phase::Finalization, |c| Phase::ApplyExtrinsic(c)); @@ -215,7 +215,7 @@ pub struct EventRecord { } decl_event!( - /// Event for the system module. + /// Event for the System module. pub enum Event { /// An extrinsic completed successfully. ExtrinsicSuccess, @@ -224,13 +224,13 @@ decl_event!( } ); -/// Origin for the system module. +/// Origin for the System module. #[derive(PartialEq, Eq, Clone)] #[cfg_attr(feature = "std", derive(Debug))] pub enum RawOrigin { /// The system itself ordained this dispatch to happen: this is the highest privilege level. Root, - /// It is signed by some public key and we provide the AccountId. + /// It is signed by some public key and we provide the `AccountId`. Signed(AccountId), /// It is signed by nobody but included and agreed upon by the validators anyway: it's "inherently" true. Inherent, @@ -252,7 +252,7 @@ pub type Log = RawLog< ::Hash, >; -/// A logs in this module. +/// A log in this module. #[cfg_attr(feature = "std", derive(Serialize, Debug))] #[derive(Encode, Decode, PartialEq, Eq, Clone)] pub enum RawLog { @@ -299,7 +299,7 @@ decl_storage! { AllExtrinsicsLen: Option; /// Map of block numbers to block hashes. pub BlockHash get(block_hash) build(|_| vec![(T::BlockNumber::zero(), hash69())]): map T::BlockNumber => T::Hash; - /// Extrinsics data for the current block (maps extrinsic's index to its data). + /// Extrinsics data for the current block (maps an extrinsic's index to its data). ExtrinsicData get(extrinsic_data): map u32 => Vec; /// Random seed of the current block. RandomSeed get(random_seed) build(|_| T::Hash::default()): T::Hash; @@ -388,7 +388,7 @@ impl Module { /// Start the execution of a particular block. pub fn initialize(number: &T::BlockNumber, parent_hash: &T::Hash, txs_root: &T::Hash) { - // populate environment. + // populate environment storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &0u32); >::put(number); >::put(parent_hash); @@ -412,7 +412,7 @@ impl Module { let storage_changes_root = T::Hashing::storage_changes_root(parent_hash, number.as_() - 1); // we can't compute changes trie root earlier && put it to the Digest - // because it will include all currently existing temporaries + // because it will include all currently existing temporaries. if let Some(storage_changes_root) = storage_changes_root { let item = RawLog::ChangesTrieRoot(storage_changes_root); let item = ::Log::from(item).into(); @@ -424,7 +424,7 @@ impl Module { ::new(number, extrinsics_root, storage_root, parent_hash, digest) } - /// Deposits a log and ensures it matches the blocks log data. + /// Deposits a log and ensures it matches the block's log data. pub fn deposit_log(item: ::Item) { let mut l = >::get(); traits::Digest::push(&mut l, item); @@ -489,7 +489,7 @@ impl Module { /// Note what the extrinsic data of the current extrinsic index is. If this is called, then /// ensure `derive_extrinsics` is also called before block-building is completed. /// - /// NOTE this function is called only when the block is being constructed locally. + /// NOTE: This function is called only when the block is being constructed locally. /// `execute_block` doesn't note any extrinsics. pub fn note_extrinsic(encoded_xt: Vec) { >::insert(Self::extrinsic_index().unwrap_or_default(), encoded_xt); @@ -516,7 +516,7 @@ impl Module { >::put(extrinsic_index); } - /// Remove all extrinsics data and save the extrinsics trie root. + /// Remove all extrinsic data and save the extrinsics trie root. pub fn derive_extrinsics() { let extrinsics = (0..>::get().unwrap_or_default()).map(>::take).collect(); let xts_root = extrinsics_data_root::(extrinsics); diff --git a/srml/timestamp/src/lib.rs b/srml/timestamp/src/lib.rs index 6c7492c1dc..71fe2aed3f 100644 --- a/srml/timestamp/src/lib.rs +++ b/srml/timestamp/src/lib.rs @@ -16,39 +16,46 @@ //! # Timestamp Module //! -//! The timestamp module provides functionality to get and set the on-chain time. -//! To use it in your module, you need to implement the timestamp [`Trait`]. -//! The supported dispatchable functions are documented as part of the [`Call`] enum. +//! The Timestamp module provides functionality to get and set the on-chain time. +//! To use it in your runtime, you need to implement the [`timestamp::Trait`](./trait.Trait.html). +//! Dispatchable functions are documented as part of the [`Call`](./enum.Call.html) enum. //! //! ## Overview //! -//! The timestamp module allows the validators to set and validate a timestamp with each block. +//! The Timestamp module allows the validators to set and validate a timestamp with each block. //! -//! It uses inherents for timestamp data, which is provided by the block author and validated/verified by other validators. -//! The timestamp can be set only once per block and must be set each block. There could be a constraint on how much time must pass before setting the new timestamp. +//! It uses inherents for timestamp data, which is provided by the block author and validated/verified +//! by other validators. The timestamp can be set only once per block and must be set each block. +//! There could be a constraint on how much time must pass before setting the new timestamp. //! -//! **NOTE:** The timestamp module is the recommended way to query the on-chain time instead of using an approach based on block numbers. -//! The block numbers based time measurement can cause issues because of cummulative calculation errors and hence it should be avoided. +//! **NOTE:** The Timestamp module is the recommended way to query the on-chain time instead of using +//! an approach based on block numbers. The block number based time measurement can cause issues +//! because of cumulative calculation errors and hence should be avoided. //! //! ## Interface //! -//! ### Dispatchable functions ([`Call`]) +//! ### Dispatchable Functions //! //! * `set` - Sets the current time. //! -//! ### Public functions ([`Module`]) +//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. //! -//! * `get` - Gets the current time for the current block. If this function is called prior the setting to timestamp, it will return the timestamp of the previous block. +//! ### Public functions //! +//! * `get` - Gets the current time for the current block. If this function is called prior to +//! setting the timestamp, it will return the timestamp of the previous block. //! * `minimum_period` - Gets the minimum (and advised) period between blocks for the chain. //! +//! See the [`Module`](./struct.Module.html) struct for details of publicly available functions. +//! //! ## Usage //! -//! The following example shows how to use the timestamp module in your custom module to query the current timestamp. +//! The following example shows how to use the Timestamp module in your custom module to query the current timestamp. //! //! ### Prerequisites //! -//! Import the `timestamp` module in your custom module and derive the module configuration trait from the `timestamp` trait. +//! Import the Timestamp module into your custom module and derive the module configuration +//! trait from the timestamp trait. //! //! ### Get current timestamp //! @@ -69,15 +76,15 @@ //! } //! ``` //! -//! ### Example from SRML +//! ### Example from the SRML //! -//! The [`Session` module](https://github.com/paritytech/substrate/blob/master/srml/session/src/lib.rs) uses the `timestamp` module for session management. +//! The [Session module](https://github.com/paritytech/substrate/blob/master/srml/session/src/lib.rs) uses +//! the Timestamp module for session management. //! //! ## Related Modules //! -//! * [`System`](https://crates.parity.io/srml_system/index.html) -//! * [`Session`](https://crates.parity.io/srml_session/index.html) -//! +//! * [`System`](../srml_system/index.html) +//! * [`Session`](../srml_session/index.html) #![cfg_attr(not(feature = "std"), no_std)] -- GitLab From 993ba2f7f57a8c0a278406fad6c4e7137b3debd1 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Tue, 16 Apr 2019 15:38:12 +0200 Subject: [PATCH 019/206] Use correct prefix needed by child trie in contract (#2292) * resolve child trie usage * update locks * increase version * fix test * Revert "update locks" This reverts commit 6f537458b39df4a3bf05a311253986f29289f391. --- srml/contract/src/lib.rs | 7 ++++++- srml/contract/src/tests.rs | 38 ++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index 9ab717bb1a..ac3d503177 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -105,6 +105,7 @@ use srml_support::dispatch::{Result, Dispatchable}; use srml_support::{Parameter, StorageMap, StorageValue, decl_module, decl_event, decl_storage, storage::child}; use srml_support::traits::{OnFreeBalanceZero, OnUnbalanced, Currency}; use system::{ensure_signed, RawOrigin}; +use substrate_primitives::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX; use timestamp; pub type CodeHash = ::Hash; @@ -158,7 +159,11 @@ where let mut buf = Vec::new(); buf.extend_from_slice(account_id.as_ref()); buf.extend_from_slice(&new_seed.to_le_bytes()[..]); - T::Hashing::hash(&buf[..]).as_ref().into() + + CHILD_STORAGE_KEY_PREFIX.iter() + .chain(T::Hashing::hash(&buf[..]).as_ref().iter()) + .cloned() + .collect() } } diff --git a/srml/contract/src/tests.rs b/srml/contract/src/tests.rs index 2f80023322..7207835925 100644 --- a/srml/contract/src/tests.rs +++ b/srml/contract/src/tests.rs @@ -34,11 +34,12 @@ use assert_matches::assert_matches; use crate::{ ContractAddressFor, GenesisConfig, Module, RawEvent, Trait, ComputeDispatchFee, TrieIdGenerator, TrieId, - AccountInfo, AccountInfoOf, + AccountInfo, AccountInfoOf, TrieIdFromParentCounter }; use substrate_primitives::storage::well_known_keys; use parity_codec::{Encode, Decode, KeyedVec}; use std::sync::atomic::{AtomicUsize, Ordering}; +use crate::account_db::{DirectAccountDb, OverlayAccountDb, AccountDb}; mod contract { // Re-export contents of the root. This basically @@ -238,29 +239,37 @@ fn refunds_unused_gas() { #[test] fn account_removal_removes_storage() { - let unique_id1 = b"unique_id1"; - let unique_id2 = b"unique_id2"; with_externalities( &mut ExtBuilder::default().existential_deposit(100).build(), || { + let trie_id1 = ::TrieIdGenerator::trie_id(&1); + let trie_id2 = ::TrieIdGenerator::trie_id(&2); + let key1 = &[1; 32]; + let key2 = &[2; 32]; + // Set up two accounts with free balance above the existential threshold. { Balances::deposit_creating(&1, 110); AccountInfoOf::::insert(1, &AccountInfo { - trie_id: unique_id1.to_vec(), + trie_id: trie_id1.clone(), storage_size: 0, }); - child::put(&unique_id1[..], &b"foo".to_vec(), &b"1".to_vec()); - assert_eq!(child::get(&unique_id1[..], &b"foo".to_vec()), Some(b"1".to_vec())); - child::put(&unique_id1[..], &b"bar".to_vec(), &b"2".to_vec()); + + let mut overlay = OverlayAccountDb::::new(&DirectAccountDb); + overlay.set_storage(&1, key1.clone(), Some(b"1".to_vec())); + overlay.set_storage(&1, key2.clone(), Some(b"2".to_vec())); + DirectAccountDb.commit(overlay.into_change_set()); Balances::deposit_creating(&2, 110); AccountInfoOf::::insert(2, &AccountInfo { - trie_id: unique_id2.to_vec(), + trie_id: trie_id2.clone(), storage_size: 0, }); - child::put(&unique_id2[..], &b"hello".to_vec(), &b"3".to_vec()); - child::put(&unique_id2[..], &b"world".to_vec(), &b"4".to_vec()); + + let mut overlay = OverlayAccountDb::::new(&DirectAccountDb); + overlay.set_storage(&2, key1.clone(), Some(b"3".to_vec())); + overlay.set_storage(&2, key2.clone(), Some(b"4".to_vec())); + DirectAccountDb.commit(overlay.into_change_set()); } // Transfer funds from account 1 of such amount that after this transfer @@ -272,15 +281,16 @@ fn account_removal_removes_storage() { // Verify that all entries from account 1 is removed, while // entries from account 2 is in place. { - assert_eq!(child::get_raw(&unique_id1[..], &b"foo".to_vec()), None); - assert_eq!(child::get_raw(&unique_id1[..], &b"bar".to_vec()), None); + // let a: ::AccountId = 1; + assert!(>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key1).is_none()); + assert!(>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key2).is_none()); assert_eq!( - child::get(&unique_id2[..], &b"hello".to_vec()), + >::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key1), Some(b"3".to_vec()) ); assert_eq!( - child::get(&unique_id2[..], &b"world".to_vec()), + >::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key2), Some(b"4".to_vec()) ); } -- GitLab From 0eabb1495e191effc5d76ac2796ee3e50f62b76c Mon Sep 17 00:00:00 2001 From: Amar Singh Date: Tue, 16 Apr 2019 14:46:03 -0100 Subject: [PATCH 020/206] Documentation for Aura Consensus Extension (#2074) --- srml/aura/src/lib.rs | 74 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 13 deletions(-) diff --git a/srml/aura/src/lib.rs b/srml/aura/src/lib.rs index 344ea64869..fc1830088d 100644 --- a/srml/aura/src/lib.rs +++ b/srml/aura/src/lib.rs @@ -14,7 +14,54 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Consensus extension module for Aura consensus. This manages offline reporting. +//! # Aura Module +//! +//! ## Overview +//! +//! The Aura module extends Aura consensus by managing offline reporting. +//! +//! ## Interface +//! +//! ### Public Functions +//! +//! See the [`Module`](./struct.Module.html) struct for details on publicly available functions. +//! +//! ## Usage +//! +//! ### Prerequisites +//! +//! Use of this module implies selection of the Aura algorithm. +//! +//! ### Simple Code Snippet +//! +//! Instantiate a report of skipped authorities: +//! +//! ```rust,ignore +//! let mut report = AuraReport { +//! start_slot: 6, // The first skipped slot +//! skipped: 3, // The number of authorities skipped +//! } +//! ``` +//! +//! See the `tests.rs` file in this module's directory for other simple code snippets that may make this module's +//! functionalities clearer. +//! +//! ## Related Modules +//! +//! - [`staking`](../srml_staking/index.html): The Staking module is called in Aura to enforce slashing +//! if validators miss a certain number of slots (see the [`StakingSlasher`](./struct.StakingSlasher.html) +//! struct and associated method). +//! - [`timestamp`](../srml_timestamp/index.html): The Timestamp module is used in Aura to track +//! consensus rounds (via `slots`). +//! - [`consensus`](../srml_consensus/index.html): The Consensus module does not relate directly to Aura, +//! but serves to manage offline reporting by implementing `ProvideInherent` in a similar way. +//! +//! ## References +//! +//! If you're interested in hacking on this module, it is useful to understand the interaction with +//! `substrate/core/inherents/src/lib.rs` and, specifically, the required implementation of +//! [`ProvideInherent`](../substrate_inherents/trait.ProvideInherent.html) and +//! [`ProvideInherentData`](../substrate_inherents/trait.ProvideInherentData.html) to create and check inherents. #![cfg_attr(not(feature = "std"), no_std)] @@ -35,13 +82,13 @@ use inherents::{InherentDataProviders, ProvideInherentData}; mod mock; mod tests; -/// The aura inherent identifier. +/// The Aura inherent identifier. pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"auraslot"; -/// The type of the aura inherent. +/// The type of the Aura inherent. pub type InherentType = u64; -/// Auxiliary trait to extract aura inherent data. +/// Auxiliary trait to extract Aura inherent data. pub trait AuraInherentData { /// Get aura inherent data. fn aura_inherent_data(&self) -> result::Result; @@ -107,7 +154,7 @@ impl ProvideInherentData for InherentDataProvider { } } -/// Something which can handle Aura consensus reports. +/// Something that can handle Aura consensus reports. pub trait HandleReport { fn handle_report(report: AuraReport); } @@ -123,7 +170,7 @@ pub trait Trait: timestamp::Trait { decl_storage! { trait Store for Module as Aura { - // The last timestamp. + /// The last timestamp. LastTimestamp get(last) build(|_| T::Moment::sa(0)): T::Moment; } } @@ -132,7 +179,7 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { } } -/// A report of skipped authorities in aura. +/// A report of skipped authorities in Aura. #[derive(Clone, Encode, Decode, PartialEq, Eq)] #[cfg_attr(feature = "std", derive(Debug))] pub struct AuraReport { @@ -143,14 +190,14 @@ pub struct AuraReport { } impl AuraReport { - /// Call the closure with (validator_indices, punishment_count) for each + /// Call the closure with (`validator_indices`, `punishment_count`) for each /// validator to punish. pub fn punish(&self, validator_count: usize, mut punish_with: F) where F: FnMut(usize, usize) { - // If all validators have been skipped, then it implies some sort of + // If all validators have been skipped, then it implies some sort of // systematic problem common to all rather than a minority of validators - // unfulfilling their specific duties. In this case, it doesn't make + // not fulfilling their specific duties. In this case, it doesn't make // sense to punish anyone, so we guard against it. if self.skipped < validator_count { for index in 0..self.skipped { @@ -161,10 +208,10 @@ impl AuraReport { } impl Module { - /// Determine the Aura slot-duration based on the timestamp module configuration. + /// Determine the Aura slot-duration based on the Timestamp module configuration. pub fn slot_duration() -> u64 { // we double the minimum block-period so each author can always propose within - // the majority of their slot. + // the majority of its slot. >::minimum_period().as_().saturating_mul(2) } @@ -202,7 +249,7 @@ impl OnTimestampSet for Module { } } -/// A type for performing slashing based on aura reports. +/// A type for performing slashing based on Aura reports. pub struct StakingSlasher(::rstd::marker::PhantomData); impl HandleReport for StakingSlasher { @@ -228,6 +275,7 @@ impl ProvideInherent for Module { None } + /// Verify the validity of the inherent using the timestamp. fn check_inherent(call: &Self::Call, data: &InherentData) -> result::Result<(), Self::Error> { let timestamp = match call { timestamp::Call::set(ref timestamp) => timestamp.clone(), -- GitLab From 2fd2e4ba3a65084e34581302188aafb44ea2253f Mon Sep 17 00:00:00 2001 From: thiolliere Date: Tue, 16 Apr 2019 18:09:34 +0200 Subject: [PATCH 021/206] Fix contract child usage (#2299) * Fix contract child usage * bump implementation version --- node/runtime/src/lib.rs | 2 +- srml/contract/src/account_db.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 4c019c03c9..170c2924e0 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -60,7 +60,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 62, - impl_version: 63, + impl_version: 64, apis: RUNTIME_API_VERSIONS, }; diff --git a/srml/contract/src/account_db.rs b/srml/contract/src/account_db.rs index 566b1c4c84..fdf36ee8ac 100644 --- a/srml/contract/src/account_db.rs +++ b/srml/contract/src/account_db.rs @@ -105,7 +105,7 @@ impl AccountDb for DirectAccountDb { let mut new_storage_size = info.storage_size; for (k, v) in changed.storage.into_iter() { - if let Some(value) = child::get::>(&info.trie_id[..], &k) { + if let Some(value) = child::get_raw(&info.trie_id[..], &k) { new_storage_size -= value.len() as u64; } if let Some(value) = v { -- GitLab From 1faed993e6b6ced8071e5bfe903ea6c1dd5d6c44 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 17 Apr 2019 12:03:00 +0200 Subject: [PATCH 022/206] Use ed25519 by default for network keys (#2290) --- core/cli/src/params.rs | 2 +- core/network-libp2p/src/config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/src/params.rs b/core/cli/src/params.rs index 0c4f0bfd64..16279af15e 100644 --- a/core/cli/src/params.rs +++ b/core/cli/src/params.rs @@ -189,7 +189,7 @@ pub struct NodeKeyParams { raw( possible_values = "&NodeKeyType::variants()", case_insensitive = "true", - default_value = r#""Secp256k1""# + default_value = r#""Ed25519""# ) )] pub node_key_type: NodeKeyType, diff --git a/core/network-libp2p/src/config.rs b/core/network-libp2p/src/config.rs index 74f9280005..9d74cd73e2 100644 --- a/core/network-libp2p/src/config.rs +++ b/core/network-libp2p/src/config.rs @@ -61,7 +61,7 @@ impl Default for NetworkConfiguration { listen_addresses: Vec::new(), public_addresses: Vec::new(), boot_nodes: Vec::new(), - node_key: NodeKeyConfig::Secp256k1(Secret::New), + node_key: NodeKeyConfig::Ed25519(Secret::New), in_peers: 25, out_peers: 75, reserved_nodes: Vec::new(), -- GitLab From fc0bb2a529edc09d31481af9c55327b4113dc4d8 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Wed, 17 Apr 2019 13:40:13 +0200 Subject: [PATCH 023/206] Make existing docs more consistent (#2307) * opening and closing links * sudo example compiles * add Aura after it was merged to master * remove extern crate line --- srml/aura/src/lib.rs | 11 +++++---- srml/balances/src/lib.rs | 34 +++++++++++++-------------- srml/consensus/src/lib.rs | 22 +++++++++++------- srml/contract/src/lib.rs | 12 ++++------ srml/staking/src/lib.rs | 26 ++++++++++----------- srml/sudo/src/lib.rs | 49 +++++---------------------------------- srml/system/src/lib.rs | 3 ++- srml/timestamp/src/lib.rs | 13 ++++------- 8 files changed, 67 insertions(+), 103 deletions(-) diff --git a/srml/aura/src/lib.rs b/srml/aura/src/lib.rs index fc1830088d..1dec04df06 100644 --- a/srml/aura/src/lib.rs +++ b/srml/aura/src/lib.rs @@ -16,6 +16,9 @@ //! # Aura Module //! +//! - [`aura::Trait`](./trait.Trait.html) +//! - [`Module`](./struct.Module.html) +//! //! ## Overview //! //! The Aura module extends Aura consensus by managing offline reporting. @@ -24,7 +27,7 @@ //! //! ### Public Functions //! -//! See the [`Module`](./struct.Module.html) struct for details on publicly available functions. +//! - `slot_duration` - Determine the Aura slot-duration based on the Timestamp module configuration. //! //! ## Usage //! @@ -48,12 +51,12 @@ //! //! ## Related Modules //! -//! - [`staking`](../srml_staking/index.html): The Staking module is called in Aura to enforce slashing +//! - [Staking](../srml_staking/index.html): The Staking module is called in Aura to enforce slashing //! if validators miss a certain number of slots (see the [`StakingSlasher`](./struct.StakingSlasher.html) //! struct and associated method). -//! - [`timestamp`](../srml_timestamp/index.html): The Timestamp module is used in Aura to track +//! - [Timestamp](../srml_timestamp/index.html): The Timestamp module is used in Aura to track //! consensus rounds (via `slots`). -//! - [`consensus`](../srml_consensus/index.html): The Consensus module does not relate directly to Aura, +//! - [Consensus](../srml_consensus/index.html): The Consensus module does not relate directly to Aura, //! but serves to manage offline reporting by implementing `ProvideInherent` in a similar way. //! //! ## References diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index 5c2de04c03..93ed2e1921 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -17,8 +17,10 @@ //! # Balances Module //! //! The Balances module provides functionality for handling accounts and balances. -//! To use it in your runtime, you need to implement the [`balances::Trait`](./trait.Trait.html). -//! Dispatchable functions are documented as part of the [`Call`](./enum.Call.html) enum. +//! +//! - [`balances::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! - [`Module`](./struct.Module.html) //! //! ## Overview //! @@ -81,14 +83,10 @@ //! - `transfer` - Transfer some liquid free balance to another account. //! - `set_balance` - Set the balances of a given account. The origin of this call must be root. //! -//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. -//! //! ### Public Functions //! //! - `vesting_balance` - Get the amount that is currently being vested and cannot be transferred out of this account. //! -//! See the [`Module`](./struct.Module.html) struct for details of publicly available functions. -//! //! ## Usage //! //! The following examples show how to use the Balances module in your custom module. @@ -99,17 +97,24 @@ //! //! [(lib.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/lib.rs): //! -//! ```rust,ignore -//! use srml_support::traits::Currency +//! ```ignore +//! # extern crate srml_support; +//! use srml_support::traits::Currency; +//! # pub trait Trait: balances::Trait { +//! # type Currency: Currency; +//! # } //! //! pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; //! pub type NegativeImbalanceOf = <::Currency as Currency<::AccountId>>::NegativeImbalance; +//! +//! # fn main() {} //!``` //! //! [(gas.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/gas.rs): //! -//! ```rust,ignore -//! use srml_support::traits::Currency +//! ```ignore +//! use srml_support::traits::Currency; +//! # pub trait Trait: system::Trait {} //! //! pub fn refund_unused_gas( //! transactor: &T::AccountId, @@ -129,17 +134,12 @@ //! T::GasPayment::on_unbalanced(imbalance); //! } //! } +//! # fn main() {} //! ``` //! //! ## Genesis config //! -//! The Balances module depends on the genesis configuration. See the [`GenesisConfig`](./struct.GenesisConfig.html) -//! struct for a list of attributes that can be provided. -//! -//! ## Related Modules -//! -//! - [`system`](../srml_system/index.html) -//! - [`srml_support`](../srml_support/index.html) +//! The Balances module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). #![cfg_attr(not(feature = "std"), no_std)] diff --git a/srml/consensus/src/lib.rs b/srml/consensus/src/lib.rs index 68faf88382..d5ee023c93 100644 --- a/srml/consensus/src/lib.rs +++ b/srml/consensus/src/lib.rs @@ -16,6 +16,10 @@ //! # Consensus Module //! +//! - [`consensus::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! - [`Module`](./struct.Module.html) +//! //! ## Overview //! //! The consensus module manages the authority set for the native code. It provides support for reporting offline @@ -33,11 +37,12 @@ //! - `set_code` - Set the new code. //! - `set_storage` - Set some items of storage. //! -//! Please refer to the [`Call`](./enum.Call.html) enum and its associated variants for documentation on each function. -//! //! ### Public Functions //! -//! See the [module](./struct.Module.html) for details on publicly available functions. +//! - `authorities` - Get the current set of authorities. These are the session keys. +//! - `set_authorities` - Set the current set of authorities' session keys. +//! - `set_authority_count` - Set the total number of authorities. +//! - `set_authority` - Set a single authority by index. //! //! ## Usage //! @@ -101,11 +106,11 @@ //! //! ## Related Modules //! -//! - [`staking`](../srml_staking/index.html): This module uses `srml-consensus` to monitor offline +//! - [Staking](../srml_staking/index.html): This module uses `srml-consensus` to monitor offline //! reporting among validators. -//! - [`aura`](../srml_aura/index.html): This module does not relate directly to `srml-consensus`, +//! - [Aura](../srml_aura/index.html): This module does not relate directly to `srml-consensus`, //! but serves to manage offline reporting for the Aura consensus algorithm with its own `handle_report` method. -//! - [`grandpa`](../srml_grandpa/index.html): Although GRANDPA does its own voter-set management, +//! - [Grandpa](../srml_grandpa/index.html): Although GRANDPA does its own voter-set management, //! it has a mode where it can track `consensus`, if desired. //! //! ## References @@ -339,7 +344,8 @@ impl Module { AuthorityStorageVec::::items() } - /// Set the current set of authorities' session keys. + /// Set the current set of authorities' session keys. Will not exceed the current + /// authorities count, even if the given `authorities` is longer. /// /// Called by `rotate_session` only. pub fn set_authorities(authorities: &[T::SessionKey]) { @@ -350,7 +356,7 @@ impl Module { } } - /// Set a single authority by index. + /// Set the total number of authorities. pub fn set_authority_count(count: u32) { Self::save_original_authorities(None); AuthorityStorageVec::::set_count(count); diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index ac3d503177..42bdf3240c 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -17,7 +17,9 @@ //! # Contract Module //! //! The Contract module provides functionality for the runtime to deploy and execute WebAssembly smart-contracts. -//! To use it in your runtime, you need to implement the [`contracts::Trait`](./trait.Trait.html). +//! +//! - [`contract::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) //! //! ## Overview //! @@ -61,12 +63,6 @@ //! This creates a new smart contract account and calls its contract deploy handler to initialize the contract. //! * `call` - Makes a call to an account, optionally transferring some balance. //! -//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. -//! -//! ### Public functions -//! -//! See the [`Module`](./struct.Module.html) struct for details on publicly available functions. -//! //! ## Usage //! //! The Contract module is a work in progress. The following examples show how this Contract module can be @@ -77,7 +73,7 @@ //! //! ## Related Modules //! -//! * [`Balances`](../srml_balances/index.html) +//! * [Balances](../srml_balances/index.html) #![cfg_attr(not(feature = "std"), no_std)] diff --git a/srml/staking/src/lib.rs b/srml/staking/src/lib.rs index 3e85b79764..c58eb593f6 100644 --- a/srml/staking/src/lib.rs +++ b/srml/staking/src/lib.rs @@ -15,17 +15,20 @@ // along with Substrate. If not, see . //! # Staking Module -//! +//! +//! The Staking module is used to manage funds at stake by network maintainers. +//! +//! - [`staking::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! - [`Module`](./struct.Module.html) +//! +//! ## Overview //! //! The Staking module is the means by which a set of network maintainers (known as _authorities_ in some contexts //! and _validators_ in others) are chosen based upon those who voluntarily place funds under deposit. Under deposit, //! those funds are rewarded under normal operation but are held at pain of _slash_ (expropriation) should the //! staked maintainer be found not to be discharging its duties properly. //! -//! To use the Staking module in your runtime, you need to implement the [`staking::Trait`](./trait.Trait.html). -//! -//! ## Overview -//! //! ### Terminology //! //! @@ -118,12 +121,9 @@ //! The dispatchable functions of the Staking module enable the steps needed for entities to accept and change their //! role, alongside some helper functions to get/set the metadata of the module. //! -//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. -//! //! ### Public Functions //! -//! The Staking module contains many public storage items and (im)mutable functions. Please refer to the -//! [struct list](#structs) below and the [`Module`](./struct.Module.html) struct definition for more details. +//! The Staking module contains many public storage items and (im)mutable functions. //! //! ## Usage //! @@ -260,15 +260,13 @@ //! //! ## GenesisConfig //! -//! The Staking module depends on the genesis configuration. See the [`GenesisConfig`](./struct.GenesisConfig.html) -//! struct for a list of attributes that can be provided. +//! The Staking module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). //! //! ## Related Modules //! -//! - [**Balances**](../srml_balances/index.html): Used to manage values at stake. -//! - [**Session**](../srml_session/index.html): Used to manage sessions. Also, a list of new validators is +//! - [Balances](../srml_balances/index.html): Used to manage values at stake. +//! - [Session](../srml_session/index.html): Used to manage sessions. Also, a list of new validators is //! stored in the Session module's `Validators` at the end of each era. -//! - [**System**](../srml_system/index.html): Used to obtain block number and time, among other details. #![cfg_attr(not(feature = "std"), no_std)] diff --git a/srml/sudo/src/lib.rs b/srml/sudo/src/lib.rs index 1d2e007820..8c59536469 100644 --- a/srml/sudo/src/lib.rs +++ b/srml/sudo/src/lib.rs @@ -16,6 +16,9 @@ //! # Sudo Module //! +//! - [`sudo::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! //! ## Overview //! //! The Sudo module allows for a single account (called the "sudo key") @@ -23,8 +26,6 @@ //! or designate a new account to replace them as the sudo key. //! Only one account can be the sudo key at a time. //! -//! You can start using the Sudo module by implementing the [`sudo::Trait`](./trait.Trait.html). -//! //! ## Interface //! //! ### Dispatchable Functions @@ -34,27 +35,8 @@ //! * `sudo` - Make a `Root` call to a dispatchable function. //! * `set_key` - Assign a new account to be the sudo key. //! -//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. -//! //! ## Usage //! -//! ### Prerequisites -//! -//! To use the Sudo module in your runtime, you must implement the following trait in your runtime: -//! -//! ```ignore -//! impl sudo::Trait for Runtime { -//! type Event = Event; -//! type Proposal = Call; -//! } -//! ``` -//! -//! You can then import the Sudo module in your `construct_runtime!` macro with: -//! -//! ```ignore -//! Sudo: sudo, -//! ``` -//! //! ### Executing Privileged Functions //! //! The Sudo module itself is not intended to be used within other modules. @@ -68,8 +50,8 @@ //! //! This is an example of a module that exposes a privileged function: //! -//! ```ignore -//! use support::{decl_module, dispatch::Result}; +//! ``` +//! use srml_support::{decl_module, dispatch::Result}; //! use system::ensure_root; //! //! pub trait Trait: system::Trait {} @@ -85,18 +67,7 @@ //! } //! } //! } -//! ``` -//! -//! ### Example from SRML -//! -//! The Consensus module exposes a `set_code` privileged function -//! that allows you to set the on-chain Wasm runtime code: -//! -//! ```ignore -//! /// Set the new code. -//! pub fn set_code(new: Vec) { -//! storage::unhashed::put_raw(well_known_keys::CODE, &new); -//! } +//! # fn main() {} //! ``` //! //! ## Genesis Config @@ -104,14 +75,6 @@ //! The Sudo module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). //! You need to set an initial superuser account as the sudo `key`. //! -//! ```ignore -//! GenesisConfig { -//! sudo: Some(SudoConfig { -//! key: AccountId, -//! }) -//! } -//! ``` -//! //! ## Related Modules //! //! * [Consensus](../srml_consensus/index.html) diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index 72a8636156..c410afd9ce 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -18,7 +18,8 @@ //! //! The System module provides low-level access to core types and cross-cutting utilities. //! It acts as the base layer for other SRML modules to interact with the Substrate framework components. -//! To use it in your module, you need to implement the [`system::Trait`](./trait.Trait.html). +//! +//! - [`system::Trait`](./trait.Trait.html) //! //! ## Overview //! diff --git a/srml/timestamp/src/lib.rs b/srml/timestamp/src/lib.rs index 71fe2aed3f..9b72a1ac9b 100644 --- a/srml/timestamp/src/lib.rs +++ b/srml/timestamp/src/lib.rs @@ -17,8 +17,10 @@ //! # Timestamp Module //! //! The Timestamp module provides functionality to get and set the on-chain time. -//! To use it in your runtime, you need to implement the [`timestamp::Trait`](./trait.Trait.html). -//! Dispatchable functions are documented as part of the [`Call`](./enum.Call.html) enum. +//! +//! - [`timestamp::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! - [`Module`](./struct.Module.html) //! //! ## Overview //! @@ -38,16 +40,12 @@ //! //! * `set` - Sets the current time. //! -//! See the [`Call`](./enum.Call.html) enum and its associated variants for details of each function. -//! //! ### Public functions //! //! * `get` - Gets the current time for the current block. If this function is called prior to //! setting the timestamp, it will return the timestamp of the previous block. //! * `minimum_period` - Gets the minimum (and advised) period between blocks for the chain. //! -//! See the [`Module`](./struct.Module.html) struct for details of publicly available functions. -//! //! ## Usage //! //! The following example shows how to use the Timestamp module in your custom module to query the current timestamp. @@ -83,8 +81,7 @@ //! //! ## Related Modules //! -//! * [`System`](../srml_system/index.html) -//! * [`Session`](../srml_session/index.html) +//! * [Session](../srml_session/index.html) #![cfg_attr(not(feature = "std"), no_std)] -- GitLab From 887a1ab53558d1284cfb8e93831916c89958a016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 17 Apr 2019 15:04:50 +0200 Subject: [PATCH 024/206] Remove peerset debug output test (#2311) We should not test debug output, especially when it can change. --- core/peerset/src/slots.rs | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/core/peerset/src/slots.rs b/core/peerset/src/slots.rs index 299e2c0e9d..094e01ac60 100644 --- a/core/peerset/src/slots.rs +++ b/core/peerset/src/slots.rs @@ -219,36 +219,4 @@ mod tests { assert_eq!(expected, slots.debug_info()); } - - #[test] - fn test_slots_debug() { - let reserved_peer = PeerId::random(); - let reserved_peer2 = PeerId::random(); - let common_peer = PeerId::random(); - let mut slots = Slots::new(10); - - slots.add_peer(reserved_peer.clone(), SlotType::Reserved); - slots.add_peer(reserved_peer2.clone(), SlotType::Reserved); - slots.add_peer(common_peer.clone(), SlotType::Common); - - let expected = format!("Slots {{ - max_slots: 10, - reserved: [ - PeerId( - {:?} - ), - PeerId( - {:?} - ) - ], - common: [ - PeerId( - {:?} - ) - ] -}}", reserved_peer.to_base58(), reserved_peer2.to_base58(), common_peer.to_base58()); - - let s = format!("{:#?}", slots); - assert_eq!(expected, s); - } } -- GitLab From 4999397966afa193f57c2ce72974313485b1b6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Wed, 17 Apr 2019 15:50:39 +0100 Subject: [PATCH 025/206] grandpa: observer (#2244) * grandpa: initial implementation of minimal grandpa worker * grandpa: extract grandpa observer future to function * grandpa: add test for observer * grandpa: start observer if no local key is defined * grandpa: add minor comments * grandpa: observer: log invalid commit * grandpa: observer: persist voter set state on authority change and pause * grandpa: observer: use commit processing callback * grandpa: keep run_grandpa to avoid breaking public api * grandpa: use grandpa::process_commit_validation_result * grandpa: use finality-grandpa 0.7.2 --- Cargo.lock | 1143 +++++++++++----------- core/finality-grandpa/Cargo.toml | 2 +- core/finality-grandpa/src/environment.rs | 61 +- core/finality-grandpa/src/lib.rs | 25 +- core/finality-grandpa/src/observer.rs | 281 ++++++ core/finality-grandpa/src/tests.rs | 103 +- node/cli/src/service.rs | 38 +- 7 files changed, 1028 insertions(+), 625 deletions(-) create mode 100644 core/finality-grandpa/src/observer.rs diff --git a/Cargo.lock b/Cargo.lock index 3577200e06..be65569197 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ name = "MacTypes-sys" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -41,18 +41,10 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.7.3" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -64,7 +56,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -73,7 +65,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -114,7 +106,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -127,9 +119,9 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -139,15 +131,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.15" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -156,7 +148,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -197,23 +189,22 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.47.3" +version = "0.43.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -309,7 +300,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -331,10 +322,10 @@ dependencies = [ [[package]] name = "cexpr" -version = "0.3.5" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -358,7 +349,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -412,7 +403,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -420,7 +411,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -432,17 +423,17 @@ dependencies = [ "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -468,7 +459,7 @@ dependencies = [ "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -478,7 +469,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -590,13 +581,11 @@ dependencies = [ [[package]] name = "csv" -version = "1.0.6" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -604,21 +593,21 @@ name = "csv-core" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctor" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctr" -version = "0.3.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -631,7 +620,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -645,13 +634,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "1.1.3" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -668,7 +657,7 @@ dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -712,7 +701,7 @@ version = "1.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -720,7 +709,7 @@ dependencies = [ [[package]] name = "either" -version = "1.5.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -739,7 +728,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -753,16 +742,16 @@ name = "error-chain" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "exit-future" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -770,7 +759,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -781,7 +770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -795,12 +784,12 @@ name = "fdlimit" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "finality-grandpa" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -819,7 +808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -856,9 +845,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -891,7 +880,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -926,28 +915,28 @@ name = "globset" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -957,7 +946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hash256-std-hasher" -version = "0.12.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -982,7 +971,7 @@ name = "heapsize" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1000,16 +989,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hex-literal" -version = "0.1.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hex-literal-impl" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1046,10 +1035,10 @@ dependencies = [ [[package]] name = "http" -version = "0.1.17" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1077,7 +1066,7 @@ dependencies = [ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1087,25 +1076,24 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.25" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1136,7 +1124,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1159,7 +1147,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1168,7 +1156,7 @@ name = "itertools" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1178,74 +1166,74 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" -version = "10.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-derive" -version = "10.1.0" +version = "10.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" -version = "10.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" -version = "10.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" -version = "10.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" -version = "10.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1259,11 +1247,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "keccak-hasher" -version = "0.12.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1304,9 +1292,9 @@ dependencies = [ "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1327,7 +1315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" +version = "0.2.48" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1336,7 +1324,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1344,7 +1332,7 @@ name = "libp2p" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1367,11 +1355,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1381,7 +1369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1392,16 +1380,16 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1415,7 +1403,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1428,7 +1416,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1437,16 +1425,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1455,17 +1443,17 @@ name = "libp2p-identify" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1480,7 +1468,7 @@ dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1490,11 +1478,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1513,9 +1501,9 @@ dependencies = [ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1526,14 +1514,14 @@ name = "libp2p-mplex" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1542,16 +1530,16 @@ name = "libp2p-noise" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", - "snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1561,7 +1549,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1569,7 +1557,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1594,7 +1582,7 @@ dependencies = [ "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1604,21 +1592,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1633,7 +1621,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1659,9 +1647,9 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1672,19 +1660,20 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librocksdb-sys" -version = "5.17.2" +version = "5.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1746,6 +1735,11 @@ dependencies = [ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "make-cmd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "matches" version = "0.1.8" @@ -1753,10 +1747,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.2.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1781,12 +1776,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "merlin" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1808,7 +1804,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1833,7 +1829,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1853,12 +1849,12 @@ name = "multistream-select" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1876,15 +1872,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1893,8 +1889,8 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1905,7 +1901,7 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1913,9 +1909,9 @@ dependencies = [ name = "node-cli" version = "1.0.0" dependencies = [ - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 1.0.0", "node-primitives 1.0.0", @@ -1923,7 +1919,7 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", - "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-basic-authorship 1.0.0", "substrate-cli 1.0.0", "substrate-client 1.0.0", @@ -1975,8 +1971,8 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -1987,13 +1983,13 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "sr-version 1.0.0", @@ -2028,9 +2024,9 @@ version = "1.0.0" dependencies = [ "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2057,8 +2053,8 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2091,10 +2087,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" -version = "4.2.3" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2113,10 +2109,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.10.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2143,15 +2139,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.10.20" +version = "0.10.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2161,13 +2157,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.43" +version = "0.9.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2176,7 +2171,7 @@ name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2207,7 +2202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2218,7 +2213,7 @@ dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2242,7 +2237,7 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2273,7 +2268,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2316,10 +2311,10 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2327,11 +2322,11 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2339,31 +2334,31 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste-impl" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2406,7 +2401,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2445,7 +2440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2453,6 +2448,14 @@ name = "proc-macro-hack-impl" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro2" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "0.4.27" @@ -2463,7 +2466,7 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.4.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2486,6 +2489,14 @@ name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "quote" version = "0.6.12" @@ -2499,7 +2510,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2509,10 +2520,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2522,9 +2533,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2533,16 +2544,16 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2588,31 +2599,31 @@ name = "rand_jitter" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_os" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_pcg" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2638,7 +2649,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2649,8 +2660,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2663,7 +2674,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.53" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2671,7 +2682,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2681,19 +2692,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.1.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2704,7 +2715,7 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2726,10 +2737,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2737,8 +2748,8 @@ name = "rocksdb" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2747,7 +2758,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2781,9 +2792,9 @@ name = "rw-stream-sink" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2814,23 +2825,23 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.15" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schnorrkel" -version = "0.1.1" -source = "git+https://github.com/paritytech/schnorrkel#1762df02ac48ba5c3fa8c162e19a393247079f88" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2841,13 +2852,13 @@ dependencies = [ [[package]] name = "schnorrkel" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/paritytech/schnorrkel#1762df02ac48ba5c3fa8c162e19a393247079f88" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2876,7 +2887,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2887,7 +2898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2905,27 +2916,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.90" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.90" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.39" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3003,8 +3014,8 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3020,12 +3031,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.9" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "snow" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3035,9 +3049,8 @@ dependencies = [ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3060,7 +3073,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-state-machine 1.0.0", "substrate-test-client 1.0.0", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3087,9 +3100,9 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -3105,7 +3118,7 @@ dependencies = [ "sr-std 1.0.0", "substrate-primitives 1.0.0", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3121,8 +3134,8 @@ version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -3131,9 +3144,9 @@ dependencies = [ name = "srml-assets" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3146,11 +3159,11 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3168,10 +3181,10 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3185,10 +3198,10 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3203,12 +3216,12 @@ name = "srml-contract" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-sandbox 1.0.0", @@ -3226,10 +3239,10 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3244,11 +3257,11 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3262,9 +3275,9 @@ dependencies = [ name = "srml-example" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "srml-balances 1.0.0", @@ -3277,9 +3290,9 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3294,12 +3307,12 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3314,8 +3327,8 @@ name = "srml-grandpa" version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3332,11 +3345,11 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3351,8 +3364,8 @@ name = "srml-metadata" version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -3361,11 +3374,11 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3380,10 +3393,10 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3401,9 +3414,9 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3418,13 +3431,13 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3441,7 +3454,7 @@ dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3452,7 +3465,7 @@ dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3461,7 +3474,7 @@ version = "1.0.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3469,8 +3482,8 @@ name = "srml-support-test" version = "0.1.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "srml-support 1.0.0", "substrate-inherents 1.0.0", @@ -3482,11 +3495,11 @@ name = "srml-system" version = "1.0.0" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3498,9 +3511,9 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3514,10 +3527,10 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3544,13 +3557,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stdweb" -version = "0.4.15" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3561,24 +3574,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stdweb-internal-macros" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3606,22 +3619,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3637,7 +3650,7 @@ dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3648,8 +3661,8 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", + "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", "substrate-primitives 1.0.0", "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3684,12 +3697,12 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.2.1" -source = "git+https://github.com/paritytech/substrate-bip39#44307fda4ea17fe97aeb93af317fbc8f6ed34193" +version = "0.2.0" +source = "git+https://github.com/paritytech/substrate-bip39#080da45923885cfec2379cef3dee4e7f43e6c260" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3703,16 +3716,16 @@ dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", - "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-client 1.0.0", "substrate-keyring 1.0.0", "substrate-network 0.1.0", @@ -3721,7 +3734,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-state-machine 1.0.0", "substrate-telemetry 1.0.0", - "sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3736,7 +3749,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3902,7 +3915,7 @@ name = "substrate-consensus-rhd" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3946,14 +3959,14 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -3963,7 +3976,7 @@ dependencies = [ "substrate-trie 1.0.0", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3971,7 +3984,7 @@ name = "substrate-finality-grandpa" version = "1.0.0" dependencies = [ "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "finality-grandpa 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "finality-grandpa 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 1.0.0", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4018,7 +4031,7 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4033,9 +4046,9 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4075,7 +4088,7 @@ name = "substrate-network-libp2p" version = "1.0.0" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4084,14 +4097,14 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-peerset 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4128,7 +4141,7 @@ dependencies = [ name = "substrate-panic-handler" version = "1.0.0" dependencies = [ - "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4141,7 +4154,7 @@ dependencies = [ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4152,29 +4165,29 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", - "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", "substrate-serializer 1.0.0", "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4184,17 +4197,17 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-version 1.0.0", @@ -4214,11 +4227,11 @@ dependencies = [ name = "substrate-rpc-servers" version = "1.0.0" dependencies = [ - "jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-rpc 1.0.0", ] @@ -4227,8 +4240,8 @@ dependencies = [ name = "substrate-serializer" version = "1.0.0" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4236,15 +4249,15 @@ name = "substrate-service" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -4300,7 +4313,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4319,8 +4332,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4350,12 +4363,12 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -4386,8 +4399,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-primitives 1.0.0", "substrate-test-runtime 1.0.0", @@ -4416,16 +4429,16 @@ version = "1.0.0" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", - "trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4440,7 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.30" +version = "0.15.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4455,19 +4468,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sysinfo" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4491,15 +4504,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.7" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4515,8 +4528,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4541,9 +4554,9 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4573,8 +4586,8 @@ name = "tinytemplate" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4585,7 +4598,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4593,16 +4606,16 @@ name = "tokio" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4617,9 +4630,9 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4657,23 +4670,23 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.12" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4681,12 +4694,11 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4703,12 +4715,12 @@ name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4721,7 +4733,7 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4745,7 +4757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4761,13 +4773,13 @@ name = "tokio-udp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4775,16 +4787,16 @@ name = "tokio-uds" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4792,7 +4804,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4802,17 +4814,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "trie-bench" -version = "0.12.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4837,12 +4849,12 @@ dependencies = [ [[package]] name = "trie-standardmap" -version = "0.12.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4904,7 +4916,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4923,7 +4935,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4941,12 +4953,20 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unsigned-varint" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5005,9 +5025,9 @@ name = "wabt" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5027,7 +5047,7 @@ version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5043,22 +5063,23 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "websocket" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5072,11 +5093,10 @@ dependencies = [ [[package]] name = "which" -version = "2.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5086,7 +5106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.7" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5108,7 +5128,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5121,7 +5141,7 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5131,12 +5151,12 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5154,11 +5174,11 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5177,7 +5197,7 @@ name = "yamux" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5185,7 +5205,7 @@ dependencies = [ "quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5198,8 +5218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" "checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" -"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" +"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" "checksum aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f10b352bc3fc08ae24dc5d2d3ddcac153678533986122dc283d747b12071000" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" @@ -5210,14 +5229,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" +"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d55aa264e822dbafa12db4d54767aff17c6ba55ea2d8559b3e17392c7d000e5d" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebecac13b3c745150d7b6c3ea7572d372f09d627c2077e893bf26c5c7f70d282" -"checksum bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df683a55b54b41d5ea8ebfaebb5aa7e6b84e3f3006a78f010dadc9ca88469260" +"checksum bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d52d263eacd15d26cbcf215d254b410bd58212aaa2d3c453a04b2d3b3adcf41" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" "checksum blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91721a6330935673395a0607df4d49a9cb90ae12d259f1b3e0a3f6e1d486872e" @@ -5231,10 +5250,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" "checksum cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "389803e36973d242e7fecb092b2de44a3d35ac62524b3b9339e51d577d668e02" -"checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" +"checksum cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "644d693ecfa91955ed32dcc7eda4914e1be97a641fb6f0645a37348e20b230da" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" @@ -5261,13 +5280,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum crypto-mac 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "779015233ac67d65098614aec748ac1c756ab6677fa2e14cf8b37c08dfed1198" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f0782c7154d8dd08f4adeb5aa22ab178c10281915f7da68d10bb646f03aaee73" +"checksum csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd1c44c58078cfbeaf11fbb3eac9ae5534c23004ed770cc4bfb48e658ae4f04" "checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" -"checksum ctor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e5cc1c7c759bf979c651ce1da82d06065375e2223b65c070190b8000787da58b" -"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" +"checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" +"checksum ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "044f882973b245404e90c90e7e42e8ee8d7a64edfd7adf83d684fb97e8e2c1b6" "checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" -"checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" +"checksum curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dae47cc3529cdab597dbc8b606e565707209b506e55848f3c15679214a56c956" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" @@ -5276,17 +5295,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" "checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" +"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -"checksum exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d8013f441e38e31c670e7f34ec8f1d5d3a2bd9d303c1ff83976ca886005e8f48" +"checksum exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "87559b08e99a81a92bbb867d237543e43495857749f688e0773390a20d56c61c" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1ee15a7050e5580b3712877157068ea713b245b080ff302ae2ca973cfcd9baa" -"checksum finality-grandpa 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9da35679ad45649e32e6344a08a36e71ba5f5305ba02d18c34d262c49ce0072" +"checksum finality-grandpa 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5cdd9ef7c48777665dacc9657c272778121d4d09848100bcc2bd9c773c6cf837" "checksum fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a557e80084b05c32b455963ff565a9de6f2866da023d6671705c6aff6f65e01c" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" @@ -5302,24 +5321,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" -"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b" +"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" -"checksum hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b2027c19ec91eb304999abae7307d225cf93be42af53b0039f76e98ed5af86" +"checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8e04cb7a5051270ef3fa79f8c7604d581ecfa73d520e74f554e45541c4b5881a" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" -"checksum hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" +"checksum hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae0e5c30fb65e661a0e39860e37100dfbe4d39aff865e9357a6a4ed0b5bbf303" +"checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" -"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" +"checksum http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1a10e5b573b9a0146545010f50772b9e8b1dd0a256564cc4307694c68832a2f5" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5b6658b016965ae301fa995306db965c93677880ea70765a84235a96eae896" +"checksum hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)" = "860faf61a9957c9cb0e23e69f1c8290e92f6eb660fcdd1f2d6777043a2ae1a46" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" @@ -5329,14 +5348,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" -"checksum jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" -"checksum jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dae61ca8a3b047fb11309b00661bc56837085bd07e46f907b9c562c0b03e68" -"checksum jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11d2a00824306155b8ef57fe957f31b8cd8ad24262f15cf911d84dcf9a3f206d" -"checksum jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fce55133ee264d0ab42bd862efcd45ae1d062cda599f4cc12ccc4be3195f2a" -"checksum jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9527f01ef25f251d64082cbefc0c6d6f367349afe6848ef908a674e06b2bdd3" -"checksum jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3889012aa638a2f18eb1a879f46fc8b34e7e1423cbff3247cd1531de0d51084b" +"checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" +"checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" +"checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" +"checksum jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56608ed54b1b2a69f4357cb8bdfbcbd99fe1179383c03a09bb428931bd35f592" +"checksum jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5521613b31ea22d36d9f95ad642058dccec846a94ed8690957652d479f620707" +"checksum jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20b8333a5a6e6ccbcf5c90f90919de557cba4929efa164e9bd0e8e497eb20e46" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "af672553b2abac1c86c29fd62c79880638b6abc91d96db4aa42a5baab2bc1ca9" +"checksum keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a02fb74dc1b613522069b5f2023c014756ce121c6c6fb39364c139b0efc39a2d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" @@ -5344,7 +5363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" +"checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" "checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" @@ -5364,7 +5383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" "checksum libp2p-websocket 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "647bd8862afe6e912eb34b7614f731c0ff89e8777b57d9f2f5f0fd593ecc8d9a" "checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" -"checksum librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7dfb546562f9b450237bb8df7a31961849ee9fb1186d9e356db1d7a6b7609ff2" +"checksum librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9024327233e7fac7982440f73301c00046d438c5b1011e8f4e394226ce19007" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" @@ -5372,12 +5391,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +"checksum make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8ca8afbe8af1785e09636acb5a41e08a765f5f0340568716c18a8700ba3c0d3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7623b01a4f1b7acb7cf8e3f678f05e15e6ae26cb0b738dfeb5cc186fd6b82ef4" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "83c2dda19c01176e8e7148f7bdb88bbdf215a8db0641f89fc40e4b81736aeda5" +"checksum merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a9e97b439f6d38cbe2a4a4aa93f6770c5305f62761b78b1851406c09c87ee2a" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" @@ -5390,16 +5410,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b30adc557058ce00c9d0d7cb3c6e0b5bc6f36e2e2eabe74b0ba726d194abd588" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" -"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9" +"checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" +"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" @@ -5417,8 +5437,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79" -"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6" +"checksum paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f50392d1265092fbee9273414cc40eb6d47d307bd66222c477bb8450c8504f9d" +"checksum paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3cd512fe3a55e8933b2dcad913e365639db86d512e4004c3084b86864d9467a" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" @@ -5430,11 +5450,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8" "checksum proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e90aa19cd73dedc2d0e1e8407473f073d735fef0ab521438de6da8ee449ab66" "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" +"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "524d165d95627ddebba768db728216c4429bbb62882f7e6ab1a6c3c54a7ed830" +"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb" "checksum pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "efb0dcbddbb600f47a7098d33762a00552c671992171637f5bb310b37fe1f0e4" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" +"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" @@ -5446,18 +5468,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" +"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" "checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)" = "53848511b7ee6eb9d5c3db48481aaa5779b38fc0131bc133c98cb4f2b2411928" +"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6" -"checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0" -"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" +"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9381ed76c1ec4e8994f1f7d2c6d7e33eed3ff7176e16fece09c2e993fc4a5a" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" @@ -5472,18 +5494,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" -"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" +"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" +"checksum schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a700659388785588c75b197cecda0f23c7112a9281ef703e8ffc651061ce014c" "checksum schnorrkel 0.1.1 (git+https://github.com/paritytech/schnorrkel)" = "" -"checksum schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5eff518f9bed3d803a0d002af0ab96339b0ebbedde3bec98a684986134b7a39" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e" "checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" "checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" -"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" -"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" +"checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" +"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" @@ -5494,33 +5516,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" -"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" -"checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" +"checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" +"checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "92a7e0c5e3dfb52e8fbe0e63a1b947bbb17b4036408b151353c4491374931362" -"checksum stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a3edad410e603184d656e2abded5fd4d3d6e93d5763d21130dbaf99795db74eb" +"checksum stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "461e7f2e33670b1c33f1ea22bb2f86de6136fabd0c4d27d167ed425c231143ca" "checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930" -"checksum stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1635afd059cbfac7d5b1274f0c44cec110c1e013c48e8bbc22e07e52696cf887" +"checksum stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "432465093692af7379dcd196ce4be398c906958d91b412fff9102a66238d6f26" "checksum stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a2a2f4a2eb556337b2d1a302630bbddf989ae383c70393e89b48152b9896cbda" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" -"checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" +"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3" +"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04" "checksum strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1810e25f576e7ffce1ff5243b37066da5ded0310b3274c20baaeccb1145b2806" "checksum strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572a2f4e53dd4c3483fd79e5cc10ddd773a3acb1169bbfe8762365e107110579" -"checksum substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)" = "" +"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" +"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" -"checksum sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a0cb7899e248ed0baa6ef6f8406352523c2f99bc7c4b1800f4cd6d5dde99eb" +"checksum sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4da1ccc493b46042d6f5352910a7f18ed8fe81307dd7db3f2e2d8a7db6f6284" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" +"checksum tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" @@ -5536,8 +5558,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82c65483db54eb91b4ef3a9389a3364558590faf30ce473141707c0e16fda975" "checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" +"checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" "checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" @@ -5548,10 +5570,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba20f7d9865497ea46511860b43e05a44f4ac9a76ee089d34cd80a839a690264" +"checksum trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eafa32a8662c06f5bf135984bc1a12821fd38770b5c2f2f9e8750327fcbe3955" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" -"checksum trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4e24277af05f38f3aaf03ac78e3a154be83f13db9c8ef0cb95bb1aa764a477b" +"checksum trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006314f54f2ea7944a878e66fd93ad7978095bc355f30a2f26ec40f664d86c86" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" "checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" @@ -5560,12 +5582,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c64cdf40b4a9645534a943668681bcb219faf51874d4b65d2e0abda1b10a2ab" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -5579,11 +5602,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a6265b25719e82598d104b3717375e37661d41753e2c84cde3f51050c7ed7e3c" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" -"checksum wasmi 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f6a891b45c79e9f96fb66cc84a057211ef9cd2e5e8d093f3dbbd480e146a8758" -"checksum websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7cc2d74d89f9df981ab41ae624e33cf302fdf456b93455c6a31911a99c9f0bb8" -"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" +"checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" +"checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" @@ -5591,7 +5614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" +"checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" "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.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" diff --git a/core/finality-grandpa/Cargo.toml b/core/finality-grandpa/Cargo.toml index 5ae9d0197f..2424eed06f 100644 --- a/core/finality-grandpa/Cargo.toml +++ b/core/finality-grandpa/Cargo.toml @@ -22,7 +22,7 @@ network = { package = "substrate-network", path = "../network" } service = { package = "substrate-service", path = "../service", optional = true } srml-finality-tracker = { path = "../../srml/finality-tracker" } fg_primitives = { package = "substrate-finality-grandpa-primitives", path = "primitives" } -grandpa = { package = "finality-grandpa", version = "0.7.1", features = ["derive-codec"] } +grandpa = { package = "finality-grandpa", version = "0.7.2", features = ["derive-codec"] } [dev-dependencies] consensus_common = { package = "substrate-consensus-common", path = "../consensus/common", features = ["test-helpers"] } diff --git a/core/finality-grandpa/src/environment.rs b/core/finality-grandpa/src/environment.rs index 387673dea3..8f5db93cae 100644 --- a/core/finality-grandpa/src/environment.rs +++ b/core/finality-grandpa/src/environment.rs @@ -298,31 +298,7 @@ impl, B, E, N, RA> grandpa::Chain: BlockNumberOps, { fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result, GrandpaError> { - if base == block { return Err(GrandpaError::NotDescendent) } - - let tree_route_res = ::client::blockchain::tree_route( - self.inner.backend().blockchain(), - BlockId::Hash(block), - BlockId::Hash(base), - ); - - let tree_route = match tree_route_res { - Ok(tree_route) => tree_route, - Err(e) => { - debug!(target: "afg", "Encountered error computing ancestry between block {:?} and base {:?}: {:?}", - block, base, e); - - return Err(GrandpaError::NotDescendent); - } - }; - - if tree_route.common_block().hash != base { - return Err(GrandpaError::NotDescendent); - } - - // skip one because our ancestry is meant to start from the parent of `block`, - // and `tree_route` includes it. - Ok(tree_route.retracted().iter().skip(1).map(|e| e.hash).collect()) + ancestry(&self.inner, base, block) } fn best_chain_containing(&self, block: Block::Hash) -> Option<(Block::Hash, NumberFor)> { @@ -400,6 +376,41 @@ impl, B, E, N, RA> grandpa::Chain, E, RA>( + client: &Client, + base: Block::Hash, + block: Block::Hash, +) -> Result, GrandpaError> where + B: Backend, + E: CallExecutor, +{ + if base == block { return Err(GrandpaError::NotDescendent) } + + let tree_route_res = ::client::blockchain::tree_route( + client.backend().blockchain(), + BlockId::Hash(block), + BlockId::Hash(base), + ); + + let tree_route = match tree_route_res { + Ok(tree_route) => tree_route, + Err(e) => { + debug!(target: "afg", "Encountered error computing ancestry between block {:?} and base {:?}: {:?}", + block, base, e); + + return Err(GrandpaError::NotDescendent); + } + }; + + if tree_route.common_block().hash != base { + return Err(GrandpaError::NotDescendent); + } + + // skip one because our ancestry is meant to start from the parent of `block`, + // and `tree_route` includes it. + Ok(tree_route.retracted().iter().skip(1).map(|e| e.hash).collect()) +} + impl, N, RA> voter::Environment> for Environment where Block: 'static, B: Backend + 'static, diff --git a/core/finality-grandpa/src/lib.rs b/core/finality-grandpa/src/lib.rs index 56b66e7026..3d9ec8b5e7 100644 --- a/core/finality-grandpa/src/lib.rs +++ b/core/finality-grandpa/src/lib.rs @@ -89,6 +89,7 @@ mod environment; mod finality_proof; mod import; mod justification; +mod observer; mod until_imported; #[cfg(feature="service-integration")] @@ -97,6 +98,7 @@ mod service_integration; pub use service_integration::{LinkHalfForService, BlockImportForService}; pub use communication::Network; pub use finality_proof::{prove_finality, check_finality_proof}; +pub use observer::run_grandpa_observer; use aux_schema::PersistentData; use environment::{CompletedRound, CompletedRounds, Environment, HasVoted, SharedVoterSetState, VoterSetState}; @@ -433,7 +435,7 @@ fn register_finality_tracker_inherent_data_provider, N, RA>( +pub fn run_grandpa_voter, N, RA>( config: Config, link: LinkHalf, network: N, @@ -656,3 +658,24 @@ pub fn run_grandpa, N, RA>( Ok(voter_work.select(on_exit).then(|_| Ok(()))) } + +#[deprecated(since = "1.1", note = "Please switch to run_grandpa_voter.")] +pub fn run_grandpa, N, RA>( + config: Config, + link: LinkHalf, + network: N, + inherent_data_providers: InherentDataProviders, + on_exit: impl Future + Clone + Send + 'static, +) -> ::client::error::Result + Send + 'static> where + Block::Hash: Ord, + B: Backend + 'static, + E: CallExecutor + Send + Sync + 'static, + N: Network + Send + Sync + 'static, + N::In: Send + 'static, + NumberFor: BlockNumberOps, + DigestFor: Encode, + DigestItemFor: DigestItem, + RA: Send + Sync + 'static, +{ + run_grandpa_voter(config, link, network, inherent_data_providers, on_exit) +} diff --git a/core/finality-grandpa/src/observer.rs b/core/finality-grandpa/src/observer.rs new file mode 100644 index 0000000000..74b5076dae --- /dev/null +++ b/core/finality-grandpa/src/observer.rs @@ -0,0 +1,281 @@ +// Copyright 2018-2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::sync::Arc; + +use futures::prelude::*; +use futures::future::{self, Loop as FutureLoop}; + +use grandpa::{ + BlockNumberOps, Error as GrandpaError, round::State as RoundState, voter, voter_set::VoterSet +}; +use log::{debug, info, warn}; + +use client::{CallExecutor, Client, backend::Backend}; +use ed25519::Public as AuthorityId; +use runtime_primitives::traits::{NumberFor, Block as BlockT, DigestItemFor, DigestItem}; +use substrate_primitives::{ed25519, H256, Blake2Hasher}; + +use crate::{ + AuthoritySignature, global_communication, CommandOrError, Config, environment, + Error, LinkHalf, Network, aux_schema::PersistentData, VoterCommand, VoterSetState, +}; +use crate::authorities::SharedAuthoritySet; +use crate::communication::NetworkBridge; +use crate::consensus_changes::SharedConsensusChanges; +use crate::environment::{CompletedRound, CompletedRounds, HasVoted}; + +struct ObserverChain<'a, Block: BlockT, B, E, RA>(&'a Client); + +impl<'a, Block: BlockT, B, E, RA> grandpa::Chain> + for ObserverChain<'a, Block, B, E, RA> where + B: Backend, + E: CallExecutor, + NumberFor: BlockNumberOps, +{ + fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result, GrandpaError> { + environment::ancestry(&self.0, base, block) + } + + fn best_chain_containing(&self, _block: Block::Hash) -> Option<(Block::Hash, NumberFor)> { + // only used by voter + None + } +} + +fn grandpa_observer, RA, S>( + client: &Arc>, + authority_set: &SharedAuthoritySet>, + consensus_changes: &SharedConsensusChanges>, + voters: &Arc>, + last_finalized_number: NumberFor, + commits: S, +) -> impl Future>> where + NumberFor: BlockNumberOps, + B: Backend, + E: CallExecutor + Send + Sync, + RA: Send + Sync, + S: Stream< + Item = voter::CommunicationIn, AuthoritySignature, AuthorityId>, + Error = CommandOrError>, + >, +{ + let authority_set = authority_set.clone(); + let consensus_changes = consensus_changes.clone(); + let client = client.clone(); + let voters = voters.clone(); + + let observer = commits.fold(last_finalized_number, move |last_finalized_number, global| { + let (round, commit, callback) = match global { + voter::CommunicationIn::Commit(round, commit, callback) => { + let commit = grandpa::Commit::from(commit); + (round, commit, callback) + }, + voter::CommunicationIn::Auxiliary(_) => { + // ignore aux messages + return future::ok(last_finalized_number); + }, + }; + + // if the commit we've received targets a block lower than the last + // finalized, ignore it and continue with the current state + if commit.target_number < last_finalized_number { + return future::ok(last_finalized_number); + } + + let validation_result = match grandpa::validate_commit( + &commit, + &voters, + &ObserverChain(&*client), + ) { + Ok(r) => r, + Err(e) => return future::err(e.into()), + }; + + if let Some(_) = validation_result.ghost() { + let finalized_hash = commit.target_hash; + let finalized_number = commit.target_number; + + // commit is valid, finalize the block it targets + match environment::finalize_block( + &client, + &authority_set, + &consensus_changes, + None, + finalized_hash, + finalized_number, + (round, commit).into(), + ) { + Ok(_) => {}, + Err(e) => return future::err(e), + }; + + grandpa::process_commit_validation_result(validation_result, callback); + + // proceed processing with new finalized block number + future::ok(finalized_number) + } else { + debug!(target: "afg", "Received invalid commit: ({:?}, {:?})", round, commit); + + grandpa::process_commit_validation_result(validation_result, callback); + + // commit is invalid, continue processing commits with the current state + future::ok(last_finalized_number) + } + }); + + observer.map(|_| ()) +} + +/// Run a GRANDPA observer as a task, the observer will finalize blocks only by +/// listening for and validating GRANDPA commits instead of following the full +/// protocol. Provide configuration and a link to a block import worker that has +/// already been instantiated with `block_import`. +pub fn run_grandpa_observer, N, RA>( + config: Config, + link: LinkHalf, + network: N, + on_exit: impl Future + Clone + Send + 'static, +) -> ::client::error::Result + Send + 'static> where + B: Backend + 'static, + E: CallExecutor + Send + Sync + 'static, + N: Network + Send + Sync + 'static, + N::In: Send + 'static, + NumberFor: BlockNumberOps, + DigestItemFor: DigestItem, + RA: Send + Sync + 'static, +{ + let LinkHalf { + client, + persistent_data, + voter_commands_rx, + } = link; + + let PersistentData { authority_set, consensus_changes, set_state } = persistent_data; + let initial_state = (authority_set, consensus_changes, set_state, voter_commands_rx.into_future()); + + let (network, network_startup) = NetworkBridge::new(network, config.clone(), on_exit.clone()); + + let observer_work = future::loop_fn(initial_state, move |state| { + let (authority_set, consensus_changes, set_state, voter_commands_rx) = state; + let set_id = authority_set.set_id(); + let voters = Arc::new(authority_set.current_authorities()); + let client = client.clone(); + + // start global communication stream for the current set + let (global_in, _) = global_communication( + None, + set_id, + &voters, + &client, + &network, + ); + + let chain_info = match client.info() { + Ok(i) => i, + Err(e) => return future::Either::B(future::err(Error::Client(e))), + }; + + let last_finalized_number = chain_info.chain.finalized_number; + + // create observer for the current set + let observer = grandpa_observer( + &client, + &authority_set, + &consensus_changes, + &voters, + last_finalized_number, + global_in, + ); + + let handle_voter_command = move |command, voter_commands_rx| { + // the observer doesn't use the voter set state, but we need to + // update it on-disk in case we restart as validator in the future. + let set_state = match command { + VoterCommand::Pause(reason) => { + info!(target: "afg", "Pausing old validator set: {}", reason); + + let completed_rounds = set_state.read().completed_rounds(); + let set_state = VoterSetState::Paused { completed_rounds }; + + crate::aux_schema::write_voter_set_state(&**client.backend(), &set_state)?; + + set_state + }, + VoterCommand::ChangeAuthorities(new) => { + // start the new authority set using the block where the + // set changed (not where the signal happened!) as the base. + let genesis_state = RoundState::genesis((new.canon_hash, new.canon_number)); + + let set_state = VoterSetState::Live:: { + // always start at round 0 when changing sets. + completed_rounds: CompletedRounds::new(CompletedRound { + number: 0, + state: genesis_state, + base: (new.canon_hash, new.canon_number), + votes: Vec::new(), + }), + current_round: HasVoted::No, + }; + + crate::aux_schema::write_voter_set_state(&**client.backend(), &set_state)?; + + set_state + }, + }; + + Ok(FutureLoop::Continue((authority_set, consensus_changes, set_state.into(), voter_commands_rx))) + }; + + // run observer and listen to commands (switch authorities or pause) + future::Either::A(observer.select2(voter_commands_rx).then(move |res| match res { + Ok(future::Either::A((_, _))) => { + // observer commit stream doesn't conclude naturally; this could reasonably be an error. + Ok(FutureLoop::Break(())) + }, + Err(future::Either::B(_)) => { + // the `voter_commands_rx` stream should not fail. + Ok(FutureLoop::Break(())) + }, + Ok(future::Either::B(((None, _), _))) => { + // the `voter_commands_rx` stream should never conclude since it's never closed. + Ok(FutureLoop::Break(())) + }, + Err(future::Either::A((CommandOrError::Error(e), _))) => { + // return inner observer error + Err(e) + }, + Ok(future::Either::B(((Some(command), voter_commands_rx), _))) => { + // some command issued externally + handle_voter_command(command, voter_commands_rx.into_future()) + }, + Err(future::Either::A((CommandOrError::VoterCommand(command), voter_commands_rx))) => { + // some command issued internally + handle_voter_command(command, voter_commands_rx) + }, + })) + }); + + let observer_work = observer_work + .map(|_| ()) + .map_err(|e| { + warn!("GRANDPA Observer failed: {:?}", e); + }); + + let observer_work = network_startup.and_then(move |()| observer_work); + + Ok(observer_work.select(on_exit).map(|_| ()).map_err(|_| ())) +} diff --git a/core/finality-grandpa/src/tests.rs b/core/finality-grandpa/src/tests.rs index 55c0d57f3a..1d8279e995 100644 --- a/core/finality-grandpa/src/tests.rs +++ b/core/finality-grandpa/src/tests.rs @@ -371,19 +371,25 @@ fn make_ids(keys: &[AuthorityKeyring]) -> Vec<(AuthorityId, u64)> { // run the voters to completion. provide a closure to be invoked after // the voters are spawned but before blocking on them. -fn run_to_completion_with( +fn run_to_completion_with( blocks: u64, net: Arc>, peers: &[AuthorityKeyring], - before_waiting: F, -) -> u64 { + with: F, +) -> u64 where + F: FnOnce(current_thread::Handle) -> Option>> +{ use parking_lot::RwLock; - let mut finality_notifications = Vec::new(); + let mut wait_for = Vec::new(); let mut runtime = current_thread::Runtime::new().unwrap(); let highest_finalized = Arc::new(RwLock::new(0)); + if let Some(f) = (with)(runtime.handle()) { + wait_for.push(f); + }; + for (peer_id, key) in peers.iter().enumerate() { let highest_finalized = highest_finalized.clone(); let (client, link) = { @@ -395,20 +401,25 @@ fn run_to_completion_with( link, ) }; - finality_notifications.push( - client.finality_notification_stream() - .take_while(move |n| { - let mut highest_finalized = highest_finalized.write(); - if *n.header.number() > *highest_finalized { - *highest_finalized = *n.header.number(); - } - Ok(n.header.number() < &blocks) - }) - .for_each(|_| Ok(())) + + wait_for.push( + Box::new( + client.finality_notification_stream() + .take_while(move |n| { + let mut highest_finalized = highest_finalized.write(); + if *n.header.number() > *highest_finalized { + *highest_finalized = *n.header.number(); + } + Ok(n.header.number() < &blocks) + }) + .collect() + .map(|_| ()) + ) ); + fn assert_send(_: &T) { } - let voter = run_grandpa( + let voter = run_grandpa_voter( Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, @@ -427,7 +438,7 @@ fn run_to_completion_with( } // wait for all finalized on each. - let wait_for = ::futures::future::join_all(finality_notifications) + let wait_for = ::futures::future::join_all(wait_for) .map(|_| ()) .map_err(|_| ()); @@ -441,17 +452,14 @@ fn run_to_completion_with( .map(|_| ()) .map_err(|_| ()); - (before_waiting)(); - runtime.block_on(wait_for.select(drive_to_completion).map_err(|_| ())).unwrap(); let highest_finalized = *highest_finalized.read(); - highest_finalized } fn run_to_completion(blocks: u64, net: Arc>, peers: &[AuthorityKeyring]) -> u64 { - run_to_completion_with(blocks, net, peers, || {}) + run_to_completion_with(blocks, net, peers, |_| None) } #[test] @@ -478,7 +486,7 @@ fn finalize_3_voters_no_observers() { } #[test] -fn finalize_3_voters_1_observer() { +fn finalize_3_voters_1_full_observer() { let peers = &[AuthorityKeyring::Alice, AuthorityKeyring::Bob, AuthorityKeyring::Charlie]; let voters = make_ids(peers); @@ -509,7 +517,7 @@ fn finalize_3_voters_1_observer() { .take_while(|n| Ok(n.header.number() < &20)) .for_each(move |_| Ok(())) ); - let voter = run_grandpa( + let voter = run_grandpa_voter( Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, @@ -539,7 +547,7 @@ fn finalize_3_voters_1_observer() { } #[test] -fn transition_3_voters_twice_1_observer() { +fn transition_3_voters_twice_1_full_observer() { let _ = env_logger::try_init(); let peers_a = &[ AuthorityKeyring::Alice, @@ -671,7 +679,7 @@ fn transition_3_voters_twice_1_observer() { assert_eq!(set.pending_changes().count(), 0); }) ); - let voter = run_grandpa( + let voter = run_grandpa_voter( Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, @@ -906,7 +914,7 @@ fn force_change_to_new_set() { let net = Arc::new(Mutex::new(net)); let runner_net = net.clone(); - let add_blocks = move || { + let add_blocks = move |_| { net.lock().peer(0).push_blocks(1, false); { @@ -938,6 +946,8 @@ fn force_change_to_new_set() { assert_eq!(set.current(), (1, voters.as_slice())); assert_eq!(set.pending_changes().count(), 0); } + + None }; // it will only finalize if the forced transition happens. @@ -1071,7 +1081,7 @@ fn voter_persists_its_votes() { let (_block_import, _, link) = net.lock().make_block_import(client.clone()); let link = link.lock().take().unwrap(); - let mut voter = run_grandpa( + let mut voter = run_grandpa_voter( Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, @@ -1225,3 +1235,44 @@ fn voter_persists_its_votes() { runtime.block_on(drive_to_completion.select(exit).map(|_| ()).map_err(|_| ())).unwrap(); } + +#[test] +fn finalize_3_voters_1_light_observer() { + let _ = env_logger::try_init(); + let authorities = &[AuthorityKeyring::Alice, AuthorityKeyring::Bob, AuthorityKeyring::Charlie]; + let voters = make_ids(authorities); + + let mut net = GrandpaTestNet::new(TestApi::new(voters), 4); + net.peer(0).push_blocks(20, false); + net.sync(); + + for i in 0..4 { + assert_eq!(net.peer(i).client().info().unwrap().chain.best_number, 20, + "Peer #{} failed to sync", i); + } + + let net = Arc::new(Mutex::new(net)); + let link = net.lock().peer(3).data.lock().take().expect("link initialized on startup; qed"); + + let finality_notifications = net.lock().peer(3).client().finality_notification_stream() + .take_while(|n| Ok(n.header.number() < &20)) + .collect(); + + run_to_completion_with(20, net.clone(), authorities, |executor| { + executor.spawn( + run_grandpa_observer( + Config { + gossip_duration: TEST_GOSSIP_DURATION, + justification_period: 32, + local_key: None, + name: Some("observer".to_string()), + }, + link, + MessageRouting::new(net.clone(), 3), + Exit, + ).unwrap() + ).unwrap(); + + Some(Box::new(finality_notifications.map(|_| ()))) + }); +} diff --git a/node/cli/src/service.rs b/node/cli/src/service.rs index b9c7ddffee..1366a62987 100644 --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -110,19 +110,33 @@ construct_service_factory! { local_key }; - executor.spawn(grandpa::run_grandpa( - grandpa::Config { - local_key, - // FIXME #1578 make this available through chainspec - gossip_duration: Duration::from_millis(333), - justification_period: 4096, - name: Some(service.config.name.clone()) + let config = grandpa::Config { + local_key, + // FIXME #1578 make this available through chainspec + gossip_duration: Duration::from_millis(333), + justification_period: 4096, + name: Some(service.config.name.clone()) + }; + + match config.local_key { + None => { + executor.spawn(grandpa::run_grandpa_observer( + config, + link_half, + service.network(), + service.on_exit(), + )?); }, - link_half, - service.network(), - service.config.custom.inherent_data_providers.clone(), - service.on_exit(), - )?); + Some(_) => { + executor.spawn(grandpa::run_grandpa_voter( + config, + link_half, + service.network(), + service.config.custom.inherent_data_providers.clone(), + service.on_exit(), + )?); + }, + } Ok(service) } -- GitLab From b307cb36b6a0302aa622dda632435d823b06d57d Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Thu, 18 Apr 2019 14:53:02 +0200 Subject: [PATCH 026/206] Make Documentation Examples Compile (#2310) * opening and closing links * sudo example compiles * add Aura after it was merged to master * Timestamp doc testing passes * Timestamp doc testing works, extraneous lines commented out * balances * remove extern crate line * Removed unneeded code snippet from aura * make consensus compiles * executive compiles * cleanup unnecessary lines * staking (removed examples that are just copies of tests) * Apply suggestions from code review * unindent example --- srml/aura/src/lib.rs | 20 -------------- srml/balances/src/lib.rs | 55 ++++++++++++++++++------------------- srml/consensus/src/lib.rs | 57 +++++++++++++++++++++------------------ srml/executive/src/lib.rs | 11 +++++++- srml/staking/src/lib.rs | 37 +------------------------ srml/timestamp/src/lib.rs | 6 +++-- 6 files changed, 74 insertions(+), 112 deletions(-) diff --git a/srml/aura/src/lib.rs b/srml/aura/src/lib.rs index 1dec04df06..e5eb3674cd 100644 --- a/srml/aura/src/lib.rs +++ b/srml/aura/src/lib.rs @@ -29,26 +29,6 @@ //! //! - `slot_duration` - Determine the Aura slot-duration based on the Timestamp module configuration. //! -//! ## Usage -//! -//! ### Prerequisites -//! -//! Use of this module implies selection of the Aura algorithm. -//! -//! ### Simple Code Snippet -//! -//! Instantiate a report of skipped authorities: -//! -//! ```rust,ignore -//! let mut report = AuraReport { -//! start_slot: 6, // The first skipped slot -//! skipped: 3, // The number of authorities skipped -//! } -//! ``` -//! -//! See the `tests.rs` file in this module's directory for other simple code snippets that may make this module's -//! functionalities clearer. -//! //! ## Related Modules //! //! - [Staking](../srml_staking/index.html): The Staking module is called in Aura to enforce slashing diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index 93ed2e1921..7f4743ffd4 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -91,16 +91,13 @@ //! //! The following examples show how to use the Balances module in your custom module. //! -//! ### Example from the SRML +//! ### Examples from the SRML //! -//! The Contract module uses the `Currency` trait to handle gas. +//! The Contract module uses the `Currency` trait to handle gas payment, and its types inherit from `Currency`: //! -//! [(lib.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/lib.rs): -//! -//! ```ignore -//! # extern crate srml_support; +//! ``` //! use srml_support::traits::Currency; -//! # pub trait Trait: balances::Trait { +//! # pub trait Trait: system::Trait { //! # type Currency: Currency; //! # } //! @@ -110,29 +107,33 @@ //! # fn main() {} //!``` //! -//! [(gas.rs)](https://github.com/paritytech/substrate/blob/master/srml/contract/src/gas.rs): +//! The Staking module uses the `LockableCurrency` trait to lock a stash account's funds: //! -//! ```ignore -//! use srml_support::traits::Currency; -//! # pub trait Trait: system::Trait {} +//! ``` +//! use srml_support::traits::{WithdrawReasons, LockableCurrency}; +//! use primitives::traits::Bounded; +//! pub trait Trait: system::Trait { +//! type Currency: LockableCurrency; +//! } +//! # struct StakingLedger { +//! # stash: ::AccountId, +//! # total: <::Currency as srml_support::traits::Currency<::AccountId>>::Balance, +//! # phantom: std::marker::PhantomData, +//! # } +//! # const STAKING_ID: [u8; 8] = *b"staking "; //! -//! pub fn refund_unused_gas( -//! transactor: &T::AccountId, -//! gas_meter: GasMeter, -//! imbalance: NegativeImbalanceOf, +//! fn update_ledger( +//! controller: &T::AccountId, +//! ledger: &StakingLedger //! ) { -//! let gas_spent = gas_meter.spent(); -//! let gas_left = gas_meter.gas_left(); -//! -//! // Increase total spent gas. -//! >::mutate(|block_gas_spent| *block_gas_spent += gas_spent); -//! -//! // Refund gas left by the price it was bought at. -//! let refund = >>::as_(gas_left) * gas_meter.gas_price; -//! let refund_imbalance = T::Currency::deposit_creating(transactor, refund); -//! if let Ok(imbalance) = imbalance.offset(refund_imbalance) { -//! T::GasPayment::on_unbalanced(imbalance); -//! } +//! T::Currency::set_lock( +//! STAKING_ID, +//! &ledger.stash, +//! ledger.total, +//! T::BlockNumber::max_value(), +//! WithdrawReasons::all() +//! ); +//! // >::insert(controller, ledger); // Commented out as we don't have access to Staking's storage here. //! } //! # fn main() {} //! ``` diff --git a/srml/consensus/src/lib.rs b/srml/consensus/src/lib.rs index d5ee023c93..5637f458c1 100644 --- a/srml/consensus/src/lib.rs +++ b/srml/consensus/src/lib.rs @@ -46,36 +46,28 @@ //! //! ## Usage //! -//! ### Prerequisites -//! -//! To use functionality from the consensus module, implement the specific Trait or function that you are invoking -//! from the module: -//! -//! ```rust,ignore -//! impl for consensus::SomeTrait for Module { -//! /// required functions and types for trait included here -//! /// more comprehensive example included below -//! } -//! ``` -//! -//! Alternatively, to set the authorities: -//! -//! ```rust,ignore -//! consensus::set_authorities(&[]) // example included below -//! ``` -//! //! ### Simple Code Snippet //! //! Set authorities: //! -//! ```rust,ignore -//! >::set_authorities(&[UintAuthorityId(4), UintAuthorityId(5), UintAuthorityId(6)]) +//! ``` +//! # use srml_consensus as consensus; +//! # fn not_executed() { +//! # let authority1 = T::SessionKey::default(); +//! # let authority2 = T::SessionKey::default(); +//! >::set_authorities(&[authority1, authority2]) +//! # } //! ``` //! //! Log changes in the authorities set: //! -//! ```rust,ignore -//! >::on_finalize(5); // finalize UintAuthorityId(5) +//! ``` +//! # use srml_consensus as consensus; +//! # use primitives::traits::Zero; +//! # use primitives::traits::OnFinalize; +//! # fn not_executed() { +//! >::on_finalize(T::BlockNumber::zero()); +//! # } //! ``` //! //! ### Example from SRML @@ -83,12 +75,21 @@ //! In the staking module, the `consensus::OnOfflineReport` is implemented to monitor offline //! reporting among validators: //! -//! ```rust,ignore +//! ``` +//! # use srml_consensus as consensus; +//! # trait Trait: consensus::Trait { +//! # } +//! # +//! # srml_support::decl_module! { +//! # pub struct Module for enum Call where origin: T::Origin { +//! # } +//! # } +//! # //! impl consensus::OnOfflineReport> for Module { //! fn handle_report(reported_indices: Vec) { //! for validator_index in reported_indices { -//! let v = >::validators()[validator_index as usize].clone(); -//! Self::on_offline_validator(v, 1); +//! // Get validator from session module +//! // Process validator //! } //! } //! } @@ -97,11 +98,15 @@ //! In the GRANDPA module, we use `srml-consensus` to get the set of `next_authorities` before changing //! this set according to the consensus algorithm (which does not rotate sessions in the *normal* way): //! -//! ```rust,ignore +//! ``` +//! # use srml_consensus as consensus; +//! # use consensus::Trait; +//! # fn not_executed() { //! let next_authorities = >::authorities() //! .into_iter() //! .map(|key| (key, 1)) // evenly-weighted. //! .collect::::SessionKey, u64)>>(); +//! # } //! ``` //! //! ## Related Modules diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index a33458a910..d0fae78105 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -49,7 +49,16 @@ //! //! `Executive` type declaration from the node template. //! -//! ```ignore +//! ``` +//! # use primitives::generic; +//! # use srml_executive as executive; +//! # pub struct UncheckedExtrinsic {}; +//! # pub struct Header {}; +//! # type Context = system::ChainContext; +//! # pub type Block = generic::Block; +//! # pub type Balances = u64; +//! # pub type AllModules = u64; +//! # pub enum Runtime {}; //! /// Executive: handles dispatch to the various modules. //! pub type Executive = executive::Executive; //! ``` diff --git a/srml/staking/src/lib.rs b/srml/staking/src/lib.rs index c58eb593f6..6a67b503dc 100644 --- a/srml/staking/src/lib.rs +++ b/srml/staking/src/lib.rs @@ -127,42 +127,7 @@ //! //! ## Usage //! -//! ### Snippet: Bonding and Accepting Roles -//! -//! An arbitrary account pair, given that the associated stash has the required funds, -//! can become stakers via the following call: -//! -//! ```rust,ignore -//! // Bond account 3 as stash. -//! // Account 4 as controller. -//! // Stash value of 1500 units. -//! // Rewards get transferred to the controller account. -//! Staking::bond(Origin::signed(3), 4, 1500, RewardDestination::Controller); -//! ``` -//! -//! To state desire to become a validator: -//! -//! ```rust,ignore -//! // Controller account 4 states desire for validation with the given preferences. -//! Staking::validate(Origin::signed(4), ValidatorPrefs::default()); -//! ``` -//! -//! Similarly, to state desire in nominating: -//! -//! ```rust,ignore -//! // Controller account 4 nominates for accounts 10 and 20. -//! Staking::nominate(Origin::signed(4), vec![20, 10]); -//! ``` -//! -//! Finally, account 4 can withdraw from any of the above roles via -//! -//! ```rust,ignore -//! Staking::chill(Origin::signed(4)); -//! ``` -//! -//! You can find the equivalent of the above calls in your [Substrate UI](https://substrate-ui.parity.io). -//! -//! ### Snippet: Reporting Misbehavior +//! ### Example: Reporting Misbehavior //! //! ``` //! use srml_support::{decl_module, dispatch::Result}; diff --git a/srml/timestamp/src/lib.rs b/srml/timestamp/src/lib.rs index 9b72a1ac9b..df89d0c1ff 100644 --- a/srml/timestamp/src/lib.rs +++ b/srml/timestamp/src/lib.rs @@ -57,8 +57,9 @@ //! //! ### Get current timestamp //! -//! ```ignore -//! use support::{decl_module, dispatch::Result}; +//! ``` +//! use srml_support::{decl_module, dispatch::Result}; +//! # use srml_timestamp as timestamp; //! use system::ensure_signed; //! //! pub trait Trait: timestamp::Trait {} @@ -72,6 +73,7 @@ //! } //! } //! } +//! # fn main() {} //! ``` //! //! ### Example from the SRML -- GitLab From eb7f7747c45e14a754a967f9bb0f0e791ee60b0a Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 18 Apr 2019 15:51:42 +0200 Subject: [PATCH 027/206] fix minor typos (#2324) * opening and closing links * sudo example compiles * add Aura after it was merged to master * Timestamp doc testing passes * Timestamp doc testing works, extraneous lines commented out * balances * remove extern crate line * Removed unneeded code snippet from aura * make consensus compiles * executive compiles * cleanup unnecessary lines * staking (removed examples that are just copies of tests) * minor typos * restore tab spacing --- srml/balances/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index 7f4743ffd4..1e0521ca8c 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -46,7 +46,7 @@ //! for most operations. When this balance falls below the existential deposit, most functionality of the account is //! removed. When both it and the reserved balance are deleted, then the account is said to be dead. //! - **Reserved Balance:** Reserved balance still belongs to the account holder, but is suspended. Reserved balance -//! can still be slashed, but only after all of free balance has been slashed. If the reserved balance falls below the +//! can still be slashed, but only after all the free balance has been slashed. If the reserved balance falls below the //! existential deposit then it and any related functionality will be deleted. When both it and the free balance are //! deleted, then the account is said to be dead. //! - **Imbalance:** A condition when some funds were credited or debited without equal and opposite accounting @@ -483,7 +483,7 @@ impl, I: Instance> Module { } } -// wrapping these imbalanes in a private module is necessary to ensure absolute privacy +// wrapping these imbalances in a private module is necessary to ensure absolute privacy // of the inner member. mod imbalances { use super::{ @@ -787,7 +787,7 @@ where Self::set_free_balance(who, free_balance - free_slash); let remaining_slash = value - free_slash; // NOTE: `slash()` prefers free balance, but assumes that reserve balance can be drawn - // from in extreme circumstances. `can_slash()` should be used prior to `slash()` is avoid having + // from in extreme circumstances. `can_slash()` should be used prior to `slash()` to avoid having // to draw from reserved funds, however we err on the side of punishment if things are inconsistent // or `can_slash` wasn't used appropriately. if !remaining_slash.is_zero() { @@ -1029,4 +1029,3 @@ where Self::total_balance(who).is_zero() } } - -- GitLab From 0bd601fd3412f6a7de50adfa8bea6d925029be83 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 19 Apr 2019 07:52:22 +0100 Subject: [PATCH 028/206] Restrict patch version of syn (#2327) --- srml/support/procedural/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srml/support/procedural/Cargo.toml b/srml/support/procedural/Cargo.toml index 1aaedcbf04..26b648da0c 100644 --- a/srml/support/procedural/Cargo.toml +++ b/srml/support/procedural/Cargo.toml @@ -13,4 +13,6 @@ sr-api-macros = { path = "../../../core/sr-api-macros" } proc-macro2 = "0.4.27" quote = { version = "0.6.12" } -syn = { version = "0.15.30", features = ["full"] } +# FIXME: https://github.com/paritytech/substrate/issues/2326 +# Remove this restriction once the dependency on erstwhile CustomKeyword trait is removed +syn = { version = ">= 0.15.30, < 0.15.32", features = ["full"] } -- GitLab From 35d443c0fe698b5077c2d31524a2e1d72c2cad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 19 Apr 2019 13:22:53 +0200 Subject: [PATCH 029/206] Remove limitation to 256 transactions, don't construct a vector. (#2321) * Remove limitation to 256 transactions, don't construct requires vector. * Bump impl version. --- node/runtime/src/lib.rs | 2 +- srml/executive/src/lib.rs | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 170c2924e0..7239e14aa1 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -60,7 +60,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 62, - impl_version: 64, + impl_version: 65, apis: RUNTIME_API_VERSIONS, }; diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index d0fae78105..69db7e5ff0 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -70,7 +70,7 @@ use rstd::marker::PhantomData; use rstd::result; use primitives::traits::{ self, Header, Zero, One, Checkable, Applyable, CheckEqual, OnFinalize, - OnInitialize, As, Digest, NumberFor, Block as BlockT, OffchainWorker + OnInitialize, Digest, NumberFor, Block as BlockT, OffchainWorker }; use srml_support::{Dispatchable, traits::MakePayment}; use parity_codec::{Codec, Encode}; @@ -320,24 +320,23 @@ impl< } // check index - let mut expected_index = >::account_nonce(sender); + let expected_index = >::account_nonce(sender); if index < &expected_index { return TransactionValidity::Invalid(ApplyError::Stale as i8) } - if *index > expected_index + As::sa(256) { - return TransactionValidity::Unknown(ApplyError::Future as i8) - } - let mut deps = Vec::new(); - while expected_index < *index { - deps.push((sender, expected_index).encode()); - expected_index = expected_index + One::one(); - } + let index = *index; + let provides = vec![(sender, index).encode()]; + let requires = if expected_index < index { + vec![(sender, index - One::one()).encode()] + } else { + vec![] + }; TransactionValidity::Valid { priority: encoded_len as TransactionPriority, - requires: deps, - provides: vec![(sender, *index).encode()], + requires, + provides, longevity: TransactionLongevity::max_value(), } } else { -- GitLab From 14bc1e581d811369fb065027440a84a7857d4c34 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 19 Apr 2019 13:24:53 +0200 Subject: [PATCH 030/206] substrate-network-libp2p uses tokio_timer::clock::Clock to get current time (#2296) --- core/network-libp2p/src/behaviour.rs | 12 ++++++---- .../src/custom_proto/behaviour.rs | 19 ++++++++++----- .../src/custom_proto/handler.rs | 24 ++++++++++++------- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/core/network-libp2p/src/behaviour.rs b/core/network-libp2p/src/behaviour.rs index c6401ef79e..a10f3697d8 100644 --- a/core/network-libp2p/src/behaviour.rs +++ b/core/network-libp2p/src/behaviour.rs @@ -26,9 +26,9 @@ use libp2p::kad::{Kademlia, KademliaOut}; use libp2p::mdns::{Mdns, MdnsEvent}; use libp2p::ping::{Ping, PingEvent}; use log::{debug, trace, warn}; -use std::{cmp, io, fmt, time::Duration, time::Instant}; +use std::{cmp, io, fmt, time::Duration}; use tokio_io::{AsyncRead, AsyncWrite}; -use tokio_timer::Delay; +use tokio_timer::{Delay, clock::Clock}; use void; /// General behaviour of the network. @@ -73,14 +73,16 @@ impl Behaviour { kademlia.add_connected_address(peer_id, addr.clone()); } + let clock = Clock::new(); Behaviour { ping: Ping::new(), custom_protocols, discovery: DiscoveryBehaviour { user_defined: known_addresses, kademlia, - next_kad_random_query: Delay::new(Instant::now()), + next_kad_random_query: Delay::new(clock.now()), duration_to_next_kad: Duration::from_secs(1), + clock, }, identify, mdns: if enable_mdns { @@ -331,6 +333,8 @@ pub struct DiscoveryBehaviour { next_kad_random_query: Delay, /// After `next_kad_random_query` triggers, the next one triggers after this duration. duration_to_next_kad: Duration, + /// `Clock` instance that uses the current execution context's source of time. + clock: Clock, } impl NetworkBehaviour for DiscoveryBehaviour @@ -408,7 +412,7 @@ where self.kademlia.find_node(random_peer_id); // Reset the `Delay` to the next random. - self.next_kad_random_query.reset(Instant::now() + self.duration_to_next_kad); + self.next_kad_random_query.reset(self.clock.now() + self.duration_to_next_kad); self.duration_to_next_kad = cmp::min(self.duration_to_next_kad * 2, Duration::from_secs(60)); }, diff --git a/core/network-libp2p/src/custom_proto/behaviour.rs b/core/network-libp2p/src/custom_proto/behaviour.rs index 7f29711a51..ca1363fab1 100644 --- a/core/network-libp2p/src/custom_proto/behaviour.rs +++ b/core/network-libp2p/src/custom_proto/behaviour.rs @@ -24,6 +24,7 @@ use log::{debug, error, trace, warn}; use smallvec::SmallVec; use std::{collections::hash_map::Entry, cmp, error, io, marker::PhantomData, mem, time::Duration, time::Instant}; use tokio_io::{AsyncRead, AsyncWrite}; +use tokio_timer::clock::Clock; /// Network behaviour that handles opening substreams for custom protocols with other nodes. /// @@ -78,6 +79,9 @@ pub struct CustomProto { /// Marker to pin the generics. marker: PhantomData, + + /// `Clock` instance that uses the current execution context's source of time. + clock: Clock, } /// State of a peer we're connected to. @@ -214,6 +218,7 @@ impl CustomProto { next_incoming_index: substrate_peerset::IncomingIndex(0), events: SmallVec::new(), marker: PhantomData, + clock: Clock::new(), } } @@ -244,7 +249,7 @@ impl CustomProto { debug!(target: "sub-libp2p", "PSM <= Dropped({:?})", peer_id); self.peerset.dropped(peer_id.clone()); let banned_until = Some(if let Some(ban) = ban { - cmp::max(timer.deadline(), Instant::now() + ban) + cmp::max(timer.deadline(), self.clock.now() + ban) } else { timer.deadline() }); @@ -260,7 +265,8 @@ impl CustomProto { peer_id: peer_id.clone(), event: CustomProtoHandlerIn::Disable, }); - let banned_until = ban.map(|dur| Instant::now() + dur); + let clock = &self.clock; + let banned_until = ban.map(|dur| clock.now() + dur); *entry.into_mut() = PeerState::Disabled { open, connected_point, banned_until } }, @@ -281,7 +287,8 @@ impl CustomProto { peer_id: peer_id.clone(), event: CustomProtoHandlerIn::Disable, }); - let banned_until = ban.map(|dur| Instant::now() + dur); + let clock = &self.clock; + let banned_until = ban.map(|dur| clock.now() + dur); *entry.into_mut() = PeerState::Disabled { open: false, connected_point, banned_until } }, @@ -369,7 +376,7 @@ impl CustomProto { }; match mem::replace(occ_entry.get_mut(), PeerState::Poisoned) { - PeerState::Banned { ref until } if *until > Instant::now() => { + PeerState::Banned { ref until } if *until > self.clock.now() => { debug!(target: "sub-libp2p", "PSM => Connect({:?}): Will start to connect at \ until {:?}", occ_entry.key(), until); *occ_entry.into_mut() = PeerState::PendingRequest { @@ -385,7 +392,7 @@ impl CustomProto { }, PeerState::Disabled { open, ref connected_point, banned_until: Some(ref banned) } - if *banned > Instant::now() => { + if *banned > self.clock.now() => { debug!(target: "sub-libp2p", "PSM => Connect({:?}): Has idle connection through \ {:?} but node is banned until {:?}", occ_entry.key(), connected_point, banned); *occ_entry.into_mut() = PeerState::DisabledPendingEnable { @@ -758,7 +765,7 @@ where PeerState::Requested | PeerState::PendingRequest { .. } => { debug!(target: "sub-libp2p", "Libp2p => Dial failure for {:?}", peer_id); *entry.into_mut() = PeerState::Banned { - until: Instant::now() + Duration::from_secs(5) + until: self.clock.now() + Duration::from_secs(5) }; debug!(target: "sub-libp2p", "PSM <= Dropped({:?})", peer_id); self.peerset.dropped(peer_id.clone()) diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index 969df7799b..b3c577ce4c 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -28,7 +28,7 @@ use log::{debug, error, warn}; use smallvec::{smallvec, SmallVec}; use std::{error, fmt, io, marker::PhantomData, mem, time::Duration, time::Instant}; use tokio_io::{AsyncRead, AsyncWrite}; -use tokio_timer::Delay; +use tokio_timer::{Delay, clock::Clock}; use void::Void; /// Implements the `IntoProtocolsHandler` trait of libp2p. @@ -119,15 +119,17 @@ where type Handler = CustomProtoHandler; fn into_handler(self, remote_peer_id: &PeerId) -> Self::Handler { + let clock = Clock::new(); CustomProtoHandler { protocol: self.protocol, remote_peer_id: remote_peer_id.clone(), state: ProtocolState::Init { substreams: SmallVec::new(), - init_deadline: Delay::new(Instant::now() + Duration::from_secs(5)) + init_deadline: Delay::new(clock.now() + Duration::from_secs(5)) }, events_queue: SmallVec::new(), - warm_up_end: Instant::now() + Duration::from_secs(5), + warm_up_end: clock.now() + Duration::from_secs(5), + clock, } } } @@ -153,6 +155,10 @@ pub struct CustomProtoHandler { /// We have a warm-up period after creating the handler during which we don't shut down the /// connection. warm_up_end: Instant, + + /// `Clock` instance that uses the current execution context's source of time. + clock: Clock, + } /// State of the handler. @@ -404,7 +410,7 @@ where }); } ProtocolState::Opening { - deadline: Delay::new(Instant::now() + Duration::from_secs(60)) + deadline: Delay::new(self.clock.now() + Duration::from_secs(60)) } } else if incoming.iter().any(|s| s.is_multiplex()) { @@ -514,7 +520,7 @@ where ProtocolState::Init { substreams, mut init_deadline } => { match init_deadline.poll() { Ok(Async::Ready(())) => { - init_deadline.reset(Instant::now() + Duration::from_secs(60)); + init_deadline.reset(self.clock.now() + Duration::from_secs(60)); error!(target: "sub-libp2p", "Handler initialization process is too long \ with {:?}", self.remote_peer_id) }, @@ -529,7 +535,7 @@ where ProtocolState::Opening { mut deadline } => { match deadline.poll() { Ok(Async::Ready(())) => { - deadline.reset(Instant::now() + Duration::from_secs(60)); + deadline.reset(self.clock.now() + Duration::from_secs(60)); let event = CustomProtoHandlerOut::ProtocolError { is_severe: true, error: "Timeout when opening protocol".to_string().into(), @@ -543,7 +549,7 @@ where }, Err(_) => { error!(target: "sub-libp2p", "Tokio timer has errored"); - deadline.reset(Instant::now() + Duration::from_secs(60)); + deadline.reset(self.clock.now() + Duration::from_secs(60)); return_value = None; ProtocolState::Opening { deadline } }, @@ -613,7 +619,7 @@ where info: (), }); ProtocolState::Opening { - deadline: Delay::new(Instant::now() + Duration::from_secs(60)) + deadline: Delay::new(self.clock.now() + Duration::from_secs(60)) } } else { return_value = None; @@ -829,7 +835,7 @@ where TSubstream: AsyncRead + AsyncWrite, TMessage: CustomMessage { } fn connection_keep_alive(&self) -> KeepAlive { - if self.warm_up_end >= Instant::now() { + if self.warm_up_end >= self.clock.now() { return KeepAlive::Until(self.warm_up_end) } -- GitLab From 600ca440142ab0f2fc5adf16ca6b32d63269df09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 19 Apr 2019 13:55:04 +0200 Subject: [PATCH 031/206] Make correct feature selection in node-template Cargo.toml (#2306) --- node-template/runtime/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node-template/runtime/Cargo.toml b/node-template/runtime/Cargo.toml index 6147250df1..3622fa34b1 100644 --- a/node-template/runtime/Cargo.toml +++ b/node-template/runtime/Cargo.toml @@ -32,7 +32,6 @@ consensus_authorities = { package = "substrate-consensus-authorities", path = ". default = ["std"] std = [ "parity-codec/std", - "primitives/std", "client/std", "rstd/std", "runtime-io/std", @@ -42,6 +41,7 @@ std = [ "aura/std", "indices/std", "primitives/std", + "runtime-primitives/std", "system/std", "timestamp/std", "sudo/std", @@ -51,4 +51,5 @@ std = [ "safe-mix/std", "consensus-aura/std", "offchain-primitives/std", + "consensus_authorities/std", ] -- GitLab From f3b6aedbc01f7d6171d82d58acc6ba144d8cb357 Mon Sep 17 00:00:00 2001 From: cheme Date: Fri, 19 Apr 2019 14:10:24 +0200 Subject: [PATCH 032/206] assert trie odd nibble padding on decoding (#2218) * Do not allow malleability in odd slice padding. * align dep --- core/trie/src/node_codec.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/trie/src/node_codec.rs b/core/trie/src/node_codec.rs index 775ee9a402..1b0d2be652 100644 --- a/core/trie/src/node_codec.rs +++ b/core/trie/src/node_codec.rs @@ -61,12 +61,18 @@ impl trie_db::NodeCodec for NodeCodec { Ok(Node::Branch(children, value)) } NodeHeader::Extension(nibble_count) => { + if nibble_count % 2 == 1 && input[0] & 0xf0 != 0x00 { + return Err(BadFormat); + } let nibble_data = take(input, (nibble_count + 1) / 2).ok_or(BadFormat)?; let nibble_slice = NibbleSlice::new_offset(nibble_data, nibble_count % 2); let count = >::decode(input).ok_or(BadFormat)?.0 as usize; Ok(Node::Extension(nibble_slice, take(input, count).ok_or(BadFormat)?)) } NodeHeader::Leaf(nibble_count) => { + if nibble_count % 2 == 1 && input[0] & 0xf0 != 0x00 { + return Err(BadFormat); + } let nibble_data = take(input, (nibble_count + 1) / 2).ok_or(BadFormat)?; let nibble_slice = NibbleSlice::new_offset(nibble_data, nibble_count % 2); let count = >::decode(input).ok_or(BadFormat)?.0 as usize; -- GitLab From aa0692a2b104c8111fe22004d0fd7c9da2086c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=85=89=E5=8D=8E?= Date: Fri, 19 Apr 2019 20:28:08 +0800 Subject: [PATCH 033/206] Fix a bug about rpc call panic (#2320) * Fix a bug about rpc call panic * Update code from review * Add database block number limit issue --- core/rpc/src/chain/mod.rs | 1 - core/rpc/src/chain/number.rs | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/rpc/src/chain/mod.rs b/core/rpc/src/chain/mod.rs index de7ad3faad..ab930d0076 100644 --- a/core/rpc/src/chain/mod.rs +++ b/core/rpc/src/chain/mod.rs @@ -187,7 +187,6 @@ impl ChainApi, Block::Hash, Block::Header, Sig } fn block_hash(&self, number: Option>>) -> Result> { - let number: Option>> = number.into(); Ok(match number { None => Some(self.client.info()?.chain.best_hash), Some(num_or_hex) => self.client.header(&BlockId::number(num_or_hex.to_number()?))?.map(|h| h.hash()), diff --git a/core/rpc/src/chain/number.rs b/core/rpc/src/chain/number.rs index bdf4b4df03..35daf26a76 100644 --- a/core/rpc/src/chain/number.rs +++ b/core/rpc/src/chain/number.rs @@ -39,18 +39,24 @@ impl> NumberOrHex { /// /// Fails in case hex number is too big. pub fn to_number(self) -> Result { - match self { - NumberOrHex::Number(n) => Ok(n), + let num: u64 = match self { + NumberOrHex::Number(n) => n.as_(), NumberOrHex::Hex(h) => { // FIXME #1377 this only supports `u64` since `BlockNumber` // is `As` we could possibly go with `u128`. let l = h.low_u64(); if U256::from(l) != h { - Err(format!("`{}` does not fit into the block number type.", h)) + return Err(format!("`{}` does not fit into the block number type.", h)); } else { - Ok(traits::As::sa(l)) + l } }, + }; + // FIXME <2329>: Database seems to limit the block number to u32 for no reason + if num > u32::max_value() as u64 { + Err(format!("`{}` > u32::max_value(), the max block number is u32.", num)) + } else { + Ok(traits::As::sa(num)) } } } -- GitLab From 3ec6247e44ba8656007fbf75295d6d373b955846 Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Fri, 19 Apr 2019 19:35:11 +0200 Subject: [PATCH 034/206] contracts: Validate code before deployment (#2330) * Validate module before storing it in code_cache. * Bump version. --- Cargo.lock | 11 ++++++++++ node/runtime/Cargo.toml | 3 +++ node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 10 +++++++++ node/runtime/wasm/Cargo.toml | 5 ++++- srml/contract/Cargo.toml | 5 +++++ srml/contract/src/wasm/code_cache.rs | 2 -- srml/contract/src/wasm/prepare.rs | 31 +++++++++++++++++++++------- 8 files changed, 57 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be65569197..5e35d98fee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3233,6 +3233,7 @@ dependencies = [ "srml-timestamp 1.0.0", "substrate-primitives 1.0.0", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5071,6 +5072,15 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wasmi-validation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "websocket" version = "0.22.2" @@ -5603,6 +5613,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" "checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" diff --git a/node/runtime/Cargo.toml b/node/runtime/Cargo.toml index 9cdceb96ac..f8e0e047bc 100644 --- a/node/runtime/Cargo.toml +++ b/node/runtime/Cargo.toml @@ -41,6 +41,9 @@ consensus_authorities = { package = "substrate-consensus-authorities", path = ". [features] default = ["std"] +core = [ + "contract/core", +] std = [ "parity-codec/std", "substrate-primitives/std", diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 7239e14aa1..3a3ad41c28 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 62, + spec_version: 63, impl_version: 65, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index af45815777..243a60fb25 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -2226,6 +2226,7 @@ dependencies = [ "srml-system 1.0.0", "srml-timestamp 1.0.0", "substrate-primitives 1.0.0", + "wasmi-validation 0.1.0", ] [[package]] @@ -3203,6 +3204,15 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wasmi-validation" +version = "0.1.0" +dependencies = [ + "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" diff --git a/node/runtime/wasm/Cargo.toml b/node/runtime/wasm/Cargo.toml index 8fd90890e9..b6490a047e 100644 --- a/node/runtime/wasm/Cargo.toml +++ b/node/runtime/wasm/Cargo.toml @@ -12,7 +12,10 @@ crate-type = ["cdylib"] node-runtime = { path = "..", default-features = false } [features] -default = [] +default = ["core"] +core = [ + "node-runtime/core", +] std = [ "node-runtime/std", ] diff --git a/srml/contract/Cargo.toml b/srml/contract/Cargo.toml index 2338aabe0d..be4034c849 100644 --- a/srml/contract/Cargo.toml +++ b/srml/contract/Cargo.toml @@ -10,6 +10,7 @@ serde_derive = { version = "1.0", optional = true } pwasm-utils = { version = "0.6.1", default-features = false } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } parity-wasm = { version = "0.31", default-features = false } +wasmi-validation = { version = "0.1", default-features = false } substrate-primitives = { path = "../../core/primitives", default-features = false } runtime-primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false } @@ -28,6 +29,9 @@ balances = { package = "srml-balances", path = "../balances" } [features] default = ["std"] +core = [ + "wasmi-validation/core", +] std = [ "serde", "serde_derive", @@ -42,4 +46,5 @@ std = [ "timestamp/std", "parity-wasm/std", "pwasm-utils/std", + "wasmi-validation/std", ] diff --git a/srml/contract/src/wasm/code_cache.rs b/srml/contract/src/wasm/code_cache.rs index dab8c4bfa4..0c71fe8cb5 100644 --- a/srml/contract/src/wasm/code_cache.rs +++ b/srml/contract/src/wasm/code_cache.rs @@ -72,8 +72,6 @@ pub fn save( let prefab_module = prepare::prepare_contract::(&original_code, schedule)?; let code_hash = T::Hashing::hash(&original_code); - // TODO: #1416 validate the code. If the code is not valid, then don't store it. - >::insert(code_hash, prefab_module); >::insert(code_hash, original_code); diff --git a/srml/contract/src/wasm/prepare.rs b/srml/contract/src/wasm/prepare.rs index 15922c3d99..53883451b4 100644 --- a/srml/contract/src/wasm/prepare.rs +++ b/srml/contract/src/wasm/prepare.rs @@ -29,20 +29,34 @@ use rstd::prelude::*; use runtime_primitives::traits::As; struct ContractModule<'a, Gas: 'a> { - // An `Option` is used here for loaning (`take()`-ing) the module. - // Invariant: Can't be `None` (i.e. on enter and on exit from the function - // the value *must* be `Some`). + /// A deserialized module. The module is valid (this is Guaranteed by `new` method). + /// + /// An `Option` is used here for loaning (`take()`-ing) the module. + /// Invariant: Can't be `None` (i.e. on enter and on exit from the function + /// the value *must* be `Some`). module: Option, schedule: &'a Schedule, } impl<'a, Gas: 'a + As + Clone> ContractModule<'a, Gas> { + /// Creates a new instance of `ContractModule`. + /// + /// Returns `Err` if the `original_code` couldn't be decoded or + /// if it contains an invalid module. fn new( original_code: &[u8], schedule: &'a Schedule, ) -> Result, &'static str> { + use wasmi_validation::{validate_module, PlainValidator}; + let module = - elements::deserialize_buffer(original_code).map_err(|_| "can't decode wasm code")?; + elements::deserialize_buffer(original_code).map_err(|_| "Can't decode wasm code")?; + + // Make sure that the module is valid. + validate_module::(&module).map_err(|_| "Module is not valid")?; + + // Return a `ContractModule` instance with + // __valid__ module. Ok(ContractModule { module: Some(module), schedule, @@ -270,7 +284,8 @@ impl<'a, Gas: 'a + As + Clone> ContractModule<'a, Gas> { /// /// The checks are: /// -/// - module doesn't define an internal memory instance, +/// - provided code is a valid wasm module. +/// - the module doesn't define an internal memory instance, /// - imported memory (if any) doesn't reserve more memory than permitted by the `schedule`, /// - all imported functions from the external environment matches defined by `env` module, /// @@ -438,7 +453,7 @@ mod tests { (func (export "deploy")) ) "#, - Err("Requested initial number of pages should not exceed the requested maximum") + Err("Module is not valid") ); prepare_test!(no_maximum, @@ -487,7 +502,7 @@ mod tests { (func (export "deploy")) ) "#, - Err("Multiple memory imports defined") + Err("Module is not valid") ); prepare_test!(table_import, @@ -505,7 +520,7 @@ mod tests { prepare_test!(global_import, r#" (module - (global $g (import "env" "global") (mut i32)) + (global $g (import "env" "global") i32) (func (export "call")) (func (export "deploy")) ) -- GitLab From 758a96ed923cc26fe748b415dee3056234bd0f88 Mon Sep 17 00:00:00 2001 From: mattrutherford <44339188+mattrutherford@users.noreply.github.com> Date: Mon, 22 Apr 2019 18:30:01 +0100 Subject: [PATCH 035/206] Telemetry - change NetworkState from string to json (#2338) * change NetworkState from string to json in telemetry --- Cargo.lock | 27 +++++++++++++++++++++++++++ core/cli/src/informant.rs | 2 +- core/network-libp2p/Cargo.toml | 4 ++++ core/network-libp2p/src/lib.rs | 11 ++++++----- core/service/Cargo.toml | 2 +- core/telemetry/Cargo.toml | 6 +++--- 6 files changed, 42 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e35d98fee..bcf5131990 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -737,6 +737,14 @@ name = "environmental" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "erased-serde" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "error-chain" version = "0.12.0" @@ -2997,6 +3005,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "slog" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "slog-async" @@ -3014,6 +3025,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3029,6 +3041,16 @@ dependencies = [ "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "slog_derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "smallvec" version = "0.6.8" @@ -4090,6 +4112,7 @@ version = "1.0.0" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4101,6 +4124,8 @@ dependencies = [ "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-peerset 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5309,6 +5334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" +"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "87559b08e99a81a92bbb867d237543e43495857749f688e0773390a20d56c61c" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" @@ -5526,6 +5552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" +"checksum slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eff3b513cf2e0d1a60e1aba152dc72bedc5b05585722bb3cebd7bcb1e31b98f" "checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" "checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" diff --git a/core/cli/src/informant.rs b/core/cli/src/informant.rs index 260615b2c1..9047eb43cb 100644 --- a/core/cli/src/informant.rs +++ b/core/cli/src/informant.rs @@ -82,7 +82,7 @@ pub fn start(service: &Service, exit: ::exit_future::Exit, handle: TaskExe (proc.cpu_usage(), proc.memory()) } else { (0.0, 0) }; - let network_state = serde_json::to_string(&network.network_state()).unwrap_or_default(); + let network_state = network.network_state(); telemetry!( SUBSTRATE_INFO; diff --git a/core/network-libp2p/Cargo.toml b/core/network-libp2p/Cargo.toml index b97916b91a..5ae7db4a3a 100644 --- a/core/network-libp2p/Cargo.toml +++ b/core/network-libp2p/Cargo.toml @@ -29,6 +29,10 @@ tokio-timer = "0.2" unsigned-varint = { version = "0.2.1", features = ["codec"] } void = "1.0" +slog = { version = "^2", features = ["nested-values"] } +slog_derive = "0.1.1" +erased-serde = "0.3.9" + [dev-dependencies] tempdir = "0.3" diff --git a/core/network-libp2p/src/lib.rs b/core/network-libp2p/src/lib.rs index 5b73db636b..1a8e9672c8 100644 --- a/core/network-libp2p/src/lib.rs +++ b/core/network-libp2p/src/lib.rs @@ -31,7 +31,8 @@ pub use libp2p::{Multiaddr, multiaddr, build_multiaddr}; pub use libp2p::{identity, PeerId, core::PublicKey}; use libp2p::core::nodes::ConnectedPoint; -use serde_derive::Serialize; +use serde_derive::{Deserialize, Serialize}; +use slog_derive::SerdeValue; use std::{collections::{HashMap, HashSet}, error, fmt, time::Duration}; /// Protocol / handler id @@ -92,7 +93,7 @@ impl From for ParseErr { /// Meant for general diagnostic purposes. /// /// **Warning**: This API is not stable. -#[derive(Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerdeValue)] #[serde(rename_all = "camelCase")] pub struct NetworkState { /// PeerId of the local node. @@ -113,7 +114,7 @@ pub struct NetworkState { pub peerset: serde_json::Value, } -#[derive(Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkStatePeer { /// How we are connected to the node. @@ -132,14 +133,14 @@ pub struct NetworkStatePeer { pub known_addresses: HashSet, } -#[derive(Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkStateNotConnectedPeer { /// List of addresses known for this node. pub known_addresses: HashSet, } -#[derive(Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub enum NetworkStatePeerEndpoint { /// We are dialing the given address. diff --git a/core/service/Cargo.toml b/core/service/Cargo.toml index 7799e805e6..7e53b74fd7 100644 --- a/core/service/Cargo.toml +++ b/core/service/Cargo.toml @@ -10,7 +10,7 @@ parking_lot = "0.7.1" error-chain = "0.12" lazy_static = "1.0" log = "0.4" -slog = "^2" +slog = {version = "^2", features = ["nested-values"]} tokio = "0.1.7" exit-future = "0.1" serde = "1.0" diff --git a/core/telemetry/Cargo.toml b/core/telemetry/Cargo.toml index 231206fffd..fced209776 100644 --- a/core/telemetry/Cargo.toml +++ b/core/telemetry/Cargo.toml @@ -12,8 +12,8 @@ log = "0.4" rand = "0.6" serde = "1.0.81" serde_derive = "1.0" -slog = "^2" -slog-json = "^2" -slog-async = "^2" +slog = { version = "^2", features = ["nested-values"] } +slog-json = { version = "^2", features = ["nested-values"] } +slog-async = { version = "^2", features = ["nested-values"] } slog-scope = "^4" ws = { version = "^0.7", features = ["ssl"] } -- GitLab From de68b7138bf9e140167efdcf7600b9c717676cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=85=89=E5=8D=8E?= Date: Tue, 23 Apr 2019 02:34:24 +0800 Subject: [PATCH 036/206] Fix test build error in std mode (#2337) --- core/test-runtime/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/test-runtime/Cargo.toml b/core/test-runtime/Cargo.toml index f7b606b742..e2d4bdc2d8 100644 --- a/core/test-runtime/Cargo.toml +++ b/core/test-runtime/Cargo.toml @@ -56,4 +56,5 @@ std = [ "memory-db/std", "offchain-primitives/std", "executive/std", + "consensus_authorities/std", ] -- GitLab From 1abc421263d927cd62d00241e55227f153b2796f Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Tue, 23 Apr 2019 18:50:31 +1200 Subject: [PATCH 037/206] Move scripts to scripts folder and update readme (#2331) * Move scripts to scripts folder and update readme * Update node-template/README.md Co-Authored-By: xlc * Update node-template/README.md Co-Authored-By: xlc * Update node-template/README.md Co-Authored-By: xlc * Update node-template/README.md Co-Authored-By: xlc * Update node-template/README.md Co-Authored-By: xlc * Update node-template/README.md Co-Authored-By: xlc * remove release flag --- node-template/README.md | 65 ++++++++++++++++++++++++++++ node-template/{ => scripts}/build.sh | 0 node-template/{ => scripts}/init.sh | 0 3 files changed, 65 insertions(+) rename node-template/{ => scripts}/build.sh (100%) rename node-template/{ => scripts}/init.sh (100%) diff --git a/node-template/README.md b/node-template/README.md index 26c6924294..4d616be7f0 100644 --- a/node-template/README.md +++ b/node-template/README.md @@ -1,3 +1,68 @@ # Template Node A new SRML-based Substrate node, ready for hacking. + +# Building + +Install Rust: + +```bash +curl https://sh.rustup.rs -sSf | sh +``` + +Install required tools: + +```bash +./scripts/init.sh +``` + +Build the WebAssembly binary: + +```bash +./scripts/build.sh +``` + +Build all native code: + +```bash +cargo build +``` + +# Run + +You can start a development chain with: + +```bash +cargo run -- --dev +``` + +Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`. + +If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with testnet units. Give each node a name and expose them so they are listed on the Polkadot [telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open. + +We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from the `--node-key` value that we specify below: + +```bash +cargo run -- \ + --base-path /tmp/alice \ + --chain=local \ + --alice \ + --node-key 0000000000000000000000000000000000000000000000000000000000000001 \ + --telemetry-url ws://telemetry.polkadot.io:1024 \ + --validator +``` + +In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's bootnode ID on TCP port 30333: + +```bash +cargo run -- \ + --base-path /tmp/bob \ + --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \ + --chain=local \ + --bob \ + --port 30334 \ + --telemetry-url ws://telemetry.polkadot.io:1024 \ + --validator +``` + +Additional CLI usage options are available and may be shown by running `cargo run -- --help`. diff --git a/node-template/build.sh b/node-template/scripts/build.sh similarity index 100% rename from node-template/build.sh rename to node-template/scripts/build.sh diff --git a/node-template/init.sh b/node-template/scripts/init.sh similarity index 100% rename from node-template/init.sh rename to node-template/scripts/init.sh -- GitLab From df1cc70ee63d28dd47596d15eb87a5664a761ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 23 Apr 2019 10:31:25 +0200 Subject: [PATCH 038/206] Build wasm files in doc release pipeline (#2340) --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7edee3724d..91855c567c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,8 +128,10 @@ build-rust-doc-release: &build <<: *build-only tags: - linux-docker - script: + before_script: - sccache -s + - ./scripts/build.sh + script: - rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds - time cargo +nightly doc --release --verbose - cp -R ./target/doc ./crate-docs -- GitLab From da833e52f17bfeed2e5e7cbd4e18195ee343ce7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 23 Apr 2019 15:49:28 +0200 Subject: [PATCH 039/206] Adjust consensus telemetry (#2198) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Send high-level consensus telemetry by default * Notify telemetry on finalized * Send used authority set to telemetry * Do not send commit message telemetry by default * Fix typo * Allow for notifications on telemetry connect ...and send the current authority set on each connect. * Send authority set to telemetry on change * Revert "Send used authority set to telemetry" This reverts commit 1deceead52bb7443a02879ac8138afad9a6ca5ff. * Merge branch 'master' into 'cmichi-send-high-level-consensus-telemetry-by-default' Squashed commit of the following: commit 6de583a230628438d2801fde75472814a6d78ccf Author: Xiliang Chen Date: Wed Apr 10 20:26:29 2019 +1200 update authers for rest of the node-template cargo.toml files (#2242) commit 5240bc1fd0b4201384c2c55c9759fd3d7eeb2d0e Author: Bastian Köcher Date: Tue Apr 9 10:31:18 2019 +0200 Throw a compile error for `on_finalise` and `on_initialise` (#2236) commit 67d2e71a16ebc98e00189c3e8af14b9a593d0472 Author: Pierre Krieger Date: Tue Apr 9 05:30:43 2019 -0300 Add warning when using default protocol ID (#2234) * Add warning when using default protocol ID * Update core/service/src/lib.rs commit 1421fed617ad72c2c83d6f105fb9cf1678160282 Author: Xiliang Chen Date: Tue Apr 9 17:22:20 2019 +1200 update name and authors to placeholder text for node-template (#2222) * update name and authors to placeholder text * revert package name change commit 6617f231515cae0adc836bfd386601984c725538 Author: André Silva Date: Mon Apr 8 12:50:34 2019 +0100 grandpa: Voter persistence and upgrade to finality-grandpa v0.7 (#2139) * core: grandpa: migrate to grandpa 0.7 * core: grandpa: store current round votes and load them on startup * core: grandpa: resend old persisted votes for the current round * core: grandpa: store base and votes for last completed round * core: grandpa: fix latest grandpa 0.7 changes * core: grandpa: update to grandpa 0.7.1 * core: grandpa: persist votes for last two completed rounds * core: grandpa: simplify VoterSetState usage * core: grandpa: use Environment::update_voter_set_state * core: grandpa: fix aux_schema test * core: grandpa: add docs * core: grandpa: add note about environment assumption * core: grandpa: don't update voter set state on ignored votes * core: grandpa: add test for v1 -> v2 aux_schema migration * core: grandpa: add test for voter vote persistence * core: grandpa: use grandpa 0.7.1 from crates.io * core: grandpa: use try_init in test * core: grandpa: add comment about block_import in test * core: grandpa: avoid cloning HasVoted * core: grandpa: add missing docs * core: grandpa: cleanup up can_propose/prevote/precommit commit 21e0877e036db50f275b6257567b1bc71ce854f8 Author: Gregory Terzian <2792687+gterzian@users.noreply.github.com> Date: Mon Apr 8 13:17:00 2019 +0200 remove clone bound on specialization in testnet factory (#2157) commit 7c6474663cdba40422760d21ae0119bfad425e40 Author: Andrew Jones Date: Sat Apr 6 12:23:56 2019 +0100 Contract import/export validation (#2203) * Reject validation of contract with unknown exports * Validate imports eagerly * Increment spec version commit 12718fac786811fc9b0627f3784451b1a6976af8 Author: Pierre Krieger Date: Fri Apr 5 14:07:09 2019 -0300 Fix state inconsistency between handler and behaviour (#2220) * Fix state inconsistency between handler and behaviour * Fix the error! being in the wrong place commit f917d124b77e134779df95edda8ea2f1b9dfc967 Author: Bastian Köcher Date: Fri Apr 5 18:50:38 2019 +0200 Use `storage_root` of newly calculated header (#2216) Instead of calculating the `storage_root` a second time, we just can take the `storage_root` from the new header. commit 3359ce0b06dd7baf99ab460f3b6f77caf2dd9129 Author: Marek Kotewicz Date: Fri Apr 5 14:44:46 2019 +0200 Peerset::discovered accepts many peer ids (#2213) * Peerset::discovered accepts many peer ids * Improve tracing in peerset commit dd82e0e6bdbf34cec6aa502497a326c4db3182f0 Author: Marek Kotewicz Date: Thu Apr 4 19:40:40 2019 +0200 simplification of peerset api (#2123) * Introduction of PeersetHandle * integrate PeersetHandle with the rest of the codebase * fix compilation errors * more tests for peerset, fixed overwriting bug in add_reserved_peer * Slots data structure and bugfixes for peerset * bend to pressure * updated lru-cache to 0.1.2 and updated linked-hash-map to 0.5.2 * peerset discovered list is now a LinkedHashMap * fix review suggestions * split back Peerset and PeersetHandle * test for Peerset::discovered * applied review suggestions * fixes to peerset::incoming * peerset disconnects are all instantaneous * instantaneous drop in peerset finished * Peerset::set_reserved_only can also reconnect nodes * Peerset scores cache uses lru-cache * remove redundant function call and comment from Peerset::on_set_reserved_only * add_peer returns SlotState enum * apply review suggestions * is_reserved -> is_connected_and_reserved commit d90833d7a101a30c1222582400280f00b4782eed Author: Arkadiy Paronyan Date: Thu Apr 4 18:01:28 2019 +0200 Disconnect on protocol timeout (#2212) commit c0a46b59112b35684ae8868d7694e8d843e7c9e4 Author: André Silva Date: Thu Apr 4 15:56:49 2019 +0100 core: grandpa: verify commit target in justification (#2201) commit 3a4901a78f627d689673597e5b8fca761d954ae3 Author: Bastian Köcher Date: Thu Apr 4 16:56:16 2019 +0200 Introduce `original_storage` and `original_storage_hash` (#2211) Both functions will ignore any overlayed changes and access the backend directly. commit a7a469f9e60990ab269a71c46990561c35a4aede Author: Xiliang Chen Date: Fri Apr 5 03:55:55 2019 +1300 code cleanup (#2206) commit 26c7b44236cc45df92b19eb1023666e90a9ccf1e Author: Arkadiy Paronyan Date: Wed Apr 3 15:52:46 2019 +0200 Emberic elm testnet (#2197) * Make telemetry onconnect hoook optional * Merge branch 'master' into 'cmichi-send-high-level-consensus-telemetry-by-default' * Introduce GrandpaParams struct to condense parameters * Remove debug statement * Fix tests * Rename parameter * Fix tests * Rename struct * Do not send verbosity level * Combine imports * Implement comments * Run cargo build --all * Remove noisy telemetry * Add docs for public items * Unbox and support Clone trait * Fix merge * Fix merge * Update core/finality-grandpa/src/lib.rs Co-Authored-By: cmichi --- Cargo.lock | 2 + core/client/src/client.rs | 5 ++ core/finality-grandpa/Cargo.toml | 1 + core/finality-grandpa/src/aux_schema.rs | 12 ++++ .../finality-grandpa/src/communication/mod.rs | 2 +- core/finality-grandpa/src/lib.rs | 69 +++++++++++++++---- core/finality-grandpa/src/tests.rs | 65 +++++++++-------- core/peerset/src/lib.rs | 1 + core/service/src/lib.rs | 33 ++++++++- core/telemetry/Cargo.toml | 1 + core/telemetry/src/lib.rs | 8 +-- node/cli/src/service.rs | 22 ++++-- 12 files changed, 166 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcf5131990..b1204a1c58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4014,6 +4014,7 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "srml-finality-tracker 1.0.0", "substrate-client 1.0.0", @@ -4360,6 +4361,7 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/core/client/src/client.rs b/core/client/src/client.rs index 4a33f3261a..099255bdf5 100644 --- a/core/client/src/client.rs +++ b/core/client/src/client.rs @@ -956,6 +956,11 @@ impl Client where let header = self.header(&BlockId::Hash(finalized_hash))? .expect("header already known to exist in DB because it is indicated in the tree route; qed"); + telemetry!(SUBSTRATE_INFO; "notify.finalized"; + "height" => format!("{}", header.number()), + "best" => ?finalized_hash, + ); + let notification = FinalityNotification { header, hash: finalized_hash, diff --git a/core/finality-grandpa/Cargo.toml b/core/finality-grandpa/Cargo.toml index 2424eed06f..9b076f5b01 100644 --- a/core/finality-grandpa/Cargo.toml +++ b/core/finality-grandpa/Cargo.toml @@ -16,6 +16,7 @@ runtime_primitives = { package = "sr-primitives", path = "../sr-primitives" } consensus_common = { package = "substrate-consensus-common", path = "../consensus/common" } substrate-primitives = { path = "../primitives" } substrate-telemetry = { path = "../telemetry" } +serde_json = "1.0" client = { package = "substrate-client", path = "../client" } inherents = { package = "substrate-inherents", path = "../../core/inherents" } network = { package = "substrate-network", path = "../network" } diff --git a/core/finality-grandpa/src/aux_schema.rs b/core/finality-grandpa/src/aux_schema.rs index 99cecb98d5..9e981cb903 100644 --- a/core/finality-grandpa/src/aux_schema.rs +++ b/core/finality-grandpa/src/aux_schema.rs @@ -25,6 +25,7 @@ use fork_tree::ForkTree; use grandpa::round::State as RoundState; use runtime_primitives::traits::{Block as BlockT, NumberFor}; use log::{info, warn}; +use substrate_telemetry::{telemetry, CONSENSUS_INFO}; use crate::authorities::{AuthoritySet, SharedAuthoritySet, PendingChange, DelayKind}; use crate::consensus_changes::{SharedConsensusChanges, ConsensusChanges}; @@ -365,6 +366,17 @@ pub(crate) fn update_authority_set( let encoded_set = set.encode(); if let Some(new_set) = new_set { + telemetry!(CONSENSUS_INFO; "afg.authority_set"; + "hash" => ?new_set.canon_hash, + "number" => ?new_set.canon_number, + "authority_set_id" => ?new_set.set_id, + "authorities" => { + let authorities: Vec = + new_set.authorities.iter().map(|(id, _)| format!("{}", id)).collect(); + format!("{:?}", authorities) + } + ); + // we also overwrite the "last completed round" entry with a blank slate // because from the perspective of the finality gadget, the chain has // reset. diff --git a/core/finality-grandpa/src/communication/mod.rs b/core/finality-grandpa/src/communication/mod.rs index 4b8958f2e9..ec7ed330ac 100644 --- a/core/finality-grandpa/src/communication/mod.rs +++ b/core/finality-grandpa/src/communication/mod.rs @@ -681,7 +681,7 @@ impl> Sink for CommitsOut { let (round, commit) = input; let round = Round(round); - telemetry!(CONSENSUS_INFO; "afg.commit_issued"; + telemetry!(CONSENSUS_DEBUG; "afg.commit_issued"; "target_number" => ?commit.target_number, "target_hash" => ?commit.target_hash, ); let (precommits, auth_data) = commit.precommits.into_iter() diff --git a/core/finality-grandpa/src/lib.rs b/core/finality-grandpa/src/lib.rs index 3d9ec8b5e7..5a2b084160 100644 --- a/core/finality-grandpa/src/lib.rs +++ b/core/finality-grandpa/src/lib.rs @@ -69,6 +69,7 @@ use inherents::InherentDataProviders; use runtime_primitives::generic::BlockId; use substrate_primitives::{ed25519, H256, Pair, Blake2Hasher}; use substrate_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG, CONSENSUS_WARN}; +use serde_json; use srml_finality_tracker; @@ -105,6 +106,7 @@ use environment::{CompletedRound, CompletedRounds, Environment, HasVoted, Shared use import::GrandpaBlockImport; use until_imported::UntilCommitBlocksImported; use communication::NetworkBridge; +use service::TelemetryOnConnect; use ed25519::{Public as AuthorityId, Signature as AuthoritySignature}; @@ -433,14 +435,26 @@ fn register_finality_tracker_inherent_data_provider, N, RA, X> { + /// Configuration for the GRANDPA service. + pub config: Config, + /// A link to the block import worker. + pub link: LinkHalf, + /// The Network instance. + pub network: N, + /// The inherent data providers. + pub inherent_data_providers: InherentDataProviders, + /// Handle to a future that will resolve on exit. + pub on_exit: X, + /// If supplied, can be used to hook on telemetry connection established events. + pub telemetry_on_connect: Option>, +} + /// Run a GRANDPA voter as a task. Provide configuration and a link to a /// block import worker that has already been instantiated with `block_import`. -pub fn run_grandpa_voter, N, RA>( - config: Config, - link: LinkHalf, - network: N, - inherent_data_providers: InherentDataProviders, - on_exit: impl Future + Clone + Send + 'static, +pub fn run_grandpa_voter, N, RA, X>( + grandpa_params: GrandpaParams, ) -> ::client::error::Result + Send + 'static> where Block::Hash: Ord, B: Backend + 'static, @@ -451,7 +465,17 @@ pub fn run_grandpa_voter, N, RA>( DigestFor: Encode, DigestItemFor: DigestItem, RA: Send + Sync + 'static, + X: Future + Clone + Send + 'static, { + let GrandpaParams { + config, + link, + network, + inherent_data_providers, + on_exit, + telemetry_on_connect, + } = grandpa_params; + use futures::future::{self, Loop as FutureLoop}; let (network, network_startup) = NetworkBridge::new(network, config.clone(), on_exit.clone()); @@ -465,6 +489,28 @@ pub fn run_grandpa_voter, N, RA>( register_finality_tracker_inherent_data_provider(client.clone(), &inherent_data_providers)?; + if let Some(telemetry_on_connect) = telemetry_on_connect { + let authorities = authority_set.clone(); + let events = telemetry_on_connect.telemetry_connection_sinks + .for_each(move |_| { + telemetry!(CONSENSUS_INFO; "afg.authority_set"; + "authority_set_id" => ?authorities.set_id(), + "authorities" => { + let curr = authorities.current_authorities(); + let voters = curr.voters(); + let authorities: Vec = + voters.iter().map(|(id, _)| id.to_string()).collect(); + serde_json::to_string(&authorities) + .expect("authorities is always at least an empty vector; elements are always of type string") + } + ); + Ok(()) + }) + .then(|_| Ok(())); + let events = events.select(telemetry_on_connect.on_exit).then(|_| Ok(())); + telemetry_on_connect.executor.spawn(events); + } + let voters = authority_set.current_authorities(); let initial_environment = Arc::new(Environment { inner: client.clone(), @@ -660,12 +706,8 @@ pub fn run_grandpa_voter, N, RA>( } #[deprecated(since = "1.1", note = "Please switch to run_grandpa_voter.")] -pub fn run_grandpa, N, RA>( - config: Config, - link: LinkHalf, - network: N, - inherent_data_providers: InherentDataProviders, - on_exit: impl Future + Clone + Send + 'static, +pub fn run_grandpa, N, RA, X>( + grandpa_params: GrandpaParams, ) -> ::client::error::Result + Send + 'static> where Block::Hash: Ord, B: Backend + 'static, @@ -676,6 +718,7 @@ pub fn run_grandpa, N, RA>( DigestFor: Encode, DigestItemFor: DigestItem, RA: Send + Sync + 'static, + X: Future + Clone + Send + 'static, { - run_grandpa_voter(config, link, network, inherent_data_providers, on_exit) + run_grandpa_voter(grandpa_params) } diff --git a/core/finality-grandpa/src/tests.rs b/core/finality-grandpa/src/tests.rs index 1d8279e995..93d68af01b 100644 --- a/core/finality-grandpa/src/tests.rs +++ b/core/finality-grandpa/src/tests.rs @@ -419,18 +419,20 @@ fn run_to_completion_with( fn assert_send(_: &T) { } - let voter = run_grandpa_voter( - Config { + let grandpa_params = GrandpaParams { + config: Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, local_key: Some(Arc::new(key.clone().into())), name: Some(format!("peer#{}", peer_id)), }, - link, - MessageRouting::new(net.clone(), peer_id), - InherentDataProviders::new(), - Exit, - ).expect("all in order with client and network"); + link: link, + network: MessageRouting::new(net.clone(), peer_id), + inherent_data_providers: InherentDataProviders::new(), + on_exit: Exit, + telemetry_on_connect: None, + }; + let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); assert_send(&voter); @@ -517,18 +519,21 @@ fn finalize_3_voters_1_full_observer() { .take_while(|n| Ok(n.header.number() < &20)) .for_each(move |_| Ok(())) ); - let voter = run_grandpa_voter( - Config { + + let grandpa_params = GrandpaParams { + config: Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, local_key, name: Some(format!("peer#{}", peer_id)), }, - link, - MessageRouting::new(net.clone(), peer_id), - InherentDataProviders::new(), - Exit, - ).expect("all in order with client and network"); + link: link, + network: MessageRouting::new(net.clone(), peer_id), + inherent_data_providers: InherentDataProviders::new(), + on_exit: Exit, + telemetry_on_connect: None, + }; + let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); runtime.spawn(voter); } @@ -679,18 +684,20 @@ fn transition_3_voters_twice_1_full_observer() { assert_eq!(set.pending_changes().count(), 0); }) ); - let voter = run_grandpa_voter( - Config { + let grandpa_params = GrandpaParams { + config: Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, local_key, name: Some(format!("peer#{}", peer_id)), }, - link, - MessageRouting::new(net.clone(), peer_id), - InherentDataProviders::new(), - Exit, - ).expect("all in order with client and network"); + link: link, + network: MessageRouting::new(net.clone(), peer_id), + inherent_data_providers: InherentDataProviders::new(), + on_exit: Exit, + telemetry_on_connect: None, + }; + let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); runtime.spawn(voter); } @@ -1081,18 +1088,20 @@ fn voter_persists_its_votes() { let (_block_import, _, link) = net.lock().make_block_import(client.clone()); let link = link.lock().take().unwrap(); - let mut voter = run_grandpa_voter( - Config { + let grandpa_params = GrandpaParams { + config: Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, local_key: Some(Arc::new(peers[0].clone().into())), name: Some(format!("peer#{}", 0)), }, - link, - MessageRouting::new(net.clone(), 0), - InherentDataProviders::new(), - Exit, - ).expect("all in order with client and network"); + link: link, + network: MessageRouting::new(net.clone(), 0), + inherent_data_providers: InherentDataProviders::new(), + on_exit: Exit, + telemetry_on_connect: None, + }; + let mut voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); let voter = future::poll_fn(move || { // we need to keep the block_import alive since it owns the diff --git a/core/peerset/src/lib.rs b/core/peerset/src/lib.rs index 570dcf5f86..b801f47b58 100644 --- a/core/peerset/src/lib.rs +++ b/core/peerset/src/lib.rs @@ -22,6 +22,7 @@ mod slots; use std::collections::VecDeque; use futures::{prelude::*, sync::mpsc, try_ready}; use libp2p::PeerId; +use linked_hash_map::LinkedHashMap; use log::trace; use lru_cache::LruCache; use slots::{SlotType, SlotState, Slots}; diff --git a/core/service/src/lib.rs b/core/service/src/lib.rs index 789b05e9dc..e749ceeb1e 100644 --- a/core/service/src/lib.rs +++ b/core/service/src/lib.rs @@ -28,6 +28,8 @@ pub mod chain_ops; use std::io; use std::net::SocketAddr; use std::collections::HashMap; +use futures::sync::mpsc; +use parking_lot::Mutex; use client::BlockchainEvents; use exit_future::Signal; @@ -82,6 +84,7 @@ pub struct Service { _rpc: Box<::std::any::Any + Send + Sync>, _telemetry: Option>, _offchain_workers: Option, ComponentBlock>>>, + _telemetry_on_connect_sinks: Arc>>>, } /// Creates bare client without any networking. @@ -96,7 +99,27 @@ pub fn new_client(config: &FactoryFullConfi Ok(client) } +/// Stream of events for connection established to a telemetry server. +pub type TelemetryOnConnectNotifications = mpsc::UnboundedReceiver<()>; + +/// Used to hook on telemetry connection established events. +pub struct TelemetryOnConnect<'a> { + /// Handle to a future that will resolve on exit. + pub on_exit: Box + Send + 'static>, + /// Event stream. + pub telemetry_connection_sinks: TelemetryOnConnectNotifications, + /// Executor to which the hook is spawned. + pub executor: &'a TaskExecutor, +} + impl Service { + /// Get event stream for telemetry connection established events. + pub fn telemetry_on_connect_stream(&self) -> TelemetryOnConnectNotifications { + let (sink, stream) = mpsc::unbounded(); + self._telemetry_on_connect_sinks.lock().push(sink); + stream + } + /// Creates a new service. pub fn new( mut config: FactoryFullConfiguration, @@ -304,6 +327,8 @@ impl Service { config.rpc_ws, config.rpc_cors.clone(), task_executor.clone(), transaction_pool.clone(), )?; + let telemetry_connection_sinks: Arc>>> = Default::default(); + // Telemetry let telemetry = config.telemetry_endpoints.clone().map(|endpoints| { let is_authority = config.roles == Roles::AUTHORITY; @@ -313,6 +338,7 @@ impl Service { let impl_name = config.impl_name.to_owned(); let version = version.clone(); let chain_name = config.chain_spec.name().to_owned(); + let telemetry_connection_sinks_ = telemetry_connection_sinks.clone(); Arc::new(tel::init_telemetry(tel::TelemetryConfig { endpoints, on_connect: Box::new(move || { @@ -326,6 +352,10 @@ impl Service { "authority" => is_authority, "network_id" => network_id.clone() ); + + telemetry_connection_sinks_.lock().retain(|sink| { + sink.unbounded_send(()).is_ok() + }); }), })) }); @@ -342,6 +372,7 @@ impl Service { _rpc: Box::new(rpc), _telemetry: telemetry, _offchain_workers: offchain_workers, + _telemetry_on_connect_sinks: telemetry_connection_sinks.clone(), }) } @@ -358,7 +389,7 @@ impl Service { } } - /// return a shared instance of Telemtry (if enabled) + /// return a shared instance of Telemetry (if enabled) pub fn telemetry(&self) -> Option> { self._telemetry.as_ref().map(|t| t.clone()) } diff --git a/core/telemetry/Cargo.toml b/core/telemetry/Cargo.toml index fced209776..959349f74f 100644 --- a/core/telemetry/Cargo.toml +++ b/core/telemetry/Cargo.toml @@ -12,6 +12,7 @@ log = "0.4" rand = "0.6" serde = "1.0.81" serde_derive = "1.0" +serde_json = "1.0" slog = { version = "^2", features = ["nested-values"] } slog-json = { version = "^2", features = ["nested-values"] } slog-async = { version = "^2", features = ["nested-values"] } diff --git a/core/telemetry/src/lib.rs b/core/telemetry/src/lib.rs index fba75c196a..a993b50a17 100644 --- a/core/telemetry/src/lib.rs +++ b/core/telemetry/src/lib.rs @@ -24,14 +24,12 @@ use std::{io, time, thread}; use std::sync::Arc; use parking_lot::Mutex; -use slog::{Drain, o}; +use slog::{Drain, o, OwnedKVList, Record}; use log::trace; use rand::{thread_rng, Rng}; pub use slog_scope::with_logger; pub use slog; use serde_derive::{Serialize, Deserialize}; -use slog::OwnedKVList; -use slog::Record; use core::result; /// Configuration for telemetry. @@ -56,7 +54,7 @@ pub const SUBSTRATE_INFO: &str = "0"; pub const CONSENSUS_TRACE: &str = "9"; pub const CONSENSUS_DEBUG: &str = "5"; pub const CONSENSUS_WARN: &str = "4"; -pub const CONSENSUS_INFO: &str = "3"; +pub const CONSENSUS_INFO: &str = "0"; /// Multiply logging to all drains. This is similar to `slog::Duplicate`, which is /// limited to two drains though and doesn't support dynamic nesting at runtime. @@ -166,7 +164,7 @@ pub fn init_telemetry(config: TelemetryConfig) -> slog_scope::GlobalLoggerGuard macro_rules! telemetry { ( $a:expr; $b:expr; $( $t:tt )* ) => { $crate::with_logger(|l| { - $crate::slog::slog_info!(l, #$a, $b; "verbosity" => stringify!($a), $($t)* ) + $crate::slog::slog_info!(l, #$a, $b; $($t)* ) }) } } diff --git a/node/cli/src/service.rs b/node/cli/src/service.rs index 1366a62987..96a531a4ef 100644 --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -37,6 +37,7 @@ use inherents::InherentDataProviders; use network::construct_simple_protocol; use substrate_service::construct_service_factory; use log::info; +use substrate_service::TelemetryOnConnect; construct_simple_protocol! { /// Demo protocol attachment for substrate. @@ -128,13 +129,20 @@ construct_service_factory! { )?); }, Some(_) => { - executor.spawn(grandpa::run_grandpa_voter( - config, - link_half, - service.network(), - service.config.custom.inherent_data_providers.clone(), - service.on_exit(), - )?); + let telemetry_on_connect = TelemetryOnConnect { + on_exit: Box::new(service.on_exit()), + telemetry_connection_sinks: service.telemetry_on_connect_stream(), + executor: &executor, + }; + let grandpa_config = grandpa::GrandpaParams { + config: config, + link: link_half, + network: service.network(), + inherent_data_providers: service.config.custom.inherent_data_providers.clone(), + on_exit: service.on_exit(), + telemetry_on_connect: Some(telemetry_on_connect), + }; + executor.spawn(grandpa::run_grandpa_voter(grandpa_config)?); }, } -- GitLab From f6605cf47db39de8f9c017f47c6dd9c241e2b4ec Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 23 Apr 2019 16:34:47 +0200 Subject: [PATCH 040/206] Add warnings about breaking changes in network (#2348) --- core/network-libp2p/src/lib.rs | 3 +++ core/network/src/lib.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/network-libp2p/src/lib.rs b/core/network-libp2p/src/lib.rs index 1a8e9672c8..dfd1b36b22 100644 --- a/core/network-libp2p/src/lib.rs +++ b/core/network-libp2p/src/lib.rs @@ -15,6 +15,9 @@ // along with Substrate. If not, see . //! Networking layer of Substrate. +//! +//! **Important**: This crate is unstable and the API and usage may change. +//! mod behaviour; mod config; diff --git a/core/network/src/lib.rs b/core/network/src/lib.rs index f07013004f..1e3a7f1552 100644 --- a/core/network/src/lib.rs +++ b/core/network/src/lib.rs @@ -19,6 +19,9 @@ //! Substrate-specific P2P networking: synchronizing blocks, propagating BFT messages. //! Allows attachment of an optional subprotocol for chain-specific requests. +//! +//! **Important**: This crate is unstable and the API and usage may change. +//! mod service; mod sync; -- GitLab From a61bd407b114f31ef0f1d04eabf88623bcb85512 Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Tue, 23 Apr 2019 18:14:45 +0200 Subject: [PATCH 041/206] Check storage_key for validity (#2316) * Intro `ChildStorageKey` for checked child keys * Get rid of Into in Externalities trait * Use Cow in ChildStorageKey * Fix tests for state-machine. * Clean * child_storage_root always return a value * Don't return Option from Ext::child_storage_root * Return 42 in child_storage_root * Return CHILD_STORAGE_KEY_PREFIX from trie id gen * Bump spec and impl version. * Require `:default:` in `is_child_trie_key_valid` * Add `default:` prefix. * Introduce `into_owned` for `ChildStorageKey`. * Add documentation. * Fix state-machine tests * Remove outdated TODO I check out with Emeric and he is ok with that * child_storage_root is infailable * Nit * Move assert after check. * Apply suggestions from @DemiMarie-parity Co-Authored-By: pepyakin * Formatting nit in core/executor/src/wasm_executor.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Formatting nits from @thiolliere --- core/executor/src/wasm_executor.rs | 68 +++++++++++++----- core/primitives/src/storage.rs | 5 +- core/sr-io/with_std.rs | 79 +++++++++++++++------ core/sr-io/without_std.rs | 20 +++--- core/state-machine/src/basic.rs | 13 ++-- core/state-machine/src/ext.rs | 53 ++++++-------- core/state-machine/src/lib.rs | 109 ++++++++++++++++++++++++----- core/state-machine/src/testing.rs | 20 +++--- core/trie/Cargo.toml | 7 +- core/trie/src/lib.rs | 20 +++++- srml/contract/src/lib.rs | 7 ++ srml/contract/src/tests.rs | 8 ++- 12 files changed, 286 insertions(+), 123 deletions(-) diff --git a/core/executor/src/wasm_executor.rs b/core/executor/src/wasm_executor.rs index 42af29e9ba..ce41d86a18 100644 --- a/core/executor/src/wasm_executor.rs +++ b/core/executor/src/wasm_executor.rs @@ -25,7 +25,7 @@ use wasmi::{ }; use wasmi::RuntimeValue::{I32, I64, self}; use wasmi::memory_units::{Pages}; -use state_machine::Externalities; +use state_machine::{Externalities, ChildStorageKey}; use crate::error::{Error, ErrorKind, Result}; use crate::wasm_utils::UserError; use primitives::{blake2_256, twox_128, twox_256, ed25519, sr25519, Pair}; @@ -174,6 +174,10 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, HexDisplay::from(&key) ); } + let storage_key = ChildStorageKey::from_vec(storage_key) + .ok_or_else(|| + UserError("ext_set_child_storage: child storage key is invalid") + )?; this.ext.set_child_storage(storage_key, key, value); Ok(()) }, @@ -189,8 +193,13 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, format!("%{}", ::primitives::hexdisplay::ascii_format(&_preimage)) } else { format!(" {}", ::primitives::hexdisplay::ascii_format(&key)) - }, HexDisplay::from(&key)); - this.ext.clear_child_storage(&storage_key, &key); + }, HexDisplay::from(&key) + ); + let storage_key = ChildStorageKey::from_vec(storage_key) + .ok_or_else(|| + UserError("ext_clear_child_storage: child storage key is not valid") + )?; + this.ext.clear_child_storage(storage_key, &key); Ok(()) }, ext_clear_storage(key_data: *const u8, key_len: u32) => { @@ -214,7 +223,11 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, storage_key_len as usize ).map_err(|_| UserError("Invalid attempt to determine storage_key in ext_exists_child_storage"))?; let key = this.memory.get(key_data, key_len as usize).map_err(|_| UserError("Invalid attempt to determine key in ext_exists_child_storage"))?; - Ok(if this.ext.exists_child_storage(&storage_key, &key) { 1 } else { 0 }) + let storage_key = ChildStorageKey::from_vec(storage_key) + .ok_or_else(|| + UserError("ext_exists_child_storage: child storage key is not valid") + )?; + Ok(if this.ext.exists_child_storage(storage_key, &key) { 1 } else { 0 }) }, ext_clear_prefix(prefix_data: *const u8, prefix_len: u32) => { let prefix = this.memory.get(prefix_data, prefix_len as usize).map_err(|_| UserError("Invalid attempt to determine prefix in ext_clear_prefix"))?; @@ -226,7 +239,11 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, storage_key_data, storage_key_len as usize ).map_err(|_| UserError("Invalid attempt to determine storage_key in ext_kill_child_storage"))?; - this.ext.kill_child_storage(&storage_key); + let storage_key = ChildStorageKey::from_vec(storage_key) + .ok_or_else(|| + UserError("ext_exists_child_storage: child storage key is not valid") + )?; + this.ext.kill_child_storage(storage_key); Ok(()) }, // return 0 and place u32::max_value() into written_out if no value exists for the key. @@ -273,7 +290,14 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, key_data, key_len as usize ).map_err(|_| UserError("Invalid attempt to determine key in ext_get_allocated_child_storage"))?; - let maybe_value = this.ext.child_storage(&storage_key, &key); + + let maybe_value = { + let storage_key = ChildStorageKey::from_slice(&storage_key) + .ok_or_else(|| + UserError("ext_get_allocated_child_storage: child storage key is not valid") + )?; + this.ext.child_storage(storage_key, &key) + }; debug_trace!(target: "wasm-trace", "*** Getting child storage: {} -> {} == {} [k={}]", ::primitives::hexdisplay::ascii_format(&storage_key), @@ -339,7 +363,14 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, key_data, key_len as usize ).map_err(|_| UserError("Invalid attempt to get key in ext_get_child_storage_into"))?; - let maybe_value = this.ext.child_storage(&storage_key, &key); + + let maybe_value = { + let storage_key = ChildStorageKey::from_slice(&*storage_key) + .ok_or_else(|| + UserError("ext_get_child_storage_into: child storage key is not valid") + )?; + this.ext.child_storage(storage_key, &key) + }; debug_trace!(target: "wasm-trace", "*** Getting storage: {} -> {} == {} [k={}]", ::primitives::hexdisplay::ascii_format(&storage_key), if let Some(_preimage) = this.hash_lookup.get(&key) { @@ -371,18 +402,17 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, }, ext_child_storage_root(storage_key_data: *const u8, storage_key_len: u32, written_out: *mut u32) -> *mut u8 => { let storage_key = this.memory.get(storage_key_data, storage_key_len as usize).map_err(|_| UserError("Invalid attempt to determine storage_key in ext_child_storage_root"))?; - let r = this.ext.child_storage_root(&storage_key); - if let Some(value) = r { - let offset = this.heap.allocate(value.len() as u32)? as u32; - this.memory.set(offset, &value).map_err(|_| UserError("Invalid attempt to set memory in ext_child_storage_root"))?; - this.memory.write_primitive(written_out, value.len() as u32) - .map_err(|_| UserError("Invalid attempt to write written_out in ext_child_storage_root"))?; - Ok(offset) - } else { - this.memory.write_primitive(written_out, u32::max_value()) - .map_err(|_| UserError("Invalid attempt to write failed written_out in ext_child_storage_root"))?; - Ok(0) - } + let storage_key = ChildStorageKey::from_slice(&*storage_key) + .ok_or_else(|| + UserError("ext_child_storage_root: child storage key is not valid") + )?; + let value = this.ext.child_storage_root(storage_key); + + let offset = this.heap.allocate(value.len() as u32)? as u32; + this.memory.set(offset, &value).map_err(|_| UserError("Invalid attempt to set memory in ext_child_storage_root"))?; + this.memory.write_primitive(written_out, value.len() as u32) + .map_err(|_| UserError("Invalid attempt to write written_out in ext_child_storage_root"))?; + Ok(offset) }, ext_storage_changes_root(parent_hash_data: *const u8, parent_hash_len: u32, parent_number: u64, result: *mut u8) -> u32 => { let mut parent_hash = H256::default(); diff --git a/core/primitives/src/storage.rs b/core/primitives/src/storage.rs index 79652a8d4c..3203fdb1ba 100644 --- a/core/primitives/src/storage.rs +++ b/core/primitives/src/storage.rs @@ -83,8 +83,11 @@ pub mod well_known_keys { pub const CHILD_STORAGE_KEY_PREFIX: &'static [u8] = b":child_storage:"; /// Whether a key is a child storage key. + /// + /// This is convenience function which basically checks if the given `key` starts + /// with `CHILD_STORAGE_KEY_PREFIX` and doesn't do anything apart from that. pub fn is_child_storage_key(key: &[u8]) -> bool { + // Other code might depend on this, so be careful changing this. key.starts_with(CHILD_STORAGE_KEY_PREFIX) } - } diff --git a/core/sr-io/with_std.rs b/core/sr-io/with_std.rs index 1f4ce56fc9..bf7147babb 100644 --- a/core/sr-io/with_std.rs +++ b/core/sr-io/with_std.rs @@ -24,7 +24,12 @@ pub use primitives::{ pub use tiny_keccak::keccak256 as keccak_256; // Switch to this after PoC-3 // pub use primitives::BlakeHasher; -pub use substrate_state_machine::{Externalities, BasicExternalities, TestExternalities}; +pub use substrate_state_machine::{ + Externalities, + BasicExternalities, + TestExternalities, + ChildStorageKey +}; use environmental::environmental; use primitives::{hexdisplay::HexDisplay, H256}; @@ -41,6 +46,18 @@ pub type StorageOverlay = HashMap, Vec>; /// A set of key value pairs for children storage; pub type ChildrenStorageOverlay = HashMap, StorageOverlay>; +/// Returns a `ChildStorageKey` if the given `storage_key` slice is a valid storage +/// key or panics otherwise. +/// +/// Panicking here is aligned with what the `without_std` environment would do +/// in the case of an invalid child storage key. +fn child_storage_key_or_panic(storage_key: &[u8]) -> ChildStorageKey { + match ChildStorageKey::from_slice(storage_key) { + Some(storage_key) => storage_key, + None => panic!("child storage key is invalid"), + } +} + /// Get `key` from storage and return a `Vec`, empty if there's a problem. pub fn storage(key: &[u8]) -> Option> { ext::with(|ext| ext.storage(key).map(|s| s.to_vec())) @@ -49,8 +66,11 @@ pub fn storage(key: &[u8]) -> Option> { /// Get `key` from child storage and return a `Vec`, empty if there's a problem. pub fn child_storage(storage_key: &[u8], key: &[u8]) -> Option> { - ext::with(|ext| ext.child_storage(storage_key, key).map(|s| s.to_vec())) - .expect("storage cannot be called outside of an Externalities-provided environment.") + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.child_storage(storage_key, key).map(|s| s.to_vec()) + }) + .expect("storage cannot be called outside of an Externalities-provided environment.") } /// Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return @@ -70,13 +90,23 @@ pub fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Op /// the number of bytes that the entry in storage had beyond the offset or None if the storage entry /// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned /// number of bytes is not equal to the number of bytes written to the `value_out`. -pub fn read_child_storage(storage_key: &[u8], key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { - ext::with(|ext| ext.child_storage(storage_key, key).map(|value| { - let value = &value[value_offset..]; - let written = ::std::cmp::min(value.len(), value_out.len()); - value_out[..written].copy_from_slice(&value[..written]); - value.len() - })).expect("read_storage cannot be called outside of an Externalities-provided environment.") +pub fn read_child_storage( + storage_key: &[u8], + key: &[u8], + value_out: &mut [u8], + value_offset: usize, +) -> Option { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.child_storage(storage_key, key) + .map(|value| { + let value = &value[value_offset..]; + let written = ::std::cmp::min(value.len(), value_out.len()); + value_out[..written].copy_from_slice(&value[..written]); + value.len() + }) + }) + .expect("read_child_storage cannot be called outside of an Externalities-provided environment.") } /// Set the storage of a key to some value. @@ -88,9 +118,10 @@ pub fn set_storage(key: &[u8], value: &[u8]) { /// Set the child storage of a key to some value. pub fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { - ext::with(|ext| - ext.set_child_storage(storage_key.to_vec(), key.to_vec(), value.to_vec()) - ); + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.set_child_storage(storage_key, key.to_vec(), value.to_vec()) + }); } /// Clear the storage of a key. @@ -102,9 +133,10 @@ pub fn clear_storage(key: &[u8]) { /// Clear the storage of a key. pub fn clear_child_storage(storage_key: &[u8], key: &[u8]) { - ext::with(|ext| + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); ext.clear_child_storage(storage_key, key) - ); + }); } /// Check whether a given `key` exists in storage. @@ -116,9 +148,10 @@ pub fn exists_storage(key: &[u8]) -> bool { /// Check whether a given `key` exists in storage. pub fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool { - ext::with(|ext| + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); ext.exists_child_storage(storage_key, key) - ).unwrap_or(false) + }).unwrap_or(false) } /// Clear the storage entries with a key that starts with the given prefix. @@ -130,9 +163,10 @@ pub fn clear_prefix(prefix: &[u8]) { /// Clear an entire child storage. pub fn kill_child_storage(storage_key: &[u8]) { - ext::with(|ext| + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); ext.kill_child_storage(storage_key) - ); + }); } /// The current relay chain identifier. @@ -150,10 +184,11 @@ pub fn storage_root() -> H256 { } /// "Commit" all existing operations and compute the resultant child storage root. -pub fn child_storage_root(storage_key: &[u8]) -> Option> { - ext::with(|ext| +pub fn child_storage_root(storage_key: &[u8]) -> Vec { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); ext.child_storage_root(storage_key) - ).unwrap_or(None) + }).expect("child_storage_root cannot be called outside of an Externalities-provided environment.") } /// "Commit" all existing operations and get the resultant storage change root. diff --git a/core/sr-io/without_std.rs b/core/sr-io/without_std.rs index 08b1a3c70a..f4b3c91154 100644 --- a/core/sr-io/without_std.rs +++ b/core/sr-io/without_std.rs @@ -475,18 +475,18 @@ pub fn storage_root() -> [u8; 32] { } /// "Commit" all existing operations and compute the resultant child storage root. -pub fn child_storage_root(storage_key: &[u8]) -> Option> { +pub fn child_storage_root(storage_key: &[u8]) -> Vec { let mut length: u32 = 0; unsafe { - let ptr = ext_child_storage_root.get()(storage_key.as_ptr(), storage_key.len() as u32, &mut length); - if length == u32::max_value() { - None - } else { - // Invariants required by Vec::from_raw_parts are not formally fulfilled. - // We don't allocate via String/Vec, but use a custom allocator instead. - // See #300 for more details. - Some(>::from_raw_parts(ptr, length as usize, length as usize)) - } + let ptr = ext_child_storage_root.get()( + storage_key.as_ptr(), + storage_key.len() as u32, + &mut length + ); + // Invariants required by Vec::from_raw_parts are not formally fulfilled. + // We don't allocate via String/Vec, but use a custom allocator instead. + // See #300 for more details. + >::from_raw_parts(ptr, length as usize, length as usize) } } diff --git a/core/state-machine/src/basic.rs b/core/state-machine/src/basic.rs index 5feab02835..0c95de61cb 100644 --- a/core/state-machine/src/basic.rs +++ b/core/state-machine/src/basic.rs @@ -23,7 +23,7 @@ use heapsize::HeapSizeOf; use trie::trie_root; use primitives::storage::well_known_keys::{CHANGES_TRIE_CONFIG, CODE, HEAP_PAGES}; use parity_codec::Encode; -use super::{Externalities, OverlayedChanges}; +use super::{ChildStorageKey, Externalities, OverlayedChanges}; use log::warn; /// Simple HashMap-based Externalities impl. @@ -115,7 +115,7 @@ impl Externalities for BasicExternalities where H::Out: Ord + Heap Externalities::::storage(self, key) } - fn child_storage(&self, _storage_key: &[u8], _key: &[u8]) -> Option> { + fn child_storage(&self, _storage_key: ChildStorageKey, _key: &[u8]) -> Option> { None } @@ -132,11 +132,10 @@ impl Externalities for BasicExternalities where H::Out: Ord + Heap } } - fn place_child_storage(&mut self, _storage_key: Vec, _key: Vec, _value: Option>) -> bool { - false + fn place_child_storage(&mut self, _storage_key: ChildStorageKey, _key: Vec, _value: Option>) { } - fn kill_child_storage(&mut self, _storage_key: &[u8]) { } + fn kill_child_storage(&mut self, _storage_key: ChildStorageKey) { } fn clear_prefix(&mut self, prefix: &[u8]) { self.changes.clear_prefix(prefix); @@ -149,8 +148,8 @@ impl Externalities for BasicExternalities where H::Out: Ord + Heap trie_root::(self.inner.clone()) } - fn child_storage_root(&mut self, _storage_key: &[u8]) -> Option> { - None + fn child_storage_root(&mut self, _storage_key: ChildStorageKey) -> Vec { + vec![42] } fn storage_changes_root(&mut self, _parent: H::Out, _parent_num: u64) -> Option { diff --git a/core/state-machine/src/ext.rs b/core/state-machine/src/ext.rs index a9411f26ad..c88798f37f 100644 --- a/core/state-machine/src/ext.rs +++ b/core/state-machine/src/ext.rs @@ -20,10 +20,10 @@ use std::{error, fmt, cmp::Ord}; use log::warn; use crate::backend::{Backend, Consolidate}; use crate::changes_trie::{AnchorBlockId, Storage as ChangesTrieStorage, compute_changes_trie_root}; -use crate::{Externalities, OverlayedChanges, OffchainExt}; +use crate::{Externalities, OverlayedChanges, OffchainExt, ChildStorageKey}; use hash_db::Hasher; use primitives::storage::well_known_keys::is_child_storage_key; -use trie::{MemoryDB, TrieDBMut, TrieMut, default_child_trie_root, is_child_trie_key_valid}; +use trie::{MemoryDB, TrieDBMut, TrieMut, default_child_trie_root}; use heapsize::HeapSizeOf; const EXT_NOT_ALLOWED_TO_FAIL: &str = "Externalities not allowed to fail within runtime"; @@ -214,10 +214,10 @@ where self.backend.storage_hash(key).expect(EXT_NOT_ALLOWED_TO_FAIL) } - fn child_storage(&self, storage_key: &[u8], key: &[u8]) -> Option> { + fn child_storage(&self, storage_key: ChildStorageKey, key: &[u8]) -> Option> { let _guard = panic_handler::AbortGuard::new(true); - self.overlay.child_storage(storage_key, key).map(|x| x.map(|x| x.to_vec())).unwrap_or_else(|| - self.backend.child_storage(storage_key, key).expect(EXT_NOT_ALLOWED_TO_FAIL)) + self.overlay.child_storage(storage_key.as_ref(), key).map(|x| x.map(|x| x.to_vec())).unwrap_or_else(|| + self.backend.child_storage(storage_key.as_ref(), key).expect(EXT_NOT_ALLOWED_TO_FAIL)) } fn exists_storage(&self, key: &[u8]) -> bool { @@ -228,11 +228,12 @@ where } } - fn exists_child_storage(&self, storage_key: &[u8], key: &[u8]) -> bool { + fn exists_child_storage(&self, storage_key: ChildStorageKey, key: &[u8]) -> bool { let _guard = panic_handler::AbortGuard::new(true); - match self.overlay.child_storage(storage_key, key) { + + match self.overlay.child_storage(storage_key.as_ref(), key) { Some(x) => x.is_some(), - _ => self.backend.exists_child_storage(storage_key, key).expect(EXT_NOT_ALLOWED_TO_FAIL), + _ => self.backend.exists_child_storage(storage_key.as_ref(), key).expect(EXT_NOT_ALLOWED_TO_FAIL), } } @@ -247,28 +248,20 @@ where self.overlay.set_storage(key, value); } - fn place_child_storage(&mut self, storage_key: Vec, key: Vec, value: Option>) -> bool { + fn place_child_storage(&mut self, storage_key: ChildStorageKey, key: Vec, value: Option>) { let _guard = panic_handler::AbortGuard::new(true); - if !is_child_storage_key(&storage_key) || !is_child_trie_key_valid::(&storage_key) { - return false; - } self.mark_dirty(); - self.overlay.set_child_storage(storage_key, key, value); - - true + self.overlay.set_child_storage(storage_key.into_owned(), key, value); } - fn kill_child_storage(&mut self, storage_key: &[u8]) { + fn kill_child_storage(&mut self, storage_key: ChildStorageKey) { let _guard = panic_handler::AbortGuard::new(true); - if !is_child_storage_key(storage_key) || !is_child_trie_key_valid::(storage_key) { - return; - } self.mark_dirty(); - self.overlay.clear_child_storage(storage_key); - self.backend.for_keys_in_child_storage(storage_key, |key| { - self.overlay.set_child_storage(storage_key.to_vec(), key.to_vec(), None); + self.overlay.clear_child_storage(storage_key.as_ref()); + self.backend.for_keys_in_child_storage(storage_key.as_ref(), |key| { + self.overlay.set_child_storage(storage_key.as_ref().to_vec(), key.to_vec(), None); }); } @@ -315,17 +308,17 @@ where root } - fn child_storage_root(&mut self, storage_key: &[u8]) -> Option> { + fn child_storage_root(&mut self, storage_key: ChildStorageKey) -> Vec { let _guard = panic_handler::AbortGuard::new(true); - if !is_child_storage_key(storage_key) || !is_child_trie_key_valid::(storage_key) { - return None; - } - if self.storage_transaction.is_some() { - return Some(self.storage(storage_key).unwrap_or(default_child_trie_root::(storage_key))); + self + .storage(storage_key.as_ref()) + .unwrap_or( + default_child_trie_root::(storage_key.as_ref()) + ) + } else { + self.child_storage_root_transaction(storage_key.as_ref()).0 } - - Some(self.child_storage_root_transaction(storage_key).0) } fn storage_changes_root(&mut self, parent: H::Out, parent_num: u64) -> Option { diff --git a/core/state-machine/src/lib.rs b/core/state-machine/src/lib.rs index edddc37126..bd9d9284e5 100644 --- a/core/state-machine/src/lib.rs +++ b/core/state-machine/src/lib.rs @@ -19,6 +19,7 @@ #![warn(missing_docs)] use std::{fmt, panic::UnwindSafe, result, marker::PhantomData}; +use std::borrow::Cow; use log::warn; use hash_db::Hasher; use heapsize::HeapSizeOf; @@ -55,6 +56,58 @@ pub use proving_backend::{create_proof_check_backend, create_proof_check_backend pub use trie_backend_essence::{TrieBackendStorage, Storage}; pub use trie_backend::TrieBackend; +/// A wrapper around a child storage key. +/// +/// This wrapper ensures that the child storage key is correct and properly used. It is +/// impossible to create an instance of this struct without providing a correct `storage_key`. +pub struct ChildStorageKey<'a, H: Hasher> { + storage_key: Cow<'a, [u8]>, + _hasher: PhantomData, +} + +impl<'a, H: Hasher> ChildStorageKey<'a, H> { + fn new(storage_key: Cow<'a, [u8]>) -> Option { + if !trie::is_child_trie_key_valid::(&storage_key) { + return None; + } + + Some(ChildStorageKey { + storage_key, + _hasher: PhantomData, + }) + } + + /// Create a new `ChildStorageKey` from a vector. + /// + /// `storage_key` has should start with `:child_storage:default:` + /// See `is_child_trie_key_valid` for more details. + pub fn from_vec(key: Vec) -> Option { + Self::new(Cow::Owned(key)) + } + + /// Create a new `ChildStorageKey` from a slice. + /// + /// `storage_key` has should start with `:child_storage:default:` + /// See `is_child_trie_key_valid` for more details. + pub fn from_slice(key: &'a [u8]) -> Option { + Self::new(Cow::Borrowed(key)) + } + + /// Get access to the byte representation of the storage key. + /// + /// This key is guaranteed to be correct. + pub fn as_ref(&self) -> &[u8] { + &*self.storage_key + } + + /// Destruct this instance into an owned vector that represents the storage key. + /// + /// This key is guaranteed to be correct. + pub fn into_owned(self) -> Vec { + self.storage_key.into_owned() + } +} + /// State Machine Error bound. /// /// This should reflect WASM error type bound for future compatibility. @@ -105,7 +158,7 @@ pub trait Externalities { } /// Read child runtime storage. - fn child_storage(&self, storage_key: &[u8], key: &[u8]) -> Option>; + fn child_storage(&self, storage_key: ChildStorageKey, key: &[u8]) -> Option>; /// Set storage entry `key` of current contract being called (effective immediately). fn set_storage(&mut self, key: Vec, value: Vec) { @@ -113,7 +166,7 @@ pub trait Externalities { } /// Set child storage entry `key` of current contract being called (effective immediately). - fn set_child_storage(&mut self, storage_key: Vec, key: Vec, value: Vec) -> bool { + fn set_child_storage(&mut self, storage_key: ChildStorageKey, key: Vec, value: Vec) { self.place_child_storage(storage_key, key, Some(value)) } @@ -123,8 +176,8 @@ pub trait Externalities { } /// Clear a child storage entry (`key`) of current contract being called (effective immediately). - fn clear_child_storage(&mut self, storage_key: &[u8], key: &[u8]) -> bool { - self.place_child_storage(storage_key.to_vec(), key.to_vec(), None) + fn clear_child_storage(&mut self, storage_key: ChildStorageKey, key: &[u8]) { + self.place_child_storage(storage_key, key.to_vec(), None) } /// Whether a storage entry exists. @@ -133,12 +186,12 @@ pub trait Externalities { } /// Whether a child storage entry exists. - fn exists_child_storage(&self, storage_key: &[u8], key: &[u8]) -> bool { + fn exists_child_storage(&self, storage_key: ChildStorageKey, key: &[u8]) -> bool { self.child_storage(storage_key, key).is_some() } /// Clear an entire child storage. - fn kill_child_storage(&mut self, storage_key: &[u8]); + fn kill_child_storage(&mut self, storage_key: ChildStorageKey); /// Clear storage entries which keys are start with the given prefix. fn clear_prefix(&mut self, prefix: &[u8]); @@ -147,7 +200,7 @@ pub trait Externalities { fn place_storage(&mut self, key: Vec, value: Option>); /// Set or clear a child storage entry. Return whether the operation succeeds. - fn place_child_storage(&mut self, storage_key: Vec, key: Vec, value: Option>) -> bool; + fn place_child_storage(&mut self, storage_key: ChildStorageKey, key: Vec, value: Option>); /// Get the identity of the chain. fn chain_id(&self) -> u64; @@ -155,10 +208,11 @@ pub trait Externalities { /// Get the trie root of the current storage map. This will also update all child storage keys in the top-level storage map. fn storage_root(&mut self) -> H::Out where H::Out: Ord; - /// Get the trie root of a child storage map. This will also update the value of the child storage keys in the top-level storage map. If the storage root equals default hash as defined by trie, the key in top-level storage map will be removed. - /// - /// Returns None if key provided is not a storage key. This can due to not being started with CHILD_STORAGE_KEY_PREFIX, or the trie implementation regards the key as invalid. - fn child_storage_root(&mut self, storage_key: &[u8]) -> Option>; + /// Get the trie root of a child storage map. This will also update the value of the child + /// storage keys in the top-level storage map. + /// If the storage root equals the default hash as defined by the trie, the key in the top-level + /// storage map will be removed. + fn child_storage_root(&mut self, storage_key: ChildStorageKey) -> Vec; /// Get the change trie root of the current storage overlay at a block with given parent. fn storage_changes_root(&mut self, parent: H::Out, parent_num: u64) -> Option where H::Out: Ord; @@ -905,12 +959,35 @@ mod tests { let backend = InMemory::::default().try_into_trie_backend().unwrap(); let changes_trie_storage = InMemoryChangesTrieStorage::new(); let mut overlay = OverlayedChanges::default(); - let mut ext = Ext::new(&mut overlay, &backend, Some(&changes_trie_storage), NeverOffchainExt::new()); + let mut ext = Ext::new( + &mut overlay, + &backend, + Some(&changes_trie_storage), + NeverOffchainExt::new() + ); - assert!(ext.set_child_storage(b":child_storage:testchild".to_vec(), b"abc".to_vec(), b"def".to_vec())); - assert_eq!(ext.child_storage(b":child_storage:testchild", b"abc"), Some(b"def".to_vec())); - ext.kill_child_storage(b":child_storage:testchild"); - assert_eq!(ext.child_storage(b":child_storage:testchild", b"abc"), None); + ext.set_child_storage( + ChildStorageKey::from_slice(b":child_storage:default:testchild").unwrap(), + b"abc".to_vec(), + b"def".to_vec() + ); + assert_eq!( + ext.child_storage( + ChildStorageKey::from_slice(b":child_storage:default:testchild").unwrap(), + b"abc" + ), + Some(b"def".to_vec()) + ); + ext.kill_child_storage( + ChildStorageKey::from_slice(b":child_storage:default:testchild").unwrap() + ); + assert_eq!( + ext.child_storage( + ChildStorageKey::from_slice(b":child_storage:default:testchild").unwrap(), + b"abc" + ), + None + ); } #[test] diff --git a/core/state-machine/src/testing.rs b/core/state-machine/src/testing.rs index 6bbfc27667..ac096c0c3e 100644 --- a/core/state-machine/src/testing.rs +++ b/core/state-machine/src/testing.rs @@ -25,7 +25,7 @@ use crate::backend::InMemory; use crate::changes_trie::{compute_changes_trie_root, InMemoryStorage as ChangesTrieInMemoryStorage, AnchorBlockId}; use primitives::storage::well_known_keys::{CHANGES_TRIE_CONFIG, CODE, HEAP_PAGES}; use parity_codec::Encode; -use super::{Externalities, OverlayedChanges}; +use super::{ChildStorageKey, Externalities, OverlayedChanges}; /// Simple HashMap-based Externalities impl. pub struct TestExternalities where H::Out: HeapSizeOf { @@ -122,8 +122,8 @@ impl Externalities for TestExternalities where H::Out: Ord + He self.storage(key) } - fn child_storage(&self, storage_key: &[u8], key: &[u8]) -> Option> { - self.changes.child_storage(storage_key, key)?.map(Vec::from) + fn child_storage(&self, storage_key: ChildStorageKey, key: &[u8]) -> Option> { + self.changes.child_storage(storage_key.as_ref(), key)?.map(Vec::from) } fn place_storage(&mut self, key: Vec, maybe_value: Option>) { @@ -139,14 +139,12 @@ impl Externalities for TestExternalities where H::Out: Ord + He } } - fn place_child_storage(&mut self, storage_key: Vec, key: Vec, value: Option>) -> bool { - self.changes.set_child_storage(storage_key, key, value); - // TODO place_child_storage and set_child_storage should always be valid (create child on set)? - true + fn place_child_storage(&mut self, storage_key: ChildStorageKey, key: Vec, value: Option>) { + self.changes.set_child_storage(storage_key.into_owned(), key, value); } - fn kill_child_storage(&mut self, storage_key: &[u8]) { - self.changes.clear_child_storage(storage_key); + fn kill_child_storage(&mut self, storage_key: ChildStorageKey) { + self.changes.clear_child_storage(storage_key.as_ref()); } fn clear_prefix(&mut self, prefix: &[u8]) { @@ -160,8 +158,8 @@ impl Externalities for TestExternalities where H::Out: Ord + He trie_root::(self.inner.clone()) } - fn child_storage_root(&mut self, _storage_key: &[u8]) -> Option> { - None + fn child_storage_root(&mut self, _storage_key: ChildStorageKey) -> Vec { + unimplemented!() } fn storage_changes_root(&mut self, parent: H::Out, parent_num: u64) -> Option { diff --git a/core/trie/Cargo.toml b/core/trie/Cargo.toml index d535c29701..1fd1b7b3bd 100644 --- a/core/trie/Cargo.toml +++ b/core/trie/Cargo.toml @@ -18,9 +18,9 @@ hash-db = { version = "0.12.2", default-features = false } trie-db = { version = "0.12.2", default-features = false } trie-root = { version = "0.12.2", default-features = false } memory-db = { version = "0.12.2", default-features = false } +substrate-primitives = { path = "../primitives", default-features = false } [dev-dependencies] -substrate-primitives = { path = "../primitives" } trie-bench = { version = "0.12" } trie-standardmap = { version = "0.12" } keccak-hasher = { version = "0.12" } @@ -31,9 +31,10 @@ hex-literal = "0.1.0" default = ["std"] std = [ "rstd/std", - "codec/std", + "codec/std", "hash-db/std", "memory-db/std", "trie-db/std", - "trie-root/std" + "trie-root/std", + "substrate-primitives/std", ] diff --git a/core/trie/src/lib.rs b/core/trie/src/lib.rs index f40ae81491..a9a9860f94 100644 --- a/core/trie/src/lib.rs +++ b/core/trie/src/lib.rs @@ -137,9 +137,23 @@ where ) } -/// Determine whether a child trie key is valid. `child_trie_root` and `child_delta_trie_root` can panic if invalid value is provided to them. -pub fn is_child_trie_key_valid(_storage_key: &[u8]) -> bool { - true +/// Determine whether a child trie key is valid. +/// +/// For now, the only valid child trie key is `:child_storage:default:`. +/// +/// `child_trie_root` and `child_delta_trie_root` can panic if invalid value is provided to them. +pub fn is_child_trie_key_valid(storage_key: &[u8]) -> bool { + use substrate_primitives::storage::well_known_keys; + let has_right_prefix = storage_key.starts_with(b":child_storage:default:"); + if has_right_prefix { + // This is an attempt to catch a change of `is_child_storage_key`, which + // just checks if the key has prefix `:child_storage:` at the moment of writing. + debug_assert!( + well_known_keys::is_child_storage_key(&storage_key), + "`is_child_trie_key_valid` is a subset of `is_child_storage_key`", + ); + } + has_right_prefix } /// Determine the default child trie root. diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index 42bdf3240c..5b52a31150 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -133,8 +133,13 @@ pub struct AccountInfo { pub trait TrieIdGenerator { /// Get a trie id for an account, using reference to parent account trie id to ensure /// uniqueness of trie id. + /// /// The implementation must ensure every new trie id is unique: two consecutive calls with the /// same parameter needs to return different trie id values. + /// + /// Also, the implementation is responsible for ensuring that `TrieId` starts with + /// `:child_storage:`. + /// TODO: We want to change this, see https://github.com/paritytech/substrate/issues/2325 fn trie_id(account_id: &AccountId) -> TrieId; } @@ -156,7 +161,9 @@ where buf.extend_from_slice(account_id.as_ref()); buf.extend_from_slice(&new_seed.to_le_bytes()[..]); + // TODO: see https://github.com/paritytech/substrate/issues/2325 CHILD_STORAGE_KEY_PREFIX.iter() + .chain(b"default:") .chain(T::Hashing::hash(&buf[..]).as_ref().iter()) .cloned() .collect() diff --git a/srml/contract/src/tests.rs b/srml/contract/src/tests.rs index 7207835925..d6fa2677df 100644 --- a/srml/contract/src/tests.rs +++ b/srml/contract/src/tests.rs @@ -123,7 +123,13 @@ static KEY_COUNTER: AtomicUsize = AtomicUsize::new(0); pub struct DummyTrieIdGenerator; impl TrieIdGenerator for DummyTrieIdGenerator { fn trie_id(account_id: &u64) -> TrieId { - let mut res = KEY_COUNTER.fetch_add(1, Ordering::Relaxed).to_le_bytes().to_vec(); + use substrate_primitives::storage::well_known_keys; + + // TODO: see https://github.com/paritytech/substrate/issues/2325 + let mut res = vec![]; + res.extend_from_slice(well_known_keys::CHILD_STORAGE_KEY_PREFIX); + res.extend_from_slice(b"default:"); + res.extend_from_slice(&KEY_COUNTER.fetch_add(1, Ordering::Relaxed).to_le_bytes()); res.extend_from_slice(&account_id.to_le_bytes()); res } -- GitLab From 3292a53c4761024d0213962c1acb0b5813e7b035 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 23 Apr 2019 18:15:21 +0200 Subject: [PATCH 042/206] ProtocolId can now be more than 3 bytes (#2350) --- .../network-libp2p/src/custom_proto/upgrade.rs | 16 ++++++++-------- core/network-libp2p/src/lib.rs | 18 ++++++++++++++++-- core/network-libp2p/tests/test.rs | 2 +- core/service/src/lib.rs | 8 +------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/core/network-libp2p/src/custom_proto/upgrade.rs b/core/network-libp2p/src/custom_proto/upgrade.rs index fc9ed5bddb..00c3fc999d 100644 --- a/core/network-libp2p/src/custom_proto/upgrade.rs +++ b/core/network-libp2p/src/custom_proto/upgrade.rs @@ -44,10 +44,11 @@ pub struct RegisteredProtocol { impl RegisteredProtocol { /// Creates a new `RegisteredProtocol`. The `custom_data` parameter will be /// passed inside the `RegisteredProtocolOutput`. - pub fn new(protocol: ProtocolId, versions: &[u8]) + pub fn new(protocol: impl Into, versions: &[u8]) -> Self { + let protocol = protocol.into(); let mut base_name = Bytes::from_static(b"/substrate/"); - base_name.extend_from_slice(&protocol); + base_name.extend_from_slice(protocol.as_bytes()); base_name.extend_from_slice(b"/"); RegisteredProtocol { @@ -63,16 +64,15 @@ impl RegisteredProtocol { } /// Returns the ID of the protocol. - #[inline] - pub fn id(&self) -> ProtocolId { - self.id + pub fn id(&self) -> &ProtocolId { + &self.id } } impl Clone for RegisteredProtocol { fn clone(&self) -> Self { RegisteredProtocol { - id: self.id, + id: self.id.clone(), base_name: self.base_name.clone(), supported_versions: self.supported_versions.clone(), marker: PhantomData, @@ -110,8 +110,8 @@ pub struct RegisteredProtocolSubstream { impl RegisteredProtocolSubstream { /// Returns the protocol id. #[inline] - pub fn protocol_id(&self) -> ProtocolId { - self.protocol_id + pub fn protocol_id(&self) -> &ProtocolId { + &self.protocol_id } /// Returns the version of the protocol that was negotiated. diff --git a/core/network-libp2p/src/lib.rs b/core/network-libp2p/src/lib.rs index dfd1b36b22..d279eac4b9 100644 --- a/core/network-libp2p/src/lib.rs +++ b/core/network-libp2p/src/lib.rs @@ -38,8 +38,22 @@ use serde_derive::{Deserialize, Serialize}; use slog_derive::SerdeValue; use std::{collections::{HashMap, HashSet}, error, fmt, time::Duration}; -/// Protocol / handler id -pub type ProtocolId = [u8; 3]; +/// Name of a protocol, transmitted on the wire. Should be unique for each chain. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct ProtocolId(smallvec::SmallVec<[u8; 6]>); + +impl<'a> From<&'a [u8]> for ProtocolId { + fn from(bytes: &'a [u8]) -> ProtocolId { + ProtocolId(bytes.into()) + } +} + +impl ProtocolId { + /// Exposes the `ProtocolId` as bytes. + pub fn as_bytes(&self) -> &[u8] { + self.0.as_ref() + } +} /// Parses a string address and returns the component, if valid. pub fn parse_str_addr(addr_str: &str) -> Result<(PeerId, Multiaddr), ParseErr> { diff --git a/core/network-libp2p/tests/test.rs b/core/network-libp2p/tests/test.rs index 437f651184..c90f9850dd 100644 --- a/core/network-libp2p/tests/test.rs +++ b/core/network-libp2p/tests/test.rs @@ -40,7 +40,7 @@ fn build_nodes(num: usize) -> Vec> ..substrate_network_libp2p::NetworkConfiguration::default() }; - let proto = substrate_network_libp2p::RegisteredProtocol::new(*b"tst", &[1]); + let proto = substrate_network_libp2p::RegisteredProtocol::new(&b"tst"[..], &[1]); result.push(substrate_network_libp2p::start_service(config, proto).unwrap().0); } diff --git a/core/service/src/lib.rs b/core/service/src/lib.rs index e749ceeb1e..afd2b52e57 100644 --- a/core/service/src/lib.rs +++ b/core/service/src/lib.rs @@ -186,13 +186,7 @@ impl Service { DEFAULT_PROTOCOL_ID } }.as_bytes(); - let mut protocol_id = network::ProtocolId::default(); - if protocol_id_full.len() > protocol_id.len() { - warn!("Protocol ID truncated to {} chars", protocol_id.len()); - } - let id_len = protocol_id_full.len().min(protocol_id.len()); - &mut protocol_id[0..id_len].copy_from_slice(&protocol_id_full[0..id_len]); - protocol_id + network::ProtocolId::from(protocol_id_full) }; let has_bootnodes = !network_params.network_config.boot_nodes.is_empty(); -- GitLab From 7a8c3d778731a1cedea47a02350902f5c1d0837d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 23 Apr 2019 18:18:32 +0200 Subject: [PATCH 043/206] Fix MultiSigner, simplify tests (#2033) * Fix MultiSigner, use `into_signed_tx` * Rebuild. --- Cargo.lock | 1 + core/basic-authorship/src/basic_authorship.rs | 4 +- core/client/src/genesis.rs | 9 +-- core/keyring/Cargo.toml | 1 + core/keyring/src/ed25519.rs | 6 ++ core/keyring/src/sr25519.rs | 6 ++ core/network/src/test/mod.rs | 16 ++--- core/rpc/src/author/tests.rs | 6 +- core/service/src/components.rs | 6 +- core/sr-primitives/src/lib.rs | 63 ++++++++++++++++++- core/test-client/src/block_builder_ext.rs | 10 +-- core/test-runtime/src/lib.rs | 14 ++--- core/test-runtime/wasm/Cargo.lock | 1 + node-template/runtime/wasm/Cargo.lock | 1 + node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 1 + 16 files changed, 101 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b1204a1c58..15d0f29513 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4057,6 +4057,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", diff --git a/core/basic-authorship/src/basic_authorship.rs b/core/basic-authorship/src/basic_authorship.rs index bab86ea420..6dee9be4a2 100644 --- a/core/basic-authorship/src/basic_authorship.rs +++ b/core/basic-authorship/src/basic_authorship.rs @@ -291,7 +291,6 @@ impl Proposer where mod tests { use super::*; - use codec::Encode; use std::cell::RefCell; use consensus_common::{Environment, Proposer}; use test_client::{self, runtime::{Extrinsic, Transfer}, AccountKeyring}; @@ -303,8 +302,7 @@ mod tests { from: AccountKeyring::Alice.into(), to: Default::default(), }; - let signature = AccountKeyring::from_public(&tx.from).unwrap().sign(&tx.encode()).into(); - Extrinsic::Transfer(tx, signature) + tx.into_signed_tx() } #[test] diff --git a/core/client/src/genesis.rs b/core/client/src/genesis.rs index eea0a251ca..74bc74360a 100644 --- a/core/client/src/genesis.rs +++ b/core/client/src/genesis.rs @@ -46,7 +46,7 @@ mod tests { use state_machine::backend::InMemory; use test_client::{ runtime::genesismap::{GenesisConfig, additional_storage_with_genesis}, - runtime::{Hash, Transfer, Block, BlockNumber, Header, Digest, Extrinsic}, + runtime::{Hash, Transfer, Block, BlockNumber, Header, Digest}, AccountKeyring, AuthorityKeyring }; use runtime_primitives::traits::BlakeTwo256; @@ -68,12 +68,7 @@ mod tests { ) -> (Vec, Hash) { use trie::ordered_trie_root; - let transactions = txs.into_iter().map(|tx| { - let signature = AccountKeyring::from_public(&tx.from).unwrap() - .sign(&tx.encode()).into(); - - Extrinsic::Transfer(tx, signature) - }).collect::>(); + let transactions = txs.into_iter().map(|tx| tx.into_signed_tx()).collect::>(); let extrinsics_root = ordered_trie_root::(transactions.iter().map(Encode::encode)).into(); diff --git a/core/keyring/Cargo.toml b/core/keyring/Cargo.toml index 8159e4252e..74f898b83f 100644 --- a/core/keyring/Cargo.toml +++ b/core/keyring/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" [dependencies] substrate-primitives = { path = "../primitives" } +sr-primitives = { path = "../sr-primitives" } hex-literal = { version = "0.1.0" } lazy_static = { version = "1.0" } strum = "0.14.0" diff --git a/core/keyring/src/ed25519.rs b/core/keyring/src/ed25519.rs index f36d8fd485..96ade6167c 100644 --- a/core/keyring/src/ed25519.rs +++ b/core/keyring/src/ed25519.rs @@ -100,6 +100,12 @@ impl From for &'static str { } } +impl From for sr_primitives::MultiSigner { + fn from(x: Keyring) -> Self { + sr_primitives::MultiSigner::Ed25519(x.into()) + } +} + lazy_static! { static ref PRIVATE_KEYS: HashMap = { Keyring::iter().map(|i| (i, i.pair())).collect() diff --git a/core/keyring/src/sr25519.rs b/core/keyring/src/sr25519.rs index 1d3342d86d..0097d7b2f9 100644 --- a/core/keyring/src/sr25519.rs +++ b/core/keyring/src/sr25519.rs @@ -96,6 +96,12 @@ impl From for &'static str { } } +impl From for sr_primitives::MultiSigner { + fn from(x: Keyring) -> Self { + sr_primitives::MultiSigner::Sr25519(x.into()) + } +} + lazy_static! { static ref PRIVATE_KEYS: HashMap = { [ diff --git a/core/network/src/test/mod.rs b/core/network/src/test/mod.rs index 97b56e1cb7..46636fa11f 100644 --- a/core/network/src/test/mod.rs +++ b/core/network/src/test/mod.rs @@ -23,7 +23,7 @@ mod sync; use std::collections::{HashMap, HashSet, VecDeque}; use std::sync::Arc; -use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::atomic::AtomicBool; use log::trace; use client; @@ -39,7 +39,6 @@ use futures::Future; use futures::sync::{mpsc, oneshot}; use crate::message::Message; use network_libp2p::PeerId; -use parity_codec::Encode; use parking_lot::{Mutex, RwLock}; use primitives::{H256, ed25519::Public as AuthorityId}; use crate::protocol::{ConnectedPeer, Context, FromNetworkMsg, Protocol, ProtocolMsg}; @@ -333,14 +332,16 @@ impl> Peer { self.net_proto_channel.send_from_client(ProtocolMsg::BlockImported(hash, header.clone())); } - // SyncOracle: are we connected to any peer? + /// SyncOracle: are we connected to any peer? + #[cfg(test)] pub fn is_offline(&self) -> bool { - self.is_offline.load(Ordering::Relaxed) + self.is_offline.load(std::sync::atomic::Ordering::Relaxed) } - // SyncOracle: are we in the process of catching-up with the chain? + /// SyncOracle: are we in the process of catching-up with the chain? + #[cfg(test)] pub fn is_major_syncing(&self) -> bool { - self.is_major_syncing.load(Ordering::Relaxed) + self.is_major_syncing.load(std::sync::atomic::Ordering::Relaxed) } /// Called on connection to other indicated peer. @@ -533,8 +534,7 @@ impl> Peer { amount: 1, nonce, }; - let signature = AccountKeyring::from_public(&transfer.from).unwrap().sign(&transfer.encode()).into(); - builder.push(Extrinsic::Transfer(transfer, signature)).unwrap(); + builder.push(transfer.into_signed_tx()).unwrap(); nonce = nonce + 1; builder.bake().unwrap() }) diff --git a/core/rpc/src/author/tests.rs b/core/rpc/src/author/tests.rs index 53166e76f8..4d0277f7d6 100644 --- a/core/rpc/src/author/tests.rs +++ b/core/rpc/src/author/tests.rs @@ -34,8 +34,7 @@ fn uxt(sender: AccountKeyring, nonce: u64) -> Extrinsic { from: sender.into(), to: Default::default(), }; - let signature = AccountKeyring::from_public(&tx.from).unwrap().sign(&tx.encode()).into(); - Extrinsic::Transfer(tx, signature) + tx.into_signed_tx() } #[test] @@ -106,8 +105,7 @@ fn should_watch_extrinsic() { from: AccountKeyring::Alice.into(), to: Default::default(), }; - let signature = AccountKeyring::from_public(&tx.from).unwrap().sign(&tx.encode()).into(); - Extrinsic::Transfer(tx, signature) + tx.into_signed_tx() }; AuthorApi::submit_extrinsic(&p, replacement.encode().into()).unwrap(); let (res, data) = runtime.block_on(data.into_future()).unwrap(); diff --git a/core/service/src/components.rs b/core/service/src/components.rs index ba27acb582..f451bff562 100644 --- a/core/service/src/components.rs +++ b/core/service/src/components.rs @@ -561,9 +561,8 @@ impl Components for LightComponents { #[cfg(test)] mod tests { use super::*; - use parity_codec::Encode; use consensus_common::BlockOrigin; - use substrate_test_client::{self, TestClient, AccountKeyring, runtime::{Extrinsic, Transfer}}; + use substrate_test_client::{self, TestClient, AccountKeyring, runtime::Transfer}; #[test] fn should_remove_transactions_from_the_pool() { @@ -576,8 +575,7 @@ mod tests { from: AccountKeyring::Alice.into(), to: Default::default(), }; - let signature = AccountKeyring::from_public(&transfer.from).unwrap().sign(&transfer.encode()).into(); - Extrinsic::Transfer(transfer, signature) + transfer.into_signed_tx() }; // store the transaction in the pool pool.submit_one(&BlockId::hash(client.best_block_header().unwrap().hash()), transaction.clone()).unwrap(); diff --git a/core/sr-primitives/src/lib.rs b/core/sr-primitives/src/lib.rs index 5167e57072..0f221bf08e 100644 --- a/core/sr-primitives/src/lib.rs +++ b/core/sr-primitives/src/lib.rs @@ -30,7 +30,7 @@ pub use serde_derive; pub use runtime_io::{StorageOverlay, ChildrenStorageOverlay}; use rstd::prelude::*; -use substrate_primitives::{ed25519, sr25519, hash::H512}; +use substrate_primitives::{crypto, ed25519, sr25519, hash::{H256, H512}}; use codec::{Encode, Decode}; #[cfg(feature = "std")] @@ -310,6 +310,18 @@ pub enum MultiSignature { Sr25519(sr25519::Signature), } +impl From for MultiSignature { + fn from(x: ed25519::Signature) -> Self { + MultiSignature::Ed25519(x) + } +} + +impl From for MultiSignature { + fn from(x: sr25519::Signature) -> Self { + MultiSignature::Sr25519(x) + } +} + impl Default for MultiSignature { fn default() -> Self { MultiSignature::Ed25519(Default::default()) @@ -332,6 +344,45 @@ impl Default for MultiSigner { } } +/// NOTE: This implementations is required by `SimpleAddressDeterminator`, +/// we convert the hash into some AccountId, it's fine to use any scheme. +impl> crypto::UncheckedFrom for MultiSigner { + fn unchecked_from(x: T) -> Self { + ed25519::Public::unchecked_from(x.into()).into() + } +} + +impl AsRef<[u8]> for MultiSigner { + fn as_ref(&self) -> &[u8] { + match *self { + MultiSigner::Ed25519(ref who) => who.as_ref(), + MultiSigner::Sr25519(ref who) => who.as_ref(), + } + } +} + +impl From for MultiSigner { + fn from(x: ed25519::Public) -> Self { + MultiSigner::Ed25519(x) + } +} + +impl From for MultiSigner { + fn from(x: sr25519::Public) -> Self { + MultiSigner::Sr25519(x) + } +} + + #[cfg(feature = "std")] +impl std::fmt::Display for MultiSigner { + fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { + match *self { + MultiSigner::Ed25519(ref who) => write!(fmt, "ed25519: {}", who), + MultiSigner::Sr25519(ref who) => write!(fmt, "sr25519: {}", who), + } + } +} + impl Verify for MultiSignature { type Signer = MultiSigner; fn verify>(&self, msg: L, signer: &Self::Signer) -> bool { @@ -357,8 +408,14 @@ impl Verify for AnySignature { } impl From for AnySignature { - fn from(s: sr25519::Signature) -> AnySignature { - AnySignature(s.0.into()) + fn from(s: sr25519::Signature) -> Self { + AnySignature(s.into()) + } +} + +impl From for AnySignature { + fn from(s: ed25519::Signature) -> Self { + AnySignature(s.into()) } } diff --git a/core/test-client/src/block_builder_ext.rs b/core/test-client/src/block_builder_ext.rs index e427b57892..15861ce3d0 100644 --- a/core/test-client/src/block_builder_ext.rs +++ b/core/test-client/src/block_builder_ext.rs @@ -17,7 +17,6 @@ //! Block Builder extensions for tests. use client; -use super::AccountKeyring; use runtime; use runtime_primitives::traits::ProvideRuntimeApi; use client::block_builder::api::BlockBuilder; @@ -33,13 +32,6 @@ impl<'a, A> BlockBuilderExt for client::block_builder::BlockBuilder<'a, runtime: A::Api: BlockBuilder { fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), client::error::Error> { - self.push(sign_tx(transfer)) + self.push(transfer.into_signed_tx()) } } - -fn sign_tx(transfer: runtime::Transfer) -> runtime::Extrinsic { - let signature = AccountKeyring::from_public(&transfer.from) - .unwrap() - .sign(&parity_codec::Encode::encode(&transfer)); - runtime::Extrinsic::Transfer(transfer, signature) -} diff --git a/core/test-runtime/src/lib.rs b/core/test-runtime/src/lib.rs index e104dd6d12..9e8617c592 100644 --- a/core/test-runtime/src/lib.rs +++ b/core/test-runtime/src/lib.rs @@ -38,7 +38,7 @@ use runtime_primitives::{ create_runtime_str, traits::{ BlindCheckable, BlakeTwo256, Block as BlockT, Extrinsic as ExtrinsicT, - GetNodeBlockType, GetRuntimeBlockType, AuthorityIdFor, + GetNodeBlockType, GetRuntimeBlockType, AuthorityIdFor, Verify, }, }; use runtime_version::RuntimeVersion; @@ -142,14 +142,14 @@ impl Extrinsic { } } -// The identity type used by authorities. -pub type AuthorityId = ed25519::Public; -// The signature type used by authorities. +/// The signature type used by authorities. pub type AuthoritySignature = ed25519::Signature; -/// An identifier for an account on this system. -pub type AccountId = sr25519::Public; -// The signature type used by accounts/transactions. +/// The identity type used by authorities. +pub type AuthorityId = ::Signer; +/// The signature type used by accounts/transactions. pub type AccountSignature = sr25519::Signature; +/// An identifier for an account on this system. +pub type AccountId = ::Signer; /// A simple hash type for all our hashing. pub type Hash = H256; /// The block number type used in this runtime. diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index b2b652afcb..f040fa9c83 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2373,6 +2373,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index ce2c4cf9a2..5334b38b43 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -2535,6 +2535,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 3a3ad41c28..6698582442 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -60,7 +60,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 63, - impl_version: 65, + impl_version: 66, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 243a60fb25..6dc918f413 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -2690,6 +2690,7 @@ version = "1.0.0" dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", -- GitLab From 0e6a407a13fbc5a5ad200645aed72bb8a8e528d7 Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Tue, 23 Apr 2019 18:42:42 +0200 Subject: [PATCH 044/206] Use serde `derive` feature. (#2351) * core/primitives * sr-primitives * sr-primitives * srml-treasury * substrate-executor * substrate-keystore * network-libp2p * substrate-service * srml-system * substrate-rpc * sr-version * substrate-telemetry * substrate-test-runtime * substrate-transaction-pool * node-template-runtime * node-primitives * srml-consensus * srml-contract * srml-democracy * srml-finality-tracker * srml-grandpa * srml-metadata * srml-support * Clean * Update locks --- Cargo.lock | 28 ++------------ core/executor/Cargo.toml | 2 - core/keystore/Cargo.toml | 2 - core/network-libp2p/Cargo.toml | 3 +- core/network-libp2p/src/lib.rs | 2 +- core/primitives/Cargo.toml | 5 +-- core/primitives/src/changes_trie.rs | 2 +- core/primitives/src/lib.rs | 2 +- core/primitives/src/storage.rs | 2 +- core/rpc/Cargo.toml | 3 +- core/rpc/src/chain/number.rs | 2 +- core/rpc/src/system/helpers.rs | 2 +- core/service/Cargo.toml | 3 +- core/service/src/chain_spec.rs | 2 +- core/sr-primitives/Cargo.toml | 4 +- core/sr-primitives/src/generic/block.rs | 2 +- core/sr-primitives/src/generic/digest.rs | 2 +- core/sr-primitives/src/generic/era.rs | 2 +- core/sr-primitives/src/generic/header.rs | 2 +- .../unchecked_mortal_compact_extrinsic.rs | 2 +- .../src/generic/unchecked_mortal_extrinsic.rs | 2 +- core/sr-primitives/src/lib.rs | 16 ++++---- core/sr-primitives/src/testing.rs | 3 -- core/sr-primitives/src/traits.rs | 4 +- core/sr-version/Cargo.toml | 4 +- core/sr-version/src/lib.rs | 2 +- core/telemetry/Cargo.toml | 3 +- core/telemetry/src/lib.rs | 2 +- core/test-runtime/Cargo.toml | 4 +- core/test-runtime/wasm/Cargo.lock | 22 ++++++++--- core/transaction-pool/graph/Cargo.toml | 3 +- core/transaction-pool/graph/src/watcher.rs | 2 +- node-template/runtime/Cargo.toml | 4 +- node-template/runtime/src/lib.rs | 2 +- node-template/runtime/wasm/Cargo.lock | 28 ++++++++------ node/primitives/Cargo.toml | 4 +- node/runtime/wasm/Cargo.lock | 38 ++++++++++--------- srml/consensus/Cargo.toml | 4 +- srml/consensus/src/lib.rs | 2 +- srml/contract/Cargo.toml | 4 +- srml/contract/src/lib.rs | 2 +- srml/democracy/Cargo.toml | 4 +- srml/democracy/src/vote_threshold.rs | 2 +- srml/finality-tracker/Cargo.toml | 4 +- srml/grandpa/Cargo.toml | 5 +-- srml/grandpa/src/lib.rs | 2 +- srml/metadata/Cargo.toml | 4 +- srml/metadata/src/lib.rs | 2 +- srml/support/Cargo.toml | 4 +- srml/support/src/event.rs | 8 +--- srml/support/src/lib.rs | 2 +- srml/support/test/Cargo.toml | 3 +- srml/support/test/tests/instance.rs | 6 +-- srml/system/Cargo.toml | 6 +-- srml/system/src/lib.rs | 2 +- srml/treasury/Cargo.toml | 4 +- srml/treasury/src/lib.rs | 2 +- 57 files changed, 116 insertions(+), 173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 15d0f29513..88bf21fd7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1980,7 +1980,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2062,7 +2061,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2926,6 +2924,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -3123,7 +3124,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", @@ -3157,7 +3157,6 @@ dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -3223,7 +3222,6 @@ dependencies = [ "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3243,7 +3241,6 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-sandbox 1.0.0", @@ -3284,7 +3281,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3335,7 +3331,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3351,7 +3346,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3388,7 +3382,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -3460,7 +3453,6 @@ dependencies = [ "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3506,7 +3498,6 @@ version = "0.1.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "srml-support 1.0.0", "substrate-inherents 1.0.0", @@ -3522,7 +3513,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3553,7 +3543,6 @@ dependencies = [ "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3988,8 +3977,6 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -4071,8 +4058,6 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4124,7 +4109,6 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4207,7 +4191,6 @@ dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", @@ -4234,7 +4217,6 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -4284,7 +4266,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -4361,7 +4342,6 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4397,7 +4377,6 @@ dependencies = [ "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -4429,7 +4408,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-primitives 1.0.0", "substrate-test-runtime 1.0.0", diff --git a/core/executor/Cargo.toml b/core/executor/Cargo.toml index baa4e3546d..0278c1704d 100644 --- a/core/executor/Cargo.toml +++ b/core/executor/Cargo.toml @@ -14,8 +14,6 @@ serializer = { package = "substrate-serializer", path = "../serializer" } state_machine = { package = "substrate-state-machine", path = "../state-machine" } runtime_version = { package = "sr-version", path = "../sr-version" } panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" } -serde = "1.0" -serde_derive = "1.0" wasmi = { version = "0.4.3" } byteorder = "1.1" lazy_static = "1.0" diff --git a/core/keystore/Cargo.toml b/core/keystore/Cargo.toml index d0c8a93473..775ae61758 100644 --- a/core/keystore/Cargo.toml +++ b/core/keystore/Cargo.toml @@ -11,8 +11,6 @@ error-chain = "0.12" hex = "0.3" rand = "0.6" serde_json = "1.0" -serde = "1.0" -serde_derive = "1.0" subtle = "2.0" [dev-dependencies] diff --git a/core/network-libp2p/Cargo.toml b/core/network-libp2p/Cargo.toml index 5ae7db4a3a..3ac9f835e3 100644 --- a/core/network-libp2p/Cargo.toml +++ b/core/network-libp2p/Cargo.toml @@ -18,8 +18,7 @@ parking_lot = "0.7.1" lazy_static = "1.2" log = "0.4" rand = "0.6" -serde = "1.0.70" -serde_derive = "1.0.70" +serde = { version = "1.0.70", features = ["derive"] } serde_json = "1.0.24" smallvec = "0.6" substrate-peerset = { path = "../peerset" } diff --git a/core/network-libp2p/src/lib.rs b/core/network-libp2p/src/lib.rs index d279eac4b9..8c8b471931 100644 --- a/core/network-libp2p/src/lib.rs +++ b/core/network-libp2p/src/lib.rs @@ -34,7 +34,7 @@ pub use libp2p::{Multiaddr, multiaddr, build_multiaddr}; pub use libp2p::{identity, PeerId, core::PublicKey}; use libp2p::core::nodes::ConnectedPoint; -use serde_derive::{Deserialize, Serialize}; +use serde::{Deserialize, Serialize}; use slog_derive::SerdeValue; use std::{collections::{HashMap, HashSet}, error, fmt, time::Duration}; diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index a72f8232b8..5a8468b436 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -8,8 +8,7 @@ edition = "2018" rstd = { package = "sr-std", path = "../sr-std", default-features = false } parity-codec = { version = "3.4.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0", default-features = false } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } twox-hash = { version = "1.2.0", optional = true } byteorder = { version = "1.3.1", default-features = false } primitive-types = { version = "0.2", default-features = false, features = ["codec"] } @@ -61,7 +60,7 @@ std = [ "base58", "substrate-bip39", "tiny-bip39", - "serde_derive", + "serde", "byteorder/std", "rand", "sha2", diff --git a/core/primitives/src/changes_trie.rs b/core/primitives/src/changes_trie.rs index c8776a6f08..9cf0066d71 100644 --- a/core/primitives/src/changes_trie.rs +++ b/core/primitives/src/changes_trie.rs @@ -17,7 +17,7 @@ //! Substrate changes trie configuration. #[cfg(any(feature = "std", test))] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use parity_codec::{Encode, Decode}; /// Substrate changes trie configuration. diff --git a/core/primitives/src/lib.rs b/core/primitives/src/lib.rs index f078b5446f..eb309c04a3 100644 --- a/core/primitives/src/lib.rs +++ b/core/primitives/src/lib.rs @@ -38,7 +38,7 @@ use parity_codec::{Encode, Decode}; #[cfg(feature = "std")] use std::borrow::Cow; #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; #[cfg(feature = "std")] pub use impl_serde::serialize as bytes; diff --git a/core/primitives/src/storage.rs b/core/primitives/src/storage.rs index 3203fdb1ba..4746d230d0 100644 --- a/core/primitives/src/storage.rs +++ b/core/primitives/src/storage.rs @@ -17,7 +17,7 @@ //! Contract execution data. #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; #[cfg(feature = "std")] use crate::bytes; use rstd::vec::Vec; diff --git a/core/rpc/Cargo.toml b/core/rpc/Cargo.toml index ec8b3318fb..600cd9ac48 100644 --- a/core/rpc/Cargo.toml +++ b/core/rpc/Cargo.toml @@ -12,8 +12,7 @@ jsonrpc-derive = "10.0.2" log = "0.4" parking_lot = "0.7.1" parity-codec = "3.3" -serde = "1.0" -serde_derive = "1.0" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" client = { package = "substrate-client", path = "../client" } substrate-executor = { path = "../executor" } diff --git a/core/rpc/src/chain/number.rs b/core/rpc/src/chain/number.rs index 35daf26a76..2e5af190ea 100644 --- a/core/rpc/src/chain/number.rs +++ b/core/rpc/src/chain/number.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use serde_derive::Deserialize; +use serde::Deserialize; use primitives::U256; use runtime_primitives::traits; diff --git a/core/rpc/src/system/helpers.rs b/core/rpc/src/system/helpers.rs index 9f64318d5d..82c7773b5b 100644 --- a/core/rpc/src/system/helpers.rs +++ b/core/rpc/src/system/helpers.rs @@ -17,7 +17,7 @@ //! Substrate system API helpers. use std::fmt; -use serde_derive::{Serialize}; +use serde::Serialize; use serde_json::{Value, map::Map}; /// Node properties diff --git a/core/service/Cargo.toml b/core/service/Cargo.toml index 7e53b74fd7..e657826b50 100644 --- a/core/service/Cargo.toml +++ b/core/service/Cargo.toml @@ -13,9 +13,8 @@ log = "0.4" slog = {version = "^2", features = ["nested-values"]} tokio = "0.1.7" exit-future = "0.1" -serde = "1.0" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -serde_derive = "1.0" target_info = "0.1" inherents = { package = "substrate-inherents", path = "../../core/inherents" } keystore = { package = "substrate-keystore", path = "../../core/keystore" } diff --git a/core/service/src/chain_spec.rs b/core/service/src/chain_spec.rs index 78aad64dd0..6af0f5766e 100644 --- a/core/service/src/chain_spec.rs +++ b/core/service/src/chain_spec.rs @@ -19,7 +19,7 @@ use std::collections::HashMap; use std::fs::File; use std::path::PathBuf; -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use primitives::storage::{StorageKey, StorageData}; use runtime_primitives::{BuildStorage, StorageOverlay, ChildrenStorageOverlay}; use serde_json as json; diff --git a/core/sr-primitives/Cargo.toml b/core/sr-primitives/Cargo.toml index dfd47f097c..5e4a13f0fe 100644 --- a/core/sr-primitives/Cargo.toml +++ b/core/sr-primitives/Cargo.toml @@ -7,8 +7,7 @@ edition = "2018" [dependencies] num-traits = { version = "0.2", default-features = false } integer-sqrt = { version = "0.1.2" } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } substrate-primitives = { path = "../primitives", default-features = false } rstd = { package = "sr-std", path = "../sr-std", default-features = false } @@ -23,7 +22,6 @@ default = ["std"] std = [ "num-traits/std", "serde", - "serde_derive", "log", "rstd/std", "runtime_io/std", diff --git a/core/sr-primitives/src/generic/block.rs b/core/sr-primitives/src/generic/block.rs index 5fb83a2a4f..f0f3c88fe7 100644 --- a/core/sr-primitives/src/generic/block.rs +++ b/core/sr-primitives/src/generic/block.rs @@ -20,7 +20,7 @@ use std::fmt; #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use rstd::prelude::*; use crate::codec::{Codec, Encode, Decode}; diff --git a/core/sr-primitives/src/generic/digest.rs b/core/sr-primitives/src/generic/digest.rs index 48f1941d69..265ceb5941 100644 --- a/core/sr-primitives/src/generic/digest.rs +++ b/core/sr-primitives/src/generic/digest.rs @@ -17,7 +17,7 @@ //! Generic implementation of a digest. #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use rstd::prelude::*; diff --git a/core/sr-primitives/src/generic/era.rs b/core/sr-primitives/src/generic/era.rs index e5a7b24f0c..22f47b6769 100644 --- a/core/sr-primitives/src/generic/era.rs +++ b/core/sr-primitives/src/generic/era.rs @@ -17,7 +17,7 @@ //! Generic implementation of an unchecked (pre-verification) extrinsic. #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use crate::codec::{Decode, Encode, Input, Output}; diff --git a/core/sr-primitives/src/generic/header.rs b/core/sr-primitives/src/generic/header.rs index 60ccd93b3d..efcc7614ed 100644 --- a/core/sr-primitives/src/generic/header.rs +++ b/core/sr-primitives/src/generic/header.rs @@ -17,7 +17,7 @@ //! Generic implementation of a block header. #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use crate::codec::{Decode, Encode, Codec, Input, Output, HasCompact, EncodeAsRef}; use crate::traits::{self, Member, SimpleArithmetic, SimpleBitOps, MaybeDisplay, Hash as HashT, DigestItem as DigestItemT, MaybeSerializeDebug, MaybeSerializeDebugButNotDeserialize}; diff --git a/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs b/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs index 243747092c..ea9dad2a50 100644 --- a/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs +++ b/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs @@ -191,7 +191,7 @@ mod tests { use super::*; use runtime_io::blake2_256; use crate::codec::{Encode, Decode}; - use serde_derive::{Serialize, Deserialize}; + use serde::{Serialize, Deserialize}; struct TestContext; impl Lookup for TestContext { diff --git a/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs b/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs index 93eeb55884..a91f4461ff 100644 --- a/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs +++ b/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs @@ -190,7 +190,7 @@ mod tests { use super::*; use runtime_io::blake2_256; use crate::codec::{Encode, Decode}; - use serde_derive::{Serialize, Deserialize}; + use serde::{Serialize, Deserialize}; struct TestContext; impl Lookup for TestContext { diff --git a/core/sr-primitives/src/lib.rs b/core/sr-primitives/src/lib.rs index 0f221bf08e..32d59b6b5a 100644 --- a/core/sr-primitives/src/lib.rs +++ b/core/sr-primitives/src/lib.rs @@ -24,7 +24,7 @@ pub use parity_codec as codec; #[cfg(feature = "std")] #[doc(hidden)] -pub use serde_derive; +pub use serde; #[cfg(feature = "std")] pub use runtime_io::{StorageOverlay, ChildrenStorageOverlay}; @@ -83,9 +83,7 @@ macro_rules! create_runtime_str { } #[cfg(feature = "std")] -pub use serde::{Serialize, de::DeserializeOwned}; -#[cfg(feature = "std")] -pub use serde_derive::{Serialize, Deserialize}; +pub use serde::{Serialize, Deserialize, de::DeserializeOwned}; /// Complex storage builder stuff. #[cfg(feature = "std")] @@ -528,7 +526,7 @@ macro_rules! impl_outer_config { ) => { $crate::__impl_outer_config_types! { $concrete $( $config $snake $( < $generic $(, $instance)? > )* )* } #[cfg(any(feature = "std", test))] - #[derive($crate::serde_derive::Serialize, $crate::serde_derive::Deserialize)] + #[derive($crate::serde::Serialize, $crate::serde::Deserialize)] #[serde(rename_all = "camelCase")] #[serde(deny_unknown_fields)] pub struct $main { @@ -576,7 +574,7 @@ macro_rules! impl_outer_log { /// Wrapper for all possible log entries for the `$trait` runtime. Provides binary-compatible /// `Encode`/`Decode` implementations with the corresponding `generic::DigestItem`. #[derive(Clone, PartialEq, Eq)] - #[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))] + #[cfg_attr(feature = "std", derive(Debug, $crate::serde::Serialize))] $(#[$attr])* #[allow(non_camel_case_types)] pub struct $name($internal); @@ -584,7 +582,7 @@ macro_rules! impl_outer_log { /// All possible log entries for the `$trait` runtime. `Encode`/`Decode` implementations /// are auto-generated => it is not binary-compatible with `generic::DigestItem`. #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)] - #[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))] + #[cfg_attr(feature = "std", derive(Debug, $crate::serde::Serialize))] $(#[$attr])* #[allow(non_camel_case_types)] pub enum InternalLog { @@ -728,7 +726,7 @@ mod tests { mod a { use super::RuntimeT; use crate::codec::{Encode, Decode}; - use serde_derive::Serialize; + use serde::Serialize; pub type Log = RawLog<::AuthorityId>; #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)] @@ -738,7 +736,7 @@ mod tests { mod b { use super::RuntimeT; use crate::codec::{Encode, Decode}; - use serde_derive::Serialize; + use serde::Serialize; pub type Log = RawLog<::AuthorityId>; #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)] diff --git a/core/sr-primitives/src/testing.rs b/core/sr-primitives/src/testing.rs index 2711c0e623..763b68b180 100644 --- a/core/sr-primitives/src/testing.rs +++ b/core/sr-primitives/src/testing.rs @@ -17,9 +17,6 @@ //! Testing utilities. use serde::{Serialize, Serializer, Deserialize, de::Error as DeError, Deserializer}; -use serde_derive::Serialize; -#[cfg(feature = "std")] -use serde_derive::Deserialize; use std::{fmt::Debug, ops::Deref, fmt}; use crate::codec::{Codec, Encode, Decode}; use crate::traits::{self, Checkable, Applyable, BlakeTwo256, Convert}; diff --git a/core/sr-primitives/src/traits.rs b/core/sr-primitives/src/traits.rs index b62bc067b6..4c9bf9f95e 100644 --- a/core/sr-primitives/src/traits.rs +++ b/core/sr-primitives/src/traits.rs @@ -20,9 +20,7 @@ use rstd::prelude::*; use rstd::{self, result, marker::PhantomData}; use runtime_io; #[cfg(feature = "std")] use std::fmt::{Debug, Display}; -#[cfg(feature = "std")] use serde::{Serialize, de::DeserializeOwned}; -#[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +#[cfg(feature = "std")] use serde::{Serialize, Deserialize, de::DeserializeOwned}; use substrate_primitives::{self, Hasher, Blake2Hasher}; use crate::codec::{Codec, Encode, HasCompact}; pub use integer_sqrt::IntegerSquareRoot; diff --git a/core/sr-version/Cargo.toml b/core/sr-version/Cargo.toml index 111e6f101f..b35052e109 100644 --- a/core/sr-version/Cargo.toml +++ b/core/sr-version/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] impl-serde = { version = "0.1", optional = true } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../sr-std", default-features = false } runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false } @@ -17,7 +16,6 @@ default = ["std"] std = [ "impl-serde", "serde", - "serde_derive", "parity-codec/std", "rstd/std", "runtime_primitives/std", diff --git a/core/sr-version/src/lib.rs b/core/sr-version/src/lib.rs index 3d1dfb4313..071b893404 100644 --- a/core/sr-version/src/lib.rs +++ b/core/sr-version/src/lib.rs @@ -19,7 +19,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; #[cfg(feature = "std")] use std::fmt; #[cfg(feature = "std")] diff --git a/core/telemetry/Cargo.toml b/core/telemetry/Cargo.toml index 959349f74f..d626e9fcdf 100644 --- a/core/telemetry/Cargo.toml +++ b/core/telemetry/Cargo.toml @@ -10,8 +10,7 @@ parking_lot = "0.7.1" lazy_static = "1.0" log = "0.4" rand = "0.6" -serde = "1.0.81" -serde_derive = "1.0" +serde = { version = "1.0.81", features = ["derive"] } serde_json = "1.0" slog = { version = "^2", features = ["nested-values"] } slog-json = { version = "^2", features = ["nested-values"] } diff --git a/core/telemetry/src/lib.rs b/core/telemetry/src/lib.rs index a993b50a17..bc295f2a8c 100644 --- a/core/telemetry/src/lib.rs +++ b/core/telemetry/src/lib.rs @@ -29,7 +29,7 @@ use log::trace; use rand::{thread_rng, Rng}; pub use slog_scope::with_logger; pub use slog; -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use core::result; /// Configuration for telemetry. diff --git a/core/test-runtime/Cargo.toml b/core/test-runtime/Cargo.toml index e2d4bdc2d8..2a4540090e 100644 --- a/core/test-runtime/Cargo.toml +++ b/core/test-runtime/Cargo.toml @@ -7,8 +7,7 @@ edition = "2018" [dependencies] log = { version = "0.4", optional = true } hex-literal = { version = "0.1.0", optional = true } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } keyring = { package = "substrate-keyring", path = "../keyring", optional = true } substrate-client = { path = "../client", default-features = false } @@ -38,7 +37,6 @@ std = [ "log", "hex-literal", "serde", - "serde_derive", "substrate-client/std", "keyring", "parity-codec/std", diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index f040fa9c83..1b99472452 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -506,6 +506,14 @@ name = "environmental" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "erased-serde" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "error-chain" version = "0.12.0" @@ -1892,6 +1900,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -1962,6 +1973,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "slog" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "slog-async" @@ -1979,6 +1993,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2057,7 +2072,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2077,7 +2091,6 @@ dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -2164,7 +2177,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2344,8 +2356,6 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -2415,7 +2425,6 @@ dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", @@ -3073,6 +3082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" +"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" diff --git a/core/transaction-pool/graph/Cargo.toml b/core/transaction-pool/graph/Cargo.toml index 1b6e328290..9090ef18b9 100644 --- a/core/transaction-pool/graph/Cargo.toml +++ b/core/transaction-pool/graph/Cargo.toml @@ -9,8 +9,7 @@ error-chain = "0.12" futures = "0.1" log = "0.4" parking_lot = "0.7.1" -serde = "1.0" -serde_derive = "1.0" +serde = { version = "1.0", features = ["derive"] } substrate-primitives = { path = "../../primitives" } sr-primitives = { path = "../../sr-primitives" } diff --git a/core/transaction-pool/graph/src/watcher.rs b/core/transaction-pool/graph/src/watcher.rs index 5516d8c43c..44ab8431e8 100644 --- a/core/transaction-pool/graph/src/watcher.rs +++ b/core/transaction-pool/graph/src/watcher.rs @@ -20,7 +20,7 @@ use futures::{ Stream, sync::mpsc, }; -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; /// Possible extrinsic status events #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] diff --git a/node-template/runtime/Cargo.toml b/node-template/runtime/Cargo.toml index 3622fa34b1..df45166bd3 100644 --- a/node-template/runtime/Cargo.toml +++ b/node-template/runtime/Cargo.toml @@ -5,8 +5,7 @@ authors = ["Anonymous"] edition = "2018" [dependencies] -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default_features = false } @@ -46,7 +45,6 @@ std = [ "timestamp/std", "sudo/std", "version/std", - "serde_derive", "serde", "safe-mix/std", "consensus-aura/std", diff --git a/node-template/runtime/src/lib.rs b/node-template/runtime/src/lib.rs index a4866b127d..f7325923c7 100644 --- a/node-template/runtime/src/lib.rs +++ b/node-template/runtime/src/lib.rs @@ -6,7 +6,7 @@ #![recursion_limit="256"] #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use parity_codec::{Encode, Decode}; use rstd::prelude::*; #[cfg(feature = "std")] diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 5334b38b43..99fc275c0a 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -506,6 +506,14 @@ name = "environmental" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "erased-serde" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "error-chain" version = "0.12.0" @@ -1275,7 +1283,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -1927,6 +1934,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -1997,6 +2007,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "slog" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "slog-async" @@ -2014,6 +2027,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2092,7 +2106,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2112,7 +2125,6 @@ dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -2156,7 +2168,6 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "srml-support 1.0.0", @@ -2201,7 +2212,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -2264,7 +2274,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2312,7 +2321,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2506,8 +2514,6 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -2577,7 +2583,6 @@ dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", @@ -2621,7 +2626,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3200,6 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" +"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index b51528c80a..1141a2455e 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -5,8 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } @@ -23,6 +22,5 @@ std = [ "primitives/std", "rstd/std", "runtime_primitives/std", - "serde_derive", "serde", ] diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 6dc918f413..84b0d2d067 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -506,6 +506,14 @@ name = "environmental" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "erased-serde" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "error-chain" version = "0.12.0" @@ -1274,7 +1282,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -1960,6 +1967,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -2030,6 +2040,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "slog" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "slog-async" @@ -2047,6 +2060,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2125,7 +2139,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2156,7 +2169,6 @@ dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -2200,7 +2212,6 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "srml-support 1.0.0", @@ -2217,7 +2228,6 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-sandbox 1.0.0", @@ -2226,7 +2236,7 @@ dependencies = [ "srml-system 1.0.0", "srml-timestamp 1.0.0", "substrate-primitives 1.0.0", - "wasmi-validation 0.1.0", + "wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2253,7 +2263,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2281,7 +2290,6 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "srml-support 1.0.0", @@ -2295,7 +2303,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "srml-consensus 1.0.0", @@ -2330,7 +2337,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -2393,7 +2399,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2441,7 +2446,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2470,7 +2474,6 @@ dependencies = [ "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "srml-balances 1.0.0", @@ -2650,8 +2653,6 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-version 1.0.0", "substrate-panic-handler 1.0.0", @@ -2732,7 +2733,6 @@ dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", @@ -2776,7 +2776,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3208,9 +3208,9 @@ dependencies = [ [[package]] name = "wasmi-validation" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3364,6 +3364,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" +"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" @@ -3576,6 +3577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/srml/consensus/Cargo.toml b/srml/consensus/Cargo.toml index 560ad046fb..ef3e943c8d 100644 --- a/srml/consensus/Cargo.toml +++ b/srml/consensus/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = "0.1.0" -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } @@ -23,7 +22,6 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io" } default = ["std"] std = [ "serde", - "serde_derive", "parity-codec/std", "substrate-primitives/std", "rstd/std", diff --git a/srml/consensus/src/lib.rs b/srml/consensus/src/lib.rs index 5637f458c1..ba56e6e4e3 100644 --- a/srml/consensus/src/lib.rs +++ b/srml/consensus/src/lib.rs @@ -127,7 +127,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use rstd::prelude::*; use parity_codec as codec; use codec::{Encode, Decode}; diff --git a/srml/contract/Cargo.toml b/srml/contract/Cargo.toml index be4034c849..28ca8f9eb9 100644 --- a/srml/contract/Cargo.toml +++ b/srml/contract/Cargo.toml @@ -5,8 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } pwasm-utils = { version = "0.6.1", default-features = false } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } parity-wasm = { version = "0.31", default-features = false } @@ -34,7 +33,6 @@ core = [ ] std = [ "serde", - "serde_derive", "parity-codec/std", "substrate-primitives/std", "runtime-primitives/std", diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index 5b52a31150..a5fa62f7ec 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -91,7 +91,7 @@ use crate::exec::ExecutionContext; use crate::account_db::{AccountDb, DirectAccountDb}; #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use substrate_primitives::crypto::UncheckedFrom; use rstd::prelude::*; use rstd::marker::PhantomData; diff --git a/srml/democracy/Cargo.toml b/srml/democracy/Cargo.toml index 0e514cd2df..e789c733d6 100644 --- a/srml/democracy/Cargo.toml +++ b/srml/democracy/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = "0.1.0" -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } @@ -24,7 +23,6 @@ balances = { package = "srml-balances", path = "../balances" } default = ["std"] std = [ "serde", - "serde_derive", "safe-mix/std", "parity-codec/std", "rstd/std", diff --git a/srml/democracy/src/vote_threshold.rs b/srml/democracy/src/vote_threshold.rs index 5d9b2b742e..ee42363d47 100644 --- a/srml/democracy/src/vote_threshold.rs +++ b/srml/democracy/src/vote_threshold.rs @@ -17,7 +17,7 @@ //! Voting thresholds. #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use parity_codec::{Encode, Decode}; use primitives::traits::{Zero, IntegerSquareRoot}; use rstd::ops::{Add, Mul, Div, Rem}; diff --git a/srml/finality-tracker/Cargo.toml b/srml/finality-tracker/Cargo.toml index b23afc58f4..c85534f1eb 100644 --- a/srml/finality-tracker/Cargo.toml +++ b/srml/finality-tracker/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = "0.1.0" -serde = { version = "1.0", default-features = false } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", default-features = false, features = ["derive"] } parity-codec = { version = "3.3", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } @@ -25,7 +24,6 @@ parking_lot = "0.7" default = ["std"] std = [ "serde/std", - "serde_derive", "parity-codec/std", "rstd/std", "srml-support/std", diff --git a/srml/grandpa/Cargo.toml b/srml/grandpa/Cargo.toml index a4cf9c9bd0..49906e699a 100644 --- a/srml/grandpa/Cargo.toml +++ b/srml/grandpa/Cargo.toml @@ -5,9 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -#hex-literal = "0.1.0" -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } substrate-finality-grandpa-primitives = { path = "../../core/finality-grandpa/primitives", default-features = false } @@ -26,7 +24,6 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io" } default = ["std"] std = [ "serde", - "serde_derive", "parity-codec/std", "substrate-primitives/std", "substrate-finality-grandpa-primitives/std", diff --git a/srml/grandpa/src/lib.rs b/srml/grandpa/src/lib.rs index e9b00662d6..e9886eddb1 100644 --- a/srml/grandpa/src/lib.rs +++ b/srml/grandpa/src/lib.rs @@ -31,7 +31,7 @@ pub use substrate_finality_grandpa_primitives as fg_primitives; #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use rstd::prelude::*; use parity_codec as codec; use codec::{Encode, Decode}; diff --git a/srml/metadata/Cargo.toml b/srml/metadata/Cargo.toml index 1dc8180829..aeac0148b4 100644 --- a/srml/metadata/Cargo.toml +++ b/srml/metadata/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] parity-codec = { version = "3.3", default-features = false, features = ["derive"] } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } @@ -18,5 +17,4 @@ std = [ "rstd/std", "primitives/std", "serde", - "serde_derive" ] diff --git a/srml/metadata/src/lib.rs b/srml/metadata/src/lib.rs index 9b03daafa6..254e72cb11 100644 --- a/srml/metadata/src/lib.rs +++ b/srml/metadata/src/lib.rs @@ -23,7 +23,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; #[cfg(feature = "std")] use parity_codec::{Decode, Input}; use parity_codec::{Encode, Output}; diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index 8b74b564ba..3cb358a4e1 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = { version = "0.1.0", optional = true } -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.5.1", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } sr-std = { path = "../../core/sr-std", default-features = false } @@ -29,7 +28,6 @@ std = [ "once_cell", "bitmask/std", "serde", - "serde_derive", "runtime_io/std", "parity-codec/std", "sr-std/std", diff --git a/srml/support/src/event.rs b/srml/support/src/event.rs index c03482f225..e4168c318a 100644 --- a/srml/support/src/event.rs +++ b/srml/support/src/event.rs @@ -28,8 +28,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// extern crate srml_support; /// #[macro_use] /// extern crate parity_codec as codec; -/// #[macro_use] -/// extern crate serde_derive; /// /// decl_event!( /// pub enum Event { @@ -48,8 +46,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// extern crate parity_codec as codec; /// #[macro_use] /// extern crate parity_codec; -/// #[macro_use] -/// extern crate serde_derive; /// /// trait Trait { /// type Balance; @@ -97,8 +93,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// extern crate parity_codec as codec; /// #[macro_use] /// extern crate parity_codec; -/// #[macro_use] -/// extern crate serde_derive; /// ///# struct DefaultInstance; ///# trait Instance {} @@ -509,7 +503,7 @@ macro_rules! __impl_outer_event_json_metadata { #[allow(dead_code)] mod tests { use super::*; - use serde_derive::Serialize; + use serde::Serialize; use parity_codec::{Encode, Decode}; mod system { diff --git a/srml/support/src/lib.rs b/srml/support/src/lib.rs index d99db6ddb8..26ed857058 100644 --- a/srml/support/src/lib.rs +++ b/srml/support/src/lib.rs @@ -159,7 +159,7 @@ pub enum Void {} #[cfg(feature = "std")] #[doc(hidden)] -pub use serde_derive::*; +pub use serde::{Serialize, Deserialize}; /// Programatically create derivations for tuples of up to 19 elements. You provide a second macro /// which is called once per tuple size, along with a number of identifiers, one for each element diff --git a/srml/support/test/Cargo.toml b/srml/support/test/Cargo.toml index 46a6d32068..de54bbd3d4 100644 --- a/srml/support/test/Cargo.toml +++ b/srml/support/test/Cargo.toml @@ -5,8 +5,7 @@ authors = ["thiolliere "] edition = "2018" [dev-dependencies] -serde = { version = "1.0", default-features = false } -serde_derive = { version = "1.0" } +serde = { version = "1.0", default-features = false, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } runtime_io = { package = "sr-io", path = "../../../core/sr-io", default-features = false } srml-support = { path = "../", default-features = false } diff --git a/srml/support/test/tests/instance.rs b/srml/support/test/tests/instance.rs index d5171f6ac7..b958de8377 100644 --- a/srml/support/test/tests/instance.rs +++ b/srml/support/test/tests/instance.rs @@ -17,7 +17,7 @@ #![recursion_limit="128"] #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use runtime_io::{with_externalities, Blake2Hasher}; use srml_support::rstd::prelude::*; use srml_support::rstd as rstd; @@ -168,7 +168,7 @@ mod module1 { >; /// A logs in this module. - #[cfg_attr(feature = "std", derive(serde_derive::Serialize, Debug))] + #[cfg_attr(feature = "std", derive(serde::Serialize, Debug))] #[derive(parity_codec::Encode, parity_codec::Decode, PartialEq, Eq, Clone)] pub enum RawLog { _Phantom(rstd::marker::PhantomData<(T, I)>), @@ -242,7 +242,7 @@ mod module2 { >; /// A logs in this module. - #[cfg_attr(feature = "std", derive(serde_derive::Serialize, Debug))] + #[cfg_attr(feature = "std", derive(serde::Serialize, Debug))] #[derive(parity_codec::Encode, parity_codec::Decode, PartialEq, Eq, Clone)] pub enum RawLog { _Phantom(rstd::marker::PhantomData<(T, I)>), diff --git a/srml/system/Cargo.toml b/srml/system/Cargo.toml index 0b91fd3c5d..0effeae251 100644 --- a/srml/system/Cargo.toml +++ b/srml/system/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = "0.1.0" -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.5", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } @@ -23,7 +22,6 @@ criterion = "0.2" default = ["std"] std = [ "serde", - "serde_derive", "safe-mix/std", "parity-codec/std", "substrate-primitives/std", @@ -35,4 +33,4 @@ std = [ [[bench]] name = "bench" -harness = false \ No newline at end of file +harness = false diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index c410afd9ce..92e7b6e73e 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -72,7 +72,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::Serialize; +use serde::Serialize; use rstd::prelude::*; #[cfg(any(feature = "std", test))] use rstd::map; diff --git a/srml/treasury/Cargo.toml b/srml/treasury/Cargo.toml index d4bbcf4f4f..a4f3960edd 100644 --- a/srml/treasury/Cargo.toml +++ b/srml/treasury/Cargo.toml @@ -6,8 +6,7 @@ edition = "2018" [dependencies] hex-literal = "0.1.0" -serde = { version = "1.0", optional = true } -serde_derive = { version = "1.0", optional = true } +serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } @@ -23,7 +22,6 @@ substrate-primitives = { path = "../../core/primitives" } default = ["std"] std = [ "serde", - "serde_derive", "parity-codec/std", "rstd/std", "runtime_primitives/std", diff --git a/srml/treasury/src/lib.rs b/srml/treasury/src/lib.rs index b96928d7f8..4c2bd0ede6 100644 --- a/srml/treasury/src/lib.rs +++ b/srml/treasury/src/lib.rs @@ -19,7 +19,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "std")] -use serde_derive::{Serialize, Deserialize}; +use serde::{Serialize, Deserialize}; use rstd::prelude::*; use srml_support::{StorageValue, StorageMap, decl_module, decl_storage, decl_event, ensure}; use srml_support::traits::{Currency, ReservableCurrency, OnDilution, OnUnbalanced, Imbalance}; -- GitLab From 815853f017a6e31e4009af72a8a34b632cdd0279 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 23 Apr 2019 19:46:30 +0200 Subject: [PATCH 045/206] Update to libp2p v0.7.0 (#2343) * Update to libp2p master * Fix tests * More tests fixing --- Cargo.lock | 397 +++++++++++----- core/consensus/common/Cargo.toml | 2 +- core/network-libp2p/Cargo.toml | 2 +- core/network-libp2p/src/behaviour.rs | 29 +- .../src/custom_proto/handler.rs | 19 +- core/network-libp2p/src/service_task.rs | 11 +- core/network-libp2p/tests/test.rs | 30 +- core/network/src/service.rs | 17 +- core/peerset/Cargo.toml | 2 +- core/service/test/src/lib.rs | 66 +-- core/test-runtime/wasm/Cargo.lock | 436 ++++++++++++++---- node-template/runtime/wasm/Cargo.lock | 436 ++++++++++++++---- node/runtime/wasm/Cargo.lock | 436 ++++++++++++++---- 13 files changed, 1437 insertions(+), 446 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88bf21fd7e..d2b0eb4f72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,6 +278,11 @@ name = "bs58" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bumpalo" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byte-tools" version = "0.2.0" @@ -300,13 +305,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cast" version = "0.2.2" @@ -913,6 +923,26 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "glob" version = "0.2.11" @@ -936,7 +966,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1046,7 +1076,7 @@ name = "http" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1087,7 +1117,7 @@ name = "hyper" version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1172,6 +1202,14 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "jsonrpc-core" version = "10.0.1" @@ -1223,7 +1261,7 @@ name = "jsonrpc-server-utils" version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1337,30 +1375,30 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-websocket 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-websocket 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1372,12 +1410,12 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1385,7 +1423,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1407,7 +1445,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1416,28 +1454,28 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-floodsub" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1448,15 +1486,15 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1469,21 +1507,19 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1498,16 +1534,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1519,13 +1555,13 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1535,13 +1571,13 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1553,15 +1589,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1572,22 +1608,22 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ratelimit" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1595,39 +1631,44 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-tcp" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1635,41 +1676,42 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-websocket" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-yamux" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1857,7 +1899,7 @@ name = "multistream-select" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2235,12 +2277,13 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2274,7 +2317,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2798,7 +2841,7 @@ name = "rw-stream-sink" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2920,6 +2963,11 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.87" @@ -3076,6 +3124,11 @@ dependencies = [ "static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "spin" version = "0.5.0" @@ -3911,7 +3964,7 @@ dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -4098,13 +4151,13 @@ name = "substrate-network-libp2p" version = "1.0.0" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4162,7 +4215,7 @@ name = "substrate-peerset" version = "1.0.0" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4613,7 +4666,7 @@ name = "tokio" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4637,7 +4690,7 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4686,7 +4739,7 @@ name = "tokio-io" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4722,7 +4775,7 @@ name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4780,7 +4833,7 @@ name = "tokio-udp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4794,7 +4847,7 @@ name = "tokio-uds" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4973,7 +5026,7 @@ name = "unsigned-varint" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5068,6 +5121,79 @@ dependencies = [ "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wasm-bindgen" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wasmi" version = "0.4.3" @@ -5087,6 +5213,19 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "web-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "websocket" version = "0.22.2" @@ -5095,7 +5234,7 @@ dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5107,6 +5246,14 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "weedle" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "which" version = "1.0.5" @@ -5167,7 +5314,7 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5210,10 +5357,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "yamux" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5262,11 +5409,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" "checksum bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0de79cfb98e7aa9988188784d8664b4b5dad6eaaa0863b91d9a4ed871d4f7a42" +"checksum bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4639720be048090544634e0402490838995ccdc9d2fe648f528f30d3c33ae71f" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" "checksum cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "389803e36973d242e7fecb092b2de44a3d35ac62524b3b9339e51d577d668e02" "checksum cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "644d693ecfa91955ed32dcc7eda4914e1be97a641fb6f0645a37348e20b230da" @@ -5336,6 +5485,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" +"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" "checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" @@ -5365,6 +5516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d" "checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" "checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" "checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" @@ -5382,24 +5534,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" -"checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" -"checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" -"checksum libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "debea88a3d5de9fdaf7082bd6d238f2c4c6a0420f14bdf9e1c1083b3e7c69286" -"checksum libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350d0018af3668d954f61ce7311e7d64ab7c40f19a8eb895e4750efe24c3455f" -"checksum libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfbcf36cc58ad5d0252d8ebe9c1a87190693fe2cdbe40fb01d8046779f9a75ad" -"checksum libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82e98435973e958d7dea3f5074d7fca53d0dfce2e1ac6924119a21c2991fe443" -"checksum libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92bb0153418eaf0ea549008d1e22748a956c9c36af9374fbe7189d44607c14be" -"checksum libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc915d0cde68a05d26a0dcb125eddce7dd2a425e97c5172ac300c1ee8716f55a" -"checksum libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "355bb370dd12809792dc020638b280e7aaf8625318018abd311c51affd0a612d" -"checksum libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e86291401f4a83f9fa81c03f8a7ccf0b03ce6aaa40cba058a7ec1026a65a6fe4" -"checksum libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3277f1f7eaadf5cdde6a76fb4afbf24e0eda6e2b04f288f526c6fa2e4293a6e" -"checksum libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4842a7ab54c12459b58b9e59cbeb03e3e1fd393fef48079472856f934352772" -"checksum libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32ba52ee76aaa94af533526ce5a22fbfcc69a560174fccee82f4cdb557411d33" -"checksum libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00f416e1e3d0214bd7df2be2b6be8ef61771d44292b973c9e02bfbbd7f62fe46" -"checksum libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af47af9997d69fc70aa13e6e7cd0d766614ebe74005e69e763221a64d9a0a5ef" -"checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" -"checksum libp2p-websocket 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "647bd8862afe6e912eb34b7614f731c0ff89e8777b57d9f2f5f0fd593ecc8d9a" -"checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" +"checksum libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0231edab431064b30b7749484a39735eb36492cef4658c372c9059e58c3003aa" +"checksum libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a3bad2ed26297112847678683dd221473a0d44297250b61f004e1b35e72493" +"checksum libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f765f103b680cbed910b02bfdbdcfce5b1142899c93e51acb960bf59b6f81b1" +"checksum libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b129d20cc8cbb6ce5da8361045649c024659173e246c5dfbf20ae06071c046a" +"checksum libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70d68816b8435d6788399416eb2f0a6974fb1d15c4be5c30141f87c8e81746df" +"checksum libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "718ca645a065fd70855ca6042a7df686c24cd21add750c37a82c811fbd1e5c43" +"checksum libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe27c623a6a720efd5d704347838972062f89149a9c3cd149748da60bdcd3e0" +"checksum libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9bc1a5d85f4812cae6367b49a432763fe28997bac7c530dc55b70ec18a78aa7" +"checksum libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe5a858342a1cc89464474f7edc4bae1da649b9c823a3e04d9fb494493601746" +"checksum libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc6b5185c50a52a12e7bbe2ee7799059e24de4e52ab25edbfd26c8ab8515d317" +"checksum libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7905c1431ad115bee83405770629a27d6f17153ad02ec9670a7347998ef20e22" +"checksum libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc17626763ded57da8fed73187c2d9f6ebb89d30838673c430315bf560c7e4db" +"checksum libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2409d08b809ab1a74269597f7da2829d117cc11b9ed3343af33fc20831619726" +"checksum libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258cdc6742945c8f6402997bbbf36733588e2db18e5a0014da6d46e3ccfb92cf" +"checksum libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b5691e2ba2720d42bd1e93d6b90239fa9235c1956ef6a5f1dd499a7ae2767be" +"checksum libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ab0b9ca050105fd94229c48911c0c84aef4d6b86a53d1b6df81d938354e47e" +"checksum libp2p-websocket 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81692c3141a9aefd84f4faffdc93985af3858ef82ed7fe8185e6b27437b36183" +"checksum libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6ff51a5b2056bacee1c9f2ed8455cdf3c5c619261ddb4efc783119130aaf52" "checksum librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9024327233e7fac7982440f73301c00046d438c5b1011e8f4e394226ce19007" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" @@ -5444,7 +5596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b9db194dfbcfe3b398d63d765437a5c7232d59906e203055f0e993f6458ff1" -"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" +"checksum parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a130a727008cfcd1068a28439fe939897ccad28664422aeca65b384d6de6d0" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fec5048fba72a2e01baeb0d08089db79aead4b57e2443df172fb1840075a233" @@ -5520,6 +5672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" "checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" "checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" "checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" @@ -5536,6 +5689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eff3b513cf2e0d1a60e1aba152dc72bedc5b05585722bb3cebd7bcb1e31b98f" "checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" "checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" @@ -5620,9 +5774,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a6265b25719e82598d104b3717375e37661d41753e2c84cde3f51050c7ed7e3c" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" +"checksum wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ffde3534e5fa6fd936e3260cd62cd644b8656320e369388f9303c955895e35d4" +"checksum wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "40c0543374a7ae881cdc5d32d19de28d1d1929e92263ffa7e31712cc2d53f9f1" +"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d" +"checksum wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "f914c94c2c5f4c9364510ca2429e59c92157ec89429243bcc245e983db990a71" +"checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385" +"checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe" +"checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" "checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" +"checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4" "checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" +"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" @@ -5636,5 +5799,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" "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.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" +"checksum yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9073f5dbc901abb0b2ec4f866e726fed2f54953bdf81f8a5fde7762b7cc3b3" "checksum zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ddfeb6eee2fb3b262ef6e0898a52b7563bb8e0d5955a313b3cf2f808246ea14" diff --git a/core/consensus/common/Cargo.toml b/core/consensus/common/Cargo.toml index 4989a1eb94..dab3878863 100644 --- a/core/consensus/common/Cargo.toml +++ b/core/consensus/common/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] crossbeam-channel = "0.3.4" -libp2p = { version = "0.6.0", default-features = false } +libp2p = { version = "0.7.0", default-features = false } log = "0.4" primitives = { package = "substrate-primitives", path= "../../primitives" } inherents = { package = "substrate-inherents", path = "../../inherents" } diff --git a/core/network-libp2p/Cargo.toml b/core/network-libp2p/Cargo.toml index 3ac9f835e3..b6be5f1841 100644 --- a/core/network-libp2p/Cargo.toml +++ b/core/network-libp2p/Cargo.toml @@ -13,7 +13,7 @@ bytes = "0.4" error-chain = { version = "0.12", default-features = false } fnv = "1.0" futures = "0.1" -libp2p = { version = "0.6.0", default-features = false, features = ["secio-secp256k1", "libp2p-websocket"] } +libp2p = { version = "0.7.0", default-features = false, features = ["secio-secp256k1", "libp2p-websocket"] } parking_lot = "0.7.1" lazy_static = "1.2" log = "0.4" diff --git a/core/network-libp2p/src/behaviour.rs b/core/network-libp2p/src/behaviour.rs index a10f3697d8..cf9fc2c1c2 100644 --- a/core/network-libp2p/src/behaviour.rs +++ b/core/network-libp2p/src/behaviour.rs @@ -24,8 +24,9 @@ use libp2p::core::swarm::toggle::Toggle; use libp2p::identify::{Identify, IdentifyEvent, protocol::IdentifyInfo}; use libp2p::kad::{Kademlia, KademliaOut}; use libp2p::mdns::{Mdns, MdnsEvent}; -use libp2p::ping::{Ping, PingEvent}; -use log::{debug, trace, warn}; +use libp2p::multiaddr::Protocol; +use libp2p::ping::{Ping, PingConfig, PingEvent, PingSuccess}; +use log::{debug, info, trace, warn}; use std::{cmp, io, fmt, time::Duration}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_timer::{Delay, clock::Clock}; @@ -68,14 +69,14 @@ impl Behaviour { let custom_protocols = CustomProto::new(protocol, peerset); - let mut kademlia = Kademlia::new(local_public_key.into_peer_id()); + let mut kademlia = Kademlia::new(local_public_key.clone().into_peer_id()); for (peer_id, addr) in &known_addresses { kademlia.add_connected_address(peer_id, addr.clone()); } let clock = Clock::new(); Behaviour { - ping: Ping::new(), + ping: Ping::new(PingConfig::new()), custom_protocols, discovery: DiscoveryBehaviour { user_defined: known_addresses, @@ -83,6 +84,7 @@ impl Behaviour { next_kad_random_query: Delay::new(clock.now()), duration_to_next_kad: Duration::from_secs(1), clock, + local_peer_id: local_public_key.into_peer_id(), }, identify, mdns: if enable_mdns { @@ -293,10 +295,11 @@ impl NetworkBehaviourEventProcess for Behavio impl NetworkBehaviourEventProcess for Behaviour { fn inject_event(&mut self, event: PingEvent) { match event { - PingEvent::PingSuccess { peer, time } => { - trace!(target: "sub-libp2p", "Ping time with {:?}: {:?}", peer, time); - self.events.push(BehaviourOut::PingSuccess { peer_id: peer, ping_time: time }); + PingEvent { peer, result: Ok(PingSuccess::Ping { rtt }) } => { + trace!(target: "sub-libp2p", "Ping time with {:?}: {:?}", peer, rtt); + self.events.push(BehaviourOut::PingSuccess { peer_id: peer, ping_time: rtt }); } + _ => () } } } @@ -335,6 +338,8 @@ pub struct DiscoveryBehaviour { duration_to_next_kad: Duration, /// `Clock` instance that uses the current execution context's source of time. clock: Clock, + /// Identity of our local node. + local_peer_id: PeerId, } impl NetworkBehaviour for DiscoveryBehaviour @@ -386,6 +391,16 @@ where NetworkBehaviour::inject_node_event(&mut self.kademlia, peer_id, event) } + fn inject_new_external_addr(&mut self, addr: &Multiaddr) { + let new_addr = addr.clone() + .with(Protocol::P2p(self.local_peer_id.clone().into())); + info!(target: "sub-libp2p", "Discovered external node address: {}", new_addr); + } + + fn inject_expired_listen_addr(&mut self, addr: &Multiaddr) { + info!(target: "sub-libp2p", "No longer listening on {}", addr); + } + fn poll( &mut self, params: &mut PollParameters, diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index b3c577ce4c..d464ed37a9 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -22,6 +22,7 @@ use libp2p::core::{ protocols_handler::IntoProtocolsHandler, protocols_handler::KeepAlive, protocols_handler::ProtocolsHandlerUpgrErr, + protocols_handler::SubstreamProtocol, upgrade::{InboundUpgrade, OutboundUpgrade} }; use log::{debug, error, warn}; @@ -405,7 +406,7 @@ where if incoming.is_empty() { if let Endpoint::Dialer = endpoint { self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { - upgrade: self.protocol.clone(), + protocol: SubstreamProtocol::new(self.protocol.clone()), info: (), }); } @@ -615,7 +616,7 @@ where // after all the substreams are closed. if reenable && shutdown.is_empty() { return_value = Some(ProtocolsHandlerEvent::OutboundSubstreamRequest { - upgrade: self.protocol.clone(), + protocol: SubstreamProtocol::new(self.protocol.clone()), info: (), }); ProtocolState::Opening { @@ -746,7 +747,7 @@ where } state.pending_messages.push(message); self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { - upgrade: self.protocol.clone(), + protocol: SubstreamProtocol::new(self.protocol.clone()), info: () }); } @@ -771,7 +772,7 @@ where } state.pending_messages.push(message); self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { - upgrade: self.protocol.clone(), + protocol: SubstreamProtocol::new(self.protocol.clone()), info: () }); } @@ -793,8 +794,8 @@ where TSubstream: AsyncRead + AsyncWrite, TMessage: CustomMessage { type OutboundProtocol = RegisteredProtocol; type OutboundOpenInfo = (); - fn listen_protocol(&self) -> Self::InboundProtocol { - self.protocol.clone() + fn listen_protocol(&self) -> SubstreamProtocol { + SubstreamProtocol::new(self.protocol.clone()) } fn inject_fully_negotiated_inbound( @@ -845,13 +846,13 @@ where TSubstream: AsyncRead + AsyncWrite, TMessage: CustomMessage { ProtocolState::Init { .. } | ProtocolState::Opening { .. } => {} ProtocolState::BackCompat { .. } | ProtocolState::Normal { .. } => keep_forever = true, - ProtocolState::Disabled { .. } | ProtocolState::Poisoned => return KeepAlive::Now, + ProtocolState::Disabled { .. } | ProtocolState::Poisoned => return KeepAlive::No, } if keep_forever { - KeepAlive::Forever + KeepAlive::Yes } else { - KeepAlive::Now + KeepAlive::No } } diff --git a/core/network-libp2p/src/service_task.rs b/core/network-libp2p/src/service_task.rs index d9d65e6af8..af05d92092 100644 --- a/core/network-libp2p/src/service_task.rs +++ b/core/network-libp2p/src/service_task.rs @@ -22,7 +22,7 @@ use crate::custom_proto::{CustomMessage, RegisteredProtocol}; use crate::{NetworkConfiguration, NonReservedPeerMode, parse_str_addr}; use fnv::FnvHashMap; use futures::{prelude::*, Stream}; -use libp2p::{multiaddr::Protocol, Multiaddr, core::swarm::NetworkBehaviour, PeerId}; +use libp2p::{Multiaddr, core::swarm::NetworkBehaviour, PeerId}; use libp2p::core::{Swarm, nodes::Substream, transport::boxed::Boxed, muxing::StreamMuxerBox}; use libp2p::core::nodes::ConnectedPoint; use log::{debug, info, warn}; @@ -84,6 +84,7 @@ where TMessage: CustomMessage + Send + 'static { let local_identity = config.node_key.clone().into_keypair()?; let local_public = local_identity.public(); let local_peer_id = local_public.clone().into_peer_id(); + info!(target: "sub-libp2p", "Local node identity is: {}", local_peer_id.to_base58()); // Build the swarm. let (mut swarm, bandwidth) = { @@ -95,12 +96,8 @@ where TMessage: CustomMessage + Send + 'static { // Listen on multiaddresses. for addr in &config.listen_addresses { - match Swarm::listen_on(&mut swarm, addr.clone()) { - Ok(mut new_addr) => { - new_addr.append(Protocol::P2p(local_peer_id.clone().into())); - info!(target: "sub-libp2p", "Local node address is: {}", new_addr); - }, - Err(err) => warn!(target: "sub-libp2p", "Can't listen on {} because: {:?}", addr, err) + if let Err(err) = Swarm::listen_on(&mut swarm, addr.clone()) { + warn!(target: "sub-libp2p", "Can't listen on {} because: {:?}", addr, err) } } diff --git a/core/network-libp2p/tests/test.rs b/core/network-libp2p/tests/test.rs index c90f9850dd..b335b7c46b 100644 --- a/core/network-libp2p/tests/test.rs +++ b/core/network-libp2p/tests/test.rs @@ -17,29 +17,35 @@ use futures::{future, stream, prelude::*, try_ready}; use rand::seq::SliceRandom; use std::io; -use substrate_network_libp2p::{CustomMessage, multiaddr::Protocol, ServiceEvent, build_multiaddr}; +use substrate_network_libp2p::{CustomMessage, Multiaddr, multiaddr::Protocol, ServiceEvent, build_multiaddr}; /// Builds two services. The second one and further have the first one as its bootstrap node. /// This is to be used only for testing, and a panic will happen if something goes wrong. -fn build_nodes(num: usize) -> Vec> +fn build_nodes(num: usize, base_port: u16) -> Vec> where TMsg: CustomMessage + Send + 'static { let mut result: Vec> = Vec::with_capacity(num); + let mut first_addr = None::; - for _ in 0 .. num { + for index in 0 .. num { let mut boot_nodes = Vec::new(); - if !result.is_empty() { - let mut bootnode = result[0].listeners().next().unwrap().clone(); - bootnode.append(Protocol::P2p(result[0].peer_id().clone().into())); - boot_nodes.push(bootnode.to_string()); + + if let Some(first_addr) = first_addr.as_ref() { + boot_nodes.push(first_addr.clone() + .with(Protocol::P2p(result[0].peer_id().clone().into())) + .to_string()); } let config = substrate_network_libp2p::NetworkConfiguration { - listen_addresses: vec![build_multiaddr![Ip4([127, 0, 0, 1]), Tcp(0u16)]], + listen_addresses: vec![build_multiaddr![Ip4([127, 0, 0, 1]), Tcp(base_port + index as u16)]], boot_nodes, ..substrate_network_libp2p::NetworkConfiguration::default() }; + if first_addr.is_none() { + first_addr = Some(config.listen_addresses.iter().next().unwrap().clone()); + } + let proto = substrate_network_libp2p::RegisteredProtocol::new(&b"tst"[..], &[1]); result.push(substrate_network_libp2p::start_service(config, proto).unwrap().0); } @@ -50,7 +56,7 @@ fn build_nodes(num: usize) -> Vec> #[test] fn basic_two_nodes_connectivity() { let (mut service1, mut service2) = { - let mut l = build_nodes::>(2).into_iter(); + let mut l = build_nodes::>(2, 50400).into_iter(); let a = l.next().unwrap(); let b = l.next().unwrap(); (a, b) @@ -90,7 +96,7 @@ fn two_nodes_transfer_lots_of_packets() { const NUM_PACKETS: u32 = 5000; let (mut service1, mut service2) = { - let mut l = build_nodes::>(2).into_iter(); + let mut l = build_nodes::>(2, 50450).into_iter(); let a = l.next().unwrap(); let b = l.next().unwrap(); (a, b) @@ -138,7 +144,7 @@ fn many_nodes_connectivity() { // increased in the `NetworkConfiguration`. const NUM_NODES: usize = 25; - let mut futures = build_nodes::>(NUM_NODES) + let mut futures = build_nodes::>(NUM_NODES, 50500) .into_iter() .map(move |mut node| { let mut num_connecs = 0; @@ -194,7 +200,7 @@ fn many_nodes_connectivity() { #[test] fn basic_two_nodes_requests_in_parallel() { let (mut service1, mut service2) = { - let mut l = build_nodes::<(Option, Vec)>(2).into_iter(); + let mut l = build_nodes::<(Option, Vec)>(2, 50550).into_iter(); let a = l.next().unwrap(); let b = l.next().unwrap(); (a, b) diff --git a/core/network/src/service.rs b/core/network/src/service.rs index d7d2da494c..f9e827b4ab 100644 --- a/core/network/src/service.rs +++ b/core/network/src/service.rs @@ -24,7 +24,7 @@ use futures::{Async, Future, Stream, stream, sync::oneshot, sync::mpsc}; use parking_lot::{Mutex, RwLock}; use network_libp2p::{ProtocolId, NetworkConfiguration, Severity}; use network_libp2p::{start_service, parse_str_addr, Service as NetworkService, ServiceEvent as NetworkServiceEvent}; -use network_libp2p::{multiaddr, RegisteredProtocol, NetworkState}; +use network_libp2p::{RegisteredProtocol, NetworkState}; use peerset::PeersetHandle; use consensus::import_queue::{ImportQueue, Link}; use runtime_primitives::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; @@ -370,8 +370,6 @@ pub trait ManageNetwork { fn remove_reserved_peer(&self, peer: PeerId); /// Add reserved peer fn add_reserved_peer(&self, peer: String) -> Result<(), String>; - /// Returns a user-friendly identifier of our node. - fn node_id(&self) -> Option; } impl> ManageNetwork for Service { @@ -393,19 +391,6 @@ impl> ManageNetwork for Service self.network.lock().add_known_address(peer_id, addr); Ok(()) } - - fn node_id(&self) -> Option { - let network = self.network.lock(); - let ret = network - .listeners() - .next() - .map(|addr| { - let mut addr = addr.clone(); - addr.append(multiaddr::Protocol::P2p(network.peer_id().clone().into())); - addr.to_string() - }); - ret - } } diff --git a/core/peerset/Cargo.toml b/core/peerset/Cargo.toml index 21d6bff69f..ed350378e5 100644 --- a/core/peerset/Cargo.toml +++ b/core/peerset/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] futures = "0.1" -libp2p = { version = "0.6.0", default-features = false } +libp2p = { version = "0.7.0", default-features = false } linked-hash-map = "0.5" log = "0.4" lru-cache = "0.1.2" diff --git a/core/service/test/src/lib.rs b/core/service/test/src/lib.rs index 2d382c8ffa..29be6cec21 100644 --- a/core/service/test/src/lib.rs +++ b/core/service/test/src/lib.rs @@ -34,7 +34,7 @@ use service::{ Roles, FactoryExtrinsic, }; -use network::{multiaddr, SyncProvider, ManageNetwork}; +use network::{multiaddr, Multiaddr, SyncProvider, ManageNetwork}; use network::config::{NetworkConfiguration, NodeKeyConfig, Secret, NonReservedPeerMode}; use sr_primitives::traits::As; use sr_primitives::generic::BlockId; @@ -42,8 +42,8 @@ use consensus::{ImportBlock, BlockImport}; struct TestNet { runtime: Runtime, - authority_nodes: Vec<(u32, Arc)>, - full_nodes: Vec<(u32, Arc)>, + authority_nodes: Vec<(u32, Arc, Multiaddr)>, + full_nodes: Vec<(u32, Arc, Multiaddr)>, _light_nodes: Vec<(u32, Arc)>, chain_spec: FactoryChainSpec, base_port: u16, @@ -54,7 +54,7 @@ impl TestNet { pub fn run_until_all_full bool + 'static>(&mut self, predicate: P) { let full_nodes = self.full_nodes.clone(); let interval = Interval::new_interval(Duration::from_millis(100)).map_err(|_| ()).for_each(move |_| { - if full_nodes.iter().all(|&(ref id, ref service)| predicate(*id, service)) { + if full_nodes.iter().all(|&(ref id, ref service, _)| predicate(*id, service)) { Err(()) } else { Ok(()) @@ -152,16 +152,24 @@ impl TestNet { let base_port = self.base_port; let spec = self.chain_spec.clone(); let executor = self.runtime.executor(); - self.authority_nodes.extend(authorities.iter().enumerate().map(|(index, key)| ((index + nodes) as u32, - Arc::new(F::new_full(node_config::(index as u32, &spec, Roles::AUTHORITY, Some(key.clone()), base_port, &temp), executor.clone()) - .expect("Error creating test node service"))) - )); + self.authority_nodes.extend(authorities.iter().enumerate().map(|(index, key)| { + let node_config = node_config::(index as u32, &spec, Roles::AUTHORITY, Some(key.clone()), base_port, &temp); + let addr = node_config.network.listen_addresses.iter().next().unwrap().clone(); + let service = Arc::new(F::new_full(node_config, executor.clone()) + .expect("Error creating test node service")); + let addr = addr.with(multiaddr::Protocol::P2p(service.network().local_peer_id().into())); + ((index + nodes) as u32, service, addr) + })); nodes += authorities.len(); - self.full_nodes.extend((nodes..nodes + full as usize).map(|index| (index as u32, - Arc::new(F::new_full(node_config::(index as u32, &spec, Roles::FULL, None, base_port, &temp), executor.clone()) - .expect("Error creating test node service"))) - )); + self.full_nodes.extend((nodes..nodes + full as usize).map(|index| { + let node_config = node_config::(index as u32, &spec, Roles::FULL, None, base_port, &temp); + let addr = node_config.network.listen_addresses.iter().next().unwrap().clone(); + let service = Arc::new(F::new_full(node_config, executor.clone()) + .expect("Error creating test node service")); + let addr = addr.with(multiaddr::Protocol::P2p(service.network().local_peer_id().into())); + (index as u32, service, addr) + })); nodes += full as usize; self._light_nodes.extend((nodes..nodes + light as usize).map(|index| (index as u32, @@ -180,9 +188,9 @@ pub fn connectivity(spec: FactoryChainSpec) { let runtime = { let mut network = TestNet::::new(&temp, spec.clone(), NUM_NODES, 0, vec![], 30400); info!("Checking star topology"); - let first_address = network.full_nodes[0].1.network().node_id().expect("No node address"); - for (_, service) in network.full_nodes.iter().skip(1) { - service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer"); + let first_address = network.full_nodes[0].2.clone(); + for (_, service, _) in network.full_nodes.iter().skip(1) { + service.network().add_reserved_peer(first_address.to_string()).expect("Error adding reserved peer"); } network.run_until_all_full(|_index, service| service.network().peers().len() == NUM_NODES as usize - 1 @@ -199,10 +207,10 @@ pub fn connectivity(spec: FactoryChainSpec) { { let mut network = TestNet::::new(&temp, spec, NUM_NODES, 0, vec![], 30400); info!("Checking linked topology"); - let mut address = network.full_nodes[0].1.network().node_id().expect("No node address"); - for (_, service) in network.full_nodes.iter().skip(1) { - service.network().add_reserved_peer(address.clone()).expect("Error adding reserved peer"); - address = service.network().node_id().expect("No node address"); + let mut address = network.full_nodes[0].2.clone(); + for (_, service, node_id) in network.full_nodes.iter().skip(1) { + service.network().add_reserved_peer(address.to_string()).expect("Error adding reserved peer"); + address = node_id.clone(); } network.run_until_all_full(|_index, service| { service.network().peers().len() == NUM_NODES as usize - 1 @@ -232,11 +240,11 @@ where let import_data = block_factory(&first_service); first_service.client().import_block(import_data, HashMap::new()).expect("Error importing test block"); } - first_service.network().node_id().unwrap() + network.full_nodes[0].2.clone() }; info!("Running sync"); - for (_, service) in network.full_nodes.iter().skip(1) { - service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer"); + for (_, service, _) in network.full_nodes.iter().skip(1) { + service.network().add_reserved_peer(first_address.to_string()).expect("Error adding reserved peer"); } network.run_until_all_full(|_index, service| service.client().info().unwrap().chain.best_number == As::sa(NUM_BLOCKS as u64) @@ -259,20 +267,20 @@ pub fn consensus(spec: FactoryChainSpec, authorities: Vec) let temp = TempDir::new("substrate-conensus-test").expect("Error creating test dir"); let mut network = TestNet::::new(&temp, spec.clone(), NUM_NODES / 2, 0, authorities, 30600); info!("Checking consensus"); - let first_address = network.authority_nodes[0].1.network().node_id().unwrap(); - for (_, service) in network.full_nodes.iter() { - service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer"); + let first_address = network.authority_nodes[0].2.clone(); + for (_, service, _) in network.full_nodes.iter() { + service.network().add_reserved_peer(first_address.to_string()).expect("Error adding reserved peer"); } - for (_, service) in network.authority_nodes.iter().skip(1) { - service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer"); + for (_, service, _) in network.authority_nodes.iter().skip(1) { + service.network().add_reserved_peer(first_address.to_string()).expect("Error adding reserved peer"); } network.run_until_all_full(|_index, service| { service.client().info().unwrap().chain.finalized_number >= As::sa(NUM_BLOCKS / 2) }); info!("Adding more peers"); network.insert_nodes(&temp, NUM_NODES / 2, 0, vec![]); - for (_, service) in network.full_nodes.iter() { - service.network().add_reserved_peer(first_address.clone()).expect("Error adding reserved peer"); + for (_, service, _) in network.full_nodes.iter() { + service.network().add_reserved_peer(first_address.to_string()).expect("Error adding reserved peer"); } network.run_until_all_full(|_index, service| service.client().info().unwrap().chain.finalized_number >= As::sa(NUM_BLOCKS) diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index 1b99472452..bff3e79986 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -82,6 +82,16 @@ dependencies = [ "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "atty" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.2" @@ -199,6 +209,11 @@ name = "bs58" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bumpalo" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byte-tools" version = "0.2.0" @@ -228,6 +243,11 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cc" version = "1.0.30" @@ -501,6 +521,18 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "env_logger" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "environmental" version = "1.0.1" @@ -611,6 +643,11 @@ dependencies = [ "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "generic-array" version = "0.8.3" @@ -628,6 +665,26 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hash-db" version = "0.12.2" @@ -727,6 +784,14 @@ name = "httparse" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "idna" version = "0.1.5" @@ -773,6 +838,14 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "keccak" version = "0.1.0" @@ -813,29 +886,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libp2p" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -847,7 +920,7 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -860,7 +933,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -882,7 +955,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -891,20 +964,20 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-floodsub" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -912,7 +985,7 @@ dependencies = [ "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -923,15 +996,15 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -944,7 +1017,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -954,11 +1027,9 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -973,16 +1044,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -994,13 +1065,13 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1010,13 +1081,13 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1028,15 +1099,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1047,22 +1118,22 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ratelimit" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1070,7 +1141,7 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1079,29 +1150,34 @@ dependencies = [ "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-tcp" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1109,26 +1185,26 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-yamux" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1286,6 +1362,15 @@ name = "nohash-hasher" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -1307,6 +1392,11 @@ dependencies = [ "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "once_cell" version = "0.1.8" @@ -1389,12 +1479,13 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1760,6 +1851,14 @@ name = "redox_syscall" version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex" version = "1.1.2" @@ -1896,6 +1995,11 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.89" @@ -2031,6 +2135,11 @@ dependencies = [ "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "spin" version = "0.5.0" @@ -2335,7 +2444,7 @@ dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2559,6 +2668,25 @@ name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "0.3.6" @@ -2917,11 +3045,89 @@ name = "vcpkg" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wasmi" version = "0.4.3" @@ -2932,6 +3138,27 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "web-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -2956,11 +3183,28 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws" version = "0.7.9" @@ -3000,7 +3244,7 @@ dependencies = [ [[package]] name = "yamux" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3029,6 +3273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9893d63fc3b1c44231e667da6836a33f27d8b6b3bdc82f83da5dfd579d1b6528" "checksum asn1_der_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e7f92edafad155aff997fa5b727c6429b91e996b5a5d62a2b0adbae1306b5fe" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" @@ -3044,11 +3289,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" "checksum bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0de79cfb98e7aa9988188784d8664b4b5dad6eaaa0863b91d9a4ed871d4f7a42" +"checksum bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4639720be048090544634e0402490838995ccdc9d2fe648f528f30d3c33ae71f" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "d01c69d08ff207f231f07196e30f84c70f1c815b04f980f8b7b01ff01f05eb92" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" @@ -3081,6 +3328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" @@ -3096,8 +3344,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" +"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" "checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" @@ -3111,35 +3362,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" "checksum integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea155abb3ba6f382a75f1418988c05fe82959ed9ce727de427f9cfd425b0c903" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" -"checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" -"checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" -"checksum libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "debea88a3d5de9fdaf7082bd6d238f2c4c6a0420f14bdf9e1c1083b3e7c69286" -"checksum libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350d0018af3668d954f61ce7311e7d64ab7c40f19a8eb895e4750efe24c3455f" -"checksum libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfbcf36cc58ad5d0252d8ebe9c1a87190693fe2cdbe40fb01d8046779f9a75ad" -"checksum libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82e98435973e958d7dea3f5074d7fca53d0dfce2e1ac6924119a21c2991fe443" -"checksum libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92bb0153418eaf0ea549008d1e22748a956c9c36af9374fbe7189d44607c14be" -"checksum libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc915d0cde68a05d26a0dcb125eddce7dd2a425e97c5172ac300c1ee8716f55a" -"checksum libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "355bb370dd12809792dc020638b280e7aaf8625318018abd311c51affd0a612d" -"checksum libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e86291401f4a83f9fa81c03f8a7ccf0b03ce6aaa40cba058a7ec1026a65a6fe4" -"checksum libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3277f1f7eaadf5cdde6a76fb4afbf24e0eda6e2b04f288f526c6fa2e4293a6e" -"checksum libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4842a7ab54c12459b58b9e59cbeb03e3e1fd393fef48079472856f934352772" -"checksum libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32ba52ee76aaa94af533526ce5a22fbfcc69a560174fccee82f4cdb557411d33" -"checksum libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00f416e1e3d0214bd7df2be2b6be8ef61771d44292b973c9e02bfbbd7f62fe46" -"checksum libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af47af9997d69fc70aa13e6e7cd0d766614ebe74005e69e763221a64d9a0a5ef" -"checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" -"checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" +"checksum libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0231edab431064b30b7749484a39735eb36492cef4658c372c9059e58c3003aa" +"checksum libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a3bad2ed26297112847678683dd221473a0d44297250b61f004e1b35e72493" +"checksum libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f765f103b680cbed910b02bfdbdcfce5b1142899c93e51acb960bf59b6f81b1" +"checksum libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b129d20cc8cbb6ce5da8361045649c024659173e246c5dfbf20ae06071c046a" +"checksum libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70d68816b8435d6788399416eb2f0a6974fb1d15c4be5c30141f87c8e81746df" +"checksum libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "718ca645a065fd70855ca6042a7df686c24cd21add750c37a82c811fbd1e5c43" +"checksum libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe27c623a6a720efd5d704347838972062f89149a9c3cd149748da60bdcd3e0" +"checksum libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9bc1a5d85f4812cae6367b49a432763fe28997bac7c530dc55b70ec18a78aa7" +"checksum libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe5a858342a1cc89464474f7edc4bae1da649b9c823a3e04d9fb494493601746" +"checksum libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc6b5185c50a52a12e7bbe2ee7799059e24de4e52ab25edbfd26c8ab8515d317" +"checksum libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7905c1431ad115bee83405770629a27d6f17153ad02ec9670a7347998ef20e22" +"checksum libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc17626763ded57da8fed73187c2d9f6ebb89d30838673c430315bf560c7e4db" +"checksum libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2409d08b809ab1a74269597f7da2829d117cc11b9ed3343af33fc20831619726" +"checksum libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258cdc6742945c8f6402997bbbf36733588e2db18e5a0014da6d46e3ccfb92cf" +"checksum libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b5691e2ba2720d42bd1e93d6b90239fa9235c1956ef6a5f1dd499a7ae2767be" +"checksum libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ab0b9ca050105fd94229c48911c0c84aef4d6b86a53d1b6df81d938354e47e" +"checksum libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6ff51a5b2056bacee1c9f2ed8455cdf3c5c619261ddb4efc783119130aaf52" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" @@ -3157,9 +3410,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)" = "84321fb9004c3bce5611188a644d6171f895fa2889d155927d528782edb21c5d" @@ -3169,7 +3424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" -"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" +"checksum parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a130a727008cfcd1068a28439fe939897ccad28664422aeca65b384d6de6d0" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" @@ -3210,6 +3465,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" @@ -3225,6 +3481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum secp256k1 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4070f3906e65249228094cf97b04a90799fba04468190bbbcfa812309cf86e32" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" "checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" "checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" @@ -3239,6 +3496,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" @@ -3256,6 +3514,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" @@ -3292,15 +3552,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ffde3534e5fa6fd936e3260cd62cd644b8656320e369388f9303c955895e35d4" +"checksum wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "40c0543374a7ae881cdc5d32d19de28d1d1929e92263ffa7e31712cc2d53f9f1" +"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d" +"checksum wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "f914c94c2c5f4c9364510ca2429e59c92157ec89429243bcc245e983db990a71" +"checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385" +"checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe" +"checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4" +"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" -"checksum yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" +"checksum yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9073f5dbc901abb0b2ec4f866e726fed2f54953bdf81f8a5fde7762b7cc3b3" "checksum zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ddfeb6eee2fb3b262ef6e0898a52b7563bb8e0d5955a313b3cf2f808246ea14" diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 99fc275c0a..54d7822c75 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -82,6 +82,16 @@ dependencies = [ "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "atty" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.2" @@ -199,6 +209,11 @@ name = "bs58" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bumpalo" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byte-tools" version = "0.2.0" @@ -228,6 +243,11 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cc" version = "1.0.31" @@ -501,6 +521,18 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "env_logger" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "environmental" version = "1.0.1" @@ -611,6 +643,11 @@ dependencies = [ "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "generic-array" version = "0.8.3" @@ -628,6 +665,26 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hash-db" version = "0.12.2" @@ -727,6 +784,14 @@ name = "httparse" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "idna" version = "0.1.5" @@ -773,6 +838,14 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "keccak" version = "0.1.0" @@ -813,29 +886,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libp2p" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -847,7 +920,7 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -860,7 +933,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -882,7 +955,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -891,20 +964,20 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-floodsub" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -912,7 +985,7 @@ dependencies = [ "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -923,15 +996,15 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -944,7 +1017,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -954,11 +1027,9 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -973,16 +1044,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -994,13 +1065,13 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1010,13 +1081,13 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1028,15 +1099,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1047,22 +1118,22 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ratelimit" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1070,7 +1141,7 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1079,29 +1150,34 @@ dependencies = [ "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-tcp" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1109,26 +1185,26 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-yamux" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1320,6 +1396,15 @@ name = "nohash-hasher" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -1341,6 +1426,11 @@ dependencies = [ "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "once_cell" version = "0.1.8" @@ -1423,12 +1513,13 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1794,6 +1885,14 @@ name = "redox_syscall" version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex" version = "1.1.2" @@ -1930,6 +2029,11 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.89" @@ -2065,6 +2169,11 @@ dependencies = [ "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "spin" version = "0.5.0" @@ -2493,7 +2602,7 @@ dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2682,6 +2791,25 @@ name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "0.3.6" @@ -3040,11 +3168,89 @@ name = "vcpkg" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wasmi" version = "0.4.3" @@ -3055,6 +3261,27 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "web-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -3079,11 +3306,28 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws" version = "0.7.9" @@ -3123,7 +3367,7 @@ dependencies = [ [[package]] name = "yamux" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3152,6 +3396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9893d63fc3b1c44231e667da6836a33f27d8b6b3bdc82f83da5dfd579d1b6528" "checksum asn1_der_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e7f92edafad155aff997fa5b727c6429b91e996b5a5d62a2b0adbae1306b5fe" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" @@ -3167,11 +3412,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" "checksum bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0de79cfb98e7aa9988188784d8664b4b5dad6eaaa0863b91d9a4ed871d4f7a42" +"checksum bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4639720be048090544634e0402490838995ccdc9d2fe648f528f30d3c33ae71f" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ce8bb087aacff865633f0bd5aeaed910fe2fe55b55f4739527f2e023a2e53d" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" @@ -3204,6 +3451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" @@ -3219,8 +3467,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" +"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" "checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" @@ -3234,35 +3485,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" "checksum integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea155abb3ba6f382a75f1418988c05fe82959ed9ce727de427f9cfd425b0c903" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" -"checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" -"checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" -"checksum libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "debea88a3d5de9fdaf7082bd6d238f2c4c6a0420f14bdf9e1c1083b3e7c69286" -"checksum libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350d0018af3668d954f61ce7311e7d64ab7c40f19a8eb895e4750efe24c3455f" -"checksum libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfbcf36cc58ad5d0252d8ebe9c1a87190693fe2cdbe40fb01d8046779f9a75ad" -"checksum libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82e98435973e958d7dea3f5074d7fca53d0dfce2e1ac6924119a21c2991fe443" -"checksum libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92bb0153418eaf0ea549008d1e22748a956c9c36af9374fbe7189d44607c14be" -"checksum libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc915d0cde68a05d26a0dcb125eddce7dd2a425e97c5172ac300c1ee8716f55a" -"checksum libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "355bb370dd12809792dc020638b280e7aaf8625318018abd311c51affd0a612d" -"checksum libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e86291401f4a83f9fa81c03f8a7ccf0b03ce6aaa40cba058a7ec1026a65a6fe4" -"checksum libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3277f1f7eaadf5cdde6a76fb4afbf24e0eda6e2b04f288f526c6fa2e4293a6e" -"checksum libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4842a7ab54c12459b58b9e59cbeb03e3e1fd393fef48079472856f934352772" -"checksum libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32ba52ee76aaa94af533526ce5a22fbfcc69a560174fccee82f4cdb557411d33" -"checksum libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00f416e1e3d0214bd7df2be2b6be8ef61771d44292b973c9e02bfbbd7f62fe46" -"checksum libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af47af9997d69fc70aa13e6e7cd0d766614ebe74005e69e763221a64d9a0a5ef" -"checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" -"checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" +"checksum libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0231edab431064b30b7749484a39735eb36492cef4658c372c9059e58c3003aa" +"checksum libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a3bad2ed26297112847678683dd221473a0d44297250b61f004e1b35e72493" +"checksum libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f765f103b680cbed910b02bfdbdcfce5b1142899c93e51acb960bf59b6f81b1" +"checksum libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b129d20cc8cbb6ce5da8361045649c024659173e246c5dfbf20ae06071c046a" +"checksum libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70d68816b8435d6788399416eb2f0a6974fb1d15c4be5c30141f87c8e81746df" +"checksum libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "718ca645a065fd70855ca6042a7df686c24cd21add750c37a82c811fbd1e5c43" +"checksum libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe27c623a6a720efd5d704347838972062f89149a9c3cd149748da60bdcd3e0" +"checksum libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9bc1a5d85f4812cae6367b49a432763fe28997bac7c530dc55b70ec18a78aa7" +"checksum libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe5a858342a1cc89464474f7edc4bae1da649b9c823a3e04d9fb494493601746" +"checksum libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc6b5185c50a52a12e7bbe2ee7799059e24de4e52ab25edbfd26c8ab8515d317" +"checksum libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7905c1431ad115bee83405770629a27d6f17153ad02ec9670a7347998ef20e22" +"checksum libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc17626763ded57da8fed73187c2d9f6ebb89d30838673c430315bf560c7e4db" +"checksum libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2409d08b809ab1a74269597f7da2829d117cc11b9ed3343af33fc20831619726" +"checksum libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258cdc6742945c8f6402997bbbf36733588e2db18e5a0014da6d46e3ccfb92cf" +"checksum libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b5691e2ba2720d42bd1e93d6b90239fa9235c1956ef6a5f1dd499a7ae2767be" +"checksum libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ab0b9ca050105fd94229c48911c0c84aef4d6b86a53d1b6df81d938354e47e" +"checksum libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6ff51a5b2056bacee1c9f2ed8455cdf3c5c619261ddb4efc783119130aaf52" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" @@ -3280,9 +3533,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)" = "84321fb9004c3bce5611188a644d6171f895fa2889d155927d528782edb21c5d" @@ -3292,7 +3547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" -"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" +"checksum parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a130a727008cfcd1068a28439fe939897ccad28664422aeca65b384d6de6d0" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" @@ -3333,6 +3588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" @@ -3348,6 +3604,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum secp256k1 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4070f3906e65249228094cf97b04a90799fba04468190bbbcfa812309cf86e32" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" "checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" "checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" @@ -3362,6 +3619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" @@ -3379,6 +3637,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" @@ -3415,15 +3675,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ffde3534e5fa6fd936e3260cd62cd644b8656320e369388f9303c955895e35d4" +"checksum wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "40c0543374a7ae881cdc5d32d19de28d1d1929e92263ffa7e31712cc2d53f9f1" +"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d" +"checksum wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "f914c94c2c5f4c9364510ca2429e59c92157ec89429243bcc245e983db990a71" +"checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385" +"checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe" +"checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4" +"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" -"checksum yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" +"checksum yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9073f5dbc901abb0b2ec4f866e726fed2f54953bdf81f8a5fde7762b7cc3b3" "checksum zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ddfeb6eee2fb3b262ef6e0898a52b7563bb8e0d5955a313b3cf2f808246ea14" diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 84b0d2d067..93d79d7dba 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -82,6 +82,16 @@ dependencies = [ "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "atty" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.2" @@ -199,6 +209,11 @@ name = "bs58" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bumpalo" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byte-tools" version = "0.2.0" @@ -228,6 +243,11 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "c_linked_list" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cc" version = "1.0.30" @@ -501,6 +521,18 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "env_logger" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "environmental" version = "1.0.1" @@ -611,6 +643,11 @@ dependencies = [ "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "generic-array" version = "0.8.3" @@ -628,6 +665,26 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "get_if_addrs" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "get_if_addrs-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hash-db" version = "0.12.2" @@ -727,6 +784,14 @@ name = "httparse" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "idna" version = "0.1.5" @@ -773,6 +838,14 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "keccak" version = "0.1.0" @@ -813,29 +886,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libp2p" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -847,7 +920,7 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -860,7 +933,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -882,7 +955,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -891,20 +964,20 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-floodsub" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -912,7 +985,7 @@ dependencies = [ "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -923,15 +996,15 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -944,7 +1017,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -954,11 +1027,9 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -973,16 +1044,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -994,13 +1065,13 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1010,13 +1081,13 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1028,15 +1099,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1047,22 +1118,22 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ratelimit" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1070,7 +1141,7 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1079,29 +1150,34 @@ dependencies = [ "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-tcp" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1109,26 +1185,26 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-yamux" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1343,6 +1419,15 @@ name = "nohash-hasher" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -1364,6 +1449,11 @@ dependencies = [ "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "once_cell" version = "0.1.8" @@ -1446,12 +1536,13 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1827,6 +1918,14 @@ name = "redox_syscall" version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex" version = "1.1.2" @@ -1963,6 +2062,11 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.89" @@ -2098,6 +2202,11 @@ dependencies = [ "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "spin" version = "0.5.0" @@ -2632,7 +2741,7 @@ dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2832,6 +2941,25 @@ name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "0.3.6" @@ -3190,11 +3318,89 @@ name = "vcpkg" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wasmi" version = "0.4.3" @@ -3214,6 +3420,27 @@ dependencies = [ "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "web-sys" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -3238,11 +3465,28 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws" version = "0.7.9" @@ -3282,7 +3526,7 @@ dependencies = [ [[package]] name = "yamux" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3311,6 +3555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9893d63fc3b1c44231e667da6836a33f27d8b6b3bdc82f83da5dfd579d1b6528" "checksum asn1_der_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e7f92edafad155aff997fa5b727c6429b91e996b5a5d62a2b0adbae1306b5fe" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" @@ -3326,11 +3571,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" "checksum bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0de79cfb98e7aa9988188784d8664b4b5dad6eaaa0863b91d9a4ed871d4f7a42" +"checksum bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4639720be048090544634e0402490838995ccdc9d2fe648f528f30d3c33ae71f" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cc 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "d01c69d08ff207f231f07196e30f84c70f1c815b04f980f8b7b01ff01f05eb92" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" @@ -3363,6 +3610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" "checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" @@ -3378,8 +3626,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" +"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" "checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" @@ -3393,35 +3644,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" "checksum integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea155abb3ba6f382a75f1418988c05fe82959ed9ce727de427f9cfd425b0c903" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" -"checksum libp2p 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5b9cd37b1ca54fa2fd0bbf0486adf2f55f8994f2be9410b65265050b24709b2" -"checksum libp2p-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9c56e6f04cb649fdeb806e963d2da223e3ed17748d9e924fdb836c09f76307" -"checksum libp2p-core-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "debea88a3d5de9fdaf7082bd6d238f2c4c6a0420f14bdf9e1c1083b3e7c69286" -"checksum libp2p-dns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350d0018af3668d954f61ce7311e7d64ab7c40f19a8eb895e4750efe24c3455f" -"checksum libp2p-floodsub 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfbcf36cc58ad5d0252d8ebe9c1a87190693fe2cdbe40fb01d8046779f9a75ad" -"checksum libp2p-identify 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82e98435973e958d7dea3f5074d7fca53d0dfce2e1ac6924119a21c2991fe443" -"checksum libp2p-kad 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92bb0153418eaf0ea549008d1e22748a956c9c36af9374fbe7189d44607c14be" -"checksum libp2p-mdns 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc915d0cde68a05d26a0dcb125eddce7dd2a425e97c5172ac300c1ee8716f55a" -"checksum libp2p-mplex 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "355bb370dd12809792dc020638b280e7aaf8625318018abd311c51affd0a612d" -"checksum libp2p-noise 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e86291401f4a83f9fa81c03f8a7ccf0b03ce6aaa40cba058a7ec1026a65a6fe4" -"checksum libp2p-ping 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3277f1f7eaadf5cdde6a76fb4afbf24e0eda6e2b04f288f526c6fa2e4293a6e" -"checksum libp2p-plaintext 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4842a7ab54c12459b58b9e59cbeb03e3e1fd393fef48079472856f934352772" -"checksum libp2p-ratelimit 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32ba52ee76aaa94af533526ce5a22fbfcc69a560174fccee82f4cdb557411d33" -"checksum libp2p-secio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00f416e1e3d0214bd7df2be2b6be8ef61771d44292b973c9e02bfbbd7f62fe46" -"checksum libp2p-tcp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af47af9997d69fc70aa13e6e7cd0d766614ebe74005e69e763221a64d9a0a5ef" -"checksum libp2p-uds 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa72d81501aad6998d3b1b964f68f438ef99c3aaf54d921e144e0477fa87568" -"checksum libp2p-yamux 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbb8d08cb536a964727e77b868a026c6d92993f08e387d49163565575a478d9" +"checksum libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0231edab431064b30b7749484a39735eb36492cef4658c372c9059e58c3003aa" +"checksum libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a3bad2ed26297112847678683dd221473a0d44297250b61f004e1b35e72493" +"checksum libp2p-core-derive 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f765f103b680cbed910b02bfdbdcfce5b1142899c93e51acb960bf59b6f81b1" +"checksum libp2p-dns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b129d20cc8cbb6ce5da8361045649c024659173e246c5dfbf20ae06071c046a" +"checksum libp2p-floodsub 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70d68816b8435d6788399416eb2f0a6974fb1d15c4be5c30141f87c8e81746df" +"checksum libp2p-identify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "718ca645a065fd70855ca6042a7df686c24cd21add750c37a82c811fbd1e5c43" +"checksum libp2p-kad 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe27c623a6a720efd5d704347838972062f89149a9c3cd149748da60bdcd3e0" +"checksum libp2p-mdns 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9bc1a5d85f4812cae6367b49a432763fe28997bac7c530dc55b70ec18a78aa7" +"checksum libp2p-mplex 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe5a858342a1cc89464474f7edc4bae1da649b9c823a3e04d9fb494493601746" +"checksum libp2p-noise 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc6b5185c50a52a12e7bbe2ee7799059e24de4e52ab25edbfd26c8ab8515d317" +"checksum libp2p-ping 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7905c1431ad115bee83405770629a27d6f17153ad02ec9670a7347998ef20e22" +"checksum libp2p-plaintext 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc17626763ded57da8fed73187c2d9f6ebb89d30838673c430315bf560c7e4db" +"checksum libp2p-ratelimit 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2409d08b809ab1a74269597f7da2829d117cc11b9ed3343af33fc20831619726" +"checksum libp2p-secio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258cdc6742945c8f6402997bbbf36733588e2db18e5a0014da6d46e3ccfb92cf" +"checksum libp2p-tcp 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b5691e2ba2720d42bd1e93d6b90239fa9235c1956ef6a5f1dd499a7ae2767be" +"checksum libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ab0b9ca050105fd94229c48911c0c84aef4d6b86a53d1b6df81d938354e47e" +"checksum libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6ff51a5b2056bacee1c9f2ed8455cdf3c5c619261ddb4efc783119130aaf52" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" @@ -3439,9 +3692,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)" = "84321fb9004c3bce5611188a644d6171f895fa2889d155927d528782edb21c5d" @@ -3451,7 +3706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" -"checksum parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61ae6944d4435d41f4d0f12108c5cbb9207cbb14bc8f2b4984c6e930dc9c8e41" +"checksum parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a130a727008cfcd1068a28439fe939897ccad28664422aeca65b384d6de6d0" "checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" @@ -3493,6 +3748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" @@ -3508,6 +3764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum secp256k1 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4070f3906e65249228094cf97b04a90799fba04468190bbbcfa812309cf86e32" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" "checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" "checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" @@ -3522,6 +3779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" @@ -3539,6 +3797,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" @@ -3575,16 +3835,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ffde3534e5fa6fd936e3260cd62cd644b8656320e369388f9303c955895e35d4" +"checksum wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "40c0543374a7ae881cdc5d32d19de28d1d1929e92263ffa7e31712cc2d53f9f1" +"checksum wasm-bindgen-futures 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0ad171fc1f6e43f97d155d27f4ee5657bd8aa5cce7c497ef3a0a0c5b44618b2d" +"checksum wasm-bindgen-macro 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "f914c94c2c5f4c9364510ca2429e59c92157ec89429243bcc245e983db990a71" +"checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385" +"checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe" +"checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" "checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" +"checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4" +"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" -"checksum yamux 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "302defd1bed8a9a6d43b82f0e5a50510dfdfbbd02c270c93ff9d6f3f5e2dea89" +"checksum yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9073f5dbc901abb0b2ec4f866e726fed2f54953bdf81f8a5fde7762b7cc3b3" "checksum zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ddfeb6eee2fb3b262ef6e0898a52b7563bb8e0d5955a313b3cf2f808246ea14" -- GitLab From db3d589a1e416e605d9bb44c09446321ebbf5c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 23 Apr 2019 19:47:11 +0200 Subject: [PATCH 046/206] Configurable state cache size and enforce exact state cache size (#2314) * Allow configuring state cache size via cli * Track used cache size * Expose memory counter to informant * Enforce max cache size constraint exactly * Default to 64 MiB Co-Authored-By: cmichi * Remove self as parameter --- core/cli/src/informant.rs | 7 +++ core/cli/src/lib.rs | 1 + core/cli/src/params.rs | 4 ++ core/client/db/src/lib.rs | 17 +++-- core/client/db/src/storage_cache.rs | 98 ++++++++++++++++++++++++++--- core/client/src/backend.rs | 2 + core/client/src/in_mem.rs | 4 ++ core/client/src/light/backend.rs | 4 ++ core/service/src/components.rs | 2 + core/service/src/config.rs | 3 + core/service/test/src/lib.rs | 1 + 11 files changed, 131 insertions(+), 12 deletions(-) diff --git a/core/cli/src/informant.rs b/core/cli/src/informant.rs index 9047eb43cb..b78e9b0646 100644 --- a/core/cli/src/informant.rs +++ b/core/cli/src/informant.rs @@ -76,6 +76,12 @@ pub fn start(service: &Service, exit: ::exit_future::Exit, handle: TaskExe TransferRateFormat(bandwidth_upload), ); + let backend = (*client).backend(); + let used_state_cache_size = match backend.used_state_cache_size(){ + Some(size) => size, + None => 0, + }; + // get cpu usage and memory usage of this process let (cpu_usage, memory) = if sys.refresh_process(self_pid) { let proc = sys.get_process(self_pid).expect("Above refresh_process succeeds, this should be Some(), qed"); @@ -99,6 +105,7 @@ pub fn start(service: &Service, exit: ::exit_future::Exit, handle: TaskExe "finalized_hash" => ?info.chain.finalized_hash, "bandwidth_download" => bandwidth_download, "bandwidth_upload" => bandwidth_upload, + "used_state_cache_size" => used_state_cache_size, ); } else { warn!("Error getting best block information"); diff --git a/core/cli/src/lib.rs b/core/cli/src/lib.rs index 31a2427669..296e8e3c3f 100644 --- a/core/cli/src/lib.rs +++ b/core/cli/src/lib.rs @@ -404,6 +404,7 @@ where config.database_path = db_path(&base_path, config.chain_spec.id()).to_string_lossy().into(); config.database_cache_size = cli.database_cache_size; + config.state_cache_size = cli.state_cache_size; config.pruning = match cli.pruning { Some(ref s) if s == "archive" => PruningMode::ArchiveAll, None => PruningMode::default(), diff --git a/core/cli/src/params.rs b/core/cli/src/params.rs index 16279af15e..42d98bf7ed 100644 --- a/core/cli/src/params.rs +++ b/core/cli/src/params.rs @@ -313,6 +313,10 @@ pub struct RunCmd { #[structopt(long = "db-cache", value_name = "MiB")] pub database_cache_size: Option, + /// Specify the state cache size + #[structopt(long = "state-cache-size", value_name = "Bytes", default_value = "67108864")] + pub state_cache_size: usize, + /// Listen to all RPC interfaces (default is local) #[structopt(long = "rpc-external")] pub rpc_external: bool, diff --git a/core/client/db/src/lib.rs b/core/client/db/src/lib.rs index 483a4c0d8d..e730c0888d 100644 --- a/core/client/db/src/lib.rs +++ b/core/client/db/src/lib.rs @@ -65,7 +65,6 @@ use client::in_mem::Backend as InMemoryBackend; const CANONICALIZATION_DELAY: u64 = 4096; const MIN_BLOCKS_TO_KEEP_CHANGES_TRIES_FOR: u64 = 32768; -const STATE_CACHE_SIZE_BYTES: usize = 16 * 1024 * 1024; /// DB-backed patricia trie state, transaction type is an overlay of changes to commit. pub type DbState = state_machine::TrieBackend>, Blake2Hasher>; @@ -74,6 +73,8 @@ pub type DbState = state_machine::TrieBackend, + /// State cache size. + pub state_cache_size: usize, /// Path to the database. pub path: PathBuf, /// Pruning mode. @@ -543,7 +544,7 @@ impl> Backend { pub fn new(config: DatabaseSettings, canonicalization_delay: u64) -> Result { let db = open_database(&config, columns::META, "full")?; - Backend::from_kvdb(db as Arc<_>, config.pruning, canonicalization_delay) + Backend::from_kvdb(db as Arc<_>, config.pruning, canonicalization_delay, config.state_cache_size) } #[cfg(any(test, feature = "test-helpers"))] @@ -556,10 +557,11 @@ impl> Backend { db as Arc<_>, PruningMode::keep_blocks(keep_blocks), canonicalization_delay, + 16777216, ).expect("failed to create test-db") } - fn from_kvdb(db: Arc, pruning: PruningMode, canonicalization_delay: u64) -> Result { + fn from_kvdb(db: Arc, pruning: PruningMode, canonicalization_delay: u64, state_cache_size: usize) -> Result { let is_archive_pruning = pruning.is_archive(); let blockchain = BlockchainDb::new(db.clone())?; let meta = blockchain.meta.clone(); @@ -582,7 +584,7 @@ impl> Backend { changes_trie_config: Mutex::new(None), blockchain, canonicalization_delay, - shared_cache: new_shared_cache(STATE_CACHE_SIZE_BYTES), + shared_cache: new_shared_cache(state_cache_size), }) } @@ -1161,6 +1163,11 @@ impl client::backend::Backend for Backend whe &self.blockchain } + fn used_state_cache_size(&self) -> Option { + let used = (*&self.shared_cache).lock().used_storage_cache_size(); + Some(used) + } + fn state_at(&self, block: BlockId) -> Result { use client::blockchain::HeaderBackend as BcHeaderBackend; @@ -1319,7 +1326,7 @@ mod tests { db.storage.db.clone() }; - let backend = Backend::::from_kvdb(backing, PruningMode::keep_blocks(1), 0).unwrap(); + let backend = Backend::::from_kvdb(backing, PruningMode::keep_blocks(1), 0, 16777216).unwrap(); assert_eq!(backend.blockchain().info().unwrap().best_number, 9); for i in 0..10 { assert!(backend.blockchain().hash(i).unwrap().is_some()) diff --git a/core/client/db/src/storage_cache.rs b/core/client/db/src/storage_cache.rs index 6cfdbdd09b..439a749c85 100644 --- a/core/client/db/src/storage_cache.rs +++ b/core/client/db/src/storage_cache.rs @@ -39,17 +39,40 @@ pub struct Cache { /// Information on the modifications in recently committed blocks; specifically which keys /// changed in which block. Ordered by block number. modifications: VecDeque>, + /// Maximum cache size available, in Bytes. + shared_cache_size: usize, + /// Used storage size, in Bytes. + storage_used_size: usize, +} + +impl Cache { + /// Returns the used memory size of the storage cache in bytes. + pub fn used_storage_cache_size(&self) -> usize { + self.storage_used_size + } } pub type SharedCache = Arc>>; /// Create new shared cache instance with given max memory usage. pub fn new_shared_cache(shared_cache_size: usize) -> SharedCache { - let cache_items = shared_cache_size / 100; // Guestimate, potentially inaccurate + // we need to supply a max capacity to `LruCache`, but since + // we don't have any idea how large the size of each item + // that is stored will be we can't calculate the max amount + // of items properly from `shared_cache_size`. + // + // what we do instead is to supply `shared_cache_size` as the + // max upper bound capacity (this would only be reached if each + // item would be one byte). + // each time we store to the storage cache we verify the memory + // constraint and pop the lru item if space needs to be freed. + Arc::new(Mutex::new(Cache { - storage: LruCache::new(cache_items), - hashes: LruCache::new(cache_items), + storage: LruCache::new(shared_cache_size), + hashes: LruCache::new(shared_cache_size), modifications: VecDeque::new(), + shared_cache_size: shared_cache_size, + storage_used_size: 0, })) } @@ -109,6 +132,33 @@ impl, B: Block> CachingState { } } + fn storage_insert(cache: &mut Cache, k: StorageValue, v: Option) { + if let Some(v_) = &v { + while cache.storage_used_size + v_.len() > cache.shared_cache_size { + // pop until space constraint satisfied + match cache.storage.remove_lru() { + Some((_, Some(popped_v))) => + cache.storage_used_size = cache.storage_used_size - popped_v.len(), + Some((_, None)) => continue, + None => break, + }; + } + cache.storage_used_size = cache.storage_used_size + v_.len(); + } + cache.storage.insert(k, v); + } + + fn storage_remove( + storage: &mut LruCache>, + k: &StorageKey, + storage_used_size: &mut usize, + ) { + let v = storage.remove(k); + if let Some(Some(v_)) = v { + *storage_used_size = *storage_used_size - v_.len(); + } + } + /// Propagate local cache into the shared cache and synchronize /// the shared cache with the best block state. /// This function updates the shared cache by removing entries @@ -139,7 +189,7 @@ impl, B: Block> CachingState { m.is_canon = true; for a in &m.storage { trace!("Reverting enacted key {:?}", a); - cache.storage.remove(a); + CachingState::::storage_remove(&mut cache.storage, a, &mut cache.storage_used_size); } false } else { @@ -155,7 +205,7 @@ impl, B: Block> CachingState { m.is_canon = false; for a in &m.storage { trace!("Retracted key {:?}", a); - cache.storage.remove(a); + CachingState::::storage_remove(&mut cache.storage, a, &mut cache.storage_used_size); } false } else { @@ -178,7 +228,7 @@ impl, B: Block> CachingState { if is_best { trace!("Committing {} local, {} hashes, {} modified entries", local_cache.storage.len(), local_cache.hashes.len(), changes.len()); for (k, v) in local_cache.storage.drain() { - cache.storage.insert(k, v); + CachingState::::storage_insert(cache, k, v); } for (k, v) in local_cache.hashes.drain() { cache.hashes.insert(k, v); @@ -198,7 +248,7 @@ impl, B: Block> CachingState { modifications.insert(k.clone()); if is_best { cache.hashes.remove(&k); - cache.storage.insert(k, v); + CachingState::::storage_insert(cache, k, v); } } // Save modified storage. These are ordered by the block number. @@ -418,4 +468,38 @@ mod tests { let s = CachingState::new(InMemory::::default(), shared.clone(), Some(h3a.clone())); assert!(s.storage(&key).unwrap().is_none()); } + + #[test] + fn should_track_used_size_correctly() { + let root_parent = H256::random(); + let shared = new_shared_cache::(5); + let h0 = H256::random(); + + let mut s = CachingState::new(InMemory::::default(), shared.clone(), Some(root_parent.clone())); + + let key = H256::random()[..].to_vec(); + s.sync_cache(&[], &[], vec![(key.clone(), Some(vec![1, 2, 3]))], Some(h0.clone()), Some(0), || true); + assert_eq!(shared.lock().used_storage_cache_size(), 3 /* bytes */); + + let key = H256::random()[..].to_vec(); + s.sync_cache(&[], &[], vec![(key.clone(), Some(vec![1, 2]))], Some(h0.clone()), Some(0), || true); + assert_eq!(shared.lock().used_storage_cache_size(), 5 /* bytes */); + } + + #[test] + fn should_remove_lru_items_based_on_tracking_used_size() { + let root_parent = H256::random(); + let shared = new_shared_cache::(5); + let h0 = H256::random(); + + let mut s = CachingState::new(InMemory::::default(), shared.clone(), Some(root_parent.clone())); + + let key = H256::random()[..].to_vec(); + s.sync_cache(&[], &[], vec![(key.clone(), Some(vec![1, 2, 3, 4]))], Some(h0.clone()), Some(0), || true); + assert_eq!(shared.lock().used_storage_cache_size(), 4 /* bytes */); + + let key = H256::random()[..].to_vec(); + s.sync_cache(&[], &[], vec![(key.clone(), Some(vec![1, 2]))], Some(h0.clone()), Some(0), || true); + assert_eq!(shared.lock().used_storage_cache_size(), 2 /* bytes */); + } } diff --git a/core/client/src/backend.rs b/core/client/src/backend.rs index 8a6ffe4384..09faab1a12 100644 --- a/core/client/src/backend.rs +++ b/core/client/src/backend.rs @@ -141,6 +141,8 @@ pub trait Backend: AuxStore + Send + Sync where fn finalize_block(&self, block: BlockId, justification: Option) -> error::Result<()>; /// Returns reference to blockchain backend. fn blockchain(&self) -> &Self::Blockchain; + /// Returns the used state cache, if existent. + fn used_state_cache_size(&self) -> Option; /// Returns reference to changes trie storage. fn changes_trie_storage(&self) -> Option<&Self::ChangesTrieStorage>; /// Returns true if state for given block is available. diff --git a/core/client/src/in_mem.rs b/core/client/src/in_mem.rs index 5d436b0c89..f6b69287a4 100644 --- a/core/client/src/in_mem.rs +++ b/core/client/src/in_mem.rs @@ -651,6 +651,10 @@ where &self.blockchain } + fn used_state_cache_size(&self) -> Option { + None + } + fn changes_trie_storage(&self) -> Option<&Self::ChangesTrieStorage> { Some(&self.changes_trie_storage) } diff --git a/core/client/src/light/backend.rs b/core/client/src/light/backend.rs index b0e0aa3687..f22ee8a762 100644 --- a/core/client/src/light/backend.rs +++ b/core/client/src/light/backend.rs @@ -183,6 +183,10 @@ impl ClientBackend for Backend where &self.blockchain } + fn used_state_cache_size(&self) -> Option { + None + } + fn changes_trie_storage(&self) -> Option<&Self::ChangesTrieStorage> { None } diff --git a/core/service/src/components.rs b/core/service/src/components.rs index f451bff562..e9fb7c9b19 100644 --- a/core/service/src/components.rs +++ b/core/service/src/components.rs @@ -457,6 +457,7 @@ impl Components for FullComponents { { let db_settings = client_db::DatabaseSettings { cache_size: config.database_cache_size.map(|u| u as usize), + state_cache_size: config.state_cache_size, path: config.database_path.as_str().into(), pruning: config.pruning.clone(), }; @@ -532,6 +533,7 @@ impl Components for LightComponents { { let db_settings = client_db::DatabaseSettings { cache_size: None, + state_cache_size: config.state_cache_size, path: config.database_path.as_str().into(), pruning: config.pruning.clone(), }; diff --git a/core/service/src/config.rs b/core/service/src/config.rs index 6f0f5032e1..20134c788d 100644 --- a/core/service/src/config.rs +++ b/core/service/src/config.rs @@ -48,6 +48,8 @@ pub struct Configuration { pub database_path: String, /// Cache Size for internal database in MiB pub database_cache_size: Option, + /// Size of internal state cache in Bytes + pub state_cache_size: usize, /// Pruning settings. pub pruning: PruningMode, /// Additional key seeds. @@ -93,6 +95,7 @@ impl Configuration ( keystore_path: root.join("key").to_str().unwrap().into(), database_path: root.join("db").to_str().unwrap().into(), database_cache_size: None, + state_cache_size: 16777216, pruning: Default::default(), keys: keys, chain_spec: (*spec).clone(), -- GitLab From 9d154fdd434b1227477f77bcee8f3a96daca6584 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Tue, 23 Apr 2019 19:50:22 +0200 Subject: [PATCH 047/206] decl_storage doc (#2341) * doc * other doc cleanup and fixing links * one more typo --- srml/support/procedural/src/lib.rs | 66 ++++++++++++++++++------------ srml/support/src/hashable.rs | 1 + 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/srml/support/procedural/src/lib.rs b/srml/support/procedural/src/lib.rs index 342745efde..5db5c0bf60 100644 --- a/srml/support/procedural/src/lib.rs +++ b/srml/support/procedural/src/lib.rs @@ -41,64 +41,76 @@ use proc_macro::TokenStream; /// ``` /// /// Declaration is set with this header `(pub) trait Store for Module as Example` -/// with `Store` a (pub) trait generated associating each storage to the Module and -/// `as Example` setting the prefix used for storages of this module, it must be unique, -/// another module with same name and same inner storage name will conflict. +/// with `Store` a (pub) trait generated associating each storage to the `Module` and +/// `as Example` setting the prefix used for storages of this module. `Example` must be unique: +/// another module with same name and same inner storage item name will conflict. /// -/// Basic storage consist of a name and a type, supported types are: -/// * storage value: `Foo: type`: implements [StorageValue](https://crates.parity.io/srml_support/storage/trait.StorageValue.html) -/// * storage map: `Foo: map type => type`: implements [StorageMap](https://crates.parity.io/srml_support/storage/trait.StorageMap.html) -/// * storage linked map: `Foo: linked_map type => type`: implements [StorageMap](https://crates.parity.io/srml_support/storage/trait.StorageMap.html) and [EnumarableStorageMap](https://crates.parity.io/srml_support/storage/trait.EnumerableStorageMap.html) -/// * storage double map: Foo: double_map u32, $hash(u32) => u32;` implements `StorageDoubleMap` with hasher $hash one available in `Hashable` trait -/// /!\ be careful while choosing the Hash, indeed malicious could craft second keys to lower the trie. +/// Basic storage consists of a name and a type; supported types are: +/// +/// * Value: `Foo: type`: Implements [StorageValue](../srml_support/storage/trait.StorageValue.html). +/// * Map: `Foo: map type => type`: implements [StorageMap](../srml_support/storage/trait.StorageMap.html) +/// * Linked map: `Foo: linked_map type => type`: Implements [StorageMap](../srml_support/storage/trait.StorageMap.html) +/// and [EnumarableStorageMap](../srml_support/storage/trait.EnumerableStorageMap.html). +/// * Double map: `Foo: double_map u32, $hash(u32) => u32;`: Implements `StorageDoubleMap` with `$hash` representing a +/// choice of hashing algorithms available in [`Hashable` trait](../srml_support/trait.Hashable.html). +/// +/// /!\ Be careful when choosing the hash function, malicious actors could craft second keys to lower the trie. /// /// And it can be extended as such: /// /// `#vis #name get(#getter) config(#field_name) build(#closure): #type = #default;` -/// * `#vis`: set the visibility of the structure -/// * `#name`: name of the storage, used as a prefix in the storage -/// * [optional] `get(#getter)`: implements the function #getter to `Module` -/// * [optional] `config(#field_name)`: `field_name` is optional if get is set: include in `GenesisConfig` -/// * [optional] `build(#closure)`: closure called with storage overlays -/// * `#type`: storage type -/// * [optional] `#default`: value returned when none -/// -/// Storages are accessible in multiples ways, using: -/// * the structure: `Foo::` -/// * the `Store` trait structure: ` as Store>::Foo` -/// * the getter on the module which calls get on the structure: `Module::::foo()` +/// +/// * `#vis`: Set the visibility of the structure. `pub` or nothing. +/// * `#name`: Name of the storage item, used as a prefix in storage. +/// * [optional] `get(#getter)`: Implements the function #getter to `Module`. +/// * [optional] `config(#field_name)`: `field_name` is optional if get is set. +/// Will include the item in `GenesisConfig`. +/// * [optional] `build(#closure)`: Closure called with storage overlays. +/// * `#type`: Storage type. +/// * [optional] `#default`: Value returned when none. +/// +/// Storage items are accessible in multiple ways: +/// +/// * The structure: `Foo::` +/// * The `Store` trait structure: ` as Store>::Foo` +/// * The getter on the module that calls get on the structure: `Module::::foo()` /// /// ## GenesisConfig /// /// An optional `GenesisConfig` struct for storage initialization can be defined, either /// when at least one storage field requires default initialization -/// (both `get` and `config` or `build`), or specifically as in : +/// (both `get` and `config` or `build`), or specifically as in: +/// /// ```nocompile /// decl_storage! { /// trait Store for Module as Example { +/// +/// // Your storage items /// } /// add_extra_genesis { /// config(genesis_field): GenesisFieldType; /// config(genesis_field2): GenesisFieldType; /// ... /// build(|_: &mut StorageOverlay, _: &mut ChildrenStorageOverlay, _: &GenesisConfig| { -/// // Modification of storages +/// // Modification of storage /// }) /// } /// } /// ``` -/// This struct can be expose as `Config` by `decl_runtime` macro. +/// +/// This struct can be exposed as `Config` by the `decl_runtime!` macro. /// /// ### Module with instances /// -/// `decl_storage!` macro support building modules with instances with the following syntax: (DefaultInstance type -/// is optional) +/// The `decl_storage!` macro supports building modules with instances with the following syntax: +/// (`DefaultInstance` type is optional) +/// /// ```nocompile /// trait Store for Module, I: Instance=DefaultInstance> as Example {} /// ``` /// /// Then the genesis config is generated with two generic parameter `GenesisConfig` -/// and storages are now accessible using two generic parameters like: +/// and storage items are now accessible using two generic parameters, e.g.: /// `>::get()` or `Dummy::::get()` #[proc_macro] pub fn decl_storage(input: TokenStream) -> TokenStream { diff --git a/srml/support/src/hashable.rs b/srml/support/src/hashable.rs index 886c88b23a..9199a0958d 100644 --- a/srml/support/src/hashable.rs +++ b/srml/support/src/hashable.rs @@ -19,6 +19,7 @@ use crate::codec::Codec; use runtime_io::{blake2_256, twox_128, twox_256}; +/// Trait for available hash functions. pub trait Hashable: Sized { fn blake2_256(&self) -> [u8; 32]; fn twox_128(&self) -> [u8; 16]; -- GitLab From c9f648af4b8250c518c4d8697e04e7f8cb237238 Mon Sep 17 00:00:00 2001 From: Nicole Zhu Date: Tue, 23 Apr 2019 19:52:10 +0200 Subject: [PATCH 048/206] Documentation: decl_module! macro (#2147) * Add: initial draft of decl_module!, before fact-check * Add: edits after content review by Guillaume * style * add link to event doc * Changed `nocompile` to `rust,ignore` for docs * Update srml/support/src/dispatch.rs Co-Authored-By: nczhu * Update dispatch.rs * Changed examples layout of decl_module macro docs * style and links * decl_module doc tests passing * All doc tests passing for decl_module * Minor cleanup, comment out doc test imports * some cleanup * Update srml/support/src/dispatch.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Bump `impl_version` for CI * Fix indentation * Update description of Multiple Module Instances * function definition updates * restructure example and spelling fixes * update after review * `ensure_root` is not a macro * remove ! from ensure_root in text * public vs private --- Cargo.lock | 1 + core/sr-primitives/src/traits.rs | 4 +- srml/support/Cargo.toml | 1 + srml/support/src/dispatch.rs | 152 ++++++++++++++++++++++++++----- 4 files changed, 131 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2b0eb4f72..62880e324e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3511,6 +3511,7 @@ dependencies = [ "sr-std 1.0.0", "srml-metadata 1.0.0", "srml-support-procedural 1.0.0", + "srml-system 1.0.0", "substrate-inherents 1.0.0", ] diff --git a/core/sr-primitives/src/traits.rs b/core/sr-primitives/src/traits.rs index 4c9bf9f95e..3004a5e069 100644 --- a/core/sr-primitives/src/traits.rs +++ b/core/sr-primitives/src/traits.rs @@ -299,9 +299,9 @@ impl OnInitialize for () {} /// Off-chain computation trait. /// -/// Implementing this trait on a module allows you to perform a long-running tasks +/// Implementing this trait on a module allows you to perform long-running tasks /// that make validators generate extrinsics (either transactions or inherents) -/// with results of those long-running computations. +/// with the results of those long-running computations. /// /// NOTE: This function runs off-chain, so it can access the block state, /// but cannot preform any alterations. diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index 3cb358a4e1..5a6dc3d9eb 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -20,6 +20,7 @@ bitmask = { version = "0.5", default-features = false } [dev-dependencies] pretty_assertions = "0.6.1" +srml-system = { path = "../system", default-features = false } [features] default = ["std"] diff --git a/srml/support/src/dispatch.rs b/srml/support/src/dispatch.rs index f249d3f2bc..48db2e748e 100644 --- a/srml/support/src/dispatch.rs +++ b/srml/support/src/dispatch.rs @@ -27,17 +27,17 @@ pub use srml_metadata::{ FunctionArgumentMetadata, OuterDispatchMetadata, OuterDispatchCall }; -/// A type that can not be instantiated. +/// A type that cannot be instantiated. pub enum Never {} /// Result of a module function call; either nothing (functions are only called for "side effects") /// or an error message. pub type Result = result::Result<(), &'static str>; -/// A lazy call (module function and argument values) that can be executed via its dispatch() +/// A lazy call (module function and argument values) that can be executed via its `dispatch` /// method. pub trait Dispatchable { - /// Every function call to your runtime has an origin which specifies where the extrinsic was + /// Every function call from your runtime has an origin, which specifies where the extrinsic was /// generated from. In the case of a signed extrinsic (transaction), the origin contains an /// identifier for the caller. The origin can be empty in the case of an inherent extrinsic. type Origin; @@ -67,38 +67,140 @@ pub trait Parameter: Codec + Clone + Eq {} #[cfg(not(feature = "std"))] impl Parameter for T where T: Codec + Clone + Eq {} -/// Declare a module struct and implement the dispatch logic. +/// Declares a `Module` struct and a `Call` enum, which implements the dispatch logic. /// -/// Usually used as follows: +/// ## Declaration /// +/// ``` +/// # #[macro_use] +/// # extern crate srml_support; +/// # use srml_support::dispatch::Result; +/// # use srml_system::{self as system, Trait, ensure_signed}; /// decl_module! { -/// pub struct Module for enum Call where origin: T::Origin -///{} -/// } +/// pub struct Module for enum Call where origin: T::Origin { +/// +/// // Private functions are dispatchable, but not available to other +/// // SRML modules. +/// fn my_function(origin, var: u64) -> Result { +/// // Your implementation +/// Ok(()) +/// } +/// +/// // Public functions are both dispatchable and available to other +/// // SRML modules. +/// pub fn my_public_function(origin) -> Result { +/// // Your implementation +/// Ok(()) +/// } +/// } +/// } +/// # fn main() {} +/// ``` +/// +/// The declaration is set with the header where: +/// +/// * `Module`: The struct generated by the macro, with type `Trait`. +/// * `Call`: The enum generated for every module, which implements [`Callable`](./dispatch/trait.Callable.html). +/// * `origin`: Alias of `T::Origin`, declared by the [`impl_outer_origin!`](./macro.impl_outer_origin.html) macro. +/// * `Result`: The expected return type from module functions. +/// +/// ### Shorthand Example /// -/// where "Trait" is a trait describing this module's requirements for the Runtime type. -/// T::Origin is declared using a impl_outer_origin! per-module macro (which is generated by the -/// construct_runtime! macro) and automatically includes all the modules that are used by the -/// runtime (alongside with a variant called "system"). +/// The macro automatically expands a shorthand function declaration to return the `Result` type. +/// These functions are the same: /// -/// A runtime module is a collection of functions unified by a common problem domain and certain -/// shared types. The "functions" do not actually return values (see Dispatchable) and are only -/// used for side effects. +/// ``` +/// # #[macro_use] +/// # extern crate srml_support; +/// # use srml_support::dispatch::Result; +/// # use srml_system::{self as system, Trait, ensure_signed}; +/// decl_module! { +/// pub struct Module for enum Call where origin: T::Origin { /// -/// For every module an associated enum (usually "Call") is generated with every variant -/// corresponding to a function of the module. This enum implements Callable and thus its values -/// can be used as an extrinsic's payload. +/// fn my_long_function(origin) -> Result { +/// // Your implementation +/// Ok(()) +/// } +/// +/// fn my_short_function(origin) { +/// // Your implementation +/// } +/// } +/// } +/// # fn main() {} +/// ``` /// -/// The `on_initialize` and `on_finalize` functions are special, since it can either take no -/// parameters, or one parameter, which has the runtime's block number type. +/// ### Privileged Function Example /// -/// ### Module with instances +/// If the `origin` param is omitted, the macro adds it as the first parameter and adds `ensure_root(origin)` +/// as the first line of the function. These functions are the same: /// -/// decl_module! support modules with instances with the following syntax: (DefaultInstance type is -/// optionnal) -/// ```nocompile -/// pub struct Module, I: Instance = DefaultInstance> for enum Call where origin: T::Origin {} /// ``` +/// # #[macro_use] +/// # extern crate srml_support; +/// # use srml_support::dispatch::Result; +/// # use srml_system::{self as system, Trait, ensure_signed, ensure_root}; +/// decl_module! { +/// pub struct Module for enum Call where origin: T::Origin { +/// +/// fn my_privileged_function() -> Result { +/// // Your implementation +/// Ok(()) +/// } +/// +/// fn my_function(origin) -> Result { +/// ensure_root(origin); +/// // Your implementation +/// Ok(()) +/// } +/// } +/// } +/// # fn main() {} +/// ``` +/// +/// ## Multiple Module Instances Example +/// +/// A Substrate module can be built such that multiple instances of the same module can be used within a single +/// runtime. For example, the [Balances module](../srml_balances/index.html) can be added multiple times to your +/// runtime in order to support multiple, independent currencies for your blockchain. Here is an example of how +/// you would declare such a module using the `decl_module!` macro: +/// +/// ``` +/// # #[macro_use] +/// # extern crate srml_support; +/// # use srml_support::dispatch::Result; +/// # use srml_system::{self as system, ensure_signed}; +/// # pub struct DefaultInstance; +/// # pub trait Instance {} +/// # impl Instance for DefaultInstance {} +/// pub trait Trait: system::Trait {} +/// +/// decl_module! { +/// pub struct Module, I: Instance = DefaultInstance> for enum Call where origin: T::Origin { +/// // Your implementation +/// } +/// } +/// # fn main() {} +/// ``` +/// +/// ## Reserved Functions +/// +/// The following are reserved function signatures: +/// +/// * `deposit_event`: Helper function for depositing an [event](https://docs.substrate.dev/docs/event-enum). +/// The default behavior is to call `deposit_event` from the [System module](../srml_system/index.html). +/// However, you can write your own implementation for events in your runtime. To use the default behavior, +/// add `fn deposit_event() = default;` to your `Module`. +/// +/// The following reserved functions also take the block number (with type `T::BlockNumber`) as an optional input: +/// +/// * `on_initialize`: Executes at the beginning of a block. Using this function will +/// implement the [`OnInitialize`](../sr_primitives/traits/trait.OnInitialize.html) trait. +/// * `on_finalize`: Executes at the end of a block. Using this function will +/// implement the [`OnFinalize`](../sr_primitives/traits/trait.OnFinalize.html) trait. +/// * `offchain_worker`: Executes at the beginning of a block and produces extrinsics for a future block +/// upon completion. Using this function will implement the +/// [`OffchainWorker`](../sr_primitives/traits/trait.OffchainWorker.html) trait. #[macro_export] macro_rules! decl_module { // Macro transformations (to convert invocations with incomplete parameters to the canonical -- GitLab From fabf6e657ee08a23762fafc6095886a5e0e8f525 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 23 Apr 2019 19:59:17 +0200 Subject: [PATCH 049/206] Documentation for assets module (#1945) * WIP - SRML Assets Module README * docs: Tweaks for consistency * docs: Add missing newline * review-fix: Remove non-SRML trait dependencies * review-fix: Replace const with let * review-fix: Remove use of compact in signature * review-fix: Change const to let since cannot use result of function call * fix: Add backticks around type and mention type it derives from * review-fix: Update variable names since changed to lowercase since using let * fix: Change type to bold instead of code * review-fix: Update Asset module * refactor: Consistent bullet points. Remove whitespace between items * review-fix: Remove useless blah * review-fix: Remove Storage Items * review-fix: Remove Types * review-fix: Remove duplicate instructions * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * Update srml/assets/src/lib.rs Co-Authored-By: ltfschoen * review-fix: Remove since will be replaced after macro expansion #2068 as per comment * review-fix: Move Goals within overview * fix: Fix indentation * style and a few minor changes * remove Events * capitalization * docs: Reword the Goals to remove mention of cold wallets based on discussion with Joe * Wording * Update lib.rs * Update lib.rs * Update lib.rs --- srml/assets/src/lib.rs | 107 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/srml/assets/src/lib.rs b/srml/assets/src/lib.rs index 9caa3dc20d..3f7c1b3efc 100644 --- a/srml/assets/src/lib.rs +++ b/srml/assets/src/lib.rs @@ -14,7 +14,108 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . +//! # Assets Module +//! //! A simple, secure module for dealing with fungible assets. +//! +//! ## Overview +//! +//! The Assets module provides functionality for asset management of fungible asset classes +//! with a fixed supply, including: +//! +//! * Asset Issuance +//! * Asset Transfer +//! * Asset Destruction +//! +//! To use it in your runtime, you need to implement the assets [`Trait`](./trait.Trait.html). +//! +//! The supported dispatchable functions are documented in the [`Call`](./enum.Call.html) enum. +//! +//! ### Terminology +//! +//! * **Asset issuance:** The creation of a new asset, whose total supply will belong to the account that issues the asset. +//! * **Asset transfer:** The action of transferring assets from one account to another. +//! * **Asset destruction:** The process of an account removing its entire holding of an asset. +//! * **Fungible asset:** An asset whose units are interchangeable. +//! * **Non-fungible asset:** An asset for which each unit has unique characteristics. +//! +//! ### Goals +//! +//! The assets system in Substrate is designed to make the following possible: +//! +//! * Issue a unique asset to its creator's account. +//! * Move assets between accounts. +//! * Remove an account's balance of an asset when requested by that account's owner and update the asset's total supply. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! +//! * `issue` - Issues the total supply of a new fungible asset to the account of the caller of the function. +//! * `transfer` - Transfers an `amount` of units of fungible asset `id` from the balance of +//! the function caller's account (`origin`) to a `target` account. +//! * `destroy` - Destroys the entire holding of a fungible asset `id` associated with the account +//! that called the function. +//! +//! Please refer to the [`Call`](./enum.Call.html) enum and its associated variants for documentation on each function. +//! +//! ### Public Functions +//! +//! +//! * `balance` - Get the asset `id` balance of `who`. +//! * `total_supply` - Get the total supply of an asset `id`. +//! +//! Please refer to the [`Module`](./struct.Module.html) struct for details on publicly available functions. +//! +//! ## Usage +//! +//! The following example shows how to use the Assets module in your runtime by exposing public functions to: +//! +//! * Issue a new fungible asset for a token distribution event (airdrop). +//! * Query the fungible asset holding balance of an account. +//! * Query the total supply of a fungible asset that has been issued. +//! +//! ### Prerequisites +//! +//! Import the Assets module and types and derive your runtime's configuration traits from the Assets module trait. +//! +//! ### Simple Code Snippet +//! +//! ```rust,ignore +//! use support::{decl_module, dispatch::Result}; +//! use system::ensure_signed; +//! +//! pub trait Trait: assets::Trait { } +//! +//! decl_module! { +//! pub struct Module for enum Call where origin: T::Origin { +//! pub fn issue_token_airdrop(origin) -> Result { +//! const ACCOUNT_ALICE: u64 = 1; +//! const ACCOUNT_BOB: u64 = 2; +//! const COUNT_AIRDROP_RECIPIENTS = 2; +//! const TOKENS_FIXED_SUPPLY: u64 = 100; +//! +//! ensure!(!COUNT_AIRDROP_RECIPIENTS.is_zero(), "Divide by zero error."); +//! +//! let sender = ensure_signed(origin)?; +//! let asset_id = Self::next_asset_id(); +//! +//! >::mutate(|asset_id| *asset_id += 1); +//! >::insert((asset_id, &ACCOUNT_ALICE), TOKENS_FIXED_SUPPLY / COUNT_AIRDROP_RECIPIENTS); +//! >::insert((asset_id, &ACCOUNT_BOB), TOKENS_FIXED_SUPPLY / COUNT_AIRDROP_RECIPIENTS); +//! >::insert(asset_id, TOKENS_FIXED_SUPPLY); +//! +//! Self::deposit_event(RawEvent::Issued(asset_id, sender, TOKENS_FIXED_SUPPLY)); +//! Ok(()) +//! } +//! } +//! } +//! ``` +//! +//! ## Related Modules +//! +//! * [`System`](../srml_system/index.html) +//! * [`Support`](../srml_support/index.html) // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] @@ -23,6 +124,7 @@ use srml_support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, use primitives::traits::{Member, SimpleArithmetic, Zero, StaticLookup}; use system::ensure_signed; +/// The module configuration trait. pub trait Trait: system::Trait { /// The overarching event type. type Event: From> + Into<::Event>; @@ -34,7 +136,6 @@ pub trait Trait: system::Trait { type AssetId = u32; decl_module! { - // Simple declaration of the `Module` type. Lets the macro know what its working on. pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; /// Issue a new class of fungible assets. There are, and will only ever be, `total` @@ -99,7 +200,7 @@ decl_storage! { Balances: map (AssetId, T::AccountId) => T::Balance; /// The next asset identifier up for grabs. NextAssetId get(next_asset_id): AssetId; - /// The total unit supply of an asset + /// The total unit supply of an asset. TotalSupply: map AssetId => T::Balance; } } @@ -113,7 +214,7 @@ impl Module { >::get((id, who)) } - // Get the total supply of an asset `id` + /// Get the total supply of an asset `id`. pub fn total_supply(id: AssetId) -> T::Balance { >::get(id) } -- GitLab From cea6d5fd9455cf4256f6901afe87736ca381b249 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 23 Apr 2019 20:01:58 +0200 Subject: [PATCH 050/206] Documentation for example module (#1947) * WIP: SRML Example Module README * add newlines * review-fix: Change const to let. Explain generic usage more * refactor: Remove example steps 2 and 3. User can refer to other examples to figure it out * fix: Update to incorporate approved approach of staking module docs in PR #1951 * fix: Move into expandable Details arrow and fix syntax so appears correctly in rust docs * fix: Fix linting * docs: Add Public Dispatchable functions * fix: Rearrange to use Simple Code Snippet and Examples from SRML * fix: Remove duplicate Dispatchable Functions section * fix: Remove Implementation Details as requested by Gav --- srml/example/src/lib.rs | 222 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) diff --git a/srml/example/src/lib.rs b/srml/example/src/lib.rs index 8ba83bfd88..d1ff7cc634 100644 --- a/srml/example/src/lib.rs +++ b/srml/example/src/lib.rs @@ -14,8 +14,230 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . +//! # Example Module +//! +//! //! The Example: A simple example of a runtime module demonstrating //! concepts, APIs and structures common to most runtime modules. +//! +//! Run `cargo doc --package srml-example --open` to view this module's documentation. +//! +//! ### Documentation Guidelines: +//! +//! +//!

    +//!
  • Documentation comments (i.e. /// comment) - should accompany module functions and be restricted to the module interface, not the internals of the module implementation. Only state inputs, outputs, and a brief description that mentions whether calling it requires root, but without repeating the source code details. Capitalise the first word of each documentation comment and end it with a full stop. See Generic example of annotating source code with documentation comments
  • +//!
  • Self-documenting code - Try to refactor code to be self-documenting.
  • +//!
  • Code comments - Supplement complex code with a brief explanation, not every line of code.
  • +//!
  • Identifiers - surround by backticks (i.e. INHERENT_IDENTIFIER, InherentType, u64)
  • +//!
  • Usage scenarios - should be simple doctests. The compiler should ensure they stay valid.
  • +//!
  • Extended tutorials - should be moved to external files and refer to.
  • +//! +//!
  • Mandatory - include all of the sections/subsections where MUST is specified.
  • +//!
  • Optional - optionally include sections/subsections where CAN is specified.
  • +//!
+//! +//! ### Documentation Template:
+//! +//! Copy and paste this template from srml/example/src/lib.rs into file srml//src/lib.rs of your own custom module and complete it. +//!

+//! // Add heading with custom module name
+//!
+//! \#  Module
+//!
+//! // Add simple description
+//!
+//! \## Overview
+//!
+//!  
+//! // Short description of module purpose.
+//! // Links to Traits that should be implemented.
+//! // What this module is for.
+//! // What functionality the module provides.
+//! // When to use the module (use case examples).
+//! // How it is used.
+//! // Inputs it uses and the source of each input.
+//! // Outputs it produces.
+//!
+//! 
+//! +//! Standard format (example): "The timestamp module provides functionality to get and set the on-chain time. +//! To use the timestamp module you need to implement the following [Trait] (). +//! Supported dispatchables are documented in the [Call] enum." +//! +//! +//! +//! +//! \## Terminology +//! +//! // Add terminology used in the custom module. Include concepts, storage items, or actions that you think +//! // deserve to be noted to give context to the rest of the documentation or module usage. The author needs to +//! // use some judgment about what is included. We don't want a list of every storage item nor types - the user +//! // can go to the code for that. For example, "transfer fee" is obvious and should not be included, but +//! // "free balance" and "reserved balance" should be noted to give context to the module. +//! +//!
+//! +//! +//! +//! \## Goals +//! +//! // Add goals that the custom module is designed to achieve. +//! +//! +//! +//! \### Scenarios +//! +//! +//! +//! \#### +//! +//! // Describe requirements prior to interacting with the custom module. +//! // Describe the process of interacting with the custom module for this scenario and public API functions used. +//! +//! \## Interface +//! +//! \### Supported Origins +//! +//! // What origins are used and supported in this module (root, signed, inherent) +//! // i.e. root when \`ensure_root\` used +//! // i.e. inherent when \`ensure_inherent\` used +//! // i.e. signed when \`ensure_signed\` used +//! +//! \`inherent\` +//! +//! +//! +//! \### Types +//! +//! // Type aliases. Include any associated types and where the user would typically define them. +//! +//! \`ExampleType\` +//! +//! +//! +//! // Reference documentation of aspects such as `storageItems` and `dispatchable` functions should only be +//! // included in the https://docs.rs Rustdocs for Substrate and not repeated in the README file. +//! +//! \### Dispatchable Functions +//! +//! +//! +//! // A brief description of dispatchable functions and a link to the rustdoc with their actual documentation. +//! +//! // MUST have link to Call enum +//! // MUST have origin information included in function doc +//! // CAN have more info up to the user +//! +//! \### Public Functions +//! +//! +//! +//! // A link to the rustdoc and any notes about usage in the module, not for specific functions. +//! // For example, in the balances module: "Note that when using the publicly exposed functions, +//! // you (the runtime developer) are responsible for implementing any necessary checks +//! // (e.g. that the sender is the signer) before calling a function that will affect storage." +//! +//! +//! +//! // It is up to the writer of the respective module (with respect to how much information to provide). +//! +//! \#### Public Inspection functions - Immutable (getters) +//! +//! // Insert a subheading for each getter function signature +//! +//! \##### \`example_getter_name()\` +//! +//! // What it returns +//! // Why, when, and how often to call it +//! // When it could panic or error +//! // When safety issues to consider +//! +//! \#### Public Mutable functions (changing state) +//! +//! // Insert a subheading for each setter function signature +//! +//! \##### \`example_setter_name(origin, parameter_name: T::ExampleType)\` +//! +//! // What state it changes +//! // Why, when, and how often to call it +//! // When it could panic or error +//! // When safety issues to consider +//! // What parameter values are valid and why +//! +//! \### Storage Items +//! +//! // Explain any storage items included in this module +//! +//! \### Digest Items +//! +//! // Explain any digest items included in this module +//! +//! \### Inherent Data +//! +//! // Explain what inherent data (if any) is defined in the module and any other related types +//! +//! \### Events: +//! +//! // Insert events for this module if any +//! +//! \### Errors: +//! +//! // Explain what generates errors +//! +//! \## Usage +//! +//! // Insert 2-3 examples of usage and code snippets that show how to use module in a custom module. +//! +//! \### Prerequisites +//! +//! // Show how to include necessary imports for and derive +//! // your module configuration trait with the `INSERT_CUSTOM_MODULE_NAME` trait. +//! +//! \```rust +//! use ; +//! +//! pub trait Trait: ::Trait { } +//! \``` +//! +//! \### Simple Code Snippet +//! +//! // Show a simple example (e.g. how to query a public getter function of ) +//! +//! \### Example from SRML +//! +//! // Show a usage example in an actual runtime +//! +//! // See: +//! // - Substrate TCR https://github.com/parity-samples/substrate-tcr +//! // - Substrate Kitties https://shawntabrizi.github.io/substrate-collectables-workshop/#/ +//! +//! // Show a usage example in an actual runtime +//! +//! \## Genesis Config +//! +//! +//! +//! \## Dependencies +//! +//! // Dependencies on other SRML modules and the genesis config should be mentioned, +//! // but not the Rust Standard Library. +//! // Genesis configuration modifications that may be made to incorporate this module +//! // Interaction with other modules +//! +//! +//! +//! \## Related Modules +//! +//! // Interaction with other modules in the form of a bullet point list +//! +//! \## References +//! +//! +//! +//! // Links to reference material, if applicable. For example, Phragmen, W3F research, etc. +//! // that the implementation is based on. +//!

// Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -- GitLab From 1acf10b0c1756b63ece7224ac61e6c803cf1e43c Mon Sep 17 00:00:00 2001 From: Nicole Zhu Date: Tue, 23 Apr 2019 20:03:33 +0200 Subject: [PATCH 051/206] Documentation: Treasury module (#2269) * Add: draft of treasury doc * Update srml/treasury/src/lib.rs Co-Authored-By: nczhu --- srml/treasury/src/lib.rs | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/srml/treasury/src/lib.rs b/srml/treasury/src/lib.rs index 4c2bd0ede6..c0a43bc8f6 100644 --- a/srml/treasury/src/lib.rs +++ b/srml/treasury/src/lib.rs @@ -14,7 +14,48 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! The Treasury: Keeps account of the taxed cash and handles its deployment. +//! # Treasury Module +//! +//! The `treasury` module keeps account of currency in a `pot` and manages the subsequent +//! deployment of these funds. +//! +//! ## Overview +//! +//! Funds for treasury are raised in two ways: +//! 1. By minting new tokens, leading to inflation, and +//! 2. By channeling tokens from transaction fees and slashing. +//! +//! Treasury funds can be used to pay for developers who provide software updates, +//! any changes decided by referenda, and to generally keep the system running smoothly. +//! +//! Treasury can be used with other modules, such as to tax validator rewards in the `staking` module. +//! +//! ### Implementations +//! +//! The treasury module provides an implementation for the following trait: +//! - `OnDilution` - Mint extra funds upon dilution; maintain the ratio of `portion` diluted to `total_issuance`. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! +//! - `propose_spend` - Propose a spending proposal and stake a proposal deposit. +//! - `set_pot` - Set the spendable balance of funds. +//! - `configure` - Configure the module's proposal requirements. +//! - `reject_proposal` - Reject a proposal and slash the deposit. +//! - `approve_proposal` - Accept the proposal and return the deposit. +//! +//! Please refer to the [`Call`](./enum.Call.html) enum and its associated variants for documentation on each function. +//! +//! ### Public Functions +//! +//! See the [module](./struct.Module.html) for details on publicly available functions. +//! +//! ## Related Modules +//! +//! The treasury module depends on the `system` and `srml_support` modules as well as +//! Substrate Core libraries and the Rust standard library. +//! #![cfg_attr(not(feature = "std"), no_std)] -- GitLab From 4addb049df3539c120a5d9f46cead19d9e56e62d Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Tue, 23 Apr 2019 23:26:09 +0300 Subject: [PATCH 052/206] set reasonable value for bonding_duration in chainspec staging config (#2289) * set reasonable value for bonding_duration in chainspec staging config * set default bonding_duration to 1, and bump runtime version * Update node/cli/src/chain_spec.rs Co-Authored-By: mnaamani * Update node/cli/src/chain_spec.rs Co-Authored-By: mnaamani * Update srml/staking/src/lib.rs Co-Authored-By: mnaamani --- node/cli/src/chain_spec.rs | 4 ++-- node/runtime/src/lib.rs | 4 ++-- srml/staking/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/node/cli/src/chain_spec.rs b/node/cli/src/chain_spec.rs index 217d3b1312..b09d55c6e9 100644 --- a/node/cli/src/chain_spec.rs +++ b/node/cli/src/chain_spec.rs @@ -112,7 +112,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig { current_session_reward: 0, validator_count: 7, sessions_per_era: 12, - bonding_duration: 60 * MINUTES, + bonding_duration: 12, offline_slash_grace: 4, minimum_validator_count: 4, stakers: initial_authorities.iter().map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator)).collect(), @@ -282,7 +282,7 @@ pub fn testnet_genesis( minimum_validator_count: 1, validator_count: 2, sessions_per_era: 5, - bonding_duration: 2 * 60 * 12, + bonding_duration: 12, offline_slash: Perbill::zero(), session_reward: Perbill::zero(), current_session_reward: 0, diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 6698582442..a09d8b31f6 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,8 +59,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 63, - impl_version: 66, + spec_version: 64, + impl_version: 65, apis: RUNTIME_API_VERSIONS, }; diff --git a/srml/staking/src/lib.rs b/srml/staking/src/lib.rs index 6a67b503dc..cc3c708bb2 100644 --- a/srml/staking/src/lib.rs +++ b/srml/staking/src/lib.rs @@ -432,8 +432,8 @@ decl_storage! { pub OfflineSlash get(offline_slash) config(): Perbill = Perbill::from_millionths(1000); // Perbill::from_fraction() is only for std, so use from_millionths(). /// Number of instances of offline reports before slashing begins for validators. pub OfflineSlashGrace get(offline_slash_grace) config(): u32; - /// The length of the bonding duration in blocks. - pub BondingDuration get(bonding_duration) config(): T::BlockNumber = T::BlockNumber::sa(1000); + /// The length of the bonding duration in eras. + pub BondingDuration get(bonding_duration) config(): T::BlockNumber = T::BlockNumber::sa(12); /// Any validators that may never be slashed or forcibly kicked. It's a Vec since they're easy to initialize /// and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets. -- GitLab From 41ccb19c97fea88e91c999deeef6b8bf5de45dd3 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 23 Apr 2019 22:30:30 +0200 Subject: [PATCH 053/206] Documentation for the Session Module (#2283) * WIP * fix: Redo session module docs incorporating approach used by Joe in democracy * remove unncessary quotes * docs: Add example from srml to session module docs * replace asterix with dash * session start * make example compile * index html updates * Update lib.rs --- srml/session/src/lib.rs | 118 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 7 deletions(-) diff --git a/srml/session/src/lib.rs b/srml/session/src/lib.rs index 204eaccc1f..255bb4f647 100644 --- a/srml/session/src/lib.rs +++ b/srml/session/src/lib.rs @@ -14,8 +14,104 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Session manager: is told the validators and allows them to manage their session keys for the -//! consensus module. +//! # Session Module +//! +//! The Session module allows validators to manage their session keys, provides a function for changing +//! the session length, and handles session rotation. +//! +//! - [`session::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! - [`Module`](./struct.Module.html) +//! +//! ## Overview +//! +//! ### Terminology +//! +//! +//! - **Session:** A session is a period of time that has a constant set of validators. Validators can only join +//! or exit the validator set at a session change. It is measured in block numbers and set with `set_length` +//! during a session for use in subsequent sessions. +//! - **Session key:** A session key is actually several keys kept together that provide the various signing +//! functions required by network authorities/validators in pursuit of their duties. +//! - **Session key configuration process:** A session key is set using `set_key` for use in the +//! next session. It is stored in `NextKeyFor`, a mapping between the caller's `AccountID` and the session +//! key provided. `set_key` allows users to set their session key prior to becoming a validator. +//! It is a public call since it uses `ensure_signed`, which checks that the origin is a signed account. +//! As such, the account ID of the origin stored in in `NextKeyFor` may not necessarily be associated with +//! a block author or a validator. The session keys of accounts are removed once their account balance is zero. +//! - **Validator set session key configuration process:** Each session we iterate through the current +//! set of validator account IDs to check if a session key was created for it in the previous session +//! using `set_key`. If it was then we call `set_authority` from the [Consensus module](../srml_consensus/index.html) +//! and pass it a set of session keys (each associated with an account ID) as the session keys for the new +//! validator set. Lastly, if the session key of the current authority does not match any session keys stored under +//! its validator index in the `AuthorityStorageVec` mapping, then we update the mapping with its session +//! key and update the saved list of original authorities if necessary +//! (see https://github.com/paritytech/substrate/issues/1290). Note: Authorities are stored in the Consensus module. +//! They are represented by a validator account ID index from the Session module and allocated with a session +//! key for the length of the session. +//! - **Session length change process:** At the start of the next session we allocate a session index and record the +//! timestamp when the session started. If a `NextSessionLength` was recorded in the previous session, we record +//! it as the new session length. Additionally, if the new session length differs from the length of the +//! next session then we record a `LastLengthChange`. +//! - **Session rotation configuration:** Configure as either a 'normal' (rewardable session where rewards are +//! applied) or 'exceptional' (slashable) session rotation. +//! - **Session rotation process:** The session is changed at the end of the final block of the current session +//! using the `on_finalize` method. It may be called by either an origin or internally from another runtime +//! module at the end of each block. +//! +//! ### Goals +//! +//! The Session module in Substrate is designed to make the following possible: +//! +//! - Set session keys of the validator set for the next session. +//! - Set the length of a session. +//! - Configure and switch between either normal or exceptional session rotations. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! +//! - `set_key` - Set a validator's session key for the next session. +//! - `set_length` - Set a new session length to be applied upon the next session change. +//! - `force_new_session` - Force a new session that should be considered either a normal (rewardable) +//! or exceptional rotation. +//! - `on_finalize` - Called when a block is finalized. Will rotate session if it is the last +//! block of the current session. +//! +//! ### Public Functions +//! +//! - `validator_count` - Get the current number of validators. +//! - `last_length_change` - Get the block number when the session length last changed. +//! - `apply_force_new_session` - Force a new session. Can be called by other runtime modules. +//! - `set_validators` - Set the current set of validators. Can only be called by the Staking module. +//! - `check_rotate_session` - Rotate the session and apply rewards if necessary. Called after the Staking +//! module updates the authorities to the new validator set. +//! - `rotate_session` - Change to the next session. Register the new authority set. Update session keys. +//! Enact session length change if applicable. +//! - `ideal_session_duration` - Get the time of an ideal session. +//! - `blocks_remaining` - Get the number of blocks remaining in the current session, +//! excluding the current block. +//! +//! ## Usage +//! +//! ### Example from the SRML +//! +//! The [Staking module](../srml_staking/index.html) uses the Session module to get the validator set. +//! +//! ``` +//! use srml_session as session; +//! # fn not_executed() { +//! +//! let validators = >::validators(); +//! # } +//! # fn main(){} +//! ``` +//! +//! ## Related Modules +//! +//! - [Consensus](../srml_consensus/index.html) +//! - [Staking](../srml_staking/index.html) +//! - [Timestamp](../srml_timestamp/index.html) #![cfg_attr(not(feature = "std"), no_std)] @@ -51,8 +147,13 @@ macro_rules! impl_session_change { for_each_tuple!(impl_session_change); pub trait Trait: timestamp::Trait + consensus::Trait { + /// Create a session key from an account key. type ConvertAccountIdToSessionKey: Convert>; + + /// Handler when a session changes. type OnSessionChange: OnSessionChange; + + /// The overarching event type. type Event: From> + Into<::Event>; } @@ -60,8 +161,8 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; - /// Sets the session key of `_validator` to `_key`. This doesn't take effect until the next - /// session. + /// Sets the session key of a validator (function caller) to `key`. + /// This doesn't take effect until the next session. fn set_key(origin, key: T::SessionKey) { let who = ensure_signed(origin)?; // set new value for next session @@ -78,6 +179,8 @@ decl_module! { Self::apply_force_new_session(apply_rewards) } + /// Called when a block is finalized. Will rotate session if it is the last + /// block of the current session. fn on_finalize(n: T::BlockNumber) { Self::check_rotate_session(n); } @@ -103,8 +206,9 @@ decl_storage! { /// Timestamp when current session started. pub CurrentStart get(current_start) build(|_| T::Moment::zero()): T::Moment; - /// New session is being forced if this entry exists; in which case, the boolean value is whether - /// the new session should be considered a normal rotation (rewardable) or exceptional (slashable). + /// New session is being forced if this entry exists; in which case, the boolean value is true if + /// the new session should be considered a normal rotation (rewardable) and false if the new session + /// should be considered exceptional (slashable). pub ForcingNewSession get(forcing_new_session): Option; /// Block at which the session length last changed. LastLengthChange: Option; @@ -198,7 +302,7 @@ impl Module { }; } - /// Get the time that should have elapsed over a session if everything was working perfectly. + /// Get the time that should elapse over a session if everything is working perfectly. pub fn ideal_session_duration() -> T::Moment { let block_period: T::Moment = >::minimum_period(); let session_length: T::BlockNumber = Self::length(); -- GitLab From 0c1674b0831b64944b9fe5386ca15233ce4c8fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 24 Apr 2019 11:05:22 +0200 Subject: [PATCH 054/206] Forward port blake2 storage support (#2360) * move storage maps to blake2_128 (#2268) * remove default hash, introduce twox_128 and blake2 * use blake2_128 & create ext_blake2_128 * refactor code * add benchmark * factorize generator * fix * parameterizable hasher * some fix * fix * fix * fix * metadata * fix * remove debug print * map -> blake2_256 * fix test * fix test * Apply suggestions from code review Co-Authored-By: thiolliere * impl twox 128 concat (#2353) * impl twox_128_concat * comment addressed * fix * impl twox_128->64_concat * fix test * Fix compilation and cleanup some docs * Apply suggestions from code review Co-Authored-By: bkchr --- core/client/src/client.rs | 14 +- core/client/src/light/fetcher.rs | 6 +- core/executor/src/wasm_executor.rs | 55 ++- core/executor/wasm/src/lib.rs | 3 +- core/primitives/Cargo.toml | 6 +- core/primitives/benches/benches.rs | 60 +++ core/primitives/src/hashing.rs | 17 + core/primitives/src/lib.rs | 2 +- core/rpc/src/state/tests.rs | 6 +- core/sr-io/with_std.rs | 4 +- core/sr-io/without_std.rs | 20 + core/sr-primitives/src/lib.rs | 8 - core/test-runtime/src/genesismap.rs | 4 +- core/test-runtime/src/system.rs | 24 +- core/test-runtime/wasm/Cargo.lock | 6 +- node-template/runtime/wasm/Cargo.lock | 1 + node/executor/src/lib.rs | 26 +- node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 1 + srml/executive/src/lib.rs | 2 +- srml/indices/src/lib.rs | 15 +- srml/metadata/src/lib.rs | 21 +- srml/support/Cargo.toml | 4 +- srml/support/procedural/src/storage/impls.rs | 138 ++++--- srml/support/procedural/src/storage/mod.rs | 76 +++- .../procedural/src/storage/transformation.rs | 93 ++--- srml/support/procedural/tools/src/syn_ext.rs | 2 +- srml/support/src/event.rs | 39 +- srml/support/src/hashable.rs | 15 +- srml/support/src/lib.rs | 24 +- srml/support/src/metadata.rs | 14 +- srml/support/src/storage/child.rs | 0 srml/support/src/storage/hashed/generator.rs | 285 +++++++++++++++ srml/support/src/storage/hashed/mod.rs | 223 ++++++++++++ srml/support/src/storage/mod.rs | 251 ++----------- .../{generator.rs => storage_items.rs} | 341 ++++-------------- .../support/src/storage/unhashed/generator.rs | 23 +- srml/support/src/storage/unhashed/mod.rs | 2 +- 38 files changed, 1101 insertions(+), 732 deletions(-) create mode 100644 core/primitives/benches/benches.rs create mode 100644 srml/support/src/storage/child.rs create mode 100644 srml/support/src/storage/hashed/generator.rs create mode 100644 srml/support/src/storage/hashed/mod.rs rename srml/support/src/storage/{generator.rs => storage_items.rs} (72%) diff --git a/core/client/src/client.rs b/core/client/src/client.rs index 099255bdf5..2b4465f19c 100644 --- a/core/client/src/client.rs +++ b/core/client/src/client.rs @@ -1536,7 +1536,7 @@ impl backend::AuxStore for Client pub(crate) mod tests { use std::collections::HashMap; use super::*; - use primitives::twox_128; + use primitives::blake2_256; use runtime_primitives::traits::DigestItem as DigestItemT; use runtime_primitives::generic::DigestItem; use test_client::{self, TestClient, AccountKeyring}; @@ -1586,12 +1586,12 @@ pub(crate) mod tests { } // prepare test cases - let alice = twox_128(&runtime::system::balance_of_key(AccountKeyring::Alice.into())).to_vec(); - let bob = twox_128(&runtime::system::balance_of_key(AccountKeyring::Bob.into())).to_vec(); - let charlie = twox_128(&runtime::system::balance_of_key(AccountKeyring::Charlie.into())).to_vec(); - let dave = twox_128(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); - let eve = twox_128(&runtime::system::balance_of_key(AccountKeyring::Eve.into())).to_vec(); - let ferdie = twox_128(&runtime::system::balance_of_key(AccountKeyring::Ferdie.into())).to_vec(); + let alice = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Alice.into())).to_vec(); + let bob = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Bob.into())).to_vec(); + let charlie = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Charlie.into())).to_vec(); + let dave = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); + let eve = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Eve.into())).to_vec(); + let ferdie = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Ferdie.into())).to_vec(); let test_cases = vec![ (1, 4, alice.clone(), vec![(4, 0), (1, 0)]), (1, 3, alice.clone(), vec![(1, 0)]), diff --git a/core/client/src/light/fetcher.rs b/core/client/src/light/fetcher.rs index 3f724c31c4..28df2f8bff 100644 --- a/core/client/src/light/fetcher.rs +++ b/core/client/src/light/fetcher.rs @@ -404,7 +404,7 @@ pub mod tests { use crate::light::fetcher::{Fetcher, FetchChecker, LightDataChecker, RemoteCallRequest, RemoteHeaderRequest}; use crate::light::blockchain::tests::{DummyStorage, DummyBlockchain}; - use primitives::{twox_128, Blake2Hasher}; + use primitives::{blake2_256, Blake2Hasher}; use primitives::storage::{StorageKey, well_known_keys}; use runtime_primitives::generic::BlockId; use state_machine::Backend; @@ -587,7 +587,7 @@ pub mod tests { // we're testing this test case here: // (1, 4, dave.clone(), vec![(4, 0), (1, 1), (1, 0)]), let (remote_client, remote_roots, _) = prepare_client_with_key_changes(); - let dave = twox_128(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); + let dave = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); let dave = StorageKey(dave); // 'fetch' changes proof from remote node: @@ -699,7 +699,7 @@ pub mod tests { let (remote_client, remote_roots, _) = prepare_client_with_key_changes(); let local_cht_root = cht::compute_root::( 4, 0, remote_roots.iter().cloned().map(|ct| Ok(Some(ct)))).unwrap(); - let dave = twox_128(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); + let dave = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); let dave = StorageKey(dave); // 'fetch' changes proof from remote node: diff --git a/core/executor/src/wasm_executor.rs b/core/executor/src/wasm_executor.rs index ce41d86a18..cc355f6bba 100644 --- a/core/executor/src/wasm_executor.rs +++ b/core/executor/src/wasm_executor.rs @@ -28,7 +28,7 @@ use wasmi::memory_units::{Pages}; use state_machine::{Externalities, ChildStorageKey}; use crate::error::{Error, ErrorKind, Result}; use crate::wasm_utils::UserError; -use primitives::{blake2_256, twox_128, twox_256, ed25519, sr25519, Pair}; +use primitives::{blake2_128, blake2_256, twox_64, twox_128, twox_256, ed25519, sr25519, Pair}; use primitives::hexdisplay::HexDisplay; use primitives::sandbox as sandbox_primitives; use primitives::{H256, Blake2Hasher}; @@ -448,6 +448,30 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, ext_chain_id() -> u64 => { Ok(this.ext.chain_id()) }, + ext_twox_64(data: *const u8, len: u32, out: *mut u8) => { + let result: [u8; 8] = if len == 0 { + let hashed = twox_64(&[0u8; 0]); + debug_trace!(target: "xxhash", "XXhash: '' -> {}", HexDisplay::from(&hashed)); + this.hash_lookup.insert(hashed.to_vec(), vec![]); + hashed + } else { + let key = this.memory.get(data, len as usize).map_err(|_| UserError("Invalid attempt to get key in ext_twox_64"))?; + let hashed_key = twox_64(&key); + debug_trace!(target: "xxhash", "XXhash: {} -> {}", + if let Ok(_skey) = ::std::str::from_utf8(&key) { + _skey + } else { + &format!("{}", HexDisplay::from(&key)) + }, + HexDisplay::from(&hashed_key) + ); + this.hash_lookup.insert(hashed_key.to_vec(), key); + hashed_key + }; + + this.memory.set(out, &result).map_err(|_| UserError("Invalid attempt to set result in ext_twox_64"))?; + Ok(()) + }, ext_twox_128(data: *const u8, len: u32, out: *mut u8) => { let result: [u8; 16] = if len == 0 { let hashed = twox_128(&[0u8; 0]); @@ -481,6 +505,21 @@ impl_function_executor!(this: FunctionExecutor<'e, E>, this.memory.set(out, &result).map_err(|_| UserError("Invalid attempt to set result in ext_twox_256"))?; Ok(()) }, + ext_blake2_128(data: *const u8, len: u32, out: *mut u8) => { + let result: [u8; 16] = if len == 0 { + let hashed = blake2_128(&[0u8; 0]); + this.hash_lookup.insert(hashed.to_vec(), vec![]); + hashed + } else { + let key = this.memory.get(data, len as usize).map_err(|_| UserError("Invalid attempt to get key in ext_blake2_128"))?; + let hashed_key = blake2_128(&key); + this.hash_lookup.insert(hashed_key.to_vec(), key); + hashed_key + }; + + this.memory.set(out, &result).map_err(|_| UserError("Invalid attempt to set result in ext_blake2_128"))?; + Ok(()) + }, ext_blake2_256(data: *const u8, len: u32, out: *mut u8) => { let result: [u8; 32] = if len == 0 { blake2_256(&[0u8; 0]) @@ -940,6 +979,20 @@ mod tests { ); } + #[test] + fn blake2_128_should_work() { + let mut ext = TestExternalities::default(); + let test_code = include_bytes!("../wasm/target/wasm32-unknown-unknown/release/runtime_test.compact.wasm"); + assert_eq!( + WasmExecutor::new().call(&mut ext, 8, &test_code[..], "test_blake2_128", &[]).unwrap(), + blake2_128(&b""[..]).encode() + ); + assert_eq!( + WasmExecutor::new().call(&mut ext, 8, &test_code[..], "test_blake2_128", b"Hello world!").unwrap(), + blake2_128(&b"Hello world!"[..]).encode() + ); + } + #[test] fn twox_256_should_work() { let mut ext = TestExternalities::default(); diff --git a/core/executor/wasm/src/lib.rs b/core/executor/wasm/src/lib.rs index dda9c61733..294c21d146 100644 --- a/core/executor/wasm/src/lib.rs +++ b/core/executor/wasm/src/lib.rs @@ -7,7 +7,7 @@ use alloc::vec::Vec; use alloc::slice; use runtime_io::{ - set_storage, storage, clear_prefix, print, blake2_256, + set_storage, storage, clear_prefix, print, blake2_128, blake2_256, twox_128, twox_256, ed25519_verify, sr25519_verify, enumerated_trie_root }; @@ -68,6 +68,7 @@ impl_stubs!( input.to_vec() }, test_blake2_256 => |input| blake2_256(input).to_vec(), + test_blake2_128 => |input| blake2_128(input).to_vec(), test_twox_256 => |input| twox_256(input).to_vec(), test_twox_128 => |input| twox_128(input).to_vec(), test_ed25519_verify => |input: &[u8]| { diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index 5a8468b436..02133e0655 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -31,8 +31,10 @@ regex = {version = "1.1", optional = true } [dev-dependencies] substrate-serializer = { path = "../serializer" } -pretty_assertions = "0.6.1" -heapsize = "0.4.2" +pretty_assertions = "0.6" +heapsize = "0.4" +hex-literal = "0.1" +rand = "0.6" [features] default = ["std"] diff --git a/core/primitives/benches/benches.rs b/core/primitives/benches/benches.rs new file mode 100644 index 0000000000..b81ef9dc42 --- /dev/null +++ b/core/primitives/benches/benches.rs @@ -0,0 +1,60 @@ +// Copyright 2019 Parity Technologies +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// TODO: Move benchmark to criterion #2354 +#![feature(test)] + +extern crate test; +use hex_literal::{hex, hex_impl}; +use substrate_primitives::hashing::{twox_128, blake2_128}; + + +const MAX_KEY_SIZE: u32 = 32; + +fn data_set() -> Vec> { + use rand::SeedableRng; + use rand::Rng; + + let rnd: [u8; 32] = rand::rngs::StdRng::seed_from_u64(12).gen(); + let mut rnd = rnd.iter().cycle(); + let mut res = Vec::new(); + for size in 1..=MAX_KEY_SIZE { + for _ in 0..1_000 { + let value = (0..size) + .map(|_| rnd.next().unwrap().clone()) + .collect(); + res.push(value); + } + } + res +} + +fn bench_hash_128(b: &mut test::Bencher, f: &Fn(&[u8]) -> [u8; 16]) { + let data_set = data_set(); + b.iter(|| { + for data in &data_set { + let _a = f(data); + } + }); +} + +#[bench] +fn bench_blake2_128(b: &mut test::Bencher) { + bench_hash_128(b, &blake2_128); +} + +#[bench] +fn bench_twox_128(b: &mut test::Bencher) { + bench_hash_128(b, &twox_128); +} diff --git a/core/primitives/src/hashing.rs b/core/primitives/src/hashing.rs index 814048fea8..87312ce6e4 100644 --- a/core/primitives/src/hashing.rs +++ b/core/primitives/src/hashing.rs @@ -55,6 +55,23 @@ pub fn blake2_128(data: &[u8]) -> [u8; 16] { r } +/// Do a XX 64-bit hash and place result in `dest`. +pub fn twox_64_into(data: &[u8], dest: &mut [u8; 8]) { + use ::core::hash::Hasher; + let mut h0 = twox_hash::XxHash::with_seed(0); + h0.write(data); + let r0 = h0.finish(); + use byteorder::{ByteOrder, LittleEndian}; + LittleEndian::write_u64(&mut dest[0..8], r0); +} + +/// Do a XX 64-bit hash and return result. +pub fn twox_64(data: &[u8]) -> [u8; 8] { + let mut r: [u8; 8] = [0; 8]; + twox_64_into(data, &mut r); + r +} + /// Do a XX 128-bit hash and place result in `dest`. pub fn twox_128_into(data: &[u8], dest: &mut [u8; 16]) { use ::core::hash::Hasher; diff --git a/core/primitives/src/lib.rs b/core/primitives/src/lib.rs index eb309c04a3..97f5480743 100644 --- a/core/primitives/src/lib.rs +++ b/core/primitives/src/lib.rs @@ -46,7 +46,7 @@ pub use impl_serde::serialize as bytes; #[cfg(feature = "std")] pub mod hashing; #[cfg(feature = "std")] -pub use hashing::{blake2_256, twox_128, twox_256}; +pub use hashing::{blake2_128, blake2_256, twox_64, twox_128, twox_256}; #[cfg(feature = "std")] pub mod hexdisplay; pub mod crypto; diff --git a/core/rpc/src/state/tests.rs b/core/rpc/src/state/tests.rs index 09ef303a64..5cf83921ad 100644 --- a/core/rpc/src/state/tests.rs +++ b/core/rpc/src/state/tests.rs @@ -17,7 +17,7 @@ use super::*; use self::error::{Error, ErrorKind}; -use sr_io::twox_128; +use sr_io::blake2_256; use assert_matches::assert_matches; use consensus::BlockOrigin; use test_client::{self, runtime, AccountKeyring, TestClient, BlockBuilderExt}; @@ -88,7 +88,7 @@ fn should_send_initial_storage_changes_and_notifications() { { let api = State::new(Arc::new(test_client::new()), Subscriptions::new(remote)); - let alice_balance_key = twox_128(&test_runtime::system::balance_of_key(AccountKeyring::Alice.into())); + let alice_balance_key = blake2_256(&test_runtime::system::balance_of_key(AccountKeyring::Alice.into())); api.subscribe_storage(Default::default(), subscriber, Some(vec![ StorageKey(alice_balance_key.to_vec()), @@ -147,7 +147,7 @@ fn should_query_storage() { let block2_hash = add_block(1); let genesis_hash = client.genesis_hash(); - let alice_balance_key = twox_128(&test_runtime::system::balance_of_key(AccountKeyring::Alice.into())); + let alice_balance_key = blake2_256(&test_runtime::system::balance_of_key(AccountKeyring::Alice.into())); let mut expected = vec![ StorageChangeSet { diff --git a/core/sr-io/with_std.rs b/core/sr-io/with_std.rs index bf7147babb..3148cf2842 100644 --- a/core/sr-io/with_std.rs +++ b/core/sr-io/with_std.rs @@ -18,8 +18,8 @@ pub use parity_codec as codec; // re-export hashing functions. pub use primitives::{ - blake2_256, twox_128, twox_256, ed25519, Blake2Hasher, sr25519, - Pair + blake2_128, blake2_256, twox_128, twox_256, twox_64, ed25519, Blake2Hasher, + sr25519, Pair }; pub use tiny_keccak::keccak256 as keccak_256; // Switch to this after PoC-3 diff --git a/core/sr-io/without_std.rs b/core/sr-io/without_std.rs index f4b3c91154..66ad5541df 100644 --- a/core/sr-io/without_std.rs +++ b/core/sr-io/without_std.rs @@ -273,7 +273,9 @@ extern_functions! { /// Hash calculation and verification fn ext_blake2_256_enumerated_trie_root(values_data: *const u8, lens_data: *const u32, lens_len: u32, result: *mut u8); + fn ext_blake2_128(data: *const u8, len: u32, out: *mut u8); fn ext_blake2_256(data: *const u8, len: u32, out: *mut u8); + fn ext_twox_64(data: *const u8, len: u32, out: *mut u8); fn ext_twox_128(data: *const u8, len: u32, out: *mut u8); fn ext_twox_256(data: *const u8, len: u32, out: *mut u8); fn ext_keccak_256(data: *const u8, len: u32, out: *mut u8); @@ -544,6 +546,15 @@ pub fn blake2_256(data: &[u8]) -> [u8; 32] { result } +/// Conduct a 128-bit Blake2 hash. +pub fn blake2_128(data: &[u8]) -> [u8; 16] { + let mut result: [u8; 16] = Default::default(); + unsafe { + ext_blake2_128.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result +} + /// Conduct a 256-bit Keccak hash. pub fn keccak_256(data: &[u8]) -> [u8; 32] { let mut result: [u8; 32] = Default::default(); @@ -571,6 +582,15 @@ pub fn twox_128(data: &[u8]) -> [u8; 16] { result } +/// Conduct two XX hashes to give a 64-bit result. +pub fn twox_64(data: &[u8]) -> [u8; 8] { + let mut result: [u8; 8] = Default::default(); + unsafe { + ext_twox_64.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result +} + /// Verify a ed25519 signature. pub fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { unsafe { diff --git a/core/sr-primitives/src/lib.rs b/core/sr-primitives/src/lib.rs index 32d59b6b5a..e1ec698a4a 100644 --- a/core/sr-primitives/src/lib.rs +++ b/core/sr-primitives/src/lib.rs @@ -88,14 +88,6 @@ pub use serde::{Serialize, Deserialize, de::DeserializeOwned}; /// Complex storage builder stuff. #[cfg(feature = "std")] pub trait BuildStorage: Sized { - /// Hash given slice. - /// - /// Default to xx128 hashing. - fn hash(data: &[u8]) -> [u8; 16] { - let r = runtime_io::twox_128(data); - log::trace!(target: "build_storage", "{} <= {}", substrate_primitives::hexdisplay::HexDisplay::from(&r), ascii_format(data)); - r - } /// Build the storage out of this builder. fn build_storage(self) -> Result<(StorageOverlay, ChildrenStorageOverlay), String> { let mut storage = Default::default(); diff --git a/core/test-runtime/src/genesismap.rs b/core/test-runtime/src/genesismap.rs index 13e9e5ec9a..be1c784a52 100644 --- a/core/test-runtime/src/genesismap.rs +++ b/core/test-runtime/src/genesismap.rs @@ -17,7 +17,7 @@ //! Tool for creating the genesis block. use std::collections::HashMap; -use runtime_io::twox_128; +use runtime_io::{blake2_256, twox_128}; use super::AccountId; use parity_codec::{Encode, KeyedVec, Joiner}; use primitives::{ChangesTrieConfiguration, map, storage::well_known_keys}; @@ -47,7 +47,7 @@ impl GenesisConfig { let wasm_runtime = include_bytes!("../wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm").to_vec(); let mut map: HashMap, Vec> = self.balances.iter() .map(|&(ref account, balance)| (account.to_keyed_vec(b"balance:"), vec![].and(&balance))) - .map(|(k, v)| (twox_128(&k[..])[..].to_vec(), v.to_vec())) + .map(|(k, v)| (blake2_256(&k[..])[..].to_vec(), v.to_vec())) .chain(vec![ (well_known_keys::CODE.into(), wasm_runtime), (well_known_keys::HEAP_PAGES.into(), vec![].and(&(16 as u64))), diff --git a/core/test-runtime/src/system.rs b/core/test-runtime/src/system.rs index 266b7130d4..51f12966dc 100644 --- a/core/test-runtime/src/system.rs +++ b/core/test-runtime/src/system.rs @@ -18,7 +18,7 @@ //! and depositing logs. use rstd::prelude::*; -use runtime_io::{storage_root, enumerated_trie_root, storage_changes_root, twox_128}; +use runtime_io::{storage_root, enumerated_trie_root, storage_changes_root, twox_128, blake2_256}; use runtime_support::storage::{self, StorageValue, StorageMap}; use runtime_support::storage_items; use runtime_primitives::traits::{Hash as HashT, BlakeTwo256, Digest as DigestT}; @@ -45,11 +45,11 @@ pub fn balance_of_key(who: AccountId) -> Vec { } pub fn balance_of(who: AccountId) -> u64 { - storage::get_or(&balance_of_key(who), 0) + storage::hashed::get_or(&blake2_256, &balance_of_key(who), 0) } pub fn nonce_of(who: AccountId) -> u64 { - storage::get_or(&who.to_keyed_vec(NONCE_OF), 0) + storage::hashed::get_or(&blake2_256, &who.to_keyed_vec(NONCE_OF), 0) } /// Get authorities at given block. @@ -152,7 +152,7 @@ pub fn validate_transaction(utx: Extrinsic) -> TransactionValidity { let tx = utx.transfer(); let nonce_key = tx.from.to_keyed_vec(NONCE_OF); - let expected_nonce: u64 = storage::get_or(&nonce_key, 0); + let expected_nonce: u64 = storage::hashed::get_or(&blake2_256, &nonce_key, 0); if tx.nonce < expected_nonce { return TransactionValidity::Invalid(ApplyError::Stale as i8); } @@ -241,26 +241,26 @@ fn execute_transaction_backend(utx: &Extrinsic) -> ApplyResult { fn execute_transfer_backend(tx: &Transfer) -> ApplyResult { // check nonce let nonce_key = tx.from.to_keyed_vec(NONCE_OF); - let expected_nonce: u64 = storage::get_or(&nonce_key, 0); + let expected_nonce: u64 = storage::hashed::get_or(&blake2_256, &nonce_key, 0); if !(tx.nonce == expected_nonce) { return Err(ApplyError::Stale) } // increment nonce in storage - storage::put(&nonce_key, &(expected_nonce + 1)); + storage::hashed::put(&blake2_256, &nonce_key, &(expected_nonce + 1)); // check sender balance let from_balance_key = tx.from.to_keyed_vec(BALANCE_OF); - let from_balance: u64 = storage::get_or(&from_balance_key, 0); + let from_balance: u64 = storage::hashed::get_or(&blake2_256, &from_balance_key, 0); // enact transfer if !(tx.amount <= from_balance) { return Err(ApplyError::CantPay) } let to_balance_key = tx.to.to_keyed_vec(BALANCE_OF); - let to_balance: u64 = storage::get_or(&to_balance_key, 0); - storage::put(&from_balance_key, &(from_balance - tx.amount)); - storage::put(&to_balance_key, &(to_balance + tx.amount)); + let to_balance: u64 = storage::hashed::get_or(&blake2_256, &to_balance_key, 0); + storage::hashed::put(&blake2_256, &from_balance_key, &(from_balance - tx.amount)); + storage::hashed::put(&blake2_256, &to_balance_key, &(to_balance + tx.amount)); Ok(ApplyOutcome::Success) } @@ -295,7 +295,7 @@ fn info_expect_equal_hash(given: &Hash, expected: &Hash) { mod tests { use super::*; - use runtime_io::{with_externalities, twox_128, TestExternalities}; + use runtime_io::{with_externalities, twox_128, blake2_256, TestExternalities}; use parity_codec::{Joiner, KeyedVec}; use substrate_test_client::{AuthorityKeyring, AccountKeyring}; use crate::{Header, Transfer}; @@ -313,7 +313,7 @@ mod tests { twox_128(&0u32.to_keyed_vec(well_known_keys::AUTHORITY_PREFIX)).to_vec() => AuthorityKeyring::Alice.to_raw_public().to_vec(), twox_128(&1u32.to_keyed_vec(well_known_keys::AUTHORITY_PREFIX)).to_vec() => AuthorityKeyring::Bob.to_raw_public().to_vec(), twox_128(&2u32.to_keyed_vec(well_known_keys::AUTHORITY_PREFIX)).to_vec() => AuthorityKeyring::Charlie.to_raw_public().to_vec(), - twox_128(&AccountKeyring::Alice.to_raw_public().to_keyed_vec(b"balance:")).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0] + blake2_256(&AccountKeyring::Alice.to_raw_public().to_keyed_vec(b"balance:")).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0] ]) } diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index bff3e79986..b637940459 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2223,7 +2223,6 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -2238,7 +2237,6 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2577,7 +2575,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2595,7 +2593,6 @@ dependencies = [ "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2628,6 +2625,7 @@ dependencies = [ "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", + "substrate-primitives 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 54d7822c75..c430e34fb8 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -2751,6 +2751,7 @@ dependencies = [ "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", + "substrate-primitives 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/node/executor/src/lib.rs b/node/executor/src/lib.rs index c855a4e6f0..d1a8e0cda3 100644 --- a/node/executor/src/lib.rs +++ b/node/executor/src/lib.rs @@ -34,7 +34,7 @@ mod tests { use keyring::{AuthorityKeyring, AccountKeyring}; use runtime_support::{Hashable, StorageValue, StorageMap, traits::Currency}; use state_machine::{CodeExecutor, Externalities, TestExternalities}; - use primitives::{twox_128, Blake2Hasher, ChangesTrieConfiguration, NeverNativeValue, + use primitives::{twox_128, blake2_256, Blake2Hasher, ChangesTrieConfiguration, NeverNativeValue, NativeOrEncoded}; use node_primitives::{Hash, BlockNumber, AccountId}; use runtime_primitives::traits::{Header as HeaderT, Hash as HashT}; @@ -119,13 +119,13 @@ mod tests { #[test] fn panic_execution_with_foreign_code_gives_error() { let mut t = TestExternalities::::new_with_code(BLOATY_CODE, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![70u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); @@ -152,13 +152,13 @@ mod tests { #[test] fn bad_extrinsic_with_native_equivalent_code_gives_error() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![70u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); @@ -185,13 +185,13 @@ mod tests { #[test] fn successful_execution_with_native_equivalent_code_gives_ok() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); @@ -222,13 +222,13 @@ mod tests { #[test] fn successful_execution_with_foreign_code_gives_ok() { let mut t = TestExternalities::::new_with_code(BLOATY_CODE, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); @@ -796,13 +796,13 @@ mod tests { fn panic_execution_gives_error() { let foreign_code = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.wasm"); let mut t = TestExternalities::::new_with_code(foreign_code, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![69u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![70u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); @@ -818,13 +818,13 @@ mod tests { fn successful_execution_gives_ok() { let foreign_code = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm"); let mut t = TestExternalities::::new_with_code(foreign_code, map![ - twox_128(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + blake2_256(&>::key_for(alice())).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16], - twox_128(&>::key_for(0)).to_vec() => vec![0u8; 32], + blake2_256(&>::key_for(0)).to_vec() => vec![0u8; 32], twox_128(>::key()).to_vec() => vec![0u8; 16], twox_128(>::key()).to_vec() => vec![0u8; 16] ]); diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index a09d8b31f6..340220160e 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 64, + spec_version: 65, impl_version: 65, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 93d79d7dba..b14c919bb3 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -2901,6 +2901,7 @@ dependencies = [ "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", + "substrate-primitives 1.0.0", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index 69db7e5ff0..271d7156ac 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -443,7 +443,7 @@ mod tests { header: Header { parent_hash: [69u8; 32].into(), number: 1, - state_root: hex!("49cd58a254ccf6abc4a023d9a22dcfc421e385527a250faec69f8ad0d8ed3e48").into(), + state_root: hex!("4c10fddf15e63c91ff2aa13ab3a9b7f6b19938d533829489e72ba40278a08fac").into(), extrinsics_root: hex!("03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314").into(), digest: Digest { logs: vec![], }, }, diff --git a/srml/indices/src/lib.rs b/srml/indices/src/lib.rs index 76261796c8..4a6010f800 100644 --- a/srml/indices/src/lib.rs +++ b/srml/indices/src/lib.rs @@ -96,16 +96,17 @@ decl_storage! { }): T::AccountIndex; /// The enumeration sets. - pub EnumSet get(enum_set): map T::AccountIndex => Vec; + pub EnumSet get(enum_set) build(|config: &GenesisConfig| { + (0..(config.ids.len() + ENUM_SET_SIZE - 1) / ENUM_SET_SIZE) + .map(|i| ( + T::AccountIndex::sa(i), + config.ids[i * ENUM_SET_SIZE..config.ids.len().min((i + 1) * ENUM_SET_SIZE)].to_owned(), + )) + .collect::>() + }): map T::AccountIndex => Vec; } add_extra_genesis { config(ids): Vec; - build(|storage: &mut primitives::StorageOverlay, _: &mut primitives::ChildrenStorageOverlay, config: &GenesisConfig| { - for i in 0..(config.ids.len() + ENUM_SET_SIZE - 1) / ENUM_SET_SIZE { - storage.insert(GenesisConfig::::hash(&>::key_for(T::AccountIndex::sa(i))).to_vec(), - config.ids[i * ENUM_SET_SIZE..config.ids.len().min((i + 1) * ENUM_SET_SIZE)].to_owned().encode()); - } - }); } } diff --git a/srml/metadata/src/lib.rs b/srml/metadata/src/lib.rs index 254e72cb11..5f8b57206b 100644 --- a/srml/metadata/src/lib.rs +++ b/srml/metadata/src/lib.rs @@ -253,17 +253,30 @@ impl std::fmt::Debug for DefaultByteGetter { } } +/// Hasher used by storage maps +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Twox128, + Twox256, + Twox64Concat, +} + /// A storage function type. #[derive(Clone, PartialEq, Eq, Encode)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] pub enum StorageFunctionType { Plain(DecodeDifferentStr), Map { + hasher: StorageHasher, key: DecodeDifferentStr, value: DecodeDifferentStr, is_linked: bool, }, DoubleMap { + hasher: StorageHasher, key1: DecodeDifferentStr, key2: DecodeDifferentStr, value: DecodeDifferentStr, @@ -312,8 +325,10 @@ pub enum RuntimeMetadata { V1(RuntimeMetadataDeprecated), /// Version 2 for runtime metadata. No longer used. V2(RuntimeMetadataDeprecated), - /// Version 3 for runtime metadata. - V3(RuntimeMetadataV3), + /// Version 3 for runtime metadata. No longer used. + V3(RuntimeMetadataDeprecated), + /// Version 4 for runtime metadata. + V4(RuntimeMetadataV4), } /// Enum that should fail. @@ -336,7 +351,7 @@ impl Decode for RuntimeMetadataDeprecated { /// The metadata of a runtime. #[derive(Eq, Encode, PartialEq)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] -pub struct RuntimeMetadataV3 { +pub struct RuntimeMetadataV4 { pub modules: DecodeDifferentArray, } diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index 5a6dc3d9eb..ab16e98ee9 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } -parity-codec = { version = "3.5.1", default-features = false, features = ["derive"] } +codec = { package = "parity-codec", version = "3.5.1", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } sr-std = { path = "../../core/sr-std", default-features = false } runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } @@ -30,7 +30,7 @@ std = [ "bitmask/std", "serde", "runtime_io/std", - "parity-codec/std", + "codec/std", "sr-std/std", "sr-primitives/std", "srml-metadata/std", diff --git a/srml/support/procedural/src/storage/impls.rs b/srml/support/procedural/src/storage/impls.rs index 5a8f7f65d5..2708fdb213 100644 --- a/srml/support/procedural/src/storage/impls.rs +++ b/srml/support/procedural/src/storage/impls.rs @@ -67,13 +67,13 @@ impl<'a, I: Iterator> Impls<'a, I> { let mutate_impl = if !is_option { quote!{ - >::put(&val, storage) + >::put(&val, storage) } } else { quote!{ match val { - Some(ref val) => >::put(&val, storage), - None => >::kill(storage), + Some(ref val) => >::put(&val, storage), + None => >::kill(storage), } } }; @@ -96,9 +96,12 @@ impl<'a, I: Iterator> Impls<'a, I> { // generator for value quote!{ #( #[ #attrs ] )* - #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance>(#scrate::storage::generator::PhantomData<(#traitinstance #comma_instance)>); + #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance> + (#scrate::rstd::marker::PhantomData<(#traitinstance #comma_instance)>); - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::generator::StorageValue<#typ> for #name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> + #scrate::storage::hashed::generator::StorageValue<#typ> for #name<#traitinstance, #instance> + { type Query = #value_type; /// Get the storage key. @@ -107,20 +110,20 @@ impl<'a, I: Iterator> Impls<'a, I> { } /// Load the value from the provided storage instance. - fn get(storage: &S) -> Self::Query { - storage.get(>::key()) + fn get>(storage: &S) -> Self::Query { + storage.get(>::key()) .#option_simple_1(|| #fielddefault) } /// Take a value from storage, removing it afterwards. - fn take(storage: &S) -> Self::Query { - storage.take(>::key()) + fn take>(storage: &S) -> Self::Query { + storage.take(>::key()) .#option_simple_1(|| #fielddefault) } /// Mutate the value under a key. - fn mutate R, S: #scrate::GenericStorage>(f: F, storage: &S) -> R { - let mut val = >::get(storage); + fn mutate R, S: #scrate::HashedStorage<#scrate::Twox128>>(f: F, storage: &S) -> R { + let mut val = >::get(storage); let ret = f(&mut val); #mutate_impl ; @@ -130,7 +133,7 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - pub fn map(self, kty: &syn::Type) -> TokenStream2 { + pub fn map(self, hasher: TokenStream2, kty: &syn::Type) -> TokenStream2 { let Self { scrate, visibility, @@ -147,15 +150,17 @@ impl<'a, I: Iterator> Impls<'a, I> { let DeclStorageTypeInfos { typ, value_type, is_option, .. } = type_infos; let option_simple_1 = option_unwrap(is_option); + let as_map = quote!{ > }; + let mutate_impl = if !is_option { quote!{ - >::insert(key, &val, storage) + #as_map::insert(key, &val, storage) } } else { quote!{ match val { - Some(ref val) => >::insert(key, &val, storage), - None => >::remove(key, storage), + Some(ref val) => #as_map::insert(key, &val, storage), + None => #as_map::remove(key, storage), } } }; @@ -178,11 +183,16 @@ impl<'a, I: Iterator> Impls<'a, I> { // generator for map quote!{ #( #[ #attrs ] )* - #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance>(#scrate::storage::generator::PhantomData<(#traitinstance #comma_instance)>); + #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance> + (#scrate::rstd::marker::PhantomData<(#traitinstance #comma_instance)>); - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::generator::StorageMap<#kty, #typ> for #name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> + #scrate::storage::hashed::generator::StorageMap<#kty, #typ> for #name<#traitinstance, #instance> + { type Query = #value_type; + type Hasher = #scrate::#hasher; + /// Get the prefix key in storage. fn prefix() -> &'static [u8] { #final_prefix @@ -190,26 +200,26 @@ impl<'a, I: Iterator> Impls<'a, I> { /// Get the storage key used to fetch a value corresponding to a specific key. fn key_for(x: &#kty) -> #scrate::rstd::vec::Vec { - let mut key = >::prefix().to_vec(); + let mut key = #as_map::prefix().to_vec(); #scrate::codec::Encode::encode_to(x, &mut key); key } /// Load the value associated with the given key from the map. - fn get(key: &#kty, storage: &S) -> Self::Query { - let key = >::key_for(key); + fn get>(key: &#kty, storage: &S) -> Self::Query { + let key = #as_map::key_for(key); storage.get(&key[..]).#option_simple_1(|| #fielddefault) } /// Take the value, reading and removing it. - fn take(key: &#kty, storage: &S) -> Self::Query { - let key = >::key_for(key); + fn take>(key: &#kty, storage: &S) -> Self::Query { + let key = #as_map::key_for(key); storage.take(&key[..]).#option_simple_1(|| #fielddefault) } /// Mutate the value under a key - fn mutate R, S: #scrate::GenericStorage>(key: &#kty, f: F, storage: &S) -> R { - let mut val = >::get(key, storage); + fn mutate R, S: #scrate::HashedStorage<#scrate::#hasher>>(key: &#kty, f: F, storage: &S) -> R { + let mut val = #as_map::get(key, storage); let ret = f(&mut val); #mutate_impl ; @@ -220,7 +230,7 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - pub fn linked_map(self, kty: &syn::Type) -> TokenStream2 { + pub fn linked_map(self, hasher: TokenStream2, kty: &syn::Type) -> TokenStream2 { let Self { scrate, visibility, @@ -264,8 +274,8 @@ impl<'a, I: Iterator> Impls<'a, I> { let name_lowercase = name.to_string().to_lowercase(); let inner_module = syn::Ident::new(&format!("__linked_map_details_for_{}_do_not_use", name_lowercase), name.span()); let linkage = syn::Ident::new(&format!("__LinkageFor{}DoNotUse", name), name.span()); - let phantom_data = quote! { #scrate::storage::generator::PhantomData }; - let as_map = quote!{ > }; + let phantom_data = quote! { #scrate::rstd::marker::PhantomData }; + let as_map = quote!{ > }; let put_or_insert = quote! { match linkage { Some(linkage) => storage.put(key_for, &(val, linkage)), @@ -316,14 +326,17 @@ impl<'a, I: Iterator> Impls<'a, I> { pub _data: #phantom_data, } - impl<'a, S: #scrate::GenericStorage, #traitinstance: #traittype, #instance #bound_instantiable> Iterator for Enumerator<'a, S, #kty, (#typ, #traitinstance, #instance)> + impl<'a, S: #scrate::HashedStorage<#scrate::#hasher>, #traitinstance: #traittype, #instance #bound_instantiable> + Iterator for Enumerator<'a, S, #kty, (#typ, #traitinstance, #instance)> where #traitinstance: 'a { type Item = (#kty, #typ); fn next(&mut self) -> Option { let next = self.next.take()?; - let key_for = as #scrate::storage::generator::StorageMap<#kty, #typ>>::key_for(&next); + let key_for = + as #scrate::storage::hashed::generator::StorageMap<#kty, #typ>>::key_for(&next); + let (val, linkage): (#typ, Linkage<#kty>) = self.storage.get(&*key_for) .expect("previous/next only contain existing entires; we enumerate using next; entry exists; qed"); self.next = linkage.next; @@ -336,26 +349,26 @@ impl<'a, I: Iterator> Impls<'a, I> { /// /// Takes care of updating previous and next elements points /// as well as updates head if the element is first or last. - fn remove_linkage(linkage: Linkage<#kty>, storage: &S); + fn remove_linkage>(linkage: Linkage<#kty>, storage: &S); /// Read the contained data and it's linkage. - fn read_with_linkage(storage: &S, key: &[u8]) -> Option<(#value_type, Linkage<#kty>)>; + fn read_with_linkage>(storage: &S, key: &[u8]) -> Option<(#value_type, Linkage<#kty>)>; /// Generate linkage for newly inserted element. /// /// Takes care of updating head and previous head's pointer. - fn new_head_linkage( + fn new_head_linkage>( storage: &S, key: &#kty, ) -> Linkage<#kty>; /// Read current head pointer. - fn read_head(storage: &S) -> Option<#kty>; + fn read_head>(storage: &S) -> Option<#kty>; /// Overwrite current head pointer. /// /// If `None` is given head is removed from storage. - fn write_head(storage: &S, head: Option<&#kty>); + fn write_head>(storage: &S, head: Option<&#kty>); } } }; @@ -365,7 +378,7 @@ impl<'a, I: Iterator> Impls<'a, I> { #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance>(#phantom_data<(#traitinstance #comma_instance)>); impl<#traitinstance: #traittype, #instance #bound_instantiable> self::#inner_module::Utils<#traitinstance, #instance> for #name<#traitinstance, #instance> { - fn remove_linkage( + fn remove_linkage>( linkage: self::#inner_module::Linkage<#kty>, storage: &S, ) { @@ -394,14 +407,14 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - fn read_with_linkage( + fn read_with_linkage>( storage: &S, key: &[u8], ) -> Option<(#value_type, self::#inner_module::Linkage<#kty>)> { storage.get(key) } - fn new_head_linkage( + fn new_head_linkage>( storage: &S, key: &#kty, ) -> self::#inner_module::Linkage<#kty> { @@ -433,11 +446,11 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - fn read_head(storage: &S) -> Option<#kty> { + fn read_head>(storage: &S) -> Option<#kty> { storage.get(#final_head_key) } - fn write_head(storage: &S, head: Option<&#kty>) { + fn write_head>(storage: &S, head: Option<&#kty>) { match head { Some(head) => storage.put(#final_head_key, head), None => storage.kill(#final_head_key), @@ -451,9 +464,13 @@ impl<'a, I: Iterator> Impls<'a, I> { #structure - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::generator::StorageMap<#kty, #typ> for #name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> + #scrate::storage::hashed::generator::StorageMap<#kty, #typ> for #name<#traitinstance, #instance> + { type Query = #value_type; + type Hasher = #scrate::#hasher; + /// Get the prefix key in storage. fn prefix() -> &'static [u8] { #final_prefix @@ -467,12 +484,12 @@ impl<'a, I: Iterator> Impls<'a, I> { } /// Load the value associated with the given key from the map. - fn get(key: &#kty, storage: &S) -> Self::Query { + fn get>(key: &#kty, storage: &S) -> Self::Query { storage.get(&*#as_map::key_for(key)).#option_simple_1(|| #fielddefault) } /// Take the value, reading and removing it. - fn take(key: &#kty, storage: &S) -> Self::Query { + fn take>(key: &#kty, storage: &S) -> Self::Query { use self::#inner_module::Utils; let res: Option<(#value_type, self::#inner_module::Linkage<#kty>)> = storage.take(&*#as_map::key_for(key)); @@ -486,12 +503,12 @@ impl<'a, I: Iterator> Impls<'a, I> { } /// Remove the value under a key. - fn remove(key: &#kty, storage: &S) { + fn remove>(key: &#kty, storage: &S) { #as_map::take(key, storage); } /// Store a value to be associated with the given key from the map. - fn insert(key: &#kty, val: &#typ, storage: &S) { + fn insert>(key: &#kty, val: &#typ, storage: &S) { use self::#inner_module::Utils; let key_for = &*#as_map::key_for(key); @@ -505,7 +522,7 @@ impl<'a, I: Iterator> Impls<'a, I> { } /// Mutate the value under a key - fn mutate R, S: #scrate::GenericStorage>(key: &#kty, f: F, storage: &S) -> R { + fn mutate R, S: #scrate::HashedStorage<#scrate::#hasher>>(key: &#kty, f: F, storage: &S) -> R { use self::#inner_module::Utils; let key_for = &*#as_map::key_for(key); @@ -519,20 +536,22 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - impl<#traitinstance: 'static + #traittype, #instance #bound_instantiable> #scrate::storage::generator::EnumerableStorageMap<#kty, #typ> for #name<#traitinstance, #instance> { - fn head(storage: &S) -> Option<#kty> { + impl<#traitinstance: 'static + #traittype, #instance #bound_instantiable> + #scrate::storage::hashed::generator::EnumerableStorageMap<#kty, #typ> for #name<#traitinstance, #instance> + { + fn head>(storage: &S) -> Option<#kty> { use self::#inner_module::Utils; Self::read_head(storage) } - fn enumerate<'a, S: #scrate::GenericStorage>(storage: &'a S) -> #scrate::storage::generator::Box + 'a> where + fn enumerate<'a, S: #scrate::HashedStorage<#scrate::#hasher>>(storage: &'a S) -> #scrate::rstd::boxed::Box + 'a> where #kty: 'a, #typ: 'a, { use self::#inner_module::{Utils, Enumerator}; - #scrate::storage::generator::Box::new(Enumerator { + #scrate::rstd::boxed::Box::new(Enumerator { next: Self::read_head(storage), storage, _data: #phantom_data::<(#typ, #traitinstance, #instance)>::default(), @@ -542,7 +561,7 @@ impl<'a, I: Iterator> Impls<'a, I> { } } - pub fn double_map(self, k1ty: &syn::Type, k2ty: &syn::Type, k2_hasher: TokenStream2) -> TokenStream2 { + pub fn double_map(self, hasher: TokenStream2, k1ty: &syn::Type, k2ty: &syn::Type, k2_hasher: TokenStream2) -> TokenStream2 { let Self { scrate, visibility, @@ -593,11 +612,20 @@ impl<'a, I: Iterator> Impls<'a, I> { // generator for double map quote!{ #( #[ #attrs ] )* - #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance>(#scrate::storage::generator::PhantomData<(#traitinstance #comma_instance)>); + #visibility struct #name<#traitinstance: #traittype, #instance #bound_instantiable #equal_default_instance> + (#scrate::rstd::marker::PhantomData<(#traitinstance #comma_instance)>); - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::unhashed::generator::StorageDoubleMap<#k1ty, #k2ty, #typ> for #name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> + #scrate::storage::unhashed::generator::StorageDoubleMap<#k1ty, #k2ty, #typ> for #name<#traitinstance, #instance> + { type Query = #value_type; + fn prefix_for(k1: &#k1ty) -> Vec { + let mut key = #as_double_map::prefix().to_vec(); + #scrate::codec::Encode::encode_to(k1, &mut key); + #scrate::Hashable::#hasher(&key).to_vec() + } + fn prefix() -> &'static [u8] { #final_prefix } @@ -608,17 +636,17 @@ impl<'a, I: Iterator> Impls<'a, I> { key } - fn get(key1: &#k1ty, key2: &#k2ty, storage: &S) -> Self::Query { + fn get(key1: &#k1ty, key2: &#k2ty, storage: &S) -> Self::Query { let key = #as_double_map::key_for(key1, key2); storage.get(&key).#option_simple_1(|| #fielddefault) } - fn take(key1: &#k1ty, key2: &#k2ty, storage: &S) -> Self::Query { + fn take(key1: &#k1ty, key2: &#k2ty, storage: &S) -> Self::Query { let key = #as_double_map::key_for(key1, key2); storage.take(&key).#option_simple_1(|| #fielddefault) } - fn mutate R, S: #scrate::GenericUnhashedStorage>(key1: &#k1ty, key2: &#k2ty, f: F, storage: &S) -> R { + fn mutate R, S: #scrate::UnhashedStorage>(key1: &#k1ty, key2: &#k2ty, f: F, storage: &S) -> R { let mut val = #as_double_map::get(key1, key2, storage); let ret = f(&mut val); diff --git a/srml/support/procedural/src/storage/mod.rs b/srml/support/procedural/src/storage/mod.rs index 82290e0de4..649a48a181 100644 --- a/srml/support/procedural/src/storage/mod.rs +++ b/srml/support/procedural/src/storage/mod.rs @@ -23,6 +23,8 @@ use srml_support_procedural_tools::{ToTokens, Parse, custom_keyword, custom_keyw use syn::{Ident, Token}; use syn::token::CustomKeyword; +use proc_macro2::TokenStream as TokenStream2; +use quote::quote; mod impls; @@ -138,6 +140,7 @@ enum DeclStorageType { #[derive(Parse, ToTokens, Debug)] struct DeclStorageMap { pub map_keyword: ext::CustomToken, + pub hasher: Option, pub key: syn::Type, pub ass_keyword: Token![=>], pub value: syn::Type, @@ -146,6 +149,7 @@ struct DeclStorageMap { #[derive(Parse, ToTokens, Debug)] struct DeclStorageLinkedMap { pub map_keyword: ext::CustomToken, + pub hasher: Option, pub key: syn::Type, pub ass_keyword: Token![=>], pub value: syn::Type, @@ -154,19 +158,22 @@ struct DeclStorageLinkedMap { #[derive(Parse, ToTokens, Debug)] struct DeclStorageDoubleMap { pub map_keyword: ext::CustomToken, + pub hasher: Option, pub key1: syn::Type, pub comma_keyword: Token![,], - pub key2_hasher: DeclStorageDoubleMapHasher, + pub key2_hasher: Hasher, pub key2: ext::Parens, pub ass_keyword: Token![=>], pub value: syn::Type, } #[derive(Parse, ToTokens, Debug)] -enum DeclStorageDoubleMapHasher { +enum Hasher { Blake2_256(ext::CustomToken), + Blake2_128(ext::CustomToken), Twox256(ext::CustomToken), Twox128(ext::CustomToken), + Twox64Concat(ext::CustomToken), } #[derive(Parse, ToTokens, Debug)] @@ -175,6 +182,64 @@ struct DeclStorageDefault { pub expr: syn::Expr, } +#[derive(Parse, ToTokens, Debug)] +struct SetHasher { + pub hasher_keyword: ext::CustomToken, + pub inner: ext::Parens, +} + +#[derive(Debug, Clone)] +enum HasherKind { + Blake2_256, + Blake2_128, + Twox256, + Twox128, + Twox64Concat, +} + +impl From<&SetHasher> for HasherKind { + fn from(set_hasher: &SetHasher) -> Self { + match set_hasher.inner.content { + Hasher::Blake2_256(_) => HasherKind::Blake2_256, + Hasher::Blake2_128(_) => HasherKind::Blake2_128, + Hasher::Twox256(_) => HasherKind::Twox256, + Hasher::Twox128(_) => HasherKind::Twox128, + Hasher::Twox64Concat(_) => HasherKind::Twox64Concat, + } + } +} +impl HasherKind { + fn into_storage_hasher_struct(&self) -> TokenStream2 { + match self { + HasherKind::Blake2_256 => quote!( Blake2_256 ), + HasherKind::Blake2_128 => quote!( Blake2_128 ), + HasherKind::Twox256 => quote!( Twox256 ), + HasherKind::Twox128 => quote!( Twox128 ), + HasherKind::Twox64Concat => quote!( Twox64Concat ), + } + } + + fn into_hashable_fn(&self) -> TokenStream2 { + match self { + HasherKind::Blake2_256 => quote!( blake2_256 ), + HasherKind::Blake2_128 => quote!( blake2_128 ), + HasherKind::Twox256 => quote!( twox_256 ), + HasherKind::Twox128 => quote!( twox_128 ), + HasherKind::Twox64Concat => quote!( twox_64_concat), + } + } + + fn into_metadata(&self) -> TokenStream2 { + match self { + HasherKind::Blake2_256 => quote!( StorageHasher::Blake2_256 ), + HasherKind::Blake2_128 => quote!( StorageHasher::Blake2_128 ), + HasherKind::Twox256 => quote!( StorageHasher::Twox256 ), + HasherKind::Twox128 => quote!( StorageHasher::Twox128 ), + HasherKind::Twox64Concat => quote!( StorageHasher::Twox64Concat ), + } + } +} + custom_keyword_impl!(SpecificHiddenCrate, "hiddencrate", "hiddencrate as keyword"); custom_keyword_impl!(DeclStorageConfig, "config", "build as keyword"); custom_keyword!(ConfigKeyword, "config", "config as keyword"); @@ -186,6 +251,9 @@ custom_keyword!(MapKeyword, "map", "map as keyword"); custom_keyword!(LinkedMapKeyword, "linked_map", "linked_map as keyword"); custom_keyword!(DoubleMapKeyword, "double_map", "double_map as keyword"); custom_keyword!(Blake2_256Keyword, "blake2_256", "Blake2_256 as keyword"); -custom_keyword!(Twox256Keyword, "twox_256", "Twox_256 as keyword"); -custom_keyword!(Twox128Keyword, "twox_128", "Twox_128 as keyword"); +custom_keyword!(Blake2_128Keyword, "blake2_128", "Blake2_128 as keyword"); +custom_keyword!(Twox256Keyword, "twox_256", "Twox256 as keyword"); +custom_keyword!(Twox128Keyword, "twox_128", "Twox128 as keyword"); +custom_keyword!(Twox64ConcatKeyword, "twox_64_concat", "Twox64Concat as keyword"); custom_keyword_impl!(ExtraGenesisSkipPhantomDataField, "extra_genesis_skip_phantom_data_field", "extra_genesis_skip_phantom_data_field as keyword"); +custom_keyword_impl!(SetHasher, "hasher", "storage hasher"); diff --git a/srml/support/procedural/src/storage/transformation.rs b/srml/support/procedural/src/storage/transformation.rs index f00b5e8309..205fccdea5 100644 --- a/srml/support/procedural/src/storage/transformation.rs +++ b/srml/support/procedural/src/storage/transformation.rs @@ -156,13 +156,13 @@ pub fn decl_storage_impl(input: TokenStream) -> TokenStream { impl<#traitinstance: 'static + #traittype, #instance #bound_instantiable> #module_ident<#traitinstance, #instance> { #impl_store_fns #[doc(hidden)] - pub fn store_metadata() -> #scrate::storage::generator::StorageMetadata { - #scrate::storage::generator::StorageMetadata { - functions: #scrate::storage::generator::DecodeDifferent::Encode(#store_functions_to_metadata) , + pub fn store_metadata() -> #scrate::metadata::StorageMetadata { + #scrate::metadata::StorageMetadata { + functions: #scrate::metadata::DecodeDifferent::Encode(#store_functions_to_metadata) , } } #[doc(hidden)] - pub fn store_metadata_functions() -> &'static [#scrate::storage::generator::StorageFunctionMetadata] { + pub fn store_metadata_functions() -> &'static [#scrate::metadata::StorageFunctionMetadata] { #store_functions_to_metadata } #[doc(hidden)] @@ -284,7 +284,7 @@ fn decl_store_extra_genesis( use #scrate::codec::{Encode, Decode}; let v = (#builder)(&self); - <#name<#traitinstance, #instance> as #scrate::storage::generator::StorageValue<#typ>>::put(&v, &storage); + <#name<#traitinstance, #instance> as #scrate::storage::hashed::generator::StorageValue<#typ>>::put(&v, &storage); }} }, DeclStorageTypeInfosKind::Map { key_type, .. } => { @@ -294,7 +294,7 @@ fn decl_store_extra_genesis( let data = (#builder)(&self); for (k, v) in data.into_iter() { - <#name<#traitinstance, #instance> as #scrate::storage::generator::StorageMap<#key_type, #typ>>::insert(&k, &v, &storage); + <#name<#traitinstance, #instance> as #scrate::storage::hashed::generator::StorageMap<#key_type, #typ>>::insert(&k, &v, &storage); } }} }, @@ -402,7 +402,7 @@ fn decl_store_extra_genesis( quote!{ #[serde(skip)] - pub _genesis_phantom_data: #scrate::storage::generator::PhantomData<(#traitinstance #comma_instance)>, + pub _genesis_phantom_data: #scrate::rstd::marker::PhantomData<(#traitinstance #comma_instance)>, }, quote!{ _genesis_phantom_data: Default::default(), @@ -440,12 +440,12 @@ fn decl_store_extra_genesis( #[cfg(feature = "std")] impl#fparam_impl #scrate::runtime_primitives::BuildStorage for GenesisConfig#sparam { fn assimilate_storage(self, r: &mut #scrate::runtime_primitives::StorageOverlay, c: &mut #scrate::runtime_primitives::ChildrenStorageOverlay) -> ::std::result::Result<(), String> { - use #scrate::rstd::{cell::RefCell, marker::PhantomData}; - let storage = (RefCell::new(r), PhantomData::::default()); + use #scrate::rstd::cell::RefCell; + let storage = RefCell::new(r); #builders - let r = storage.0.into_inner(); + let r = storage.into_inner(); #scall(r, c, &self); @@ -589,14 +589,14 @@ fn decl_storage_items( DeclStorageTypeInfosKind::Simple => { i.simple_value() }, - DeclStorageTypeInfosKind::Map { key_type, is_linked: false } => { - i.map(key_type) + DeclStorageTypeInfosKind::Map { key_type, is_linked: false, hasher } => { + i.map(hasher.into_storage_hasher_struct(), key_type) }, - DeclStorageTypeInfosKind::Map { key_type, is_linked: true } => { - i.linked_map(key_type) + DeclStorageTypeInfosKind::Map { key_type, is_linked: true, hasher } => { + i.linked_map(hasher.into_storage_hasher_struct(), key_type) }, - DeclStorageTypeInfosKind::DoubleMap { key1_type, key2_type, key2_hasher } => { - i.double_map(key1_type, key2_type, key2_hasher) + DeclStorageTypeInfosKind::DoubleMap { key1_type, key2_type, key2_hasher, hasher } => { + i.double_map(hasher.into_hashable_fn(), key1_type, key2_type, key2_hasher) }, }; impls.extend(implementation) @@ -662,15 +662,15 @@ fn impl_store_fns( quote!{ #( #[ #attrs ] )* pub fn #get_fn() -> #value_type { - <#name<#traitinstance, #instance> as #scrate::storage::generator::StorageValue<#typ>> :: get(&#scrate::storage::RuntimeStorage) + <#name<#traitinstance, #instance> as #scrate::storage::hashed::generator::StorageValue<#typ>> :: get(&#scrate::storage::RuntimeStorage) } } }, DeclStorageTypeInfosKind::Map { key_type, .. } => { quote!{ #( #[ #attrs ] )* - pub fn #get_fn>(key: K) -> #value_type { - <#name<#traitinstance, #instance> as #scrate::storage::generator::StorageMap<#key_type, #typ>> :: get(key.borrow(), &#scrate::storage::RuntimeStorage) + pub fn #get_fn>(key: K) -> #value_type { + <#name<#traitinstance, #instance> as #scrate::storage::hashed::generator::StorageMap<#key_type, #typ>> :: get(key.borrow(), &#scrate::storage::RuntimeStorage) } } } @@ -678,8 +678,8 @@ fn impl_store_fns( quote!{ pub fn #get_fn(k1: KArg1, k2: KArg2) -> #value_type where - KArg1: #scrate::storage::generator::Borrow<#key1_type>, - KArg2: #scrate::storage::generator::Borrow<#key2_type>, + KArg1: #scrate::rstd::borrow::Borrow<#key1_type>, + KArg2: #scrate::rstd::borrow::Borrow<#key2_type>, { <#name<#traitinstance> as #scrate::storage::unhashed::generator::StorageDoubleMap<#key1_type, #key2_type, #typ>> :: get(k1.borrow(), k2.borrow(), &#scrate::storage::RuntimeStorage) } @@ -727,42 +727,46 @@ fn store_functions_to_metadata ( let stype = match type_infos.kind { DeclStorageTypeInfosKind::Simple => { quote!{ - #scrate::storage::generator::StorageFunctionType::Plain( - #scrate::storage::generator::DecodeDifferent::Encode(#styp), + #scrate::metadata::StorageFunctionType::Plain( + #scrate::metadata::DecodeDifferent::Encode(#styp), ) } }, - DeclStorageTypeInfosKind::Map { key_type, is_linked } => { + DeclStorageTypeInfosKind::Map { key_type, is_linked, hasher } => { + let hasher = hasher.into_metadata(); let kty = clean_type_string("e!(#key_type).to_string()); quote!{ - #scrate::storage::generator::StorageFunctionType::Map { - key: #scrate::storage::generator::DecodeDifferent::Encode(#kty), - value: #scrate::storage::generator::DecodeDifferent::Encode(#styp), + #scrate::metadata::StorageFunctionType::Map { + hasher: #scrate::metadata::#hasher, + key: #scrate::metadata::DecodeDifferent::Encode(#kty), + value: #scrate::metadata::DecodeDifferent::Encode(#styp), is_linked: #is_linked, } } }, - DeclStorageTypeInfosKind::DoubleMap { key1_type, key2_type, key2_hasher } => { + DeclStorageTypeInfosKind::DoubleMap { key1_type, key2_type, key2_hasher, hasher } => { + let hasher = hasher.into_metadata(); let k1ty = clean_type_string("e!(#key1_type).to_string()); let k2ty = clean_type_string("e!(#key2_type).to_string()); let k2_hasher = clean_type_string(&key2_hasher.to_string()); quote!{ - #scrate::storage::generator::StorageFunctionType::DoubleMap { - key1: #scrate::storage::generator::DecodeDifferent::Encode(#k1ty), - key2: #scrate::storage::generator::DecodeDifferent::Encode(#k2ty), - value: #scrate::storage::generator::DecodeDifferent::Encode(#styp), - key2_hasher: #scrate::storage::generator::DecodeDifferent::Encode(#k2_hasher), + #scrate::metadata::StorageFunctionType::DoubleMap { + hasher: #scrate::metadata::#hasher, + key1: #scrate::metadata::DecodeDifferent::Encode(#k1ty), + key2: #scrate::metadata::DecodeDifferent::Encode(#k2ty), + value: #scrate::metadata::DecodeDifferent::Encode(#styp), + key2_hasher: #scrate::metadata::DecodeDifferent::Encode(#k2_hasher), } } }, }; let modifier = if type_infos.is_option { quote!{ - #scrate::storage::generator::StorageFunctionModifier::Optional + #scrate::metadata::StorageFunctionModifier::Optional } } else { quote!{ - #scrate::storage::generator::StorageFunctionModifier::Default + #scrate::metadata::StorageFunctionModifier::Default } }; let default = default_value.inner.as_ref().map(|d| &d.expr) @@ -786,16 +790,16 @@ fn store_functions_to_metadata ( let struct_name = proc_macro2::Ident::new(&("__GetByteStruct".to_string() + &str_name), name.span()); let cache_name = proc_macro2::Ident::new(&("__CACHE_GET_BYTE_STRUCT_".to_string() + &str_name), name.span()); let item = quote! { - #scrate::storage::generator::StorageFunctionMetadata { - name: #scrate::storage::generator::DecodeDifferent::Encode(#str_name), + #scrate::metadata::StorageFunctionMetadata { + name: #scrate::metadata::DecodeDifferent::Encode(#str_name), modifier: #modifier, ty: #stype, - default: #scrate::storage::generator::DecodeDifferent::Encode( - #scrate::storage::generator::DefaultByteGetter( + default: #scrate::metadata::DecodeDifferent::Encode( + #scrate::metadata::DefaultByteGetter( &#struct_name::<#traitinstance, #instance>(#scrate::rstd::marker::PhantomData) ) ), - documentation: #scrate::storage::generator::DecodeDifferent::Encode(&[ #docs ]), + documentation: #scrate::metadata::DecodeDifferent::Encode(&[ #docs ]), }, }; items.extend(item); @@ -806,7 +810,7 @@ fn store_functions_to_metadata ( #[allow(non_upper_case_globals)] static #cache_name: #scrate::once_cell::sync::OnceCell<#scrate::rstd::vec::Vec> = #scrate::once_cell::sync::OnceCell::INIT; #[cfg(feature = "std")] - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::generator::DefaultByte for #struct_name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::metadata::DefaultByte for #struct_name<#traitinstance, #instance> { fn default_byte(&self) -> #scrate::rstd::vec::Vec { use #scrate::codec::Encode; #cache_name.get_or_init(|| { @@ -816,7 +820,7 @@ fn store_functions_to_metadata ( } } #[cfg(not(feature = "std"))] - impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::storage::generator::DefaultByte for #struct_name<#traitinstance, #instance> { + impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::metadata::DefaultByte for #struct_name<#traitinstance, #instance> { fn default_byte(&self) -> #scrate::rstd::vec::Vec { use #scrate::codec::Encode; let def_val: #value_type = #default; @@ -848,10 +852,12 @@ pub(crate) struct DeclStorageTypeInfos<'a> { enum DeclStorageTypeInfosKind<'a> { Simple, Map { + hasher: HasherKind, key_type: &'a syn::Type, is_linked: bool, }, DoubleMap { + hasher: HasherKind, key1_type: &'a syn::Type, key2_type: &'a syn::Type, key2_hasher: TokenStream2, @@ -871,14 +877,17 @@ fn get_type_infos(storage_type: &DeclStorageType) -> DeclStorageTypeInfos { let (value_type, kind) = match storage_type { DeclStorageType::Simple(ref st) => (st, DeclStorageTypeInfosKind::Simple), DeclStorageType::Map(ref map) => (&map.value, DeclStorageTypeInfosKind::Map { + hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key_type: &map.key, is_linked: false, }), DeclStorageType::LinkedMap(ref map) => (&map.value, DeclStorageTypeInfosKind::Map { + hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key_type: &map.key, is_linked: true, }), DeclStorageType::DoubleMap(ref map) => (&map.value, DeclStorageTypeInfosKind::DoubleMap { + hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key1_type: &map.key1, key2_type: &map.key2.content, key2_hasher: { let h = &map.key2_hasher; quote! { #h } }, diff --git a/srml/support/procedural/tools/src/syn_ext.rs b/srml/support/procedural/tools/src/syn_ext.rs index c2136b2cd8..c6b0b4aefb 100644 --- a/srml/support/procedural/tools/src/syn_ext.rs +++ b/srml/support/procedural/tools/src/syn_ext.rs @@ -72,7 +72,7 @@ groups_impl!(Braces, Brace, Brace, parse_braces); groups_impl!(Brackets, Bracket, Bracket, parse_brackets); groups_impl!(Parens, Paren, Parenthesis, parse_parens); -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct CustomToken(std::marker::PhantomData); impl Parse for CustomToken { diff --git a/srml/support/src/event.rs b/srml/support/src/event.rs index e4168c318a..739c9f660c 100644 --- a/srml/support/src/event.rs +++ b/srml/support/src/event.rs @@ -24,29 +24,19 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// # Simple Event Example: /// /// ```rust -/// #[macro_use] -/// extern crate srml_support; -/// #[macro_use] -/// extern crate parity_codec as codec; -/// -/// decl_event!( -/// pub enum Event { +/// srml_support::decl_event!( +/// pub enum Event { /// Success, /// Failure(String), /// } /// ); +/// ///# fn main() {} /// ``` /// /// # Generic Event Example: /// /// ```rust -/// #[macro_use] -/// extern crate srml_support; -/// extern crate parity_codec as codec; -/// #[macro_use] -/// extern crate parity_codec; -/// /// trait Trait { /// type Balance; /// type Token; @@ -54,8 +44,8 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// /// mod event1 { /// // Event that specifies the generic parameter explicitly (`Balance`). -/// decl_event!( -/// pub enum Event where Balance = ::Balance { +/// srml_support::decl_event!( +/// pub enum Event where Balance = ::Balance { /// Message(Balance), /// } /// ); @@ -65,8 +55,8 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// // Event that uses the generic parameter `Balance`. /// // If no name for the generic parameter is specified explicitly, /// // the name will be taken from the type name of the trait. -/// decl_event!( -/// pub enum Event where ::Balance { +/// srml_support::decl_event!( +/// pub enum Event where ::Balance { /// Message(Balance), /// } /// ); @@ -74,12 +64,13 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// /// mod event3 { /// // And we even support declaring multiple generic parameters! -/// decl_event!( -/// pub enum Event where ::Balance, ::Token { +/// srml_support::decl_event!( +/// pub enum Event where ::Balance, ::Token { /// Message(Balance, Token), /// } /// ); /// } +/// ///# fn main() {} /// ``` /// @@ -88,12 +79,6 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// # Generic Event with Instance Example: /// /// ```rust -/// #[macro_use] -/// extern crate srml_support; -/// extern crate parity_codec as codec; -/// #[macro_use] -/// extern crate parity_codec; -/// ///# struct DefaultInstance; ///# trait Instance {} ///# impl Instance for DefaultInstance {} @@ -103,7 +88,7 @@ pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEn /// } /// /// // For module with instances, DefaultInstance is optionnal -/// decl_event!( +/// srml_support::decl_event!( /// pub enum Event where /// ::Balance, /// ::Token @@ -504,7 +489,7 @@ macro_rules! __impl_outer_event_json_metadata { mod tests { use super::*; use serde::Serialize; - use parity_codec::{Encode, Decode}; + use codec::{Encode, Decode}; mod system { pub trait Trait { diff --git a/srml/support/src/hashable.rs b/srml/support/src/hashable.rs index 9199a0958d..b3ee2b3612 100644 --- a/srml/support/src/hashable.rs +++ b/srml/support/src/hashable.rs @@ -17,16 +17,24 @@ //! Hashable trait. use crate::codec::Codec; -use runtime_io::{blake2_256, twox_128, twox_256}; +use runtime_io::{blake2_128, blake2_256, twox_128, twox_256}; +use crate::storage::hashed::generator::StorageHasher; +use crate::Twox64Concat; +use crate::rstd::prelude::Vec; -/// Trait for available hash functions. +// This trait must be kept coherent with srml-support-procedural HasherKind usage pub trait Hashable: Sized { + fn blake2_128(&self) -> [u8; 16]; fn blake2_256(&self) -> [u8; 32]; fn twox_128(&self) -> [u8; 16]; fn twox_256(&self) -> [u8; 32]; + fn twox_64_concat(&self) -> Vec; } impl Hashable for T { + fn blake2_128(&self) -> [u8; 16] { + self.using_encoded(blake2_128) + } fn blake2_256(&self) -> [u8; 32] { self.using_encoded(blake2_256) } @@ -36,4 +44,7 @@ impl Hashable for T { fn twox_256(&self) -> [u8; 32] { self.using_encoded(twox_256) } + fn twox_64_concat(&self) -> Vec { + self.using_encoded(Twox64Concat::hash) + } } diff --git a/srml/support/src/lib.rs b/srml/support/src/lib.rs index 26ed857058..78edc361d5 100644 --- a/srml/support/src/lib.rs +++ b/srml/support/src/lib.rs @@ -27,7 +27,7 @@ pub use serde; #[doc(hidden)] pub use sr_std as rstd; #[doc(hidden)] -pub use parity_codec as codec; +pub use codec; #[cfg(feature = "std")] #[doc(hidden)] pub use once_cell; @@ -35,8 +35,8 @@ pub use once_cell; pub use paste; pub use sr_primitives as runtime_primitives; -pub use self::storage::generator::Storage as GenericStorage; -pub use self::storage::unhashed::generator::UnhashedStorage as GenericUnhashedStorage; +pub use self::storage::hashed::generator::{HashedStorage, Twox256, Twox128, Blake2_256, Blake2_128, Twox64Concat}; +pub use self::storage::unhashed::generator::UnhashedStorage; #[macro_use] pub mod dispatch; @@ -56,7 +56,7 @@ pub mod inherent; mod double_map; pub mod traits; -pub use self::storage::{StorageVec, StorageList, StorageValue, StorageMap, EnumerableStorageMap, StorageDoubleMap}; +pub use self::storage::{StorageList, StorageValue, StorageMap, EnumerableStorageMap, StorageDoubleMap}; pub use self::hashable::Hashable; pub use self::dispatch::{Parameter, Dispatchable, Callable, IsSubType}; pub use self::double_map::StorageDoubleMapWithHasher; @@ -179,13 +179,13 @@ macro_rules! for_each_tuple { #[cfg(test)] mod tests { use super::*; - use parity_codec::Codec; + use codec::Codec; use runtime_io::{with_externalities, Blake2Hasher}; use runtime_primitives::BuildStorage; pub use srml_metadata::{ DecodeDifferent, StorageMetadata, StorageFunctionMetadata, StorageFunctionType, StorageFunctionModifier, - DefaultByte, DefaultByteGetter, + DefaultByte, DefaultByteGetter, StorageHasher }; pub use rstd::marker::PhantomData; @@ -209,11 +209,11 @@ mod tests { decl_storage! { trait Store for Module as Example { - pub Data get(data) build(|_| vec![(15u32, 42u64)]): linked_map u32 => u64; - pub GenericData get(generic_data): linked_map T::BlockNumber => T::BlockNumber; + pub Data get(data) build(|_| vec![(15u32, 42u64)]): linked_map hasher(twox_64_concat) u32 => u64; + pub GenericData get(generic_data): linked_map hasher(twox_128) T::BlockNumber => T::BlockNumber; pub GenericData2 get(generic_data2): linked_map T::BlockNumber => Option; - pub DataDM config(test_config) build(|_| vec![(15u32, 16u32, 42u64)]): double_map u32, blake2_256(u32) => u64; + pub DataDM config(test_config) build(|_| vec![(15u32, 16u32, 42u64)]): double_map hasher(twox_64_concat) u32, blake2_256(u32) => u64; pub GenericDataDM: double_map T::BlockNumber, twox_128(T::BlockNumber) => T::BlockNumber; pub GenericData2DM: double_map T::BlockNumber, twox_256(T::BlockNumber) => Option; } @@ -354,6 +354,7 @@ mod tests { name: DecodeDifferent::Encode("Data"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ + hasher: StorageHasher::Twox64Concat, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("u64"), is_linked: true }, default: DecodeDifferent::Encode( @@ -365,6 +366,7 @@ mod tests { name: DecodeDifferent::Encode("GenericData"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ + hasher: StorageHasher::Twox128, key: DecodeDifferent::Encode("T::BlockNumber"), value: DecodeDifferent::Encode("T::BlockNumber"), is_linked: true }, default: DecodeDifferent::Encode( @@ -376,6 +378,7 @@ mod tests { name: DecodeDifferent::Encode("GenericData2"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map{ + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("T::BlockNumber"), value: DecodeDifferent::Encode("T::BlockNumber"), is_linked: true }, default: DecodeDifferent::Encode( @@ -387,6 +390,7 @@ mod tests { name: DecodeDifferent::Encode("DataDM"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::DoubleMap{ + hasher: StorageHasher::Twox64Concat, key1: DecodeDifferent::Encode("u32"), key2: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("u64"), @@ -401,6 +405,7 @@ mod tests { name: DecodeDifferent::Encode("GenericDataDM"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::DoubleMap{ + hasher: StorageHasher::Blake2_256, key1: DecodeDifferent::Encode("T::BlockNumber"), key2: DecodeDifferent::Encode("T::BlockNumber"), value: DecodeDifferent::Encode("T::BlockNumber"), @@ -415,6 +420,7 @@ mod tests { name: DecodeDifferent::Encode("GenericData2DM"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::DoubleMap{ + hasher: StorageHasher::Blake2_256, key1: DecodeDifferent::Encode("T::BlockNumber"), key2: DecodeDifferent::Encode("T::BlockNumber"), value: DecodeDifferent::Encode("T::BlockNumber"), diff --git a/srml/support/src/metadata.rs b/srml/support/src/metadata.rs index f7594d27b7..407408b52c 100644 --- a/srml/support/src/metadata.rs +++ b/srml/support/src/metadata.rs @@ -16,10 +16,14 @@ pub use srml_metadata::{ DecodeDifferent, FnEncode, RuntimeMetadata, - ModuleMetadata, RuntimeMetadataV3, + ModuleMetadata, RuntimeMetadataV4, DefaultByteGetter, RuntimeMetadataPrefixed, + StorageMetadata, StorageFunctionMetadata, + StorageFunctionType, StorageFunctionModifier, + DefaultByte, StorageHasher }; + /// Implements the metadata support for the given runtime and all its modules. /// /// Example: @@ -36,8 +40,8 @@ macro_rules! impl_runtime_metadata { ) => { impl $runtime { pub fn metadata() -> $crate::metadata::RuntimeMetadataPrefixed { - $crate::metadata::RuntimeMetadata::V3 ( - $crate::metadata::RuntimeMetadataV3 { + $crate::metadata::RuntimeMetadata::V4 ( + $crate::metadata::RuntimeMetadataV4 { modules: $crate::__runtime_modules_to_metadata!($runtime;; $( $rest )*), } ).into() @@ -377,8 +381,8 @@ mod tests { event_module2::Module with Event Storage Call, ); - const EXPECTED_METADATA: RuntimeMetadata = RuntimeMetadata::V3( - RuntimeMetadataV3 { + const EXPECTED_METADATA: RuntimeMetadata = RuntimeMetadata::V4( + RuntimeMetadataV4 { modules: DecodeDifferent::Encode(&[ ModuleMetadata { name: DecodeDifferent::Encode("system"), diff --git a/srml/support/src/storage/child.rs b/srml/support/src/storage/child.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/srml/support/src/storage/hashed/generator.rs b/srml/support/src/storage/hashed/generator.rs new file mode 100644 index 0000000000..12600a9eaf --- /dev/null +++ b/srml/support/src/storage/hashed/generator.rs @@ -0,0 +1,285 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Abstract storage to use on HashedStorage trait + +use crate::codec; +use crate::rstd::prelude::{Vec, Box}; +#[cfg(feature = "std")] +use crate::storage::unhashed::generator::UnhashedStorage; +use runtime_io::{twox_64, twox_128, blake2_128, twox_256, blake2_256}; + +pub trait StorageHasher: 'static { + type Output: AsRef<[u8]>; + fn hash(x: &[u8]) -> Self::Output; +} + +/// Hash storage keys with `concat(twox128(key), key)` +pub struct Twox64Concat; +impl StorageHasher for Twox64Concat { + type Output = Vec; + fn hash(x: &[u8]) -> Vec { + twox_64(x) + .into_iter() + .chain(x.into_iter()) + .cloned() + .collect::>() + } +} + +#[test] +fn test_twox_64_concat() { + let r = Twox64Concat::hash(b"foo"); + assert_eq!(r.split_at(8), (&twox_128(b"foo")[..8], &b"foo"[..])) +} + +/// Hash storage keys with blake2 128 +pub struct Blake2_128; +impl StorageHasher for Blake2_128 { + type Output = [u8; 16]; + fn hash(x: &[u8]) -> [u8; 16] { + blake2_128(x) + } +} + +/// Hash storage keys with blake2 256 +pub struct Blake2_256; +impl StorageHasher for Blake2_256 { + type Output = [u8; 32]; + fn hash(x: &[u8]) -> [u8; 32] { + blake2_256(x) + } +} + +/// Hash storage keys with twox 128 +pub struct Twox128; +impl StorageHasher for Twox128 { + type Output = [u8; 16]; + fn hash(x: &[u8]) -> [u8; 16] { + twox_128(x) + } +} + +/// Hash storage keys with twox 256 +pub struct Twox256; +impl StorageHasher for Twox256 { + type Output = [u8; 32]; + fn hash(x: &[u8]) -> [u8; 32] { + twox_256(x) + } +} + +/// Abstraction around storage. +pub trait HashedStorage { + /// true if the key exists in storage. + fn exists(&self, key: &[u8]) -> bool; + + /// Load the bytes of a key from storage. Can panic if the type is incorrect. + fn get(&self, key: &[u8]) -> Option; + + /// Load the bytes of a key from storage. Can panic if the type is incorrect. Will panic if + /// it's not there. + fn require(&self, key: &[u8]) -> T { + self.get(key).expect("Required values must be in storage") + } + + /// Load the bytes of a key from storage. Can panic if the type is incorrect. The type's + /// default is returned if it's not there. + fn get_or_default(&self, key: &[u8]) -> T { + self.get(key).unwrap_or_default() + } + + /// Put a value in under a key. + fn put(&self, key: &[u8], val: &T); + + /// Remove the bytes of a key from storage. + fn kill(&self, key: &[u8]); + + /// Take a value from storage, deleting it after reading. + fn take(&self, key: &[u8]) -> Option { + let value = self.get(key); + self.kill(key); + value + } + + /// Take a value from storage, deleting it after reading. + fn take_or_panic(&self, key: &[u8]) -> T { + self.take(key).expect("Required values must be in storage") + } + + /// Take a value from storage, deleting it after reading. + fn take_or_default(&self, key: &[u8]) -> T { + self.take(key).unwrap_or_default() + } + + /// Get a Vec of bytes from storage. + fn get_raw(&self, key: &[u8]) -> Option>; + + /// Put a raw byte slice into storage. + fn put_raw(&self, key: &[u8], value: &[u8]); +} + +// We use a construct like this during when genesis storage is being built. +#[cfg(feature = "std")] +impl HashedStorage for std::cell::RefCell<&mut sr_primitives::StorageOverlay> { + fn exists(&self, key: &[u8]) -> bool { + UnhashedStorage::exists(self, &H::hash(key).as_ref()) + } + + fn get(&self, key: &[u8]) -> Option { + UnhashedStorage::get(self, &H::hash(key).as_ref()) + } + + fn put(&self, key: &[u8], val: &T) { + UnhashedStorage::put(self, &H::hash(key).as_ref(), val) + } + + fn kill(&self, key: &[u8]) { + UnhashedStorage::kill(self, &H::hash(key).as_ref()) + } + + fn get_raw(&self, key: &[u8]) -> Option> { + UnhashedStorage::get_raw(self, &H::hash(key).as_ref()) + } + + fn put_raw(&self, key: &[u8], value: &[u8]) { + UnhashedStorage::put_raw(self, &H::hash(key).as_ref(), value) + } +} + +/// A strongly-typed value kept in storage. +pub trait StorageValue { + /// The type that get/take returns. + type Query; + + /// Get the storage key. + fn key() -> &'static [u8]; + + /// true if the value is defined in storage. + fn exists>(storage: &S) -> bool { + storage.exists(Self::key()) + } + + /// Load the value from the provided storage instance. + fn get>(storage: &S) -> Self::Query; + + /// Take a value from storage, removing it afterwards. + fn take>(storage: &S) -> Self::Query; + + /// Store a value under this key into the provided storage instance. + fn put>(val: &T, storage: &S) { + storage.put(Self::key(), val) + } + + /// Mutate this value + fn mutate R, S: HashedStorage>(f: F, storage: &S) -> R; + + /// Clear the storage value. + fn kill>(storage: &S) { + storage.kill(Self::key()) + } + + /// Append the given items to the value in the storage. + /// + /// `T` is required to implement `codec::EncodeAppend`. + fn append, I: codec::Encode>( + items: &[I], storage: &S + ) -> Result<(), &'static str> where T: codec::EncodeAppend { + let new_val = ::append( + storage.get_raw(Self::key()).unwrap_or_default(), + items, + ).ok_or_else(|| "Could not append given item")?; + storage.put_raw(Self::key(), &new_val); + Ok(()) + } +} + +/// A strongly-typed list in storage. +pub trait StorageList { + /// Get the prefix key in storage. + fn prefix() -> &'static [u8]; + + /// Get the key used to put the length field. + fn len_key() -> Vec; + + /// Get the storage key used to fetch a value at a given index. + fn key_for(index: u32) -> Vec; + + /// Read out all the items. + fn items>(storage: &S) -> Vec; + + /// Set the current set of items. + fn set_items>(items: &[T], storage: &S); + + /// Set the item at the given index. + fn set_item>(index: u32, item: &T, storage: &S); + + /// Load the value at given index. Returns `None` if the index is out-of-bounds. + fn get>(index: u32, storage: &S) -> Option; + + /// Load the length of the list + fn len>(storage: &S) -> u32; + + /// Clear the list. + fn clear>(storage: &S); +} + +/// A strongly-typed map in storage. +pub trait StorageMap { + /// The type that get/take returns. + type Query; + + type Hasher: StorageHasher; + + /// Get the prefix key in storage. + fn prefix() -> &'static [u8]; + + /// Get the storage key used to fetch a value corresponding to a specific key. + fn key_for(x: &K) -> Vec; + + /// true if the value is defined in storage. + fn exists>(key: &K, storage: &S) -> bool { + storage.exists(&Self::key_for(key)[..]) + } + + /// Load the value associated with the given key from the map. + fn get>(key: &K, storage: &S) -> Self::Query; + + /// Take the value under a key. + fn take>(key: &K, storage: &S) -> Self::Query; + + /// Store a value to be associated with the given key from the map. + fn insert>(key: &K, val: &V, storage: &S) { + storage.put(&Self::key_for(key)[..], val); + } + + /// Remove the value under a key. + fn remove>(key: &K, storage: &S) { + storage.kill(&Self::key_for(key)[..]); + } + + /// Mutate the value under a key. + fn mutate R, S: HashedStorage>(key: &K, f: F, storage: &S) -> R; +} + +/// A `StorageMap` with enumerable entries. +pub trait EnumerableStorageMap: StorageMap { + /// Return current head element. + fn head>(storage: &S) -> Option; + + /// Enumerate all elements in the map. + fn enumerate<'a, S: HashedStorage>(storage: &'a S) -> Box + 'a> where K: 'a, V: 'a; +} diff --git a/srml/support/src/storage/hashed/mod.rs b/srml/support/src/storage/hashed/mod.rs new file mode 100644 index 0000000000..5c65cf0513 --- /dev/null +++ b/srml/support/src/storage/hashed/mod.rs @@ -0,0 +1,223 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Operation on runtime storage using hashed keys. + +pub mod generator; +use super::unhashed; +use crate::rstd::prelude::*; +use crate::rstd::borrow::Borrow; +use runtime_io::{self, twox_128}; +use crate::codec::{Codec, Encode, Decode, KeyedVec}; + +/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry. +pub fn get R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> Option { + unhashed::get(&hash(key).as_ref()) +} + +/// Return the value of the item in storage under `key`, or the type's default if there is no +/// explicit entry. +pub fn get_or_default R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> T { + unhashed::get_or_default(&hash(key).as_ref()) +} + +/// Return the value of the item in storage under `key`, or `default_value` if there is no +/// explicit entry. +pub fn get_or R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], default_value: T) -> T { + unhashed::get_or(&hash(key).as_ref(), default_value) +} + +/// Return the value of the item in storage under `key`, or `default_value()` if there is no +/// explicit entry. +pub fn get_or_else T, HashFn: Fn(&[u8]) -> R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], default_value: F) -> T { + unhashed::get_or_else(&hash(key).as_ref(), default_value) +} + +/// Put `value` in storage under `key`. +pub fn put R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], value: &T) { + unhashed::put(&hash(key).as_ref(), value) +} + +/// Remove `key` from storage, returning its value if it had an explicit entry or `None` otherwise. +pub fn take R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> Option { + unhashed::take(&hash(key).as_ref()) +} + +/// Remove `key` from storage, returning its value, or, if there was no explicit entry in storage, +/// the default for its type. +pub fn take_or_default R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> T { + unhashed::take_or_default(&hash(key).as_ref()) +} + +/// Return the value of the item in storage under `key`, or `default_value` if there is no +/// explicit entry. Ensure there is no explicit entry on return. +pub fn take_or R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], default_value: T) -> T { + unhashed::take_or(&hash(key).as_ref(), default_value) +} + +/// Return the value of the item in storage under `key`, or `default_value()` if there is no +/// explicit entry. Ensure there is no explicit entry on return. +pub fn take_or_else T, HashFn: Fn(&[u8]) -> R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], default_value: F) -> T { + unhashed::take_or_else(&hash(key).as_ref(), default_value) +} + +/// Check to see if `key` has an explicit entry in storage. +pub fn exists R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> bool { + unhashed::exists(&hash(key).as_ref()) +} + +/// Ensure `key` has no explicit entry in storage. +pub fn kill R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) { + unhashed::kill(&hash(key).as_ref()) +} + +/// Get a Vec of bytes from storage. +pub fn get_raw R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8]) -> Option> { + unhashed::get_raw(&hash(key).as_ref()) +} + +/// Put a raw byte slice into storage. +pub fn put_raw R, R: AsRef<[u8]>>(hash: &HashFn, key: &[u8], value: &[u8]) { + unhashed::put_raw(&hash(key).as_ref(), value) +} + +/// A trait to conveniently store a vector of storable data. +/// +/// It uses twox_128 hasher. Final keys in trie are `twox_128(concatenation(PREFIX,count))` +pub trait StorageVec { + type Item: Default + Sized + Codec; + const PREFIX: &'static [u8]; + + /// Get the current set of items. + fn items() -> Vec { + (0..Self::count()).into_iter().map(Self::item).collect() + } + + /// Set the current set of items. + fn set_items(items: I) + where + I: IntoIterator, + T: Borrow, + { + let mut count: u32 = 0; + + for i in items.into_iter() { + put(&twox_128, &count.to_keyed_vec(Self::PREFIX), i.borrow()); + count = count.checked_add(1).expect("exceeded runtime storage capacity"); + } + + Self::set_count(count); + } + + /// Push an item. + fn push(item: &Self::Item) { + let len = Self::count(); + put(&twox_128, &len.to_keyed_vec(Self::PREFIX), item); + Self::set_count(len + 1); + } + + fn set_item(index: u32, item: &Self::Item) { + if index < Self::count() { + put(&twox_128, &index.to_keyed_vec(Self::PREFIX), item); + } + } + + fn clear_item(index: u32) { + if index < Self::count() { + kill(&twox_128, &index.to_keyed_vec(Self::PREFIX)); + } + } + + fn item(index: u32) -> Self::Item { + get_or_default(&twox_128, &index.to_keyed_vec(Self::PREFIX)) + } + + fn set_count(count: u32) { + (count..Self::count()).for_each(Self::clear_item); + put(&twox_128, &b"len".to_keyed_vec(Self::PREFIX), &count); + } + + fn count() -> u32 { + get_or_default(&twox_128, &b"len".to_keyed_vec(Self::PREFIX)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use runtime_io::{twox_128, TestExternalities, with_externalities}; + + #[test] + fn integers_can_be_stored() { + let mut t = TestExternalities::default(); + with_externalities(&mut t, || { + let x = 69u32; + put(&twox_128, b":test", &x); + let y: u32 = get(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + with_externalities(&mut t, || { + let x = 69426942i64; + put(&twox_128, b":test", &x); + let y: i64 = get(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + } + + #[test] + fn bools_can_be_stored() { + let mut t = TestExternalities::default(); + with_externalities(&mut t, || { + let x = true; + put(&twox_128, b":test", &x); + let y: bool = get(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + + with_externalities(&mut t, || { + let x = false; + put(&twox_128, b":test", &x); + let y: bool = get(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + } + + #[test] + fn vecs_can_be_retrieved() { + let mut t = TestExternalities::default(); + with_externalities(&mut t, || { + runtime_io::set_storage(&twox_128(b":test"), b"\x2cHello world"); + let x = b"Hello world".to_vec(); + let y = get::, _, _>(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + } + + #[test] + fn vecs_can_be_stored() { + let mut t = TestExternalities::default(); + let x = b"Hello world".to_vec(); + + with_externalities(&mut t, || { + put(&twox_128, b":test", &x); + }); + + with_externalities(&mut t, || { + let y: Vec = get(&twox_128, b":test").unwrap(); + assert_eq!(x, y); + }); + } +} diff --git a/srml/support/src/storage/mod.rs b/srml/support/src/storage/mod.rs index 74b55673e7..fb23383c9d 100644 --- a/srml/support/src/storage/mod.rs +++ b/srml/support/src/storage/mod.rs @@ -18,12 +18,14 @@ use crate::rstd::prelude::*; use crate::rstd::borrow::Borrow; -use runtime_io::{self, twox_128}; -use crate::codec::{Codec, Encode, Decode, KeyedVec, Input, EncodeAppend}; +use codec::{Codec, Encode, Decode, KeyedVec, Input, EncodeAppend}; +use hashed::generator::{HashedStorage, StorageHasher}; +use unhashed::generator::UnhashedStorage; #[macro_use] -pub mod generator; +pub mod storage_items; pub mod unhashed; +pub mod hashed; struct IncrementalInput<'a> { key: &'a [u8], @@ -54,116 +56,44 @@ impl<'a> Input for IncrementalChildInput<'a> { } } - -/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry. -pub fn get(key: &[u8]) -> Option { - unhashed::get(&twox_128(key)) -} - -/// Return the value of the item in storage under `key`, or the type's default if there is no -/// explicit entry. -pub fn get_or_default(key: &[u8]) -> T { - unhashed::get_or_default(&twox_128(key)) -} - -/// Return the value of the item in storage under `key`, or `default_value` if there is no -/// explicit entry. -pub fn get_or(key: &[u8], default_value: T) -> T { - unhashed::get_or(&twox_128(key), default_value) -} - -/// Return the value of the item in storage under `key`, or `default_value()` if there is no -/// explicit entry. -pub fn get_or_else T>(key: &[u8], default_value: F) -> T { - unhashed::get_or_else(&twox_128(key), default_value) -} - -/// Put `value` in storage under `key`. -pub fn put(key: &[u8], value: &T) { - unhashed::put(&twox_128(key), value) -} - -/// Remove `key` from storage, returning its value if it had an explicit entry or `None` otherwise. -pub fn take(key: &[u8]) -> Option { - unhashed::take(&twox_128(key)) -} - -/// Remove `key` from storage, returning its value, or, if there was no explicit entry in storage, -/// the default for its type. -pub fn take_or_default(key: &[u8]) -> T { - unhashed::take_or_default(&twox_128(key)) -} - -/// Return the value of the item in storage under `key`, or `default_value` if there is no -/// explicit entry. Ensure there is no explicit entry on return. -pub fn take_or(key: &[u8], default_value: T) -> T { - unhashed::take_or(&twox_128(key), default_value) -} - -/// Return the value of the item in storage under `key`, or `default_value()` if there is no -/// explicit entry. Ensure there is no explicit entry on return. -pub fn take_or_else T>(key: &[u8], default_value: F) -> T { - unhashed::take_or_else(&twox_128(key), default_value) -} - -/// Check to see if `key` has an explicit entry in storage. -pub fn exists(key: &[u8]) -> bool { - unhashed::exists(&twox_128(key)) -} - -/// Ensure `key` has no explicit entry in storage. -pub fn kill(key: &[u8]) { - unhashed::kill(&twox_128(key)) -} - -/// Get a Vec of bytes from storage. -pub fn get_raw(key: &[u8]) -> Option> { - unhashed::get_raw(&twox_128(key)) -} - -/// Put a raw byte slice into storage. -pub fn put_raw(key: &[u8], value: &[u8]) { - unhashed::put_raw(&twox_128(key), value) -} - /// The underlying runtime storage. pub struct RuntimeStorage; -impl crate::GenericStorage for RuntimeStorage { +impl HashedStorage for RuntimeStorage { fn exists(&self, key: &[u8]) -> bool { - exists(key) + hashed::exists(&H::hash, key) } /// Load the bytes of a key from storage. Can panic if the type is incorrect. fn get(&self, key: &[u8]) -> Option { - get(key) + hashed::get(&H::hash, key) } /// Put a value in under a key. fn put(&self, key: &[u8], val: &T) { - put(key, val) + hashed::put(&H::hash, key, val) } /// Remove the bytes of a key from storage. fn kill(&self, key: &[u8]) { - kill(key) + hashed::kill(&H::hash, key) } /// Take a value from storage, deleting it after reading. fn take(&self, key: &[u8]) -> Option { - take(key) + hashed::take(&H::hash, key) } fn get_raw(&self, key: &[u8]) -> Option> { - get_raw(key) + hashed::get_raw(&H::hash, key) } fn put_raw(&self, key: &[u8], value: &[u8]) { - put_raw(key, value) + hashed::put_raw(&H::hash, key, value) } } -impl crate::GenericUnhashedStorage for RuntimeStorage { +impl UnhashedStorage for RuntimeStorage { fn exists(&self, key: &[u8]) -> bool { unhashed::exists(key) } @@ -235,11 +165,11 @@ pub trait StorageValue { where T: EncodeAppend; } -impl StorageValue for U where U: generator::StorageValue { +impl StorageValue for U where U: hashed::generator::StorageValue { type Query = U::Query; fn key() -> &'static [u8] { - >::key() + >::key() } fn exists() -> bool { U::exists(&RuntimeStorage) @@ -296,17 +226,17 @@ pub trait StorageList { fn clear(); } -impl StorageList for U where U: generator::StorageList { +impl StorageList for U where U: hashed::generator::StorageList { fn prefix() -> &'static [u8] { - >::prefix() + >::prefix() } fn len_key() -> Vec { - >::len_key() + >::len_key() } fn key_for(index: u32) -> Vec { - >::key_for(index) + >::key_for(index) } fn items() -> Vec { @@ -364,15 +294,15 @@ pub trait StorageMap { fn take>(key: KeyArg) -> Self::Query; } -impl StorageMap for U where U: generator::StorageMap { +impl StorageMap for U where U: hashed::generator::StorageMap { type Query = U::Query; fn prefix() -> &'static [u8] { - >::prefix() + >::prefix() } fn key_for>(key: KeyArg) -> Vec { - >::key_for(key.borrow()) + >::key_for(key.borrow()) } fn exists>(key: KeyArg) -> bool { @@ -412,13 +342,13 @@ pub trait EnumerableStorageMap: StorageMap { fn enumerate() -> Box> where K: 'static, V: 'static; } -impl EnumerableStorageMap for U where U: generator::EnumerableStorageMap { +impl EnumerableStorageMap for U where U: hashed::generator::EnumerableStorageMap { fn head() -> Option { - >::head(&RuntimeStorage) + >::head(&RuntimeStorage) } fn enumerate() -> Box> where K: 'static, V: 'static { - >::enumerate(&RuntimeStorage) + >::enumerate(&RuntimeStorage) } } @@ -525,72 +455,13 @@ where } } -/// A trait to conveniently store a vector of storable data. -pub trait StorageVec { - type Item: Default + Sized + Codec; - const PREFIX: &'static [u8]; - - /// Get the current set of items. - fn items() -> Vec { - (0..Self::count()).into_iter().map(Self::item).collect() - } - - /// Set the current set of items. - fn set_items(items: I) - where - I: IntoIterator, - T: Borrow, - { - let mut count: u32 = 0; - - for i in items.into_iter() { - put(&count.to_keyed_vec(Self::PREFIX), i.borrow()); - count = count.checked_add(1).expect("exceeded runtime storage capacity"); - } - - Self::set_count(count); - } - - /// Push an item. - fn push(item: &Self::Item) { - let len = Self::count(); - put(&len.to_keyed_vec(Self::PREFIX), item); - Self::set_count(len + 1); - } - - fn set_item(index: u32, item: &Self::Item) { - if index < Self::count() { - put(&index.to_keyed_vec(Self::PREFIX), item); - } - } - - fn clear_item(index: u32) { - if index < Self::count() { - kill(&index.to_keyed_vec(Self::PREFIX)); - } - } - - fn item(index: u32) -> Self::Item { - get_or_default(&index.to_keyed_vec(Self::PREFIX)) - } - - fn set_count(count: u32) { - (count..Self::count()).for_each(Self::clear_item); - put(&b"len".to_keyed_vec(Self::PREFIX), &count); - } - - fn count() -> u32 { - get_or_default(&b"len".to_keyed_vec(Self::PREFIX)) - } -} - /// child storage NOTE could replace unhashed by having only one kind of storage (root being null storage /// key (storage_key can become Option<&[u8]>). /// This module is a currently only a variant of unhashed with additional `storage_key`. /// Note that `storage_key` must be unique and strong (strong in the sense of being long enough to /// avoid collision from a resistant hash function (which unique implies)). pub mod child { - use super::{runtime_io, Codec, Decode, Vec, IncrementalChildInput}; + use super::{Codec, Decode, Vec, IncrementalChildInput}; /// Return the value of the item in storage under `key`, or `None` if there is no explicit entry. pub fn get(storage_key: &[u8], key: &[u8]) -> Option { @@ -681,71 +552,3 @@ pub mod child { pub use super::unhashed::StorageVec; } - -#[cfg(test)] -mod tests { - use super::*; - use runtime_io::{twox_128, TestExternalities, with_externalities}; - - #[test] - fn integers_can_be_stored() { - let mut t = TestExternalities::default(); - with_externalities(&mut t, || { - let x = 69u32; - put(b":test", &x); - let y: u32 = get(b":test").unwrap(); - assert_eq!(x, y); - }); - with_externalities(&mut t, || { - let x = 69426942i64; - put(b":test", &x); - let y: i64 = get(b":test").unwrap(); - assert_eq!(x, y); - }); - } - - #[test] - fn bools_can_be_stored() { - let mut t = TestExternalities::default(); - with_externalities(&mut t, || { - let x = true; - put(b":test", &x); - let y: bool = get(b":test").unwrap(); - assert_eq!(x, y); - }); - - with_externalities(&mut t, || { - let x = false; - put(b":test", &x); - let y: bool = get(b":test").unwrap(); - assert_eq!(x, y); - }); - } - - #[test] - fn vecs_can_be_retrieved() { - let mut t = TestExternalities::default(); - with_externalities(&mut t, || { - runtime_io::set_storage(&twox_128(b":test"), b"\x2cHello world"); - let x = b"Hello world".to_vec(); - let y = get::>(b":test").unwrap(); - assert_eq!(x, y); - - }); - } - - #[test] - fn vecs_can_be_stored() { - let mut t = TestExternalities::default(); - let x = b"Hello world".to_vec(); - - with_externalities(&mut t, || { - put(b":test", &x); - }); - - with_externalities(&mut t, || { - let y: Vec = get(b":test").unwrap(); - assert_eq!(x, y); - }); - } -} diff --git a/srml/support/src/storage/generator.rs b/srml/support/src/storage/storage_items.rs similarity index 72% rename from srml/support/src/storage/generator.rs rename to srml/support/src/storage/storage_items.rs index 3d57d200e2..720cac64c5 100644 --- a/srml/support/src/storage/generator.rs +++ b/srml/support/src/storage/storage_items.rs @@ -46,10 +46,6 @@ //!# fn main() { } //! ``` -use crate::codec; -use crate::rstd::vec::Vec; -#[cfg(feature = "std")] -use crate::storage::unhashed::generator::UnhashedStorage; #[doc(hidden)] pub use crate::rstd::borrow::Borrow; #[doc(hidden)] @@ -57,204 +53,6 @@ pub use crate::rstd::marker::PhantomData; #[doc(hidden)] pub use crate::rstd::boxed::Box; -pub use srml_metadata::{ - DecodeDifferent, StorageMetadata, StorageFunctionMetadata, - StorageFunctionType, StorageFunctionModifier, - DefaultByte, DefaultByteGetter, -}; - -/// Abstraction around storage. -pub trait Storage { - /// true if the key exists in storage. - fn exists(&self, key: &[u8]) -> bool; - - /// Load the bytes of a key from storage. Can panic if the type is incorrect. - fn get(&self, key: &[u8]) -> Option; - - /// Load the bytes of a key from storage. Can panic if the type is incorrect. Will panic if - /// it's not there. - fn require(&self, key: &[u8]) -> T { self.get(key).expect("Required values must be in storage") } - - /// Load the bytes of a key from storage. Can panic if the type is incorrect. The type's - /// default is returned if it's not there. - fn get_or_default(&self, key: &[u8]) -> T { self.get(key).unwrap_or_default() } - - /// Put a value in under a key. - fn put(&self, key: &[u8], val: &T); - - /// Remove the bytes of a key from storage. - fn kill(&self, key: &[u8]); - - /// Take a value from storage, deleting it after reading. - fn take(&self, key: &[u8]) -> Option { - let value = self.get(key); - self.kill(key); - value - } - - /// Take a value from storage, deleting it after reading. - fn take_or_panic(&self, key: &[u8]) -> T { self.take(key).expect("Required values must be in storage") } - - /// Take a value from storage, deleting it after reading. - fn take_or_default(&self, key: &[u8]) -> T { self.take(key).unwrap_or_default() } - - /// Get a Vec of bytes from storage. - fn get_raw(&self, key: &[u8]) -> Option>; - - /// Put a raw byte slice into storage. - fn put_raw(&self, key: &[u8], value: &[u8]); -} - -// We use a construct like this during when genesis storage is being built. -#[cfg(feature = "std")] -impl Storage for (crate::rstd::cell::RefCell<&mut sr_primitives::StorageOverlay>, PhantomData) { - fn exists(&self, key: &[u8]) -> bool { - UnhashedStorage::exists(self, &S::hash(key)) - } - - fn get(&self, key: &[u8]) -> Option { - UnhashedStorage::get(self, &S::hash(key)) - } - - fn put(&self, key: &[u8], val: &T) { - UnhashedStorage::put(self, &S::hash(key), val) - } - - fn kill(&self, key: &[u8]) { - UnhashedStorage::kill(self, &S::hash(key)) - } - - fn get_raw(&self, key: &[u8]) -> Option> { - UnhashedStorage::get_raw(self, key) - } - - fn put_raw(&self, key: &[u8], value: &[u8]) { - UnhashedStorage::put_raw(self, key, value) - } -} - -/// A strongly-typed value kept in storage. -pub trait StorageValue { - /// The type that get/take returns. - type Query; - - /// Get the storage key. - fn key() -> &'static [u8]; - - /// true if the value is defined in storage. - fn exists(storage: &S) -> bool { - storage.exists(Self::key()) - } - - /// Load the value from the provided storage instance. - fn get(storage: &S) -> Self::Query; - - /// Take a value from storage, removing it afterwards. - fn take(storage: &S) -> Self::Query; - - /// Store a value under this key into the provided storage instance. - fn put(val: &T, storage: &S) { - storage.put(Self::key(), val) - } - - /// Mutate this value - fn mutate R, S: Storage>(f: F, storage: &S) -> R; - - /// Clear the storage value. - fn kill(storage: &S) { - storage.kill(Self::key()) - } - - /// Append the given items to the value in the storage. - /// - /// `T` is required to implement `codec::EncodeAppend`. - fn append( - items: &[I], storage: &S - ) -> Result<(), &'static str> where T: codec::EncodeAppend { - let new_val = ::append( - storage.get_raw(Self::key()).unwrap_or_default(), - items, - ).ok_or_else(|| "Could not append given item")?; - storage.put_raw(Self::key(), &new_val); - Ok(()) - } -} - -/// A strongly-typed list in storage. -pub trait StorageList { - /// Get the prefix key in storage. - fn prefix() -> &'static [u8]; - - /// Get the key used to put the length field. - fn len_key() -> Vec; - - /// Get the storage key used to fetch a value at a given index. - fn key_for(index: u32) -> Vec; - - /// Read out all the items. - fn items(storage: &S) -> Vec; - - /// Set the current set of items. - fn set_items(items: &[T], storage: &S); - - /// Set the item at the given index. - fn set_item(index: u32, item: &T, storage: &S); - - /// Load the value at given index. Returns `None` if the index is out-of-bounds. - fn get(index: u32, storage: &S) -> Option; - - /// Load the length of the list - fn len(storage: &S) -> u32; - - /// Clear the list. - fn clear(storage: &S); -} - -/// A strongly-typed map in storage. -pub trait StorageMap { - /// The type that get/take returns. - type Query; - - /// Get the prefix key in storage. - fn prefix() -> &'static [u8]; - - /// Get the storage key used to fetch a value corresponding to a specific key. - fn key_for(x: &K) -> Vec; - - /// true if the value is defined in storage. - fn exists(key: &K, storage: &S) -> bool { - storage.exists(&Self::key_for(key)[..]) - } - - /// Load the value associated with the given key from the map. - fn get(key: &K, storage: &S) -> Self::Query; - - /// Take the value under a key. - fn take(key: &K, storage: &S) -> Self::Query; - - /// Store a value to be associated with the given key from the map. - fn insert(key: &K, val: &V, storage: &S) { - storage.put(&Self::key_for(key)[..], val); - } - - /// Remove the value under a key. - fn remove(key: &K, storage: &S) { - storage.kill(&Self::key_for(key)[..]); - } - - /// Mutate the value under a key. - fn mutate R, S: Storage>(key: &K, f: F, storage: &S) -> R; -} - -/// A `StorageMap` with enumerable entries. -pub trait EnumerableStorageMap: StorageMap { - /// Return current head element. - fn head(storage: &S) -> Option; - - /// Enumerate all elements in the map. - fn enumerate<'a, S: Storage>(storage: &'a S) -> Box + 'a> where K: 'a, V: 'a; -} - // FIXME #1466 Remove this in favor of `decl_storage` macro. /// Declares strongly-typed wrappers around codec-compatible types in storage. #[macro_export] @@ -380,12 +178,12 @@ macro_rules! __storage_items_internal { // generator for values. (($($vis:tt)*) ($get_fn:ident) ($wraptype:ident $gettype:ty) ($getter:ident) ($taker:ident) $name:ident : $key:expr => $ty:ty) => { $crate::__storage_items_internal!{ ($($vis)*) () ($wraptype $gettype) ($getter) ($taker) $name : $key => $ty } - pub fn $get_fn() -> $gettype { <$name as $crate::storage::generator::StorageValue<$ty>> :: get(&$crate::storage::RuntimeStorage) } + pub fn $get_fn() -> $gettype { <$name as $crate::storage::hashed::generator::StorageValue<$ty>> :: get(&$crate::storage::RuntimeStorage) } }; (($($vis:tt)*) () ($wraptype:ident $gettype:ty) ($getter:ident) ($taker:ident) $name:ident : $key:expr => $ty:ty) => { $($vis)* struct $name; - impl $crate::storage::generator::StorageValue<$ty> for $name { + impl $crate::storage::hashed::generator::StorageValue<$ty> for $name { type Query = $gettype; /// Get the storage key. @@ -394,29 +192,29 @@ macro_rules! __storage_items_internal { } /// Load the value from the provided storage instance. - fn get(storage: &S) -> Self::Query { + fn get>(storage: &S) -> Self::Query { storage.$getter($key) } /// Take a value from storage, removing it afterwards. - fn take(storage: &S) -> Self::Query { + fn take>(storage: &S) -> Self::Query { storage.$taker($key) } /// Mutate this value. - fn mutate R, S: $crate::GenericStorage>(f: F, storage: &S) -> R { - let mut val = >::get(storage); + fn mutate R, S: $crate::HashedStorage<$crate::Twox128>>(f: F, storage: &S) -> R { + let mut val = >::get(storage); let ret = f(&mut val); $crate::__handle_wrap_internal!($wraptype { // raw type case - >::put(&val, storage) + >::put(&val, storage) } { // Option<> type case match val { - Some(ref val) => >::put(&val, storage), - None => >::kill(storage), + Some(ref val) => >::put(&val, storage), + None => >::kill(storage), } }); @@ -428,15 +226,17 @@ macro_rules! __storage_items_internal { (($($vis:tt)*) ($get_fn:ident) ($wraptype:ident $gettype:ty) ($getter:ident) ($taker:ident) $name:ident : $prefix:expr => map [$kty:ty => $ty:ty]) => { $crate::__storage_items_internal!{ ($($vis)*) () ($wraptype $gettype) ($getter) ($taker) $name : $prefix => map [$kty => $ty] } pub fn $get_fn>(key: K) -> $gettype { - <$name as $crate::storage::generator::StorageMap<$kty, $ty>> :: get(key.borrow(), &$crate::storage::RuntimeStorage) + <$name as $crate::storage::hashed::generator::StorageMap<$kty, $ty>> :: get(key.borrow(), &$crate::storage::RuntimeStorage) } }; (($($vis:tt)*) () ($wraptype:ident $gettype:ty) ($getter:ident) ($taker:ident) $name:ident : $prefix:expr => map [$kty:ty => $ty:ty]) => { $($vis)* struct $name; - impl $crate::storage::generator::StorageMap<$kty, $ty> for $name { + impl $crate::storage::hashed::generator::StorageMap<$kty, $ty> for $name { type Query = $gettype; + type Hasher = $crate::Blake2_256; + /// Get the prefix key in storage. fn prefix() -> &'static [u8] { $prefix @@ -450,31 +250,31 @@ macro_rules! __storage_items_internal { } /// Load the value associated with the given key from the map. - fn get(key: &$kty, storage: &S) -> Self::Query { - let key = <$name as $crate::storage::generator::StorageMap<$kty, $ty>>::key_for(key); + fn get>(key: &$kty, storage: &S) -> Self::Query { + let key = <$name as $crate::storage::hashed::generator::StorageMap<$kty, $ty>>::key_for(key); storage.$getter(&key[..]) } /// Take the value, reading and removing it. - fn take(key: &$kty, storage: &S) -> Self::Query { - let key = <$name as $crate::storage::generator::StorageMap<$kty, $ty>>::key_for(key); + fn take>(key: &$kty, storage: &S) -> Self::Query { + let key = <$name as $crate::storage::hashed::generator::StorageMap<$kty, $ty>>::key_for(key); storage.$taker(&key[..]) } /// Mutate the value under a key. - fn mutate R, S: $crate::GenericStorage>(key: &$kty, f: F, storage: &S) -> R { - let mut val = >::take(key, storage); + fn mutate R, S: $crate::HashedStorage>(key: &$kty, f: F, storage: &S) -> R { + let mut val = >::take(key, storage); let ret = f(&mut val); $crate::__handle_wrap_internal!($wraptype { // raw type case - >::insert(key, &val, storage) + >::insert(key, &val, storage) } { // Option<> type case match val { - Some(ref val) => >::insert(key, &val, storage), - None => >::remove(key, storage), + Some(ref val) => >::insert(key, &val, storage), + None => >::remove(key, storage), } }); @@ -487,19 +287,19 @@ macro_rules! __storage_items_internal { $($vis)* struct $name; impl $name { - fn clear_item(index: u32, storage: &S) { - if index < <$name as $crate::storage::generator::StorageList<$ty>>::len(storage) { - storage.kill(&<$name as $crate::storage::generator::StorageList<$ty>>::key_for(index)); + fn clear_item>(index: u32, storage: &S) { + if index < <$name as $crate::storage::hashed::generator::StorageList<$ty>>::len(storage) { + storage.kill(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::key_for(index)); } } - fn set_len(count: u32, storage: &S) { - (count..<$name as $crate::storage::generator::StorageList<$ty>>::len(storage)).for_each(|i| $name::clear_item(i, storage)); - storage.put(&<$name as $crate::storage::generator::StorageList<$ty>>::len_key(), &count); + fn set_len>(count: u32, storage: &S) { + (count..<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len(storage)).for_each(|i| $name::clear_item(i, storage)); + storage.put(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len_key(), &count); } } - impl $crate::storage::generator::StorageList<$ty> for $name { + impl $crate::storage::hashed::generator::StorageList<$ty> for $name { /// Get the prefix key in storage. fn prefix() -> &'static [u8] { $prefix @@ -520,43 +320,43 @@ macro_rules! __storage_items_internal { } /// Read out all the items. - fn items(storage: &S) -> $crate::rstd::vec::Vec<$ty> { - (0..<$name as $crate::storage::generator::StorageList<$ty>>::len(storage)) - .map(|i| <$name as $crate::storage::generator::StorageList<$ty>>::get(i, storage).expect("all items within length are set; qed")) + fn items>(storage: &S) -> $crate::rstd::vec::Vec<$ty> { + (0..<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len(storage)) + .map(|i| <$name as $crate::storage::hashed::generator::StorageList<$ty>>::get(i, storage).expect("all items within length are set; qed")) .collect() } /// Set the current set of items. - fn set_items(items: &[$ty], storage: &S) { + fn set_items>(items: &[$ty], storage: &S) { $name::set_len(items.len() as u32, storage); items.iter() .enumerate() - .for_each(|(i, item)| <$name as $crate::storage::generator::StorageList<$ty>>::set_item(i as u32, item, storage)); + .for_each(|(i, item)| <$name as $crate::storage::hashed::generator::StorageList<$ty>>::set_item(i as u32, item, storage)); } - fn set_item(index: u32, item: &$ty, storage: &S) { - if index < <$name as $crate::storage::generator::StorageList<$ty>>::len(storage) { - storage.put(&<$name as $crate::storage::generator::StorageList<$ty>>::key_for(index)[..], item); + fn set_item>(index: u32, item: &$ty, storage: &S) { + if index < <$name as $crate::storage::hashed::generator::StorageList<$ty>>::len(storage) { + storage.put(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::key_for(index)[..], item); } } /// Load the value at given index. Returns `None` if the index is out-of-bounds. - fn get(index: u32, storage: &S) -> Option<$ty> { - storage.get(&<$name as $crate::storage::generator::StorageList<$ty>>::key_for(index)[..]) + fn get>(index: u32, storage: &S) -> Option<$ty> { + storage.get(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::key_for(index)[..]) } /// Load the length of the list. - fn len(storage: &S) -> u32 { - storage.get(&<$name as $crate::storage::generator::StorageList<$ty>>::len_key()).unwrap_or_default() + fn len>(storage: &S) -> u32 { + storage.get(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len_key()).unwrap_or_default() } /// Clear the list. - fn clear(storage: &S) { - for i in 0..<$name as $crate::storage::generator::StorageList<$ty>>::len(storage) { + fn clear>(storage: &S) { + for i in 0..<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len(storage) { $name::clear_item(i, storage); } - storage.kill(&<$name as $crate::storage::generator::StorageList<$ty>>::len_key()[..]) + storage.kill(&<$name as $crate::storage::hashed::generator::StorageList<$ty>>::len_key()[..]) } } }; @@ -584,35 +384,11 @@ macro_rules! __handle_wrap_internal { mod tests { use std::collections::HashMap; use std::cell::RefCell; - use codec::{Decode, Encode}; use super::*; + use crate::metadata::*; + use crate::metadata::StorageHasher; use crate::rstd::marker::PhantomData; - - impl Storage for RefCell, Vec>> { - fn exists(&self, key: &[u8]) -> bool { - self.borrow_mut().get(key).is_some() - } - - fn get(&self, key: &[u8]) -> Option { - self.borrow_mut().get(key).map(|v| T::decode(&mut &v[..]).unwrap()) - } - - fn put(&self, key: &[u8], val: &T) { - self.borrow_mut().insert(key.to_owned(), val.encode()); - } - - fn kill(&self, key: &[u8]) { - self.borrow_mut().remove(key); - } - - fn put_raw(&self, key: &[u8], value: &[u8]) { - self.borrow_mut().insert(key.to_owned(), value.to_owned()); - } - - fn get_raw(&self, key: &[u8]) -> Option> { - self.borrow().get(key).cloned() - } - } + use crate::storage::hashed::generator::*; storage_items! { Value: b"a" => u32; @@ -622,7 +398,8 @@ mod tests { #[test] fn value() { - let storage = RefCell::new(HashMap::new()); + let mut overlay = HashMap::new(); + let storage = RefCell::new(&mut overlay); assert!(Value::get(&storage).is_none()); Value::put(&100_000, &storage); assert_eq!(Value::get(&storage), Some(100_000)); @@ -632,7 +409,8 @@ mod tests { #[test] fn list() { - let storage = RefCell::new(HashMap::new()); + let mut overlay = HashMap::new(); + let storage = RefCell::new(&mut overlay); assert_eq!(List::len(&storage), 0); assert!(List::items(&storage).is_empty()); @@ -651,7 +429,8 @@ mod tests { #[test] fn map() { - let storage = RefCell::new(HashMap::new()); + let mut overlay = HashMap::new(); + let storage = RefCell::new(&mut overlay); assert!(Map::get(&5, &storage).is_none()); Map::insert(&5, &[1; 32], &storage); assert_eq!(Map::get(&5, &storage), Some([1; 32])); @@ -661,7 +440,7 @@ mod tests { } pub trait Trait { - type Origin: codec::Encode + codec::Decode + ::std::default::Default; + type Origin: crate::codec::Encode + crate::codec::Decode + ::std::default::Default; type BlockNumber; } @@ -850,6 +629,7 @@ mod tests { name: DecodeDifferent::Encode("MAPU32"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -863,6 +643,7 @@ mod tests { name: DecodeDifferent::Encode("PUBMAPU32"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -876,6 +657,7 @@ mod tests { name: DecodeDifferent::Encode("MAPU32MYDEF"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -889,6 +671,7 @@ mod tests { name: DecodeDifferent::Encode("PUBMAPU32MYDEF"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -902,6 +685,7 @@ mod tests { name: DecodeDifferent::Encode("GETMAPU32"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -915,6 +699,7 @@ mod tests { name: DecodeDifferent::Encode("PUBGETMAPU32"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -928,6 +713,7 @@ mod tests { name: DecodeDifferent::Encode("GETMAPU32MYDEF"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -941,6 +727,7 @@ mod tests { name: DecodeDifferent::Encode("PUBGETMAPU32MYDEF"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: false, @@ -954,6 +741,7 @@ mod tests { name: DecodeDifferent::Encode("LINKEDMAPU32"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: true, @@ -967,6 +755,7 @@ mod tests { name: DecodeDifferent::Encode("PUBLINKEDMAPU32MYDEF"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: true, @@ -980,6 +769,7 @@ mod tests { name: DecodeDifferent::Encode("GETLINKEDMAPU32"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: true, @@ -993,6 +783,7 @@ mod tests { name: DecodeDifferent::Encode("PUBGETLINKEDMAPU32MYDEF"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map { + hasher: StorageHasher::Blake2_256, key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String"), is_linked: true, diff --git a/srml/support/src/storage/unhashed/generator.rs b/srml/support/src/storage/unhashed/generator.rs index 6993059c2a..25592dce6d 100644 --- a/srml/support/src/storage/unhashed/generator.rs +++ b/srml/support/src/storage/unhashed/generator.rs @@ -15,7 +15,6 @@ // along with Substrate. If not, see . use crate::codec; -use runtime_io::twox_128; use crate::rstd::vec::Vec; /// Abstraction around storage with unhashed access. @@ -65,36 +64,36 @@ pub trait UnhashedStorage { // We use a construct like this during when genesis storage is being built. #[cfg(feature = "std")] -impl UnhashedStorage for (crate::rstd::cell::RefCell<&mut sr_primitives::StorageOverlay>, H) { +impl UnhashedStorage for std::cell::RefCell<&mut sr_primitives::StorageOverlay> { fn exists(&self, key: &[u8]) -> bool { - self.0.borrow().contains_key(key) + self.borrow().contains_key(key) } fn get(&self, key: &[u8]) -> Option { - self.0.borrow().get(key) + self.borrow().get(key) .map(|x| codec::Decode::decode(&mut x.as_slice()).expect("Unable to decode expected type.")) } fn put(&self, key: &[u8], val: &T) { - self.0.borrow_mut().insert(key.to_vec(), codec::Encode::encode(val)); + self.borrow_mut().insert(key.to_vec(), codec::Encode::encode(val)); } fn kill(&self, key: &[u8]) { - self.0.borrow_mut().remove(key); + self.borrow_mut().remove(key); } fn kill_prefix(&self, prefix: &[u8]) { - self.0.borrow_mut().retain(|key, _| { + self.borrow_mut().retain(|key, _| { !key.starts_with(prefix) }) } fn get_raw(&self, key: &[u8]) -> Option> { - self.0.borrow().get(key).cloned() + self.borrow().get(key).cloned() } fn put_raw(&self, key: &[u8], value: &[u8]) { - self.0.borrow_mut().insert(key.to_vec(), value.to_vec()); + self.borrow_mut().insert(key.to_vec(), value.to_vec()); } } @@ -121,11 +120,7 @@ pub trait StorageDoubleMap fn key_for(k1: &K1, k2: &K2) -> Vec; /// Get the storage prefix used to fetch keys corresponding to a specific key1. - fn prefix_for(k1: &K1) -> Vec { - let mut key = Self::prefix().to_vec(); - codec::Encode::encode_to(k1, &mut key); - twox_128(&key).to_vec() - } + fn prefix_for(k1: &K1) -> Vec; /// true if the value is defined in storage. fn exists(k1: &K1, k2: &K2, storage: &S) -> bool { diff --git a/srml/support/src/storage/unhashed/mod.rs b/srml/support/src/storage/unhashed/mod.rs index 225c6756b8..40e18d0cd2 100644 --- a/srml/support/src/storage/unhashed/mod.rs +++ b/srml/support/src/storage/unhashed/mod.rs @@ -17,7 +17,7 @@ //! Operation on unhashed runtime storage use crate::rstd::borrow::Borrow; -use super::{runtime_io, Codec, Encode, Decode, KeyedVec, Vec, IncrementalInput}; +use super::{Codec, Encode, Decode, KeyedVec, Vec, IncrementalInput}; pub mod generator; -- GitLab From 8a28b59dd97ac8f7f165d649b0a2f3e4b1965e81 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 24 Apr 2019 11:58:08 +0200 Subject: [PATCH 055/206] Silence the spam a little bit (#2362) --- core/network-libp2p/src/custom_proto/handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index d464ed37a9..beac1dec25 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -690,7 +690,7 @@ where } ProtocolState::BackCompat { substream: existing, mut shutdown } => { - warn!(target: "sub-libp2p", "Received extra substream after having already one \ + debug!(target: "sub-libp2p", "Received extra substream after having already one \ open in backwards-compatibility mode with {:?}", self.remote_peer_id); substream.shutdown(); shutdown.push(substream); -- GitLab From 2a991ddd61dac151e6828695d6f73a7014449464 Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Wed, 24 Apr 2019 11:58:30 +0200 Subject: [PATCH 056/206] Use from_ss58check and to_ss58check from Ss58Codec for ed25519 (#2355) * fix: use Ss58Codec for from_ss58check and to_ss58check * Update lib.rs * chore: clean --- Cargo.lock | 1230 ++++++++++++++++---------------- core/keystore/src/lib.rs | 3 +- core/primitives/src/ed25519.rs | 34 +- subkey/src/vanity.rs | 2 +- 4 files changed, 619 insertions(+), 650 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 62880e324e..9069255fcc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ name = "MacTypes-sys" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -41,10 +41,10 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -56,7 +56,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -65,7 +65,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -119,9 +119,9 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -131,15 +131,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -148,7 +148,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -189,22 +189,23 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.43.2" +version = "0.47.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -248,10 +249,10 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -267,7 +268,7 @@ dependencies = [ [[package]] name = "block-padding" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -278,6 +279,14 @@ name = "bs58" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bstr" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bumpalo" version = "2.4.1" @@ -332,10 +341,10 @@ dependencies = [ [[package]] name = "cexpr" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -359,7 +368,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -413,7 +422,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -421,36 +430,38 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion-plot" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -469,7 +480,7 @@ dependencies = [ "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -479,7 +490,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -591,11 +602,13 @@ dependencies = [ [[package]] name = "csv" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -603,7 +616,7 @@ name = "csv-core" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -617,7 +630,7 @@ dependencies = [ [[package]] name = "ctr" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -626,11 +639,11 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -644,13 +657,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "1.0.3" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -664,7 +677,7 @@ name = "derive_more" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", @@ -711,7 +724,7 @@ version = "1.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -719,7 +732,7 @@ dependencies = [ [[package]] name = "either" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -738,7 +751,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -752,7 +765,7 @@ name = "erased-serde" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -760,16 +773,16 @@ name = "error-chain" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "exit-future" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -777,7 +790,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -786,7 +799,7 @@ name = "failure_derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -802,7 +815,7 @@ name = "fdlimit" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -826,7 +839,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -863,9 +876,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -898,7 +911,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -930,7 +943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -940,7 +953,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -950,31 +963,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "globset" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -984,7 +997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hash256-std-hasher" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1009,7 +1022,7 @@ name = "heapsize" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1027,16 +1040,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hex-literal" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hex-literal-impl" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1073,7 +1086,7 @@ dependencies = [ [[package]] name = "http" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1104,7 +1117,7 @@ dependencies = [ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1114,26 +1127,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.23" +version = "0.12.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1162,7 +1176,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1185,7 +1199,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1194,7 +1208,7 @@ name = "itertools" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1212,74 +1226,74 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-derive" -version = "10.0.2" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.27 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1293,11 +1307,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "keccak-hasher" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1338,9 +1352,9 @@ dependencies = [ "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1361,7 +1375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.48" +version = "0.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1370,7 +1384,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1399,13 +1413,13 @@ dependencies = [ "libp2p-websocket 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1424,18 +1438,18 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1462,7 +1476,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1476,11 +1490,11 @@ dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1496,10 +1510,10 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1520,13 +1534,13 @@ dependencies = [ "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1545,9 +1559,9 @@ dependencies = [ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1565,7 +1579,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1574,16 +1588,16 @@ name = "libp2p-noise" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", - "snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1601,7 +1615,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1626,7 +1640,7 @@ dependencies = [ "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1637,21 +1651,21 @@ dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1670,7 +1684,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1696,10 +1710,10 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1710,20 +1724,19 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librocksdb-sys" -version = "5.14.3" +version = "5.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1785,11 +1798,6 @@ dependencies = [ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "make-cmd" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "matches" version = "0.1.8" @@ -1797,11 +1805,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1826,13 +1833,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "merlin" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1854,7 +1860,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1879,7 +1885,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1902,9 +1908,9 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1922,15 +1928,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1939,19 +1945,19 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nix" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1959,9 +1965,9 @@ dependencies = [ name = "node-cli" version = "1.0.0" dependencies = [ - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 1.0.0", "node-primitives 1.0.0", @@ -1969,7 +1975,7 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-basic-authorship 1.0.0", "substrate-cli 1.0.0", "substrate-client 1.0.0", @@ -1983,7 +1989,7 @@ dependencies = [ "substrate-service-test 1.0.0", "substrate-telemetry 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2021,7 +2027,7 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -2032,13 +2038,13 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", "sr-version 1.0.0", @@ -2071,11 +2077,11 @@ dependencies = [ name = "node-template" version = "1.0.0" dependencies = [ - "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2091,7 +2097,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-service 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2102,7 +2108,7 @@ version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -2135,10 +2141,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" -version = "4.2.0" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2157,12 +2163,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ole32-sys" version = "0.2.0" @@ -2187,15 +2198,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.10.16" +version = "0.10.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2205,12 +2216,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.40" +version = "0.9.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2219,7 +2231,7 @@ name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2250,7 +2262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2259,7 +2271,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2285,21 +2297,21 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-multihash" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2360,10 +2372,10 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2371,11 +2383,11 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2383,29 +2395,29 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste-impl" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2484,10 +2496,10 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2499,15 +2511,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2515,7 +2519,7 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2538,20 +2542,12 @@ name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quote" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "quote" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2559,7 +2555,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2569,10 +2565,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2582,9 +2578,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2593,16 +2589,16 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2648,31 +2644,31 @@ name = "rand_jitter" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_os" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_pcg" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2698,7 +2694,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2709,8 +2705,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2723,7 +2719,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.51" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2731,7 +2727,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2741,19 +2737,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.1.0" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2764,7 +2760,7 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2786,10 +2782,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2797,8 +2793,8 @@ name = "rocksdb" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2807,7 +2803,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2815,7 +2811,7 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2843,7 +2839,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2874,23 +2870,23 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schnorrkel" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.1.1" +source = "git+https://github.com/paritytech/schnorrkel#1762df02ac48ba5c3fa8c162e19a393247079f88" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2901,13 +2897,13 @@ dependencies = [ [[package]] name = "schnorrkel" version = "0.1.1" -source = "git+https://github.com/paritytech/schnorrkel#1762df02ac48ba5c3fa8c162e19a393247079f88" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2936,7 +2932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2947,7 +2943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2970,30 +2966,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha-1" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3018,7 +3025,7 @@ name = "sha2" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3029,7 +3036,7 @@ name = "sha3" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3075,8 +3082,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3095,22 +3102,19 @@ name = "slog_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "smallvec" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "snow" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3120,8 +3124,9 @@ dependencies = [ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3139,9 +3144,9 @@ name = "sr-api-macros" version = "1.0.0" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-version 1.0.0", @@ -3176,8 +3181,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-std 1.0.0", "substrate-primitives 1.0.0", @@ -3193,7 +3198,7 @@ dependencies = [ "sr-std 1.0.0", "substrate-primitives 1.0.0", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3209,7 +3214,7 @@ version = "1.0.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "sr-std 1.0.0", ] @@ -3218,9 +3223,9 @@ dependencies = [ name = "srml-assets" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3233,11 +3238,11 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3255,10 +3260,10 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3272,9 +3277,9 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3289,11 +3294,11 @@ name = "srml-contract" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-sandbox 1.0.0", @@ -3312,10 +3317,10 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3330,10 +3335,10 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3347,9 +3352,9 @@ dependencies = [ name = "srml-example" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "srml-balances 1.0.0", @@ -3362,9 +3367,9 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3379,11 +3384,11 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3398,7 +3403,7 @@ name = "srml-grandpa" version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3415,11 +3420,11 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3434,7 +3439,7 @@ name = "srml-metadata" version = "1.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", ] @@ -3443,11 +3448,11 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3462,10 +3467,10 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3483,9 +3488,9 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3500,12 +3505,12 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3519,7 +3524,7 @@ dependencies = [ name = "srml-support-procedural" version = "1.0.0" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", @@ -3531,7 +3536,7 @@ name = "srml-support-procedural-tools" version = "1.0.0" dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3541,7 +3546,7 @@ dependencies = [ name = "srml-support-procedural-tools-derive" version = "1.0.0" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3551,7 +3556,7 @@ name = "srml-support-test" version = "0.1.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "srml-support 1.0.0", "substrate-inherents 1.0.0", @@ -3562,11 +3567,11 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3578,9 +3583,9 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3594,9 +3599,9 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -3623,14 +3628,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stdweb" -version = "0.4.13" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb-internal-macros 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb-internal-runtime 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3638,31 +3644,31 @@ name = "stdweb-derive" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stdweb-internal-macros" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stdweb-internal-runtime" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -3685,20 +3691,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3714,7 +3720,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3727,17 +3733,17 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", "substrate-primitives 1.0.0", - "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate" version = "1.0.0" dependencies = [ - "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "node-cli 1.0.0", @@ -3763,12 +3769,12 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.2.0" -source = "git+https://github.com/paritytech/substrate-bip39#080da45923885cfec2379cef3dee4e7f43e6c260" +version = "0.2.1" +source = "git+https://github.com/paritytech/substrate-bip39#44307fda4ea17fe97aeb93af317fbc8f6ed34193" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3782,16 +3788,16 @@ dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-client 1.0.0", "substrate-keyring 1.0.0", "substrate-network 0.1.0", @@ -3800,10 +3806,10 @@ dependencies = [ "substrate-service 1.0.0", "substrate-state-machine 1.0.0", "substrate-telemetry 1.0.0", - "sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3815,7 +3821,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3890,7 +3896,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-telemetry 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3945,7 +3951,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-telemetry 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3973,7 +3979,7 @@ dependencies = [ "substrate-inherents 1.0.0", "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3981,7 +3987,7 @@ name = "substrate-consensus-rhd" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3998,7 +4004,7 @@ dependencies = [ "substrate-keyring 1.0.0", "substrate-primitives 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4015,7 +4021,7 @@ dependencies = [ "substrate-consensus-common 1.0.0", "substrate-inherents 1.0.0", "substrate-primitives 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4025,7 +4031,7 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4040,7 +4046,7 @@ dependencies = [ "substrate-trie 1.0.0", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4055,7 +4061,7 @@ dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "srml-finality-tracker 1.0.0", "substrate-client 1.0.0", @@ -4068,7 +4074,7 @@ dependencies = [ "substrate-service 1.0.0", "substrate-telemetry 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4096,7 +4102,7 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4112,7 +4118,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 1.0.0", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4144,7 +4150,7 @@ dependencies = [ "substrate-peerset 1.0.0", "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4162,15 +4168,15 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-peerset 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4192,7 +4198,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-test-client 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4207,7 +4213,7 @@ dependencies = [ name = "substrate-panic-handler" version = "1.0.0" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4220,7 +4226,7 @@ dependencies = [ "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4231,28 +4237,28 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", - "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", "substrate-serializer 1.0.0", - "tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4262,16 +4268,16 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-version 1.0.0", @@ -4284,18 +4290,18 @@ dependencies = [ "substrate-test-client 1.0.0", "substrate-test-runtime 1.0.0", "substrate-transaction-pool 1.0.0", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-rpc-servers" version = "1.0.0" dependencies = [ - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-rpc 1.0.0", ] @@ -4304,8 +4310,8 @@ dependencies = [ name = "substrate-serializer" version = "1.0.0" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4313,14 +4319,14 @@ name = "substrate-service" version = "1.0.0" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", @@ -4338,7 +4344,7 @@ dependencies = [ "substrate-test-client 1.0.0", "substrate-transaction-pool 1.0.0", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4356,7 +4362,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-service 1.0.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4376,7 +4382,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4395,8 +4401,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4426,11 +4432,11 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", "sr-primitives 1.0.0", "sr-std 1.0.0", @@ -4461,7 +4467,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "substrate-primitives 1.0.0", "substrate-test-runtime 1.0.0", @@ -4488,18 +4494,18 @@ dependencies = [ name = "substrate-trie" version = "1.0.0" dependencies = [ - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 1.0.0", "substrate-primitives 1.0.0", - "trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4517,7 +4523,7 @@ name = "syn" version = "0.15.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4527,7 +4533,7 @@ name = "synstructure" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4535,13 +4541,13 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4565,15 +4571,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4586,11 +4592,12 @@ dependencies = [ [[package]] name = "termion" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4615,14 +4622,14 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tiny-bip39" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4647,8 +4654,8 @@ name = "tinytemplate" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4658,28 +4665,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4693,7 +4700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4713,7 +4720,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4731,13 +4738,13 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4747,7 +4754,7 @@ dependencies = [ [[package]] name = "tokio-reactor" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4755,16 +4762,17 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4780,13 +4788,13 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4794,7 +4802,7 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4818,7 +4826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4839,8 +4847,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4851,13 +4859,13 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4865,7 +4873,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4875,17 +4883,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "trie-bench" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4910,12 +4918,12 @@ dependencies = [ [[package]] name = "trie-standardmap" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4977,7 +4985,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4996,7 +5004,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5014,14 +5022,6 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unsigned-varint" version = "0.2.2" @@ -5086,9 +5086,9 @@ name = "wabt" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5108,7 +5108,7 @@ version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5138,7 +5138,7 @@ dependencies = [ "bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5168,7 +5168,7 @@ name = "wasm-bindgen-macro-support" version = "0.2.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5188,7 +5188,7 @@ dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5197,12 +5197,12 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5229,7 +5229,7 @@ dependencies = [ [[package]] name = "websocket" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5241,7 +5241,7 @@ dependencies = [ "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5252,15 +5252,16 @@ name = "weedle" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "which" -version = "1.0.5" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5270,7 +5271,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5292,7 +5293,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5305,7 +5306,7 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5320,7 +5321,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5338,11 +5339,11 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5369,7 +5370,7 @@ dependencies = [ "quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5382,7 +5383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" "checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f10b352bc3fc08ae24dc5d2d3ddcac153678533986122dc283d747b12071000" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" @@ -5393,23 +5394,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" +"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d55aa264e822dbafa12db4d54767aff17c6ba55ea2d8559b3e17392c7d000e5d" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebecac13b3c745150d7b6c3ea7572d372f09d627c2077e893bf26c5c7f70d282" -"checksum bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d52d263eacd15d26cbcf215d254b410bd58212aaa2d3c453a04b2d3b3adcf41" +"checksum bindgen 0.47.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df683a55b54b41d5ea8ebfaebb5aa7e6b84e3f3006a78f010dadc9ca88469260" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" "checksum blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91721a6330935673395a0607df4d49a9cb90ae12d259f1b3e0a3f6e1d486872e" "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" "checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814" -"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" -"checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" +"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" "checksum bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0de79cfb98e7aa9988188784d8664b4b5dad6eaaa0863b91d9a4ed871d4f7a42" +"checksum bstr 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6c8203ca06c502958719dae5f653a79e0cc6ba808ed02beffbf27d09610f2143" "checksum bumpalo 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4639720be048090544634e0402490838995ccdc9d2fe648f528f30d3c33ae71f" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" @@ -5419,7 +5421,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" "checksum cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "389803e36973d242e7fecb092b2de44a3d35ac62524b3b9339e51d577d668e02" -"checksum cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "644d693ecfa91955ed32dcc7eda4914e1be97a641fb6f0645a37348e20b230da" +"checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" @@ -5430,8 +5432,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" -"checksum criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "1c6e5ee5b9652d4f851418c448af105642e1f99e9a2741a8ff45c0d2c911b1e0" -"checksum criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4107e4a5abb94267e0149922b8ff49dc70a87cc202820fdbfc0d3e1edbdc4b16" +"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" +"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" "checksum crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4c7ea749d9fb09e23c5cb17e3b70650860553a0e2744e38446b1803bf7db94" "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" @@ -5446,13 +5448,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum crypto-mac 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "779015233ac67d65098614aec748ac1c756ab6677fa2e14cf8b37c08dfed1198" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd1c44c58078cfbeaf11fbb3eac9ae5534c23004ed770cc4bfb48e658ae4f04" +"checksum csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9044e25afb0924b5a5fc5511689b0918629e85d68ea591e5e87fbf1e85ea1b3b" "checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" "checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" -"checksum ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "044f882973b245404e90c90e7e42e8ee8d7a64edfd7adf83d684fb97e8e2c1b6" -"checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e" +"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" +"checksum ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5531b7f0698d9220b4729f8811931dbe0e91a05be2f7b3245fdc50dd856bae26" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" -"checksum curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dae47cc3529cdab597dbc8b606e565707209b506e55848f3c15679214a56c956" +"checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum derive_more 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fbe9f11be34f800b3ecaaed0ec9ec2e015d1d0ba0c8644c1310f73d6e8994615" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" @@ -5461,13 +5463,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" "checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" -"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" +"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" "checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c7464757b80de8930c91c9afe77ddce501826bf9d134a87db2c67d9dc177e2c" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -"checksum exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "87559b08e99a81a92bbb867d237543e43495857749f688e0773390a20d56c61c" +"checksum exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d8013f441e38e31c670e7f34ec8f1d5d3a2bd9d303c1ff83976ca886005e8f48" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" @@ -5489,25 +5491,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" "checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" -"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" +"checksum globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4feaabe24a0a658fd9cf4a9acf6ed284f045c77df0f49020ba3245cfb7b454" +"checksum h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "85ab6286db06040ddefb71641b50017c06874614001a134b423783e2db2920bd" "checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0" -"checksum hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1224388a21c88a80ae7087a2a245ca6d80acc97a9186b75789fb3eeefd0609af" +"checksum hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b2027c19ec91eb304999abae7307d225cf93be42af53b0039f76e98ed5af86" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8e04cb7a5051270ef3fa79f8c7604d581ecfa73d520e74f554e45541c4b5881a" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae0e5c30fb65e661a0e39860e37100dfbe4d39aff865e9357a6a4ed0b5bbf303" -"checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a" +"checksum hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" +"checksum hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" -"checksum http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1a10e5b573b9a0146545010f50772b9e8b1dd0a256564cc4307694c68832a2f5" +"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)" = "860faf61a9957c9cb0e23e69f1c8290e92f6eb660fcdd1f2d6777043a2ae1a46" +"checksum hyper 0.12.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4f2777434f26af6e4ce4fdcdccd3bed9d861d11e87bcbe72c0f51ddaca8ff848" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" @@ -5518,14 +5520,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum js-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3c994fd445b81741d77f6bcd227d6ed645b95b35a2ecfd2050767450ff1c0b6d" -"checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" -"checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" -"checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" -"checksum jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56608ed54b1b2a69f4357cb8bdfbcbd99fe1179383c03a09bb428931bd35f592" -"checksum jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5521613b31ea22d36d9f95ad642058dccec846a94ed8690957652d479f620707" -"checksum jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20b8333a5a6e6ccbcf5c90f90919de557cba4929efa164e9bd0e8e497eb20e46" +"checksum jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" +"checksum jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dae61ca8a3b047fb11309b00661bc56837085bd07e46f907b9c562c0b03e68" +"checksum jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11d2a00824306155b8ef57fe957f31b8cd8ad24262f15cf911d84dcf9a3f206d" +"checksum jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fce55133ee264d0ab42bd862efcd45ae1d062cda599f4cc12ccc4be3195f2a" +"checksum jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9527f01ef25f251d64082cbefc0c6d6f367349afe6848ef908a674e06b2bdd3" +"checksum jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3889012aa638a2f18eb1a879f46fc8b34e7e1423cbff3247cd1531de0d51084b" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum keccak-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a02fb74dc1b613522069b5f2023c014756ce121c6c6fb39364c139b0efc39a2d" +"checksum keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "af672553b2abac1c86c29fd62c79880638b6abc91d96db4aa42a5baab2bc1ca9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" @@ -5533,7 +5535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" +"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libp2p 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0231edab431064b30b7749484a39735eb36492cef4658c372c9059e58c3003aa" "checksum libp2p-core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a3bad2ed26297112847678683dd221473a0d44297250b61f004e1b35e72493" @@ -5553,7 +5555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libp2p-uds 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ab0b9ca050105fd94229c48911c0c84aef4d6b86a53d1b6df81d938354e47e" "checksum libp2p-websocket 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81692c3141a9aefd84f4faffdc93985af3858ef82ed7fe8185e6b27437b36183" "checksum libp2p-yamux 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6ff51a5b2056bacee1c9f2ed8455cdf3c5c619261ddb4efc783119130aaf52" -"checksum librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9024327233e7fac7982440f73301c00046d438c5b1011e8f4e394226ce19007" +"checksum librocksdb-sys 5.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7dfb546562f9b450237bb8df7a31961849ee9fb1186d9e356db1d7a6b7609ff2" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" @@ -5561,13 +5563,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -"checksum make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8ca8afbe8af1785e09636acb5a41e08a765f5f0340568716c18a8700ba3c0d3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7623b01a4f1b7acb7cf8e3f678f05e15e6ae26cb0b738dfeb5cc186fd6b82ef4" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a9e97b439f6d38cbe2a4a4aa93f6770c5305f62761b78b1851406c09c87ee2a" +"checksum merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "83c2dda19c01176e8e7148f7bdb88bbdf215a8db0641f89fc40e4b81736aeda5" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" @@ -5577,19 +5578,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" "checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" +"checksum nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46f0f3210768d796e8fa79ec70ee6af172dacbe7147f5e69be5240a47778302b" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" -"checksum nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b30adc557058ce00c9d0d7cb3c6e0b5bc6f36e2e2eabe74b0ba726d194abd588" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" -"checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" +"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" @@ -5598,7 +5600,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c" "checksum parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b9db194dfbcfe3b398d63d765437a5c7232d59906e203055f0e993f6458ff1" "checksum parity-multiaddr 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a130a727008cfcd1068a28439fe939897ccad28664422aeca65b384d6de6d0" -"checksum parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8eab0287ccde7821e337a124dc5a4f1d6e4c25d10cc91e3f9361615dd95076" +"checksum parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05d6a68e07ab34a9e87bd8dd4936f6bb5be21e4f6dbcdbaf04d8e854eba0af01" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fec5048fba72a2e01baeb0d08089db79aead4b57e2443df172fb1840075a233" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" @@ -5607,8 +5609,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f50392d1265092fbee9273414cc40eb6d47d307bd66222c477bb8450c8504f9d" -"checksum paste-impl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3cd512fe3a55e8933b2dcad913e365639db86d512e4004c3084b86864d9467a" +"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79" +"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" @@ -5618,15 +5620,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edb92f1ebfc177432c03287b15d48c202e6e2c95993a7af3ba039abb43b1492e" "checksum proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c6cf4e5b00300d151dfffae39f529dfa5188f42eeb14201229aa420d6aad10c" "checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8" -"checksum proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e90aa19cd73dedc2d0e1e8407473f073d735fef0ab521438de6da8ee449ab66" +"checksum proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6a9bed9ebc40cf53e3a76d7486c54d05002eae6485b2711ab9104476fb2eb8bc" "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" -"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" -"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb" +"checksum proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)" = "ba92c84f814b3f9a44c5cfca7d2ad77fa10710867d2bbb1b3d175ab5f47daa12" +"checksum protobuf 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc7badf647ae2fa27ba51c218e347386c88cc604fcfe71f2aba0ad017f3f2b75" "checksum pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "efb0dcbddbb600f47a7098d33762a00552c671992171637f5bb310b37fe1f0e4" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" @@ -5638,24 +5638,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" -"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" -"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" "checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6" -"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" -"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" +"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9381ed76c1ec4e8994f1f7d2c6d7e33eed3ff7176e16fece09c2e993fc4a5a" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" "checksum rocksdb 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f1651697fefd273bfb4fd69466cc2a9d20de557a0213b97233b22b5e95924b5e" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" -"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" "checksum rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" @@ -5664,9 +5664,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" -"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" -"checksum schnorrkel 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a700659388785588c75b197cecda0f23c7112a9281ef703e8ffc651061ce014c" +"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum schnorrkel 0.1.1 (git+https://github.com/paritytech/schnorrkel)" = "" +"checksum schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5eff518f9bed3d803a0d002af0ab96339b0ebbedde3bec98a684986134b7a39" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e" "checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" @@ -5674,9 +5674,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" -"checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" -"checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" -"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" +"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" @@ -5688,54 +5689,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" "checksum slog_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eff3b513cf2e0d1a60e1aba152dc72bedc5b05585722bb3cebd7bcb1e31b98f" -"checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" -"checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "92a7e0c5e3dfb52e8fbe0e63a1b947bbb17b4036408b151353c4491374931362" -"checksum stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "461e7f2e33670b1c33f1ea22bb2f86de6136fabd0c4d27d167ed425c231143ca" +"checksum stdweb 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)" = "b2c1d5ac2f828b2877a6be60a51b8e3ebb57b56862b10be1a72676ca8900b69d" "checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930" -"checksum stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "432465093692af7379dcd196ce4be398c906958d91b412fff9102a66238d6f26" -"checksum stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a2a2f4a2eb556337b2d1a302630bbddf989ae383c70393e89b48152b9896cbda" +"checksum stdweb-internal-macros 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e68f7d08b76979a43e93fe043b66d2626e35d41d68b0b85519202c6dd8ac59fa" +"checksum stdweb-internal-runtime 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d52317523542cc0af5b7e31017ad0f7d1e78da50455e38d5657cd17754f617da" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3" -"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04" +"checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" +"checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" "checksum strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1810e25f576e7ffce1ff5243b37066da5ded0310b3274c20baaeccb1145b2806" "checksum strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572a2f4e53dd4c3483fd79e5cc10ddd773a3acb1169bbfe8762365e107110579" -"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" +"checksum substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" "checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" -"checksum sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4da1ccc493b46042d6f5352910a7f18ed8fe81307dd7db3f2e2d8a7db6f6284" +"checksum sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a0cb7899e248ed0baa6ef6f8406352523c2f99bc7c4b1800f4cd6d5dde99eb" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff" +"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5388a470627f97a01a6e13389ced797a42b1611f9de7e0f6ca705675ac55297" +"checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" -"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9" +"checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82c65483db54eb91b4ef3a9389a3364558590faf30ce473141707c0e16fda975" "checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" -"checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" -"checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" -"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2f843ffdf8d6e1f90bddd48da43f99ab071660cd92b7ec560ef3cdfd7a409a" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" +"checksum tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72558af20be886ea124595ea0f806dd5703b8958e4705429dd58b3d8231f72f2" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" "checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" @@ -5743,10 +5744,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum trie-bench 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eafa32a8662c06f5bf135984bc1a12821fd38770b5c2f2f9e8750327fcbe3955" +"checksum trie-bench 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba20f7d9865497ea46511860b43e05a44f4ac9a76ee089d34cd80a839a690264" "checksum trie-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba73747fd3a64ab531274c04cb588dfa9d30d972d62990831e63fbce2cfec59" "checksum trie-root 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfa2e20c4f1418ac2e71ddc418e35e1b56e34022e2146209ffdbf1b2de8b1bd9" -"checksum trie-standardmap 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006314f54f2ea7944a878e66fd93ad7978095bc355f30a2f26ec40f664d86c86" +"checksum trie-standardmap 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4e24277af05f38f3aaf03ac78e3a154be83f13db9c8ef0cb95bb1aa764a477b" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" "checksum twox-hash 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09871da9f15424236082e0b220fd404a4eb6bebc7205c67653701229234ac64c" @@ -5755,13 +5756,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c64cdf40b4a9645534a943668681bcb219faf51874d4b65d2e0abda1b10a2ab" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -5782,14 +5782,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wasm-bindgen-macro-support 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "9168c413491e4233db7b6884f09a43beb00c14d11d947ffd165242daa48a2385" "checksum wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "326c32126e1a157b6ced7400061a84ac5b11182b2cda6edad7314eb3ae9ac9fe" "checksum wasm-bindgen-webidl 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "613dbf4d7d3bf10aeb212b35de14a8ef07222c26526d4f931061a83fc9e2a851" -"checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" +"checksum wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aebbaef470840d157a5c47c8c49f024da7b1b80e90ff729ca982b2b80447e78b" "checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" "checksum web-sys 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "24129e4be2281109b3e15a328d3d7f233ee232a5405f75ba1e9bb59a25ebc4d4" -"checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" +"checksum websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7cc2d74d89f9df981ab41ae624e33cf302fdf456b93455c6a31911a99c9f0bb8" "checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044" -"checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" +"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" @@ -5797,7 +5797,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum x25519-dalek 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4aca1ba6bec2719576bd20dfe5b24d9359552e616d10bff257e50cd85f745d17" +"checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" "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.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9073f5dbc901abb0b2ec4f866e726fed2f54953bdf81f8a5fde7762b7cc3b3" diff --git a/core/keystore/src/lib.rs b/core/keystore/src/lib.rs index 59c1a65cfb..ff737535f9 100644 --- a/core/keystore/src/lib.rs +++ b/core/keystore/src/lib.rs @@ -138,6 +138,7 @@ impl Store { mod tests { use super::*; use tempdir::TempDir; + use substrate_primitives::crypto::Ss58Codec; #[test] fn basic_store() { @@ -162,6 +163,6 @@ mod tests { let mut store = Store::open(temp_dir.path().to_owned()).unwrap(); let pair = store.generate_from_seed("0x3d97c819d68f9bafa7d6e79cb991eebcd77d966c5334c0b94d9e1fa7ad0869dc").unwrap(); - assert_eq!("5DKUrgFqCPV8iAXx9sjy1nyBygQCeiUYRFWurZGhnrn3HBL8", pair.public().to_ss58check()); + assert_eq!("5DKUrgFqCPV8iAXx9sjy1nyBygQCeiUYRFWurZGhnrn3HJCA", pair.public().to_ss58check()); } } diff --git a/core/primitives/src/ed25519.rs b/core/primitives/src/ed25519.rs index 937cc19a89..d095c6445d 100644 --- a/core/primitives/src/ed25519.rs +++ b/core/primitives/src/ed25519.rs @@ -29,13 +29,11 @@ use blake2_rfc; #[cfg(feature = "std")] use ring::{signature, signature::KeyPair, rand::{SecureRandom, SystemRandom}}; #[cfg(feature = "std")] -use base58::{ToBase58, FromBase58}; -#[cfg(feature = "std")] use substrate_bip39::seed_from_entropy; #[cfg(feature = "std")] use bip39::{Mnemonic, Language, MnemonicType}; #[cfg(feature = "std")] -use crate::crypto::{Pair as TraitPair, DeriveJunction, SecretStringError, Derive}; +use crate::crypto::{Pair as TraitPair, DeriveJunction, SecretStringError, Derive, Ss58Codec}; #[cfg(feature = "std")] use serde::{de, Serializer, Serialize, Deserializer, Deserialize}; use crate::crypto::UncheckedFrom; @@ -324,36 +322,6 @@ impl Public { #[cfg(feature = "std")] impl Derive for Public {} -#[cfg(feature = "std")] -impl Public { - /// Some if the string is a properly encoded SS58Check address. - pub fn from_ss58check(s: &str) -> Result { - let d = s.from_base58().map_err(|_| PublicError::BadBase58)?; // failure here would be invalid encoding. - if d.len() != 35 { - // Invalid length. - return Err(PublicError::BadLength); - } - if d[0] != 42 { - // Invalid version. - return Err(PublicError::UnknownVersion); - } - if d[33..35] != blake2_rfc::blake2b::blake2b(64, &[], &d[0..33]).as_bytes()[0..2] { - // Invalid checksum. - return Err(PublicError::InvalidChecksum); - } - Ok(Self::from_slice(&d[1..33])) - } - - /// Return the ss58-check string for this key. - pub fn to_ss58check(&self) -> String { - let mut v = vec![42u8]; - v.extend(self.as_slice()); - let r = blake2_rfc::blake2b::blake2b(64, &[], &v); - v.extend(&r.as_bytes()[0..2]); - v.to_base58() - } -} - #[cfg(feature = "std")] impl AsRef for Pair { fn as_ref(&self) -> &Pair { diff --git a/subkey/src/vanity.rs b/subkey/src/vanity.rs index 785eb95aa5..400b3bae82 100644 --- a/subkey/src/vanity.rs +++ b/subkey/src/vanity.rs @@ -105,7 +105,7 @@ pub(super) fn generate_key>(desired: &str) -> Result Date: Wed, 24 Apr 2019 12:23:59 +0200 Subject: [PATCH 057/206] Subkey can construct and sign transfer txs (#2109) * First effort * Fix for encoding * !fixed subkey xfer creation (still brittle because of double-hardcoded genesis_hash (#2221) * CLI genesis hash * Add test * Slightly nicer text * Fix Elm hash * Update lock file --- Cargo.lock | 5 +++ core/primitives/src/crypto.rs | 22 ++++++++--- subkey/Cargo.toml | 5 +++ subkey/src/cli.yml | 24 ++++++++++++ subkey/src/main.rs | 74 ++++++++++++++++++++++++++++++++++- 5 files changed, 123 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9069255fcc..452da42fb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3731,9 +3731,14 @@ version = "1.0.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 1.0.0", + "node-runtime 1.0.0", + "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 1.0.0", "substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)", "substrate-primitives 1.0.0", "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/core/primitives/src/crypto.rs b/core/primitives/src/crypto.rs index e0ecd4ce42..dc886c7b38 100644 --- a/core/primitives/src/crypto.rs +++ b/core/primitives/src/crypto.rs @@ -215,7 +215,9 @@ pub trait Derive: Sized { /// Derive a child key from a series of given junctions. /// /// Will be `None` for public keys if there are any hard junctions in there. - fn derive>(&self, _path: Iter) -> Option { None } + fn derive>(&self, _path: Iter) -> Option { + None + } } #[cfg(feature = "std")] @@ -266,11 +268,19 @@ impl + AsRef<[u8]> + Default + Derive> Ss58Codec for T { let cap = re.captures(s).ok_or(PublicError::InvalidFormat)?; let re_junction = Regex::new(r"/(/?[^/]+)") .expect("constructed from known-good static value; qed"); - let path = re_junction.captures_iter(&cap["path"]) - .map(|f| DeriveJunction::from(&f[1])); - Self::from_ss58check(cap.name("ss58").map(|r| r.as_str()).unwrap_or(DEV_ADDRESS))? - .derive(path) - .ok_or(PublicError::InvalidPath) + let addr = Self::from_ss58check( + cap.name("ss58") + .map(|r| r.as_str()) + .unwrap_or(DEV_ADDRESS) + )?; + if cap["path"].is_empty() { + Ok(addr) + } else { + let path = re_junction.captures_iter(&cap["path"]) + .map(|f| DeriveJunction::from(&f[1])); + addr.derive(path) + .ok_or(PublicError::InvalidPath) + } } } diff --git a/subkey/Cargo.toml b/subkey/Cargo.toml index 12ae7bdbbe..280f18887e 100644 --- a/subkey/Cargo.toml +++ b/subkey/Cargo.toml @@ -6,6 +6,9 @@ edition = "2018" [dependencies] substrate-primitives = { version = "*", path = "../core/primitives" } +node-runtime = { version = "*", path = "../node/runtime" } +node-primitives = { version = "*", path = "../node/primitives" } +sr-primitives = { version = "*", path = "../core/sr-primitives" } rand = "0.6" clap = { version = "~2.32", features = ["yaml"] } tiny-bip39 = "0.6.0" @@ -13,6 +16,8 @@ rustc-hex = "2.0" substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39" } schnorrkel = "0.1" hex = "0.3" +hex-literal = "0.1" +parity-codec = "3.2" [features] bench = [] diff --git a/subkey/src/cli.yml b/subkey/src/cli.yml index cc131703eb..8b839cd443 100644 --- a/subkey/src/cli.yml +++ b/subkey/src/cli.yml @@ -40,6 +40,30 @@ subcommands: long: hex help: The message on STDIN is hex-encoded data takes_value: false + - transfer: + about: Author and sign a Node balances::Transfer transaction with a given (secret) key + args: + - from: + index: 1 + required: true + help: The signing secret key URI. + - to: + index: 2 + required: true + help: The destination account public key URI. + - amount: + index: 3 + required: true + help: The number of units to transfer. + - index: + index: 4 + required: true + help: The signing account's transaction index. + - genesis: + short: g + long: genesis + help: The genesis hash or a recognised chain identifier (dev, elm, alex). + takes_value: true - verify: about: Verify a signature for a message, provided on STDIN, with a given (public or secret) key args: diff --git a/subkey/src/main.rs b/subkey/src/main.rs index 5caf58d45b..2aa8609623 100644 --- a/subkey/src/main.rs +++ b/subkey/src/main.rs @@ -20,14 +20,19 @@ extern crate test; extern crate substrate_bip39; extern crate rustc_hex; +#[macro_use] extern crate hex_literal; use std::io::{stdin, Read}; use clap::load_yaml; use rand::{RngCore, rngs::OsRng}; use substrate_bip39::mini_secret_from_entropy; use bip39::{Mnemonic, Language, MnemonicType}; -use substrate_primitives::{ed25519, sr25519, hexdisplay::HexDisplay, Pair, crypto::Ss58Codec}; +use substrate_primitives::{ed25519, sr25519, hexdisplay::HexDisplay, Pair, crypto::Ss58Codec, blake2_256}; +use parity_codec::{Encode, Decode, Compact}; +use sr_primitives::generic::Era; use schnorrkel::keys::MiniSecretKey; +use node_primitives::{Balance, Index, Hash}; +use node_runtime::{Call, UncheckedExtrinsic, BalancesCall}; mod vanity; @@ -173,6 +178,54 @@ fn execute>(matches: clap::ArgMatches) where let sig = pair.sign(&message); println!("{}", hex::encode(&sig)); } + ("transfer", Some(matches)) => { + let signer = matches.value_of("from") + .expect("parameter is required; thus it can't be None; qed"); + let signer = Sr25519::pair_from_suri(signer, password); + + let to = matches.value_of("to") + .expect("parameter is required; thus it can't be None; qed"); + let to = sr25519::Public::from_string(to).ok().or_else(|| + sr25519::Pair::from_string(to, password).ok().map(|p| p.public()) + ).expect("Invalid 'to' URI; expecting either a secret URI or a public URI."); + + let amount = matches.value_of("amount") + .expect("parameter is required; thus it can't be None; qed"); + let amount = str::parse::(amount) + .expect("Invalid 'amount' parameter; expecting an integer."); + + let index = matches.value_of("index") + .expect("parameter is required; thus it can't be None; qed"); + let index = str::parse::(index) + .expect("Invalid 'amount' parameter; expecting an integer."); + + let function = Call::Balances(BalancesCall::transfer(to.into(), amount)); + + let genesis_hash: Hash = match matches.value_of("genesis").unwrap_or("alex") { + "elm" => hex!["10c08714a10c7da78f40a60f6f732cf0dba97acfb5e2035445b032386157d5c3"].into(), + "alex" => hex!["dcd1346701ca8396496e52aa2785b1748deb6db09551b72159dcb3e08991025b"].into(), + h => hex::decode(h).ok().and_then(|x| Decode::decode(&mut &x[..])).expect("Invalid genesis hash or unrecognised chain identifier"), + }; + + println!("Using a genesis hash of {}", HexDisplay::from(&genesis_hash.as_ref())); + + let era = Era::immortal(); + let raw_payload = (Compact(index), function, era, genesis_hash); + let signature = raw_payload.using_encoded(|payload| if payload.len() > 256 { + signer.sign(&blake2_256(payload)[..]) + } else { + println!("Signing {}", HexDisplay::from(&payload)); + signer.sign(payload) + }); + let extrinsic = UncheckedExtrinsic::new_signed( + index, + raw_payload.1, + signer.public().into(), + signature.into(), + era, + ); + println!("0x{}", hex::encode(&extrinsic.encode())); + } ("verify", Some(matches)) => { let sig_data = matches.value_of("sig") .expect("signature parameter is required; thus it can't be None; qed"); @@ -218,3 +271,22 @@ fn main() { fn print_usage(matches: &clap::ArgMatches) { println!("{}", matches.usage()); } + +#[cfg(test)] +mod tests { + use super::{Hash, Decode}; + #[test] + fn should_work() { + let s = "0123456789012345678901234567890123456789012345678901234567890123"; + + let d1: Hash = hex::decode(s).ok().and_then(|x| Decode::decode(&mut &x[..])).unwrap(); + + let d2: Hash = { + let mut gh: [u8; 32] = Default::default(); + gh.copy_from_slice(hex::decode(s).unwrap().as_ref()); + Hash::from(gh) + }; + + assert_eq!(d1, d2); + } +} -- GitLab From d9b328f08f5bf3fd650aa04a68017cd664906255 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Wed, 24 Apr 2019 12:51:46 +0200 Subject: [PATCH 058/206] =?UTF-8?q?Use=20balances::TotalIssuance=20for=20s?= =?UTF-8?q?caling=20between=20votes=20and=20balances=20(#=E2=80=A6=20(#236?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use balances::TotalIssuance for scaling between votes and balances (#2361) * Use total issuance to convert between votes and balances * Remove cruft * Bump runtime version --- core/sr-primitives/src/traits.rs | 29 ----------------------------- node/runtime/src/lib.rs | 21 +++++++++++++++++---- 2 files changed, 17 insertions(+), 33 deletions(-) diff --git a/core/sr-primitives/src/traits.rs b/core/sr-primitives/src/traits.rs index 3004a5e069..9e43ddc60f 100644 --- a/core/sr-primitives/src/traits.rs +++ b/core/sr-primitives/src/traits.rs @@ -150,35 +150,6 @@ impl Convert for () { fn convert(_: A) -> B { Default::default() } } -/// A structure that converts the currency type into a lossy u64 -/// And back from u128 -pub struct CurrencyToVoteHandler; - -impl Convert for CurrencyToVoteHandler { - fn convert(x: u128) -> u64 { - if x >> 96 == 0 { - // Remove dust; divide by 2^32 - (x >> 32) as u64 - } else { - u64::max_value() - } - } -} - -impl Convert for CurrencyToVoteHandler { - fn convert(x: u128) -> u128 { - // if it practically fits in u64 - if x >> 64 == 0 { - // Add zero dust; multiply by 2^32 - x << 32 - } - else { - // 0000_0000_FFFF_FFFF_FFFF_FFFF_0000_0000 - (u64::max_value() << 32) as u128 - } - } -} - /// A structure that performs identity conversion. pub struct Identity; impl Convert for Identity { diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 340220160e..b765abd380 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -34,8 +34,7 @@ use client::{ use runtime_primitives::{ApplyResult, generic, create_runtime_str}; use runtime_primitives::transaction_validity::TransactionValidity; use runtime_primitives::traits::{ - BlakeTwo256, Block as BlockT, DigestFor, NumberFor, StaticLookup, CurrencyToVoteHandler, - AuthorityIdFor, + BlakeTwo256, Block as BlockT, DigestFor, NumberFor, StaticLookup, AuthorityIdFor, Convert }; use version::RuntimeVersion; use council::{motions as council_motions, voting as council_voting}; @@ -59,8 +58,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 65, - impl_version: 65, + spec_version: 66, + impl_version: 66, apis: RUNTIME_API_VERSIONS, }; @@ -73,6 +72,20 @@ pub fn native_version() -> NativeVersion { } } +pub struct CurrencyToVoteHandler; + +impl CurrencyToVoteHandler { + fn factor() -> u128 { (Balances::total_issuance() / u64::max_value() as u128).max(1) } +} + +impl Convert for CurrencyToVoteHandler { + fn convert(x: u128) -> u64 { (x / Self::factor()) as u64 } +} + +impl Convert for CurrencyToVoteHandler { + fn convert(x: u128) -> u128 { x * Self::factor() } +} + impl system::Trait for Runtime { type Origin = Origin; type Index = Index; -- GitLab From cdd9b4f2e71695217baa04199a823a78faaea31b Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Wed, 24 Apr 2019 13:09:51 +0200 Subject: [PATCH 059/206] Fix grandpa observer and maybe some test timeouts (#2359) * fix: grandpa observer and maybe test timeouts * Update core/finality-grandpa/src/observer.rs Co-Authored-By: gavofyork --- core/finality-grandpa/src/observer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/finality-grandpa/src/observer.rs b/core/finality-grandpa/src/observer.rs index 74b5076dae..cce68a64d4 100644 --- a/core/finality-grandpa/src/observer.rs +++ b/core/finality-grandpa/src/observer.rs @@ -90,9 +90,9 @@ fn grandpa_observer, RA, S>( }, }; - // if the commit we've received targets a block lower than the last + // if the commit we've received targets a block lower or equal to the last // finalized, ignore it and continue with the current state - if commit.target_number < last_finalized_number { + if commit.target_number <= last_finalized_number { return future::ok(last_finalized_number); } -- GitLab From ba16f60be235d863781d20fdbd60bba8b93a6112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Wed, 24 Apr 2019 16:54:09 +0100 Subject: [PATCH 060/206] git: allow diffing Cargo.lock (#2370) --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 9a0309f9e5..9bd26362b0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -Cargo.lock linguist-generated=true -diff +Cargo.lock linguist-generated=true -- GitLab From b787f7770f0a9e8d5f47df3caebd0d1c16b5d962 Mon Sep 17 00:00:00 2001 From: Stanislav Tkach Date: Thu, 25 Apr 2019 12:17:40 +0300 Subject: [PATCH 061/206] Update hex-literal version, simplify imports and remove unused dependencies (#2371) --- Cargo.lock | 57 ++++++++++----------- core/executor/Cargo.toml | 2 +- core/executor/src/wasm_executor.rs | 2 +- core/keyring/Cargo.toml | 1 - core/primitives/Cargo.toml | 4 +- core/primitives/benches/benches.rs | 3 +- core/primitives/src/crypto.rs | 2 +- core/primitives/src/ed25519.rs | 2 +- core/primitives/src/sr25519.rs | 2 +- core/rpc/Cargo.toml | 1 - core/sr-primitives/src/lib.rs | 3 -- core/state-machine/Cargo.toml | 4 +- core/state-machine/src/basic.rs | 2 +- core/state-machine/src/ext.rs | 2 +- core/state-machine/src/overlayed_changes.rs | 2 +- core/state-machine/src/testing.rs | 2 +- core/test-runtime/Cargo.toml | 2 - core/trie/Cargo.toml | 2 +- core/trie/src/lib.rs | 2 +- node-template/Cargo.toml | 1 - node/cli/Cargo.toml | 2 +- node/cli/src/chain_spec.rs | 2 +- node/runtime/Cargo.toml | 2 - srml/assets/Cargo.toml | 1 - srml/aura/Cargo.toml | 1 - srml/balances/Cargo.toml | 1 - srml/consensus/Cargo.toml | 1 - srml/contract/Cargo.toml | 2 +- srml/contract/src/tests.rs | 2 +- srml/council/Cargo.toml | 2 +- srml/council/src/motions.rs | 2 +- srml/democracy/Cargo.toml | 1 - srml/example/Cargo.toml | 1 - srml/executive/Cargo.toml | 2 +- srml/executive/src/lib.rs | 2 +- srml/finality-tracker/Cargo.toml | 1 - srml/indices/Cargo.toml | 1 - srml/session/Cargo.toml | 1 - srml/staking/Cargo.toml | 1 - srml/sudo/Cargo.toml | 1 - srml/support/Cargo.toml | 2 - srml/system/Cargo.toml | 1 - srml/timestamp/Cargo.toml | 1 - srml/treasury/Cargo.toml | 1 - subkey/Cargo.toml | 2 +- subkey/src/main.rs | 5 +- 46 files changed, 54 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 452da42fb6..9dd2198b81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1047,6 +1047,15 @@ dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex-literal" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hex-literal-impl" version = "0.1.2" @@ -1055,6 +1064,14 @@ dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex-literal-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hmac" version = "0.4.2" @@ -1967,7 +1984,7 @@ version = "1.0.0" dependencies = [ "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 1.0.0", "node-primitives 1.0.0", @@ -2038,7 +2055,6 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2081,7 +2097,6 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3223,7 +3238,6 @@ dependencies = [ name = "srml-assets" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3238,7 +3252,6 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3260,7 +3273,6 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3277,7 +3289,6 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3294,7 +3305,7 @@ name = "srml-contract" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3317,7 +3328,7 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3335,7 +3346,6 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3352,7 +3362,6 @@ dependencies = [ name = "srml-example" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3367,7 +3376,7 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3384,7 +3393,6 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3420,7 +3428,6 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3448,7 +3455,6 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3467,7 +3473,6 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3488,7 +3493,6 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3505,7 +3509,6 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3568,7 +3571,6 @@ name = "srml-system" version = "1.0.0" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3583,7 +3585,6 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3599,7 +3600,6 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3731,7 +3731,7 @@ version = "1.0.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "node-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4036,7 +4036,7 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4107,7 +4107,6 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4245,7 +4244,7 @@ dependencies = [ "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4273,7 +4272,6 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4387,7 +4385,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4437,7 +4435,6 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4501,7 +4498,7 @@ version = "1.0.0" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5506,7 +5503,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" +"checksum hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c3da68162fdd2147e66682e78e729bd77f93b4c99656db058c5782d8c6b6225a" "checksum hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" +"checksum hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06095d08c7c05760f11a071b3e1d4c5b723761c01bd8d7201c30a9536668a612" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" diff --git a/core/executor/Cargo.toml b/core/executor/Cargo.toml index 0278c1704d..d56fb00ad9 100644 --- a/core/executor/Cargo.toml +++ b/core/executor/Cargo.toml @@ -25,7 +25,7 @@ tiny-keccak = "1.4.2" [dev-dependencies] assert_matches = "1.1" wabt = "~0.7.4" -hex-literal = "0.1.0" +hex-literal = "0.2.0" [features] default = [] diff --git a/core/executor/src/wasm_executor.rs b/core/executor/src/wasm_executor.rs index cc355f6bba..3fe1a1c3cc 100644 --- a/core/executor/src/wasm_executor.rs +++ b/core/executor/src/wasm_executor.rs @@ -897,7 +897,7 @@ mod tests { use parity_codec::Encode; use state_machine::TestExternalities; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use primitives::map; #[test] diff --git a/core/keyring/Cargo.toml b/core/keyring/Cargo.toml index 74f898b83f..01fa362cad 100644 --- a/core/keyring/Cargo.toml +++ b/core/keyring/Cargo.toml @@ -7,7 +7,6 @@ edition = "2018" [dependencies] substrate-primitives = { path = "../primitives" } sr-primitives = { path = "../sr-primitives" } -hex-literal = { version = "0.1.0" } lazy_static = { version = "1.0" } strum = "0.14.0" strum_macros = "0.14.0" diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index 02133e0655..6d50c8be0e 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -18,7 +18,6 @@ hash-db = { version = "0.12", default-features = false } hash256-std-hasher = { version = "0.12", default-features = false } ring = { version = "0.14", optional = true } untrusted = { version = "0.6", optional = true } -hex-literal = { version = "0.1", optional = true } base58 = { version = "0.1", optional = true } blake2-rfc = { version = "0.2.18", optional = true } schnorrkel = { version = "0.1", optional = true } @@ -33,7 +32,7 @@ regex = {version = "1.1", optional = true } substrate-serializer = { path = "../serializer" } pretty_assertions = "0.6" heapsize = "0.4" -hex-literal = "0.1" +hex-literal = "0.2" rand = "0.6" [features] @@ -57,7 +56,6 @@ std = [ "blake2-rfc", "ring", "untrusted", - "hex-literal", "hex", "base58", "substrate-bip39", diff --git a/core/primitives/benches/benches.rs b/core/primitives/benches/benches.rs index b81ef9dc42..a38f5fdae2 100644 --- a/core/primitives/benches/benches.rs +++ b/core/primitives/benches/benches.rs @@ -16,10 +16,9 @@ #![feature(test)] extern crate test; -use hex_literal::{hex, hex_impl}; +use hex_literal::hex; use substrate_primitives::hashing::{twox_128, blake2_128}; - const MAX_KEY_SIZE: u32 = 32; fn data_set() -> Vec> { diff --git a/core/primitives/src/crypto.rs b/core/primitives/src/crypto.rs index dc886c7b38..dce30fad71 100644 --- a/core/primitives/src/crypto.rs +++ b/core/primitives/src/crypto.rs @@ -410,7 +410,7 @@ pub trait Pair: Sized { #[cfg(test)] mod tests { use crate::DeriveJunction; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use super::*; #[derive(Eq, PartialEq, Debug)] diff --git a/core/primitives/src/ed25519.rs b/core/primitives/src/ed25519.rs index d095c6445d..8bf3ae4ad0 100644 --- a/core/primitives/src/ed25519.rs +++ b/core/primitives/src/ed25519.rs @@ -490,7 +490,7 @@ impl Pair { #[cfg(test)] mod test { use super::*; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use crate::crypto::DEV_PHRASE; #[test] diff --git a/core/primitives/src/sr25519.rs b/core/primitives/src/sr25519.rs index e70e35c1ae..8f309ec030 100644 --- a/core/primitives/src/sr25519.rs +++ b/core/primitives/src/sr25519.rs @@ -504,7 +504,7 @@ impl Pair { mod test { use super::*; use crate::crypto::{Ss58Codec, DEV_PHRASE, DEV_ADDRESS}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn default_phrase_should_be_used() { diff --git a/core/rpc/Cargo.toml b/core/rpc/Cargo.toml index 600cd9ac48..4b00f2bf2d 100644 --- a/core/rpc/Cargo.toml +++ b/core/rpc/Cargo.toml @@ -32,4 +32,3 @@ test_client = { package = "substrate-test-client", path = "../test-client" } test_runtime = { package = "substrate-test-runtime", path = "../test-runtime" } consensus = { package = "substrate-consensus-common", path = "../consensus/common" } rustc-hex = "2.0" -hex-literal = "0.1" diff --git a/core/sr-primitives/src/lib.rs b/core/sr-primitives/src/lib.rs index e1ec698a4a..08c6b3c9a9 100644 --- a/core/sr-primitives/src/lib.rs +++ b/core/sr-primitives/src/lib.rs @@ -33,9 +33,6 @@ use rstd::prelude::*; use substrate_primitives::{crypto, ed25519, sr25519, hash::{H256, H512}}; use codec::{Encode, Decode}; -#[cfg(feature = "std")] -use substrate_primitives::hexdisplay::ascii_format; - #[cfg(feature = "std")] pub mod testing; diff --git a/core/state-machine/Cargo.toml b/core/state-machine/Cargo.toml index eed53d49c3..171ae15b28 100644 --- a/core/state-machine/Cargo.toml +++ b/core/state-machine/Cargo.toml @@ -6,7 +6,6 @@ description = "Substrate State Machine" edition = "2018" [dependencies] -hex-literal = "0.1.0" log = "0.4" parking_lot = "0.7.1" heapsize = "0.4" @@ -17,3 +16,6 @@ trie = { package = "substrate-trie", path = "../trie" } primitives = { package = "substrate-primitives", path = "../primitives" } panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" } parity-codec = "3.3" + +[dev-dependencies] +hex-literal = "0.2.0" diff --git a/core/state-machine/src/basic.rs b/core/state-machine/src/basic.rs index 0c95de61cb..a4863485b7 100644 --- a/core/state-machine/src/basic.rs +++ b/core/state-machine/src/basic.rs @@ -166,7 +166,7 @@ impl Externalities for BasicExternalities where H::Out: Ord + Heap mod tests { use super::*; use primitives::{Blake2Hasher, H256}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn commit_should_work() { diff --git a/core/state-machine/src/ext.rs b/core/state-machine/src/ext.rs index c88798f37f..a9f2ab9d0e 100644 --- a/core/state-machine/src/ext.rs +++ b/core/state-machine/src/ext.rs @@ -360,7 +360,7 @@ where #[cfg(test)] mod tests { - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use parity_codec::Encode; use primitives::{Blake2Hasher}; use primitives::storage::well_known_keys::EXTRINSIC_INDEX; diff --git a/core/state-machine/src/overlayed_changes.rs b/core/state-machine/src/overlayed_changes.rs index 56e69323e8..c98882726e 100644 --- a/core/state-machine/src/overlayed_changes.rs +++ b/core/state-machine/src/overlayed_changes.rs @@ -309,7 +309,7 @@ impl From>> for OverlayedValue { #[cfg(test)] mod tests { - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use primitives::{Blake2Hasher, H256}; use primitives::storage::well_known_keys::EXTRINSIC_INDEX; use crate::backend::InMemory; diff --git a/core/state-machine/src/testing.rs b/core/state-machine/src/testing.rs index ac096c0c3e..3adf277bf3 100644 --- a/core/state-machine/src/testing.rs +++ b/core/state-machine/src/testing.rs @@ -180,7 +180,7 @@ impl Externalities for TestExternalities where H::Out: Ord + He mod tests { use super::*; use primitives::{Blake2Hasher, H256}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn commit_should_work() { diff --git a/core/test-runtime/Cargo.toml b/core/test-runtime/Cargo.toml index 2a4540090e..6b3d6f7d9f 100644 --- a/core/test-runtime/Cargo.toml +++ b/core/test-runtime/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" [dependencies] log = { version = "0.4", optional = true } -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } keyring = { package = "substrate-keyring", path = "../keyring", optional = true } @@ -35,7 +34,6 @@ substrate-test-client = { path = "../test-client" } default = ["std"] std = [ "log", - "hex-literal", "serde", "substrate-client/std", "keyring", diff --git a/core/trie/Cargo.toml b/core/trie/Cargo.toml index 1fd1b7b3bd..b47148c28d 100644 --- a/core/trie/Cargo.toml +++ b/core/trie/Cargo.toml @@ -25,7 +25,7 @@ trie-bench = { version = "0.12" } trie-standardmap = { version = "0.12" } keccak-hasher = { version = "0.12" } criterion = "0.2" -hex-literal = "0.1.0" +hex-literal = "0.2.0" [features] default = ["std"] diff --git a/core/trie/src/lib.rs b/core/trie/src/lib.rs index a9a9860f94..e29402b63c 100644 --- a/core/trie/src/lib.rs +++ b/core/trie/src/lib.rs @@ -339,7 +339,7 @@ mod tests { use hash_db::{HashDB, Hasher}; use trie_db::{DBValue, TrieMut, Trie}; use trie_standardmap::{Alphabet, ValueMode, StandardMap}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; fn check_equivalent(input: &Vec<(&[u8], &[u8])>) { { diff --git a/node-template/Cargo.toml b/node-template/Cargo.toml index 7ef20cc89f..3e9d8656ea 100644 --- a/node-template/Cargo.toml +++ b/node-template/Cargo.toml @@ -17,7 +17,6 @@ log = "0.4" tokio = "0.1" exit-future = "0.1" parking_lot = "0.7.1" -hex-literal = "0.1" parity-codec = "3.3" trie-root = "0.12.2" sr-io = { path = "../core/sr-io" } diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index a26d8f3ae8..0ca5dc34f6 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -19,7 +19,7 @@ primitives = { package = "substrate-primitives", path = "../../core/primitives" inherents = { package = "substrate-inherents", path = "../../core/inherents" } node-runtime = { path = "../runtime" } node-primitives = { path = "../primitives" } -hex-literal = "0.1" +hex-literal = "0.2" substrate-basic-authorship = { path = "../../core/basic-authorship" } substrate-service = { path = "../../core/service" } transaction_pool = { package = "substrate-transaction-pool", path = "../../core/transaction-pool" } diff --git a/node/cli/src/chain_spec.rs b/node/cli/src/chain_spec.rs index b09d55c6e9..0c017d2fac 100644 --- a/node/cli/src/chain_spec.rs +++ b/node/cli/src/chain_spec.rs @@ -23,7 +23,7 @@ use node_runtime::{ConsensusConfig, CouncilSeatsConfig, CouncilVotingConfig, Dem SudoConfig, ContractConfig, GrandpaConfig, IndicesConfig, Permill, Perbill}; pub use node_runtime::GenesisConfig; use substrate_service; -use hex_literal::{hex, hex_impl}; +use hex_literal::hex; use substrate_telemetry::TelemetryEndpoints; const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; diff --git a/node/runtime/Cargo.toml b/node/runtime/Cargo.toml index f8e0e047bc..d6d5207747 100644 --- a/node/runtime/Cargo.toml +++ b/node/runtime/Cargo.toml @@ -34,7 +34,6 @@ sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = fal node-primitives = { path = "../primitives", default-features = false } consensus_aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default-features = false } rustc-hex = { version = "2.0", optional = true } -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true } substrate-keyring = { path = "../../core/keyring", optional = true } consensus_authorities = { package = "substrate-consensus-authorities", path = "../../core/consensus/authorities", default-features = false } @@ -73,7 +72,6 @@ std = [ "client/std", "consensus_aura/std", "rustc-hex", - "hex-literal", "substrate-keyring", "offchain-primitives/std", "consensus_authorities/std", diff --git a/srml/assets/Cargo.toml b/srml/assets/Cargo.toml index 066dd42ffd..726c7f3580 100644 --- a/srml/assets/Cargo.toml +++ b/srml/assets/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false } # Needed for various traits. In our case, `OnFinalize`. diff --git a/srml/aura/Cargo.toml b/srml/aura/Cargo.toml index b22fea8ffd..4ec1c27c71 100644 --- a/srml/aura/Cargo.toml +++ b/srml/aura/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" parity-codec = { version = "3.3", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } diff --git a/srml/balances/Cargo.toml b/srml/balances/Cargo.toml index 804ee60364..df8c31c865 100644 --- a/srml/balances/Cargo.toml +++ b/srml/balances/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/srml/consensus/Cargo.toml b/srml/consensus/Cargo.toml index ef3e943c8d..267e394ffb 100644 --- a/srml/consensus/Cargo.toml +++ b/srml/consensus/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } diff --git a/srml/contract/Cargo.toml b/srml/contract/Cargo.toml index 28ca8f9eb9..6d302c208c 100644 --- a/srml/contract/Cargo.toml +++ b/srml/contract/Cargo.toml @@ -22,7 +22,7 @@ timestamp = { package = "srml-timestamp", path = "../timestamp", default-feature [dev-dependencies] wabt = "~0.7.4" assert_matches = "1.1" -hex-literal = "0.1.0" +hex-literal = "0.2.0" consensus = { package = "srml-consensus", path = "../consensus" } balances = { package = "srml-balances", path = "../balances" } diff --git a/srml/contract/src/tests.rs b/srml/contract/src/tests.rs index d6fa2677df..0e7270769c 100644 --- a/srml/contract/src/tests.rs +++ b/srml/contract/src/tests.rs @@ -29,7 +29,7 @@ use srml_support::{storage::child, StorageMap, assert_ok, impl_outer_event, impl use substrate_primitives::Blake2Hasher; use system::{self, Phase, EventRecord}; use {wabt, balances, consensus}; -use hex_literal::*; +use hex_literal::hex; use assert_matches::assert_matches; use crate::{ ContractAddressFor, GenesisConfig, Module, RawEvent, diff --git a/srml/council/Cargo.toml b/srml/council/Cargo.toml index 87de0ae0d1..c4d535af53 100644 --- a/srml/council/Cargo.toml +++ b/srml/council/Cargo.toml @@ -17,7 +17,7 @@ democracy = { package = "srml-democracy", path = "../democracy", default-feature system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -hex-literal = "0.1.0" +hex-literal = "0.2.0" balances = { package = "srml-balances", path = "../balances" } [features] diff --git a/srml/council/src/motions.rs b/srml/council/src/motions.rs index 3bbe463780..393ebce4f8 100644 --- a/srml/council/src/motions.rs +++ b/srml/council/src/motions.rs @@ -205,7 +205,7 @@ mod tests { use crate::tests::{Call, Origin, Event as OuterEvent}; use srml_support::{Hashable, assert_ok, assert_noop}; use system::{EventRecord, Phase}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn motions_basic_environment_works() { diff --git a/srml/democracy/Cargo.toml b/srml/democracy/Cargo.toml index e789c733d6..8fbe34bb2e 100644 --- a/srml/democracy/Cargo.toml +++ b/srml/democracy/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/srml/example/Cargo.toml b/srml/example/Cargo.toml index c62b61f7b3..ae9f2f508e 100644 --- a/srml/example/Cargo.toml +++ b/srml/example/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false } srml-support = { path = "../support", default-features = false } diff --git a/srml/executive/Cargo.toml b/srml/executive/Cargo.toml index 0526e86ca9..ef2190da54 100644 --- a/srml/executive/Cargo.toml +++ b/srml/executive/Cargo.toml @@ -14,7 +14,7 @@ srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -hex-literal = "0.1.0" +hex-literal = "0.2.0" substrate-primitives = { path = "../../core/primitives" } srml-indices = { path = "../indices" } balances = { package = "srml-balances", path = "../balances" } diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index 271d7156ac..6ca10bed2d 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -365,7 +365,7 @@ mod tests { use primitives::testing::{Digest, DigestItem, Header, Block}; use srml_support::{traits::Currency, impl_outer_origin, impl_outer_event}; use system; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; impl_outer_origin! { pub enum Origin for Runtime { diff --git a/srml/finality-tracker/Cargo.toml b/srml/finality-tracker/Cargo.toml index c85534f1eb..b0b2c53b58 100644 --- a/srml/finality-tracker/Cargo.toml +++ b/srml/finality-tracker/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", default-features = false, features = ["derive"] } parity-codec = { version = "3.3", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } diff --git a/srml/indices/Cargo.toml b/srml/indices/Cargo.toml index 8c62cf13b5..ad666e7a54 100644 --- a/srml/indices/Cargo.toml +++ b/srml/indices/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/srml/session/Cargo.toml b/srml/session/Cargo.toml index 036f5a55ec..7739e9746f 100644 --- a/srml/session/Cargo.toml +++ b/srml/session/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/srml/staking/Cargo.toml b/srml/staking/Cargo.toml index cd10f783b1..e26814ffde 100644 --- a/srml/staking/Cargo.toml +++ b/srml/staking/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/srml/sudo/Cargo.toml b/srml/sudo/Cargo.toml index 220127ba3b..788d24e1c3 100644 --- a/srml/sudo/Cargo.toml +++ b/srml/sudo/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } sr-std = { path = "../../core/sr-std", default-features = false } diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index ab16e98ee9..1d44412be7 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } codec = { package = "parity-codec", version = "3.5.1", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } @@ -25,7 +24,6 @@ srml-system = { path = "../system", default-features = false } [features] default = ["std"] std = [ - "hex-literal", "once_cell", "bitmask/std", "serde", diff --git a/srml/system/Cargo.toml b/srml/system/Cargo.toml index 0effeae251..0153906c97 100644 --- a/srml/system/Cargo.toml +++ b/srml/system/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.5", default-features = false, features = ["derive"] } diff --git a/srml/timestamp/Cargo.toml b/srml/timestamp/Cargo.toml index c86493890a..b785dd9184 100644 --- a/srml/timestamp/Cargo.toml +++ b/srml/timestamp/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } diff --git a/srml/treasury/Cargo.toml b/srml/treasury/Cargo.toml index a4f3960edd..e0716f6c59 100644 --- a/srml/treasury/Cargo.toml +++ b/srml/treasury/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } diff --git a/subkey/Cargo.toml b/subkey/Cargo.toml index 280f18887e..bd44c8754a 100644 --- a/subkey/Cargo.toml +++ b/subkey/Cargo.toml @@ -16,7 +16,7 @@ rustc-hex = "2.0" substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39" } schnorrkel = "0.1" hex = "0.3" -hex-literal = "0.1" +hex-literal = "0.2" parity-codec = "3.2" [features] diff --git a/subkey/src/main.rs b/subkey/src/main.rs index 2aa8609623..b0ad1b281d 100644 --- a/subkey/src/main.rs +++ b/subkey/src/main.rs @@ -18,11 +18,8 @@ #[cfg(feature = "bench")] extern crate test; -extern crate substrate_bip39; -extern crate rustc_hex; -#[macro_use] extern crate hex_literal; - use std::io::{stdin, Read}; +use hex_literal::hex; use clap::load_yaml; use rand::{RngCore, rngs::OsRng}; use substrate_bip39::mini_secret_from_entropy; -- GitLab From 9172ffaa86b413a221742c1ac3447a999028c288 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 25 Apr 2019 11:39:57 +0200 Subject: [PATCH 062/206] Remove the multiplexed networking system (#2373) * Remove the multiplexed networking system * Rename BackCompat to Normal * Remove CustomMessageId * Fix tests --- .../src/custom_proto/handler.rs | 315 ++---------------- core/network-libp2p/src/custom_proto/mod.rs | 2 +- .../src/custom_proto/upgrade.rs | 108 +----- core/network-libp2p/src/lib.rs | 4 +- core/network-libp2p/tests/test.rs | 13 +- core/network/src/message.rs | 22 +- 6 files changed, 36 insertions(+), 428 deletions(-) diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index beac1dec25..7c0ec61344 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use crate::custom_proto::upgrade::{CustomMessage, CustomMessageId, RegisteredProtocol}; +use crate::custom_proto::upgrade::{CustomMessage, RegisteredProtocol}; use crate::custom_proto::upgrade::{RegisteredProtocolEvent, RegisteredProtocolSubstream}; use futures::prelude::*; use libp2p::core::{ @@ -25,8 +25,8 @@ use libp2p::core::{ protocols_handler::SubstreamProtocol, upgrade::{InboundUpgrade, OutboundUpgrade} }; -use log::{debug, error, warn}; -use smallvec::{smallvec, SmallVec}; +use log::{debug, error}; +use smallvec::SmallVec; use std::{error, fmt, io, marker::PhantomData, mem, time::Duration, time::Instant}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_timer::{Delay, clock::Clock}; @@ -69,26 +69,17 @@ use void::Void; /// /// ## How it works /// -/// For backwards compatibility reasons, the behaviour of the handler is quite complicated. After -/// enough nodes have upgraded, it should be simplified by using helpers provided by libp2p. -/// /// When the handler is created, it is initially in the `Init` state and waits for either a /// `Disable` or an `Enable` message from the outer layer. At any time, the outer layer is free to /// toggle the handler between the disabled and enabled states. /// /// When the handler is enabled for the first time, if it is the dialer of the connection, it tries -/// to open a substream. The substream negotiates either a protocol named `/substrate/xxx` or a -/// protocol named `/substrate/multi/xxx`. If it is the former, then we are in -/// "backwards-compatibility mode". If it is the latter, we are in normal operation mode. -/// -/// In "backwards-compatibility mode", we have one unique substream where bidirectional -/// communications happen. If the remote closes the substream, we consider that we are now -/// disconnected. Re-enabling is performed by re-opening the substream. +/// to open a substream. The substream negotiates either a protocol named `/substrate/xxx`, where +/// `xxx` is chosen by the user. /// -/// In normal operation mode, each request gets sent over a different substream where the response -/// is then sent back. If the remote refuses one of our substream open request, or if an error -/// happens on one substream, we consider that we are disconnected. Re-enabling is performed by -/// opening an outbound substream. +/// Then, we have one unique substream where bidirectional communications happen. If the remote +/// closes the substream, we consider that we are now disconnected. Re-enabling is performed by +/// re-opening the substream (even if we are not the dialer of the connection). /// pub struct CustomProtoHandlerProto { /// Configuration for the protocol upgrade to negotiate. @@ -159,7 +150,6 @@ pub struct CustomProtoHandler { /// `Clock` instance that uses the current execution context's source of time. clock: Clock, - } /// State of the handler. @@ -181,17 +171,13 @@ enum ProtocolState { /// Backwards-compatible mode. Contains the unique substream that is open. /// If we are in this state, we have sent a `CustomProtocolOpen` message to the outside. - BackCompat { + Normal { /// The unique substream where bidirectional communications happen. substream: RegisteredProtocolSubstream, /// Contains substreams which are being shut down. shutdown: SmallVec<[RegisteredProtocolSubstream; 4]>, }, - /// Normal functionning. Contains the substreams that are open. - /// If we are in this state, we have sent a `CustomProtocolOpen` message to the outside. - Normal(PerProtocolNormalState), - /// We are disabled. Contains substreams that are being closed. /// If we are in this state, either we have sent a `CustomProtocolClosed` message to the /// outside or we have never sent any `CustomProtocolOpen` in the first place. @@ -212,128 +198,6 @@ enum ProtocolState { Poisoned, } -/// Normal functionning mode for a protocol. -struct PerProtocolNormalState { - /// Optional substream that we opened. - outgoing_substream: Option>, - - /// Substreams that have been opened by the remote. We are waiting for a packet from it. - incoming_substreams: SmallVec<[RegisteredProtocolSubstream; 4]>, - - /// For each request that has been sent to the remote, contains the substream where we - /// expect a response. - pending_response: SmallVec<[(u64, RegisteredProtocolSubstream); 4]>, - - /// For each request received by the remote, contains the substream where to send back our - /// response. Once a response has been sent, the substream closes. - pending_send_back: SmallVec<[(u64, RegisteredProtocolSubstream); 4]>, - - /// List of messages waiting for a substream to open in order to be sent. - pending_messages: SmallVec<[TMessage; 6]>, - - /// Contains substreams which are being shut down. - shutdown: SmallVec<[RegisteredProtocolSubstream; 4]>, -} - -impl PerProtocolNormalState -where TMessage: CustomMessage, TSubstream: AsyncRead + AsyncWrite { - /// Polls for things that are new. Same API constraints as `Future::poll()`. - /// Optionally returns the event to produce. - /// You must pass the `protocol_id` as we need have to inject it in the returned event. - /// API note: Ideally we wouldn't need to be passed a `ProtocolId`, and we would return a - /// different enum that doesn't contain any `protocol_id`, and the caller would inject - /// the ID itself, but that's a ton of code for not much gain. - fn poll(&mut self) -> Option> { - for n in (0..self.pending_response.len()).rev() { - let (request_id, mut substream) = self.pending_response.swap_remove(n); - match substream.poll() { - Ok(Async::Ready(Some(RegisteredProtocolEvent::Message(message)))) => { - if message.request_id() == CustomMessageId::Response(request_id) { - let event = CustomProtoHandlerOut::CustomMessage { - message - }; - self.shutdown.push(substream); - return Some(event); - } else { - self.shutdown.push(substream); - let event = CustomProtoHandlerOut::ProtocolError { - is_severe: true, - error: format!("Request ID doesn't match substream: expected {:?}, \ - got {:?}", request_id, message.request_id()).into(), - }; - return Some(event); - } - }, - Ok(Async::Ready(Some(RegisteredProtocolEvent::Clogged { .. }))) => - unreachable!("Cannot receive Clogged message with new protocol version; QED"), - Ok(Async::NotReady) => - self.pending_response.push((request_id, substream)), - Ok(Async::Ready(None)) => { - self.shutdown.push(substream); - let event = CustomProtoHandlerOut::ProtocolError { - is_severe: false, - error: format!("Request ID {:?} didn't receive an answer", request_id).into(), - }; - return Some(event); - } - Err(err) => { - self.shutdown.push(substream); - let event = CustomProtoHandlerOut::ProtocolError { - is_severe: false, - error: format!("Error while waiting for an answer for {:?}: {}", - request_id, err).into(), - }; - return Some(event); - } - } - } - - for n in (0..self.incoming_substreams.len()).rev() { - let mut substream = self.incoming_substreams.swap_remove(n); - match substream.poll() { - Ok(Async::Ready(Some(RegisteredProtocolEvent::Message(message)))) => { - return match message.request_id() { - CustomMessageId::Request(id) => { - self.pending_send_back.push((id, substream)); - Some(CustomProtoHandlerOut::CustomMessage { - message - }) - } - CustomMessageId::OneWay => { - self.shutdown.push(substream); - Some(CustomProtoHandlerOut::CustomMessage { - message - }) - } - _ => { - self.shutdown.push(substream); - Some(CustomProtoHandlerOut::ProtocolError { - is_severe: true, - error: format!("Received response in new substream").into(), - }) - } - } - }, - Ok(Async::Ready(Some(RegisteredProtocolEvent::Clogged { .. }))) => - unreachable!("Cannot receive Clogged message with new protocol version; QED"), - Ok(Async::NotReady) => - self.incoming_substreams.push(substream), - Ok(Async::Ready(None)) => {} - Err(err) => { - self.shutdown.push(substream); - return Some(CustomProtoHandlerOut::ProtocolError { - is_severe: false, - error: format!("Error in incoming substream: {}", err).into(), - }); - } - } - } - - shutdown_list(&mut self.shutdown); - None - } -} - /// Event that can be received by a `CustomProtoHandler`. #[derive(Debug)] pub enum CustomProtoHandlerIn { @@ -414,26 +278,12 @@ where deadline: Delay::new(self.clock.now() + Duration::from_secs(60)) } - } else if incoming.iter().any(|s| s.is_multiplex()) { - let event = CustomProtoHandlerOut::CustomProtocolOpen { - version: incoming[0].protocol_version() - }; - self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Normal(PerProtocolNormalState { - outgoing_substream: None, - incoming_substreams: incoming.into_iter().collect(), - pending_response: SmallVec::new(), - pending_send_back: SmallVec::new(), - pending_messages: SmallVec::new(), - shutdown: SmallVec::new(), - }) - } else { let event = CustomProtoHandlerOut::CustomProtocolOpen { version: incoming[0].protocol_version() }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::BackCompat { + ProtocolState::Normal { substream: incoming.into_iter().next() .expect("We have a check above that incoming isn't empty; QED"), shutdown: SmallVec::new() @@ -442,7 +292,6 @@ where } st @ ProtocolState::Opening { .. } => st, - st @ ProtocolState::BackCompat { .. } => st, st @ ProtocolState::Normal { .. } => st, ProtocolState::Disabled { shutdown, .. } => { ProtocolState::Disabled { shutdown, reenable: true } @@ -470,7 +319,7 @@ where ProtocolState::Disabled { shutdown: SmallVec::new(), reenable: false } } - ProtocolState::BackCompat { mut substream, mut shutdown } => { + ProtocolState::Normal { mut substream, mut shutdown } => { substream.shutdown(); shutdown.push(substream); let event = CustomProtoHandlerOut::CustomProtocolClosed { @@ -483,23 +332,6 @@ where } } - ProtocolState::Normal(state) => { - let mut out: SmallVec<[_; 6]> = SmallVec::new(); - out.extend(state.outgoing_substream.into_iter()); - out.extend(state.incoming_substreams.into_iter()); - out.extend(state.pending_response.into_iter().map(|(_, s)| s)); - out.extend(state.pending_send_back.into_iter().map(|(_, s)| s)); - for s in &mut out { - s.shutdown(); - } - out.extend(state.shutdown.into_iter()); - let event = CustomProtoHandlerOut::CustomProtocolClosed { - result: Ok(()) - }; - self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Disabled { shutdown: out, reenable: false } - } - ProtocolState::Disabled { shutdown, .. } => ProtocolState::Disabled { shutdown, reenable: false }, }; @@ -557,25 +389,25 @@ where } } - ProtocolState::BackCompat { mut substream, shutdown } => { + ProtocolState::Normal { mut substream, shutdown } => { match substream.poll() { Ok(Async::Ready(Some(RegisteredProtocolEvent::Message(message)))) => { let event = CustomProtoHandlerOut::CustomMessage { message }; return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::BackCompat { substream, shutdown } + ProtocolState::Normal { substream, shutdown } }, Ok(Async::Ready(Some(RegisteredProtocolEvent::Clogged { messages }))) => { let event = CustomProtoHandlerOut::Clogged { messages, }; return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::BackCompat { substream, shutdown } + ProtocolState::Normal { substream, shutdown } } Ok(Async::NotReady) => { return_value = None; - ProtocolState::BackCompat { substream, shutdown } + ProtocolState::Normal { substream, shutdown } } Ok(Async::Ready(None)) => { let event = CustomProtoHandlerOut::CustomProtocolClosed { @@ -600,16 +432,6 @@ where } } - ProtocolState::Normal(mut norm_state) => { - if let Some(event) = norm_state.poll() { - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - } else { - return_value = None; - } - - ProtocolState::Normal(norm_state) - } - ProtocolState::Disabled { mut shutdown, reenable } => { shutdown_list(&mut shutdown); // If `reenable` is `true`, that means we should open the substreams system again @@ -658,65 +480,18 @@ where version: substream.protocol_version() }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - - match (substream.endpoint(), substream.is_multiplex()) { - (Endpoint::Dialer, true) => { - ProtocolState::Normal(PerProtocolNormalState { - outgoing_substream: Some(substream), - incoming_substreams: SmallVec::new(), - pending_response: SmallVec::new(), - pending_send_back: SmallVec::new(), - pending_messages: SmallVec::new(), - shutdown: SmallVec::new(), - }) - }, - (Endpoint::Listener, true) => { - ProtocolState::Normal(PerProtocolNormalState { - outgoing_substream: None, - incoming_substreams: smallvec![substream], - pending_response: SmallVec::new(), - pending_send_back: SmallVec::new(), - pending_messages: SmallVec::new(), - shutdown: SmallVec::new(), - }) - }, - (_, false) => { - ProtocolState::BackCompat { - substream, - shutdown: SmallVec::new() - } - }, + ProtocolState::Normal { + substream, + shutdown: SmallVec::new() } } - ProtocolState::BackCompat { substream: existing, mut shutdown } => { + ProtocolState::Normal { substream: existing, mut shutdown } => { debug!(target: "sub-libp2p", "Received extra substream after having already one \ open in backwards-compatibility mode with {:?}", self.remote_peer_id); substream.shutdown(); shutdown.push(substream); - ProtocolState::BackCompat { substream: existing, shutdown } - } - - ProtocolState::Normal(mut state) => { - if substream.endpoint() == Endpoint::Listener { - state.incoming_substreams.push(substream); - } else if !state.pending_messages.is_empty() { - let message = state.pending_messages.remove(0); - let request_id = message.request_id(); - substream.send_message(message); - if let CustomMessageId::Request(request_id) = request_id { - state.pending_response.push((request_id, substream)); - } else { - state.shutdown.push(substream); - } - } else { - debug!(target: "sub-libp2p", "Opened spurious outbound substream with {:?}", - self.remote_peer_id); - substream.shutdown(); - state.shutdown.push(substream); - } - - ProtocolState::Normal(state) + ProtocolState::Normal { substream: existing, shutdown } } ProtocolState::Disabled { mut shutdown, .. } => { @@ -730,54 +505,9 @@ where /// Sends a message to the remote. fn send_message(&mut self, message: TMessage) { match self.state { - ProtocolState::BackCompat { ref mut substream, .. } => + ProtocolState::Normal { ref mut substream, .. } => substream.send_message(message), - ProtocolState::Normal(ref mut state) => { - if let CustomMessageId::Request(request_id) = message.request_id() { - if let Some(mut outgoing_substream) = state.outgoing_substream.take() { - outgoing_substream.send_message(message); - state.pending_response.push((request_id, outgoing_substream)); - } else { - if state.pending_messages.len() >= 2048 { - let event = CustomProtoHandlerOut::Clogged { - messages: Vec::new(), - }; - self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - } - state.pending_messages.push(message); - self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { - protocol: SubstreamProtocol::new(self.protocol.clone()), - info: () - }); - } - } else if let CustomMessageId::Response(request_id) = message.request_id() { - if let Some(pos) = state.pending_send_back.iter().position(|(id, _)| *id == request_id) { - let (_, mut substream) = state.pending_send_back.remove(pos); - substream.send_message(message); - state.shutdown.push(substream); - } else { - warn!(target: "sub-libp2p", "Libp2p layer received response to a \ - non-existing request ID {:?} with {:?}", request_id, self.remote_peer_id); - } - } else if let Some(mut outgoing_substream) = state.outgoing_substream.take() { - outgoing_substream.send_message(message); - state.shutdown.push(outgoing_substream); - } else { - if state.pending_messages.len() >= 2048 { - let event = CustomProtoHandlerOut::Clogged { - messages: Vec::new(), - }; - self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); - } - state.pending_messages.push(message); - self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { - protocol: SubstreamProtocol::new(self.protocol.clone()), - info: () - }); - } - } - _ => debug!(target: "sub-libp2p", "Tried to send message over closed protocol \ with {:?}", self.remote_peer_id) } @@ -844,8 +574,7 @@ where TSubstream: AsyncRead + AsyncWrite, TMessage: CustomMessage { match self.state { ProtocolState::Init { .. } | ProtocolState::Opening { .. } => {} - ProtocolState::BackCompat { .. } | ProtocolState::Normal { .. } => - keep_forever = true, + ProtocolState::Normal { .. } => keep_forever = true, ProtocolState::Disabled { .. } | ProtocolState::Poisoned => return KeepAlive::No, } diff --git a/core/network-libp2p/src/custom_proto/mod.rs b/core/network-libp2p/src/custom_proto/mod.rs index cf2bf57153..261f710d8d 100644 --- a/core/network-libp2p/src/custom_proto/mod.rs +++ b/core/network-libp2p/src/custom_proto/mod.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . pub use self::behaviour::{CustomProto, CustomProtoOut}; -pub use self::upgrade::{CustomMessage, CustomMessageId, RegisteredProtocol}; +pub use self::upgrade::{CustomMessage, RegisteredProtocol}; mod behaviour; mod handler; diff --git a/core/network-libp2p/src/custom_proto/upgrade.rs b/core/network-libp2p/src/custom_proto/upgrade.rs index 00c3fc999d..bc61ff74e8 100644 --- a/core/network-libp2p/src/custom_proto/upgrade.rs +++ b/core/network-libp2p/src/custom_proto/upgrade.rs @@ -19,7 +19,7 @@ use bytes::Bytes; use libp2p::core::{Negotiated, Endpoint, UpgradeInfo, InboundUpgrade, OutboundUpgrade, upgrade::ProtocolName}; use libp2p::tokio_codec::Framed; use log::warn; -use std::{collections::VecDeque, io, iter, marker::PhantomData, vec::IntoIter as VecIntoIter}; +use std::{collections::VecDeque, io, marker::PhantomData, vec::IntoIter as VecIntoIter}; use futures::{prelude::*, future, stream}; use tokio_io::{AsyncRead, AsyncWrite}; use unsigned_varint::codec::UviBytes; @@ -100,9 +100,6 @@ pub struct RegisteredProtocolSubstream { /// If true, we have sent a "remote is clogged" event recently and shouldn't send another one /// unless the buffer empties then fills itself again. clogged_fuse: bool, - /// If true, then this substream uses the "/multi/" version of the protocol. This is a hint - /// that the handler can behave differently. - is_multiplex: bool, /// Marker to pin the generic. marker: PhantomData, } @@ -126,12 +123,6 @@ impl RegisteredProtocolSubstream { self.endpoint } - /// Returns true if we negotiated the "multiplexed" version. This means that the handler can - /// open multiple substreams instead of just one. - pub fn is_multiplex(&self) -> bool { - self.is_multiplex - } - /// Starts a graceful shutdown process on this substream. /// /// Note that "graceful" means that we sent a closing message. We don't wait for any @@ -162,31 +153,9 @@ pub trait CustomMessage { /// Tries to parse `bytes` received from the network into a message. fn from_bytes(bytes: &[u8]) -> Result where Self: Sized; - - /// Returns a unique ID that is used to match request and responses. - /// - /// The networking layer employs multiplexing in order to have multiple parallel data streams. - /// Transmitting messages over the network uses two kinds of substreams: - /// - /// - Undirectional substreams, where we send a single message then close the substream. - /// - Bidirectional substreams, where we send a message then wait for a response. Once the - /// response has arrived, we close the substream. - /// - /// If `request_id()` returns `OneWay`, then this message will be sent or received over a - /// unidirectional substream. If instead it returns `Request` or `Response`, then we use the - /// value to match a request with its response. - fn request_id(&self) -> CustomMessageId; } -/// See the documentation of `CustomMessage::request_id`. -#[derive(Debug, Copy, Clone, PartialEq, Eq)] -pub enum CustomMessageId { - OneWay, - Request(u64), - Response(u64), -} - -// These trait implementations exist mostly for testing convenience. This should eventually be +// This trait implementation exist mostly for testing convenience. This should eventually be // removed. impl CustomMessage for Vec { @@ -197,45 +166,6 @@ impl CustomMessage for Vec { fn from_bytes(bytes: &[u8]) -> Result { Ok(bytes.to_vec()) } - - fn request_id(&self) -> CustomMessageId { - CustomMessageId::OneWay - } -} - -impl CustomMessage for (Option, Vec) { - fn into_bytes(self) -> Vec { - use byteorder::WriteBytesExt; - use std::io::Write; - let mut out = Vec::new(); - out.write_u64::(self.0.unwrap_or(u64::max_value())) - .expect("Writing to a Vec can never fail"); - out.write_all(&self.1).expect("Writing to a Vec can never fail"); - out - } - - fn from_bytes(bytes: &[u8]) -> Result { - use byteorder::ReadBytesExt; - use std::io::Read; - let mut rdr = std::io::Cursor::new(bytes); - let id = rdr.read_u64::().map_err(|_| ())?; - let mut out = Vec::new(); - rdr.read_to_end(&mut out).map_err(|_| ())?; - let id = if id == u64::max_value() { - None - } else { - Some(id) - }; - Ok((id, out)) - } - - fn request_id(&self) -> CustomMessageId { - if let Some(id) = self.0 { - CustomMessageId::Request(id) - } else { - CustomMessageId::OneWay - } - } } /// Event produced by the `RegisteredProtocolSubstream`. @@ -328,33 +258,15 @@ impl UpgradeInfo for RegisteredProtocol { #[inline] fn protocol_info(&self) -> Self::InfoIter { // Report each version as an individual protocol. - self.supported_versions.iter().flat_map(|&version| { + self.supported_versions.iter().map(|&version| { let num = version.to_string(); - // Note that `name1` is the multiplex version, as we priviledge it over the old one. - let mut name1 = self.base_name.clone(); - name1.extend_from_slice(b"multi/"); - name1.extend_from_slice(num.as_bytes()); - let proto1 = RegisteredProtocolName { - name: name1, + let mut name = self.base_name.clone(); + name.extend_from_slice(num.as_bytes()); + RegisteredProtocolName { + name, version, - is_multiplex: true, - }; - - let mut name2 = self.base_name.clone(); - name2.extend_from_slice(num.as_bytes()); - let proto2 = RegisteredProtocolName { - name: name2, - version, - is_multiplex: false, - }; - - // Important note: we prioritize the backwards compatible mode for now. - // After some intensive testing has been done, we should switch to the new mode by - // default. - // Then finally we can remove the old mode after everyone has switched. - // See https://github.com/paritytech/substrate/issues/1692 - iter::once(proto2).chain(iter::once(proto1)) + } }).collect::>().into_iter() } } @@ -366,8 +278,6 @@ pub struct RegisteredProtocolName { name: Bytes, /// Version number. Stored in string form in `name`, but duplicated here for easier retrieval. version: u8, - /// If true, then this version is the one with the multiplexing. - is_multiplex: bool, } impl ProtocolName for RegisteredProtocolName { @@ -403,7 +313,6 @@ where TSubstream: AsyncRead + AsyncWrite, protocol_id: self.id, protocol_version: info.version, clogged_fuse: false, - is_multiplex: info.is_multiplex, marker: PhantomData, }) } @@ -432,7 +341,6 @@ where TSubstream: AsyncRead + AsyncWrite, protocol_id: self.id, protocol_version: info.version, clogged_fuse: false, - is_multiplex: info.is_multiplex, marker: PhantomData, }) } diff --git a/core/network-libp2p/src/lib.rs b/core/network-libp2p/src/lib.rs index 8c8b471931..639a74933d 100644 --- a/core/network-libp2p/src/lib.rs +++ b/core/network-libp2p/src/lib.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . //! Networking layer of Substrate. -//! +//! //! **Important**: This crate is unstable and the API and usage may change. //! @@ -27,7 +27,7 @@ mod transport; pub use crate::behaviour::Severity; pub use crate::config::*; -pub use crate::custom_proto::{CustomMessage, CustomMessageId, RegisteredProtocol}; +pub use crate::custom_proto::{CustomMessage, RegisteredProtocol}; pub use crate::config::{NetworkConfiguration, NodeKeyConfig, Secret, NonReservedPeerMode}; pub use crate::service_task::{start_service, Service, ServiceEvent}; pub use libp2p::{Multiaddr, multiaddr, build_multiaddr}; diff --git a/core/network-libp2p/tests/test.rs b/core/network-libp2p/tests/test.rs index b335b7c46b..ff4d5824e0 100644 --- a/core/network-libp2p/tests/test.rs +++ b/core/network-libp2p/tests/test.rs @@ -200,7 +200,7 @@ fn many_nodes_connectivity() { #[test] fn basic_two_nodes_requests_in_parallel() { let (mut service1, mut service2) = { - let mut l = build_nodes::<(Option, Vec)>(2, 50550).into_iter(); + let mut l = build_nodes::>(2, 50550).into_iter(); let a = l.next().unwrap(); let b = l.next().unwrap(); (a, b) @@ -209,17 +209,8 @@ fn basic_two_nodes_requests_in_parallel() { // Generate random messages with or without a request id. let mut to_send = { let mut to_send = Vec::new(); - let mut next_id = 0; for _ in 0..200 { // Note: don't make that number too high or the CPU usage will explode. - let id = if rand::random::() % 4 != 0 { - let i = next_id; - next_id += 1; - Some(i) - } else { - None - }; - - let msg = (id, (0..10).map(|_| rand::random::()).collect::>()); + let msg = (0..10).map(|_| rand::random::()).collect::>(); to_send.push(msg); } to_send diff --git a/core/network/src/message.rs b/core/network/src/message.rs index 6053d12f51..b2cc5a888a 100644 --- a/core/network/src/message.rs +++ b/core/network/src/message.rs @@ -125,7 +125,7 @@ pub struct RemoteReadResponse { /// Generic types. pub mod generic { use parity_codec::{Encode, Decode}; - use network_libp2p::{CustomMessage, CustomMessageId}; + use network_libp2p::CustomMessage; use runtime_primitives::Justification; use crate::config::Roles; use super::{ @@ -213,26 +213,6 @@ pub mod generic { fn from_bytes(bytes: &[u8]) -> Result { Decode::decode(&mut &bytes[..]).ok_or(()) } - - fn request_id(&self) -> CustomMessageId { - match *self { - Message::Status(_) => CustomMessageId::OneWay, - Message::BlockRequest(ref req) => CustomMessageId::Request(req.id), - Message::BlockResponse(ref resp) => CustomMessageId::Response(resp.id), - Message::BlockAnnounce(_) => CustomMessageId::OneWay, - Message::Transactions(_) => CustomMessageId::OneWay, - Message::Consensus(_) => CustomMessageId::OneWay, - Message::RemoteCallRequest(ref req) => CustomMessageId::Request(req.id), - Message::RemoteCallResponse(ref resp) => CustomMessageId::Response(resp.id), - Message::RemoteReadRequest(ref req) => CustomMessageId::Request(req.id), - Message::RemoteReadResponse(ref resp) => CustomMessageId::Response(resp.id), - Message::RemoteHeaderRequest(ref req) => CustomMessageId::Request(req.id), - Message::RemoteHeaderResponse(ref resp) => CustomMessageId::Response(resp.id), - Message::RemoteChangesRequest(ref req) => CustomMessageId::Request(req.id), - Message::RemoteChangesResponse(ref resp) => CustomMessageId::Response(resp.id), - Message::ChainSpecific(_) => CustomMessageId::OneWay, - } - } } /// Status sent on connection. -- GitLab From f8f9ef07f21115e270494efbce568c494b39d268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Thu, 25 Apr 2019 13:03:30 +0200 Subject: [PATCH 063/206] Fixes node-template-release (#2375) --- node-template/scripts/build.sh | 2 +- scripts/node-template-release/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node-template/scripts/build.sh b/node-template/scripts/build.sh index edbcba835c..01d0fee354 100755 --- a/node-template/scripts/build.sh +++ b/node-template/scripts/build.sh @@ -2,7 +2,7 @@ set -e -PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null && pwd )" export CARGO_INCREMENTAL=0 diff --git a/scripts/node-template-release/src/main.rs b/scripts/node-template-release/src/main.rs index 871cc078ed..470d34ef0d 100644 --- a/scripts/node-template-release/src/main.rs +++ b/scripts/node-template-release/src/main.rs @@ -137,7 +137,7 @@ fn write_cargo_toml(path: &Path, cargo_toml: CargoToml) { /// Build and test the generated node-template fn build_and_test(path: &Path, cargo_tomls: &[PathBuf]) { // Build wasm - assert!(Command::new(path.join("build.sh")).current_dir(path).status().expect("Compiles wasm").success()); + assert!(Command::new(path.join("./scripts/build.sh")).current_dir(path).status().expect("Compiles wasm").success()); // Build node assert!(Command::new("cargo").args(&["build", "--all"]).current_dir(path).status().expect("Compiles node").success()); -- GitLab From e802919de80237f529e5bd91080a31748e1c3284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 25 Apr 2019 13:31:50 +0200 Subject: [PATCH 064/206] Allow localhost IP by default. (#2380) --- core/cli/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/cli/src/lib.rs b/core/cli/src/lib.rs index 296e8e3c3f..275399bdf3 100644 --- a/core/cli/src/lib.rs +++ b/core/cli/src/lib.rs @@ -483,7 +483,9 @@ where } else { Some(vec![ "http://localhost:*".into(), + "http://127.0.0.1:*".into(), "https://localhost:*".into(), + "https://127.0.0.1:*".into(), "https://polkadot.js.org".into(), "https://substrate-ui.parity.io".into(), ]) -- GitLab From a89639161ab558d6e3c44f9b5717b37a9c10425c Mon Sep 17 00:00:00 2001 From: thiolliere Date: Thu, 25 Apr 2019 15:48:19 +0200 Subject: [PATCH 065/206] remove use of hidden api in support procedural (#2383) --- Cargo.lock | 50 +++++----- srml/support/procedural/Cargo.toml | 4 +- srml/support/procedural/src/storage/mod.rs | 91 +++++++++---------- .../procedural/src/storage/transformation.rs | 22 ++--- srml/support/procedural/tools/src/lib.rs | 24 ----- srml/support/procedural/tools/src/syn_ext.rs | 27 ------ 6 files changed, 81 insertions(+), 137 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dd2198b81..0e83b961ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,7 +106,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -625,7 +625,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -680,7 +680,7 @@ dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -801,7 +801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1260,7 +1260,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1480,7 +1480,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2288,7 +2288,7 @@ dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2434,7 +2434,7 @@ dependencies = [ "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2516,7 +2516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2994,7 +2994,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3119,7 +3119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3169,7 +3169,7 @@ dependencies = [ "substrate-primitives 1.0.0", "substrate-state-machine 1.0.0", "substrate-test-client 1.0.0", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3531,7 +3531,7 @@ dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 1.0.0", "srml-support-procedural-tools 1.0.0", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3542,7 +3542,7 @@ dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 1.0.0", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3551,7 +3551,7 @@ version = "1.0.0" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3648,7 +3648,7 @@ dependencies = [ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3663,7 +3663,7 @@ dependencies = [ "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3706,7 +3706,7 @@ dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3722,7 +3722,7 @@ dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4522,7 +4522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.31" +version = "0.15.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4537,7 +4537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5142,7 +5142,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5172,7 +5172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5192,7 +5192,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5714,7 +5714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum substrate-bip39 0.2.1 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" +"checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a0cb7899e248ed0baa6ef6f8406352523c2f99bc7c4b1800f4cd6d5dde99eb" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" diff --git a/srml/support/procedural/Cargo.toml b/srml/support/procedural/Cargo.toml index 26b648da0c..0f7586a795 100644 --- a/srml/support/procedural/Cargo.toml +++ b/srml/support/procedural/Cargo.toml @@ -13,6 +13,4 @@ sr-api-macros = { path = "../../../core/sr-api-macros" } proc-macro2 = "0.4.27" quote = { version = "0.6.12" } -# FIXME: https://github.com/paritytech/substrate/issues/2326 -# Remove this restriction once the dependency on erstwhile CustomKeyword trait is removed -syn = { version = ">= 0.15.30, < 0.15.32", features = ["full"] } +syn = { version = "0.15.32", features = ["full"] } diff --git a/srml/support/procedural/src/storage/mod.rs b/srml/support/procedural/src/storage/mod.rs index 649a48a181..1d9e62bdd7 100644 --- a/srml/support/procedural/src/storage/mod.rs +++ b/srml/support/procedural/src/storage/mod.rs @@ -18,11 +18,8 @@ //! `decl_storage` macro // end::description[] -use srml_support_procedural_tools::syn_ext as ext; -use srml_support_procedural_tools::{ToTokens, Parse, custom_keyword, custom_keyword_impl}; - +use srml_support_procedural_tools::{ToTokens, Parse, syn_ext as ext}; use syn::{Ident, Token}; -use syn::token::CustomKeyword; use proc_macro2::TokenStream as TokenStream2; use quote::quote; @@ -30,10 +27,28 @@ mod impls; pub mod transformation; +mod keyword { + syn::custom_keyword!(hiddencrate); + syn::custom_keyword!(add_extra_genesis); + syn::custom_keyword!(extra_genesis_skip_phantom_data_field); + syn::custom_keyword!(config); + syn::custom_keyword!(build); + syn::custom_keyword!(get); + syn::custom_keyword!(map); + syn::custom_keyword!(linked_map); + syn::custom_keyword!(double_map); + syn::custom_keyword!(blake2_256); + syn::custom_keyword!(blake2_128); + syn::custom_keyword!(twox_256); + syn::custom_keyword!(twox_128); + syn::custom_keyword!(twox_64_concat); + syn::custom_keyword!(hasher); +} + /// Parsing usage only #[derive(Parse, ToTokens, Debug)] struct StorageDefinition { - pub hidden_crate: Option, + pub hidden_crate: ext::Opt, pub visibility: syn::Visibility, pub trait_token: Token![trait], pub ident: Ident, @@ -51,25 +66,25 @@ struct StorageDefinition { pub as_token: Token![as], pub crate_ident: Ident, pub content: ext::Braces>, - pub extra_genesis: Option, - pub extra_genesis_skip_phantom_data_field: Option, + pub extra_genesis: ext::Opt, + pub extra_genesis_skip_phantom_data_field: ext::Opt, } #[derive(Parse, ToTokens, Debug)] struct SpecificHiddenCrate { - pub keyword: ext::CustomToken, + pub keyword: keyword::hiddencrate, pub ident: ext::Parens, } #[derive(Parse, ToTokens, Debug)] struct AddExtraGenesis { - pub extragenesis_keyword: ext::CustomToken, + pub extragenesis_keyword: keyword::add_extra_genesis, pub content: ext::Braces, } #[derive(Parse, ToTokens, Debug)] struct ExtraGenesisSkipPhantomDataField { - pub genesis_phantom_keyword: ext::CustomToken, + pub genesis_phantom_keyword: keyword::extra_genesis_skip_phantom_data_field, pub token: Token![;], } @@ -87,7 +102,7 @@ enum AddExtraGenesisLineEnum { #[derive(Parse, ToTokens, Debug)] struct AddExtraGenesisLine { pub attrs: ext::OuterAttributes, - pub config_keyword: ext::CustomToken, + pub config_keyword: keyword::config, pub extra_field: ext::Parens, pub coldot_token: Token![:], pub extra_type: syn::Type, @@ -102,9 +117,9 @@ struct DeclStorageLine { pub visibility: syn::Visibility, // name pub name: Ident, - pub getter: Option, - pub config: Option, - pub build: Option, + pub getter: ext::Opt, + pub config: ext::Opt, + pub build: ext::Opt, pub coldot_token: Token![:], pub storage_type: DeclStorageType, pub default_value: ext::Opt, @@ -113,19 +128,19 @@ struct DeclStorageLine { #[derive(Parse, ToTokens, Debug)] struct DeclStorageGetter { - pub getter_keyword: ext::CustomToken, + pub getter_keyword: keyword::get, pub getfn: ext::Parens, } #[derive(Parse, ToTokens, Debug)] struct DeclStorageConfig { - pub config_keyword: ext::CustomToken, + pub config_keyword: keyword::config, pub expr: ext::Parens>, } #[derive(Parse, ToTokens, Debug)] struct DeclStorageBuild { - pub build_keyword: ext::CustomToken, + pub build_keyword: keyword::build, pub expr: ext::Parens, } @@ -139,8 +154,8 @@ enum DeclStorageType { #[derive(Parse, ToTokens, Debug)] struct DeclStorageMap { - pub map_keyword: ext::CustomToken, - pub hasher: Option, + pub map_keyword: keyword::map, + pub hasher: ext::Opt, pub key: syn::Type, pub ass_keyword: Token![=>], pub value: syn::Type, @@ -148,8 +163,8 @@ struct DeclStorageMap { #[derive(Parse, ToTokens, Debug)] struct DeclStorageLinkedMap { - pub map_keyword: ext::CustomToken, - pub hasher: Option, + pub map_keyword: keyword::linked_map, + pub hasher: ext::Opt, pub key: syn::Type, pub ass_keyword: Token![=>], pub value: syn::Type, @@ -157,8 +172,8 @@ struct DeclStorageLinkedMap { #[derive(Parse, ToTokens, Debug)] struct DeclStorageDoubleMap { - pub map_keyword: ext::CustomToken, - pub hasher: Option, + pub map_keyword: keyword::double_map, + pub hasher: ext::Opt, pub key1: syn::Type, pub comma_keyword: Token![,], pub key2_hasher: Hasher, @@ -169,11 +184,11 @@ struct DeclStorageDoubleMap { #[derive(Parse, ToTokens, Debug)] enum Hasher { - Blake2_256(ext::CustomToken), - Blake2_128(ext::CustomToken), - Twox256(ext::CustomToken), - Twox128(ext::CustomToken), - Twox64Concat(ext::CustomToken), + Blake2_256(keyword::blake2_256), + Blake2_128(keyword::blake2_128), + Twox256(keyword::twox_256), + Twox128(keyword::twox_128), + Twox64Concat(keyword::twox_64_concat), } #[derive(Parse, ToTokens, Debug)] @@ -184,7 +199,7 @@ struct DeclStorageDefault { #[derive(Parse, ToTokens, Debug)] struct SetHasher { - pub hasher_keyword: ext::CustomToken, + pub hasher_keyword: keyword::hasher, pub inner: ext::Parens, } @@ -239,21 +254,3 @@ impl HasherKind { } } } - -custom_keyword_impl!(SpecificHiddenCrate, "hiddencrate", "hiddencrate as keyword"); -custom_keyword_impl!(DeclStorageConfig, "config", "build as keyword"); -custom_keyword!(ConfigKeyword, "config", "config as keyword"); -custom_keyword!(BuildKeyword, "build", "build as keyword"); -custom_keyword_impl!(DeclStorageBuild, "build", "storage build config"); -custom_keyword_impl!(AddExtraGenesis, "add_extra_genesis", "storage extra genesis"); -custom_keyword_impl!(DeclStorageGetter, "get", "storage getter"); -custom_keyword!(MapKeyword, "map", "map as keyword"); -custom_keyword!(LinkedMapKeyword, "linked_map", "linked_map as keyword"); -custom_keyword!(DoubleMapKeyword, "double_map", "double_map as keyword"); -custom_keyword!(Blake2_256Keyword, "blake2_256", "Blake2_256 as keyword"); -custom_keyword!(Blake2_128Keyword, "blake2_128", "Blake2_128 as keyword"); -custom_keyword!(Twox256Keyword, "twox_256", "Twox256 as keyword"); -custom_keyword!(Twox128Keyword, "twox_128", "Twox128 as keyword"); -custom_keyword!(Twox64ConcatKeyword, "twox_64_concat", "Twox64Concat as keyword"); -custom_keyword_impl!(ExtraGenesisSkipPhantomDataField, "extra_genesis_skip_phantom_data_field", "extra_genesis_skip_phantom_data_field as keyword"); -custom_keyword_impl!(SetHasher, "hasher", "storage hasher"); diff --git a/srml/support/procedural/src/storage/transformation.rs b/srml/support/procedural/src/storage/transformation.rs index 205fccdea5..04b2b832b6 100644 --- a/srml/support/procedural/src/storage/transformation.rs +++ b/srml/support/procedural/src/storage/transformation.rs @@ -74,7 +74,7 @@ pub fn decl_storage_impl(input: TokenStream) -> TokenStream { Err(err) => return err.to_compile_error().into(), }; - let hidden_crate_name = hidden_crate.map(|rc| rc.ident.content).map(|i| i.to_string()) + let hidden_crate_name = hidden_crate.inner.map(|rc| rc.ident.content).map(|i| i.to_string()) .unwrap_or_else(|| "decl_storage".to_string()); let scrate = generate_crate_access(&hidden_crate_name, "srml-support"); let scrate_decl = generate_hidden_includes( @@ -103,8 +103,8 @@ pub fn decl_storage_impl(input: TokenStream) -> TokenStream { &traittype, &instance_opts, &storage_lines, - &extra_genesis, - extra_genesis_skip_phantom_data_field.is_some(), + &extra_genesis.inner, + extra_genesis_skip_phantom_data_field.inner.is_some(), )); let decl_storage_items = decl_storage_items( &scrate, @@ -219,10 +219,10 @@ fn decl_store_extra_genesis( let mut opt_build; // need build line - if let Some(ref config) = config { + if let Some(ref config) = config.inner { let ident = if let Some(ident) = config.expr.content.as_ref() { quote!( #ident ) - } else if let Some(ref getter) = getter { + } else if let Some(ref getter) = getter.inner { let ident = &getter.getfn.content; quote!( #ident ) } else { @@ -259,7 +259,7 @@ fn decl_store_extra_genesis( quote!( #( #[ #attrs ] )* pub #ident: Vec<(#key1_type, #key2_type, #storage_type)>, ) }, }); - opt_build = Some(build.as_ref().map(|b| &b.expr.content).map(|b|quote!( #b )) + opt_build = Some(build.inner.as_ref().map(|b| &b.expr.content).map(|b|quote!( #b )) .unwrap_or_else(|| quote!( (|config: &GenesisConfig<#traitinstance, #instance>| config.#ident.clone()) ))); let fielddefault = default_value.inner.as_ref().map(|d| &d.expr).map(|d| @@ -271,7 +271,7 @@ fn decl_store_extra_genesis( config_field_default.extend(quote!( #ident: #fielddefault, )); } else { - opt_build = build.as_ref().map(|b| &b.expr.content).map(|b| quote!( #b )); + opt_build = build.inner.as_ref().map(|b| &b.expr.content).map(|b| quote!( #b )); } let typ = type_infos.typ; @@ -647,7 +647,7 @@ fn impl_store_fns( .. } = sline; - if let Some(getter) = getter { + if let Some(getter) = getter.inner.as_ref() { let get_fn = &getter.getfn.content; let type_infos = get_type_infos(storage_type); @@ -877,17 +877,17 @@ fn get_type_infos(storage_type: &DeclStorageType) -> DeclStorageTypeInfos { let (value_type, kind) = match storage_type { DeclStorageType::Simple(ref st) => (st, DeclStorageTypeInfosKind::Simple), DeclStorageType::Map(ref map) => (&map.value, DeclStorageTypeInfosKind::Map { - hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), + hasher: map.hasher.inner.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key_type: &map.key, is_linked: false, }), DeclStorageType::LinkedMap(ref map) => (&map.value, DeclStorageTypeInfosKind::Map { - hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), + hasher: map.hasher.inner.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key_type: &map.key, is_linked: true, }), DeclStorageType::DoubleMap(ref map) => (&map.value, DeclStorageTypeInfosKind::DoubleMap { - hasher: map.hasher.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), + hasher: map.hasher.inner.as_ref().map(|h| h.into()).unwrap_or(HasherKind::Blake2_256), key1_type: &map.key1, key2_type: &map.key2.content, key2_hasher: { let h = &map.key2_hasher; quote! { #h } }, diff --git a/srml/support/procedural/tools/src/lib.rs b/srml/support/procedural/tools/src/lib.rs index 34b96df810..fd7dd41391 100644 --- a/srml/support/procedural/tools/src/lib.rs +++ b/srml/support/procedural/tools/src/lib.rs @@ -27,30 +27,6 @@ use quote::quote; pub mod syn_ext; -#[macro_export] -macro_rules! custom_keyword_impl { - ($name:ident, $keyident:expr, $keydisp:expr) => { - - impl CustomKeyword for $name { - fn ident() -> &'static str { $keyident } - fn display() -> &'static str { $keydisp } - } - - } -} - -#[macro_export] -macro_rules! custom_keyword { - ($name:ident, $keyident:expr, $keydisp:expr) => { - - #[derive(Debug)] - struct $name; - - custom_keyword_impl!($name, $keyident, $keydisp); - - } -} - // FIXME #1569, remove the following functions, which are copied from sr-api-macros use proc_macro2::{TokenStream, Span}; use syn::Ident; diff --git a/srml/support/procedural/tools/src/syn_ext.rs b/srml/support/procedural/tools/src/syn_ext.rs index c6b0b4aefb..01177b9b3e 100644 --- a/srml/support/procedural/tools/src/syn_ext.rs +++ b/srml/support/procedural/tools/src/syn_ext.rs @@ -23,7 +23,6 @@ use syn::parse::{ ParseStream, Result, }; -use syn::token::CustomKeyword; use proc_macro2::TokenStream as T2; use quote::{ToTokens, quote}; use std::iter::once; @@ -72,32 +71,6 @@ groups_impl!(Braces, Brace, Brace, parse_braces); groups_impl!(Brackets, Bracket, Bracket, parse_brackets); groups_impl!(Parens, Paren, Parenthesis, parse_parens); -#[derive(Debug, Clone)] -pub struct CustomToken(std::marker::PhantomData); - -impl Parse for CustomToken { - fn parse(input: ParseStream) -> Result { - let ident: syn::Ident = input.parse()?; - - if ident.to_string().as_str() != T::ident() { - return Err(syn::parse::Error::new_spanned(ident, "expected another custom token")) - } - Ok(CustomToken(std::marker::PhantomData)) - } -} - -impl ToTokens for CustomToken { - fn to_tokens(&self, tokens: &mut T2) { - use std::str::FromStr; - tokens.extend(T2::from_str(T::ident()).expect("custom keyword should parse to ident")); - } -} - -impl CustomKeyword for CustomToken { - fn ident() -> &'static str { ::ident() } - fn display() -> &'static str { ::display() } -} - #[derive(Debug)] pub struct PunctuatedInner { pub inner: syn::punctuated::Punctuated, -- GitLab From 60e194e4e5c98717b926fcdcdf9ae0a806d95469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 25 Apr 2019 15:49:34 +0200 Subject: [PATCH 066/206] Unify & enforce same interface of sr-io (std & without-std) (#2381) * WiP: HTTP Apis. * Working on the API. * Add docs, clean up the API. * Expose ext_ stuff as well. * Implement HTTP helpers for offchain sr-io. * Remove HTTP stuff. * Remove spurious leading `::` Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Rename in toml. * Add issue number. * Bump version. --- core/cli/src/lib.rs | 4 +- core/executor/wasm/src/lib.rs | 2 +- core/peerset/src/lib.rs | 1 - core/sr-io/Cargo.toml | 6 +- core/sr-io/src/lib.rs | 225 +++++- core/sr-io/with_std.rs | 387 +++++----- core/sr-io/without_std.rs | 987 +++++++++++++------------- core/test-runtime/wasm/Cargo.lock | 6 - node-template/runtime/wasm/Cargo.lock | 13 - node/runtime/src/lib.rs | 2 +- node/runtime/wasm/Cargo.lock | 17 - 11 files changed, 909 insertions(+), 741 deletions(-) diff --git a/core/cli/src/lib.rs b/core/cli/src/lib.rs index 275399bdf3..d0cef45585 100644 --- a/core/cli/src/lib.rs +++ b/core/cli/src/lib.rs @@ -745,10 +745,10 @@ fn init_logger(pattern: &str) { builder.filter(None, log::LevelFilter::Info); if let Ok(lvl) = std::env::var("RUST_LOG") { - builder.parse(&lvl); + builder.parse_filters(&lvl); } - builder.parse(pattern); + builder.parse_filters(pattern); let isatty = atty::is(atty::Stream::Stderr); let enable_color = isatty; diff --git a/core/executor/wasm/src/lib.rs b/core/executor/wasm/src/lib.rs index 294c21d146..842749dd5b 100644 --- a/core/executor/wasm/src/lib.rs +++ b/core/executor/wasm/src/lib.rs @@ -92,7 +92,7 @@ impl_stubs!( [sr25519_verify(&sig, &msg[..], &pubkey) as u8].to_vec() }, test_enumerated_trie_root => |_| { - enumerated_trie_root::(&[&b"zero"[..], &b"one"[..], &b"two"[..]]).to_vec() + enumerated_trie_root::(&[&b"zero"[..], &b"one"[..], &b"two"[..]]).as_ref().to_vec() }, test_sandbox => |code: &[u8]| { let ok = execute_sandboxed(code, &[]).is_ok(); diff --git a/core/peerset/src/lib.rs b/core/peerset/src/lib.rs index b801f47b58..570dcf5f86 100644 --- a/core/peerset/src/lib.rs +++ b/core/peerset/src/lib.rs @@ -22,7 +22,6 @@ mod slots; use std::collections::VecDeque; use futures::{prelude::*, sync::mpsc, try_ready}; use libp2p::PeerId; -use linked_hash_map::LinkedHashMap; use log::trace; use lru_cache::LruCache; use slots::{SlotType, SlotState, Slots}; diff --git a/core/sr-io/Cargo.toml b/core/sr-io/Cargo.toml index 68da47893f..645caf54b2 100644 --- a/core/sr-io/Cargo.toml +++ b/core/sr-io/Cargo.toml @@ -11,7 +11,7 @@ rustc_version = "0.2" [dependencies] rstd = { package = "sr-std", path = "../sr-std", default-features = false } primitives = { package = "substrate-primitives", path = "../primitives", default-features = false } -parity-codec = { version = "3.3", default-features = false } +codec = { package="parity-codec", version = "3.3", default-features = false } hash-db = { version = "0.12", default-features = false } libsecp256k1 = { version = "0.2.1", optional = true } tiny-keccak = { version = "1.4.2", optional = true } @@ -23,7 +23,7 @@ trie = { package = "substrate-trie", path = "../trie", optional = true } default = ["std"] std = [ "primitives/std", - "parity-codec/std", + "codec/std", "rstd/std", "hash-db/std", "trie", @@ -34,4 +34,4 @@ std = [ ] nightly = [] strict = [] -wasm-nice-panic-message = [] \ No newline at end of file +wasm-nice-panic-message = [] diff --git a/core/sr-io/src/lib.rs b/core/sr-io/src/lib.rs index 6a00e6ca27..5101d3b2c1 100644 --- a/core/sr-io/src/lib.rs +++ b/core/sr-io/src/lib.rs @@ -16,6 +16,8 @@ //! This is part of the Substrate runtime. +#![warn(missing_docs)] + #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(lang_items))] #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] @@ -25,14 +27,231 @@ #![cfg_attr(feature = "std", doc = "Substrate runtime standard library as compiled when linked with Rust's standard library.")] #![cfg_attr(not(feature = "std"), doc = "Substrate's runtime standard library as compiled without Rust's standard library.")] +use hash_db::Hasher; +use rstd::vec::Vec; + +#[doc(hidden)] +pub use codec; + +pub use primitives::Blake2Hasher; + +/// Error verifying ECDSA signature pub enum EcdsaVerifyError { + /// Incorrect value of R or S BadRS, + /// Incorrect value of V BadV, + /// Invalid signature BadSignature, } -#[cfg(feature = "std")] -include!("../with_std.rs"); +/// Trait for things which can be printed. +pub trait Printable { + /// Print the object. + fn print(self); +} + +/// Converts a public trait definition into a private trait and set of public functions +/// that assume the trait is implemented for `()` for ease of calling. +macro_rules! export_api { + ( + $( #[$trait_attr:meta] )* + pub(crate) trait $trait_name:ident { + $( + $( #[$attr:meta] )* + fn $name:ident + $(< $( $g_name:ident $( : $g_ty:path )? ),+ >)? + ( $( $arg:ident : $arg_ty:ty ),* ) + $( -> $ret:ty )? + $( where $( $w_name:path : $w_ty:path ),+ )?; + )* + } + ) => { + $( #[$trait_attr] )* + pub(crate) trait $trait_name { + $( + $( #[$attr] )* + fn $name $(< $( $g_name $( : $g_ty )? ),+ >)? ( $($arg : $arg_ty ),* ) $( -> $ret )? + $( where $( $w_name : $w_ty ),+ )?; + )* + } + + $( + $( #[$attr] )* + pub fn $name $(< $( $g_name $( : $g_ty )? ),+ >)? ( $($arg : $arg_ty ),* ) $( -> $ret )? + $( where $( $w_name : $w_ty ),+ )? + { + #[allow(deprecated)] + <()>:: $name $(::< $( $g_name ),+ > )? ( $( $arg ),* ) + } + )* + } +} + +export_api! { + pub(crate) trait StorageApi { + /// Get `key` from storage and return a `Vec`, empty if there's a problem. + fn storage(key: &[u8]) -> Option>; + + /// Get `key` from child storage and return a `Vec`, empty if there's a problem. + fn child_storage(storage_key: &[u8], key: &[u8]) -> Option>; + + /// Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return + /// the number of bytes that the entry in storage had beyond the offset or None if the storage entry + /// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned + /// number of bytes is not equal to the number of bytes written to the `value_out`. + fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option; + + /// Get `key` from child storage, placing the value into `value_out` (as much of it as possible) and return + /// the number of bytes that the entry in storage had beyond the offset or None if the storage entry + /// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned + /// number of bytes is not equal to the number of bytes written to the `value_out`. + fn read_child_storage(storage_key: &[u8], key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option; + + /// Set the storage of some particular key to Some value. + fn set_storage(key: &[u8], value: &[u8]); + + /// Set the child storage of some particular key to Some value. + fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]); + + /// Clear the storage of a key. + fn clear_storage(key: &[u8]); + + /// Clear the storage of a key. + fn clear_child_storage(storage_key: &[u8], key: &[u8]); + + /// Clear an entire child storage. + fn kill_child_storage(storage_key: &[u8]); + + /// Check whether a given `key` exists in storage. + fn exists_storage(key: &[u8]) -> bool; + + /// Check whether a given `key` exists in storage. + fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool; + + /// Clear the storage entries with a key that starts with the given prefix. + fn clear_prefix(prefix: &[u8]); + + /// "Commit" all existing operations and compute the resultant storage root. + fn storage_root() -> [u8; 32]; + + /// "Commit" all existing operations and compute the resultant child storage root. + fn child_storage_root(storage_key: &[u8]) -> Vec; + + /// "Commit" all existing operations and get the resultant storage change root. + fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<[u8; 32]>; + + /// A trie root formed from the enumerated items. + /// TODO [#2382] remove (just use `ordered_trie_root` (NOTE currently not implemented for without_std)) + fn enumerated_trie_root(input: &[&[u8]]) -> H::Out + where + H: Hasher, + H: self::imp::HasherBounds, + H::Out: Ord + ; + /// A trie root formed from the iterated items. + fn trie_root(input: I) -> H::Out + where + I: IntoIterator, + A: AsRef<[u8]>, + A: Ord, + B: AsRef<[u8]>, + H: Hasher, + H: self::imp::HasherBounds, + H::Out: Ord + ; + + /// A trie root formed from the enumerated items. + fn ordered_trie_root(input: I) -> H::Out + where + I: IntoIterator, + A: AsRef<[u8]>, + H: Hasher, + H: self::imp::HasherBounds, + H::Out: Ord + ; + } +} + +export_api! { + pub(crate) trait OtherApi { + /// The current relay chain identifier. + fn chain_id() -> u64; + + /// Print a printable value. + fn print(value: T) + where + T: Printable, + T: Sized + ; + } +} + +export_api! { + pub(crate) trait CryptoApi { + /// Verify a ed25519 signature. + fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool; + + /// Verify an sr25519 signature. + fn sr25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool; + + /// Verify and recover a SECP256k1 ECDSA signature. + /// - `sig` is passed in RSV format. V should be either 0/1 or 27/28. + /// - returns `Err` if the signature is bad, otherwise the 64-byte pubkey (doesn't include the 0x04 prefix). + fn secp256k1_ecdsa_recover(sig: &[u8; 65], msg: &[u8; 32]) -> Result<[u8; 64], EcdsaVerifyError>; + } +} + +export_api! { + pub(crate) trait HashingApi { + /// Conduct a 256-bit Keccak hash. + fn keccak_256(data: &[u8]) -> [u8; 32] ; + + /// Conduct a 128-bit Blake2 hash. + fn blake2_128(data: &[u8]) -> [u8; 16]; + + /// Conduct a 256-bit Blake2 hash. + fn blake2_256(data: &[u8]) -> [u8; 32]; + + /// Conduct four XX hashes to give a 256-bit result. + fn twox_256(data: &[u8]) -> [u8; 32]; + + /// Conduct two XX hashes to give a 128-bit result. + fn twox_128(data: &[u8]) -> [u8; 16]; + + /// Conduct two XX hashes to give a 64-bit result. + fn twox_64(data: &[u8]) -> [u8; 8]; + } +} + +export_api! { + pub(crate) trait OffchainApi { + /// Submit extrinsic from the runtime. + /// + /// Depending on the kind of extrinsic it will either be: + /// 1. scheduled to be included in the next produced block (inherent) + /// 2. added to the pool and propagated (transaction) + fn submit_extrinsic(data: &T); + } +} + +/// API trait that should cover all other APIs. +/// +/// Implement this to make sure you implement all APIs. +trait Api: StorageApi + OtherApi + CryptoApi + HashingApi + OffchainApi {} + +mod imp { + use super::*; + + #[cfg(feature = "std")] + include!("../with_std.rs"); + + #[cfg(not(feature = "std"))] + include!("../without_std.rs"); +} + +#[cfg(feature = "std")] +pub use self::imp::{StorageOverlay, ChildrenStorageOverlay, with_storage, with_externalities, TestExternalities}; #[cfg(not(feature = "std"))] -include!("../without_std.rs"); +pub use self::imp::ext::*; diff --git a/core/sr-io/with_std.rs b/core/sr-io/with_std.rs index 3148cf2842..d73ccf4b66 100644 --- a/core/sr-io/with_std.rs +++ b/core/sr-io/with_std.rs @@ -14,14 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -#[doc(hidden)] -pub use parity_codec as codec; -// re-export hashing functions. -pub use primitives::{ +use primitives::{ blake2_128, blake2_256, twox_128, twox_256, twox_64, ed25519, Blake2Hasher, sr25519, Pair }; -pub use tiny_keccak::keccak256 as keccak_256; // Switch to this after PoC-3 // pub use primitives::BlakeHasher; pub use substrate_state_machine::{ @@ -33,18 +29,15 @@ pub use substrate_state_machine::{ use environmental::environmental; use primitives::{hexdisplay::HexDisplay, H256}; -use hash_db::Hasher; #[cfg(feature = "std")] use std::collections::HashMap; environmental!(ext: trait Externalities); -/// A set of key value pairs for storage. -pub type StorageOverlay = HashMap, Vec>; - -/// A set of key value pairs for children storage; -pub type ChildrenStorageOverlay = HashMap, StorageOverlay>; +/// Additional bounds for `Hasher` trait for with_std. +pub trait HasherBounds {} +impl HasherBounds for T {} /// Returns a `ChildStorageKey` if the given `storage_key` slice is a valid storage /// key or panics otherwise. @@ -58,209 +51,217 @@ fn child_storage_key_or_panic(storage_key: &[u8]) -> ChildStorageKey Option> { - ext::with(|ext| ext.storage(key).map(|s| s.to_vec())) +impl StorageApi for () { + fn storage(key: &[u8]) -> Option> { + ext::with(|ext| ext.storage(key).map(|s| s.to_vec())) + .expect("storage cannot be called outside of an Externalities-provided environment.") + } + + fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { + ext::with(|ext| ext.storage(key).map(|value| { + let value = &value[value_offset..]; + let written = std::cmp::min(value.len(), value_out.len()); + value_out[..written].copy_from_slice(&value[..written]); + value.len() + })).expect("read_storage cannot be called outside of an Externalities-provided environment.") + } + + fn child_storage(storage_key: &[u8], key: &[u8]) -> Option> { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.child_storage(storage_key, key).map(|s| s.to_vec()) + }) .expect("storage cannot be called outside of an Externalities-provided environment.") -} + } -/// Get `key` from child storage and return a `Vec`, empty if there's a problem. -pub fn child_storage(storage_key: &[u8], key: &[u8]) -> Option> { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.child_storage(storage_key, key).map(|s| s.to_vec()) - }) - .expect("storage cannot be called outside of an Externalities-provided environment.") -} + fn set_storage(key: &[u8], value: &[u8]) { + ext::with(|ext| + ext.set_storage(key.to_vec(), value.to_vec()) + ); + } -/// Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return -/// the number of bytes that the entry in storage had beyond the offset or None if the storage entry -/// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned -/// number of bytes is not equal to the number of bytes written to the `value_out`. -pub fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { - ext::with(|ext| ext.storage(key).map(|value| { - let value = &value[value_offset..]; - let written = ::std::cmp::min(value.len(), value_out.len()); - value_out[..written].copy_from_slice(&value[..written]); - value.len() - })).expect("read_storage cannot be called outside of an Externalities-provided environment.") -} + fn read_child_storage( + storage_key: &[u8], + key: &[u8], + value_out: &mut [u8], + value_offset: usize, + ) -> Option { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.child_storage(storage_key, key) + .map(|value| { + let value = &value[value_offset..]; + let written = std::cmp::min(value.len(), value_out.len()); + value_out[..written].copy_from_slice(&value[..written]); + value.len() + }) + }) + .expect("read_child_storage cannot be called outside of an Externalities-provided environment.") + } -/// Get `key` from child storage, placing the value into `value_out` (as much of it as possible) and return -/// the number of bytes that the entry in storage had beyond the offset or None if the storage entry -/// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned -/// number of bytes is not equal to the number of bytes written to the `value_out`. -pub fn read_child_storage( - storage_key: &[u8], - key: &[u8], - value_out: &mut [u8], - value_offset: usize, -) -> Option { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.child_storage(storage_key, key) - .map(|value| { - let value = &value[value_offset..]; - let written = ::std::cmp::min(value.len(), value_out.len()); - value_out[..written].copy_from_slice(&value[..written]); - value.len() - }) - }) - .expect("read_child_storage cannot be called outside of an Externalities-provided environment.") -} + fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.set_child_storage(storage_key, key.to_vec(), value.to_vec()) + }); + } -/// Set the storage of a key to some value. -pub fn set_storage(key: &[u8], value: &[u8]) { - ext::with(|ext| - ext.set_storage(key.to_vec(), value.to_vec()) - ); -} + fn clear_storage(key: &[u8]) { + ext::with(|ext| + ext.clear_storage(key) + ); + } -/// Set the child storage of a key to some value. -pub fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.set_child_storage(storage_key, key.to_vec(), value.to_vec()) - }); -} + fn clear_child_storage(storage_key: &[u8], key: &[u8]) { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.clear_child_storage(storage_key, key) + }); + } -/// Clear the storage of a key. -pub fn clear_storage(key: &[u8]) { - ext::with(|ext| - ext.clear_storage(key) - ); -} + fn kill_child_storage(storage_key: &[u8]) { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.kill_child_storage(storage_key) + }); + } -/// Clear the storage of a key. -pub fn clear_child_storage(storage_key: &[u8], key: &[u8]) { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.clear_child_storage(storage_key, key) - }); -} + fn exists_storage(key: &[u8]) -> bool { + ext::with(|ext| + ext.exists_storage(key) + ).unwrap_or(false) + } -/// Check whether a given `key` exists in storage. -pub fn exists_storage(key: &[u8]) -> bool { - ext::with(|ext| - ext.exists_storage(key) - ).unwrap_or(false) -} + fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.exists_child_storage(storage_key, key) + }).unwrap_or(false) + } -/// Check whether a given `key` exists in storage. -pub fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.exists_child_storage(storage_key, key) - }).unwrap_or(false) -} + fn clear_prefix(prefix: &[u8]) { + ext::with(|ext| + ext.clear_prefix(prefix) + ); + } -/// Clear the storage entries with a key that starts with the given prefix. -pub fn clear_prefix(prefix: &[u8]) { - ext::with(|ext| - ext.clear_prefix(prefix) - ); -} + fn storage_root() -> [u8; 32] { + ext::with(|ext| + ext.storage_root() + ).unwrap_or(H256::zero()).into() + } -/// Clear an entire child storage. -pub fn kill_child_storage(storage_key: &[u8]) { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.kill_child_storage(storage_key) - }); -} + fn child_storage_root(storage_key: &[u8]) -> Vec { + ext::with(|ext| { + let storage_key = child_storage_key_or_panic(storage_key); + ext.child_storage_root(storage_key) + }).expect("child_storage_root cannot be called outside of an Externalities-provided environment.") + } -/// The current relay chain identifier. -pub fn chain_id() -> u64 { - ext::with(|ext| - ext.chain_id() - ).unwrap_or(0) -} + fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<[u8; 32]> { + ext::with(|ext| + ext.storage_changes_root(parent_hash.into(), parent_num).map(Into::into) + ).unwrap_or(None) + } -/// "Commit" all existing operations and compute the resultant storage root. -pub fn storage_root() -> H256 { - ext::with(|ext| - ext.storage_root() - ).unwrap_or(H256::zero()) -} + fn enumerated_trie_root(input: &[&[u8]]) -> H::Out + where + H: Hasher, + H::Out: Ord, + { + trie::ordered_trie_root::(input.iter()) + } -/// "Commit" all existing operations and compute the resultant child storage root. -pub fn child_storage_root(storage_key: &[u8]) -> Vec { - ext::with(|ext| { - let storage_key = child_storage_key_or_panic(storage_key); - ext.child_storage_root(storage_key) - }).expect("child_storage_root cannot be called outside of an Externalities-provided environment.") -} + fn trie_root(input: I) -> H::Out + where + I: IntoIterator, + A: AsRef<[u8]> + Ord, + B: AsRef<[u8]>, + H: Hasher, + H::Out: Ord, + { + trie::trie_root::(input) + } -/// "Commit" all existing operations and get the resultant storage change root. -pub fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option { - ext::with(|ext| - ext.storage_changes_root(parent_hash.into(), parent_num) - ).unwrap_or(None) + fn ordered_trie_root(input: I) -> H::Out + where + I: IntoIterator, + A: AsRef<[u8]>, + H: Hasher, + H::Out: Ord, + { + trie::ordered_trie_root::(input) + } } -/// A trie root formed from the enumerated items. -// TODO: remove (just use `ordered_trie_root`) -pub fn enumerated_trie_root(input: &[&[u8]]) -> H::Out -where - H: Hasher, - H::Out: Ord, -{ - trie::ordered_trie_root::(input.iter()) -} +impl OtherApi for () { + fn chain_id() -> u64 { + ext::with(|ext| + ext.chain_id() + ).unwrap_or(0) + } -/// A trie root formed from the iterated items. -pub fn trie_root(input: I) -> H::Out -where - I: IntoIterator, - A: AsRef<[u8]> + Ord, - B: AsRef<[u8]>, - H: Hasher, - ::Out: Ord, -{ - trie::trie_root::(input) + fn print(value: T) { + value.print() + } } -/// A trie root formed from the enumerated items. -pub fn ordered_trie_root(input: I) -> H::Out -where - I: IntoIterator + Iterator, - A: AsRef<[u8]>, - H: Hasher, - ::Out: Ord, -{ - trie::ordered_trie_root::(input) -} +impl CryptoApi for () { + fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { + ed25519::Pair::verify_weak(sig, msg, pubkey) + } -/// Verify a ed25519 signature. -pub fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { - ed25519::Pair::verify_weak(sig, msg, pubkey) -} + fn sr25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { + sr25519::Pair::verify_weak(sig, msg, pubkey) + } -/// Verify an sr25519 signature. -pub fn sr25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { - sr25519::Pair::verify_weak(sig, msg, pubkey) + fn secp256k1_ecdsa_recover(sig: &[u8; 65], msg: &[u8; 32]) -> Result<[u8; 64], EcdsaVerifyError> { + let rs = secp256k1::Signature::parse_slice(&sig[0..64]).map_err(|_| EcdsaVerifyError::BadRS)?; + let v = secp256k1::RecoveryId::parse(if sig[64] > 26 { sig[64] - 27 } else { sig[64] } as u8).map_err(|_| EcdsaVerifyError::BadV)?; + let pubkey = secp256k1::recover(&secp256k1::Message::parse(msg), &rs, &v).map_err(|_| EcdsaVerifyError::BadSignature)?; + let mut res = [0u8; 64]; + res.copy_from_slice(&pubkey.serialize()[1..65]); + Ok(res) + } } -/// Verify and recover a SECP256k1 ECDSA signature. -/// - `sig` is passed in RSV format. V should be either 0/1 or 27/28. -/// - returns `Err` if the signature is bad, otherwise the 64-byte pubkey (doesn't include the 0x04 prefix). -pub fn secp256k1_ecdsa_recover(sig: &[u8; 65], msg: &[u8; 32]) -> Result<[u8; 64], EcdsaVerifyError> { - let rs = secp256k1::Signature::parse_slice(&sig[0..64]).map_err(|_| EcdsaVerifyError::BadRS)?; - let v = secp256k1::RecoveryId::parse(if sig[64] > 26 { sig[64] - 27 } else { sig[64] } as u8).map_err(|_| EcdsaVerifyError::BadV)?; - let pubkey = secp256k1::recover(&secp256k1::Message::parse(msg), &rs, &v).map_err(|_| EcdsaVerifyError::BadSignature)?; - let mut res = [0u8; 64]; - res.copy_from_slice(&pubkey.serialize()[1..65]); - Ok(res) +impl HashingApi for () { + fn keccak_256(data: &[u8]) -> [u8; 32] { + tiny_keccak::keccak256(data) + } + + fn blake2_128(data: &[u8]) -> [u8; 16] { + blake2_128(data) + } + + fn blake2_256(data: &[u8]) -> [u8; 32] { + blake2_256(data) + } + + fn twox_256(data: &[u8]) -> [u8; 32] { + twox_256(data) + } + + fn twox_128(data: &[u8]) -> [u8; 16] { + twox_128(data) + } + + fn twox_64(data: &[u8]) -> [u8; 8] { + twox_64(data) + } } -/// Submit extrinsic. -pub fn submit_extrinsic(data: &T) { - ext::with(|ext| ext - .submit_extrinsic(codec::Encode::encode(data)) - .expect("submit_extrinsic can be called only in offchain worker context") - ).expect("submit_extrinsic cannot be called outside of an Externalities-provided environment.") +impl OffchainApi for () { + fn submit_extrinsic(data: &T) { + ext::with(|ext| ext + .submit_extrinsic(codec::Encode::encode(data)) + .expect("submit_extrinsic can be called only in offchain worker context") + ).expect("submit_extrinsic cannot be called outside of an Externalities-provided environment.") + } } +impl Api for () {} + /// Execute the given closure with global function available whose functionality routes into the /// externalities `ext`. Forwards the value that the closure returns. // NOTE: need a concrete hasher here due to limitations of the `environmental!` macro, otherwise a type param would have been fine I think. @@ -268,6 +269,12 @@ pub fn with_externalities R>(ext: &mut Externalities, Vec>; + +/// A set of key value pairs for children storage; +pub type ChildrenStorageOverlay = HashMap, StorageOverlay>; + /// Execute the given closure with global functions available whose functionality routes into /// externalities that draw from and populate `storage`. Forwards the value that the closure returns. pub fn with_storage R>(storage: &mut StorageOverlay, f: F) -> R { @@ -279,11 +286,6 @@ pub fn with_storage R>(storage: &mut StorageOverlay, f: F) -> r } -/// Trait for things which can be printed. -pub trait Printable { - fn print(self); -} - impl<'a> Printable for &'a [u8] { fn print(self) { println!("Runtime: {}", HexDisplay::from(&self)); @@ -302,11 +304,6 @@ impl Printable for u64 { } } -/// Print a printable value. -pub fn print(value: T) { - value.print(); -} - #[cfg(test)] mod std_tests { use super::*; diff --git a/core/sr-io/without_std.rs b/core/sr-io/without_std.rs index 66ad5541df..b60a3ded1f 100644 --- a/core/sr-io/without_std.rs +++ b/core/sr-io/without_std.rs @@ -14,15 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -#[doc(hidden)] -pub use parity_codec as codec; #[doc(hidden)] pub use rstd; pub use rstd::{mem, slice}; use core::{intrinsics, panic::PanicInfo}; use rstd::{vec::Vec, cell::Cell}; -use hash_db::Hasher; use primitives::Blake2Hasher; #[panic_handler] @@ -56,587 +53,584 @@ pub extern fn oom(_: ::core::alloc::Layout) -> ! { } } -/// The state of an exchangeable function. -#[derive(Clone, Copy)] -enum ExchangeableFunctionState { - Original, - Replaced, -} - -/// A function which implementation can be exchanged. -/// -/// Internally this works by swapping function pointers. -pub struct ExchangeableFunction(Cell<(T, ExchangeableFunctionState)>); +/// External (Host) APIs +pub mod ext { + use super::*; -impl ExchangeableFunction { - /// Create a new instance of `ExchangeableFunction`. - pub const fn new(impl_: T) -> Self { - Self(Cell::new((impl_, ExchangeableFunctionState::Original))) + /// The state of an exchangeable function. + #[derive(Clone, Copy)] + enum ExchangeableFunctionState { + /// Original function is present + Original, + /// The function has been replaced. + Replaced, } -} -impl ExchangeableFunction { - /// Replace the implementation with `new_impl`. - /// - /// # Panics - /// - /// Panics when trying to replace an already replaced implementation. - /// - /// # Returns + /// A function which implementation can be exchanged. /// - /// Returns the original implementation wrapped in [`RestoreImplementation`]. - pub fn replace_implementation(&'static self, new_impl: T) -> RestoreImplementation { - if let ExchangeableFunctionState::Replaced = self.0.get().1 { - panic!("Trying to replace an already replaced implementation!") + /// Internally this works by swapping function pointers. + pub struct ExchangeableFunction(Cell<(T, ExchangeableFunctionState)>); + + impl ExchangeableFunction { + /// Create a new instance of `ExchangeableFunction`. + pub const fn new(impl_: T) -> Self { + Self(Cell::new((impl_, ExchangeableFunctionState::Original))) } + } - let old = self.0.replace((new_impl, ExchangeableFunctionState::Replaced)); + impl ExchangeableFunction { + /// Replace the implementation with `new_impl`. + /// + /// # Panics + /// + /// Panics when trying to replace an already replaced implementation. + /// + /// # Returns + /// + /// Returns the original implementation wrapped in [`RestoreImplementation`]. + pub fn replace_implementation(&'static self, new_impl: T) -> RestoreImplementation { + if let ExchangeableFunctionState::Replaced = self.0.get().1 { + panic!("Trying to replace an already replaced implementation!") + } - RestoreImplementation(self, Some(old.0)) - } + let old = self.0.replace((new_impl, ExchangeableFunctionState::Replaced)); - /// Restore the original implementation. - fn restore_orig_implementation(&self, orig: T) { - self.0.set((orig, ExchangeableFunctionState::Original)); - } + RestoreImplementation(self, Some(old.0)) + } - /// Returns the internal function pointer. - pub fn get(&self) -> T { - self.0.get().0 + /// Restore the original implementation. + fn restore_orig_implementation(&self, orig: T) { + self.0.set((orig, ExchangeableFunctionState::Original)); + } + + /// Returns the internal function pointer. + pub fn get(&self) -> T { + self.0.get().0 + } } -} -// WASM does not support threads, so this is safe; qed. -unsafe impl Sync for ExchangeableFunction {} + // WASM does not support threads, so this is safe; qed. + unsafe impl Sync for ExchangeableFunction {} -/// Restores a function implementation on drop. -/// -/// Stores a static reference to the function object and the original implementation. -pub struct RestoreImplementation(&'static ExchangeableFunction, Option); + /// Restores a function implementation on drop. + /// + /// Stores a static reference to the function object and the original implementation. + pub struct RestoreImplementation(&'static ExchangeableFunction, Option); -impl Drop for RestoreImplementation { - fn drop(&mut self) { - self.0.restore_orig_implementation(self.1.take().expect("Value is only taken on drop; qed")); + impl Drop for RestoreImplementation { + fn drop(&mut self) { + self.0.restore_orig_implementation(self.1.take().expect("Value is only taken on drop; qed")); + } } -} -/// Declare extern functions -macro_rules! extern_functions { - ( - $( - $( #[$attr:meta] )* - fn $name:ident ( $( $arg:ident : $arg_ty:ty ),* ) $( -> $ret:ty )?; - )* - ) => { - $( - $( #[$attr] )* - #[allow(non_upper_case_globals)] - pub static $name: ExchangeableFunction $ret )?> = - ExchangeableFunction::new(extern_functions_host_impl::$name); - )* - - /// The exchangeable extern functions host implementations. - mod extern_functions_host_impl { + /// Ensures we use the right crypto when calling into native + pub trait ExternTrieCrypto: Hasher { + /// Calculate enumerated trie root. + fn enumerated_trie_root(values: &[&[u8]]) -> Self::Out; + } + + /// Additional bounds for Hasher trait for without_std. + pub trait HasherBounds: ExternTrieCrypto {} + impl HasherBounds for T {} + + // Ensures we use a Blake2_256-flavored Hasher when calling into native + impl ExternTrieCrypto for Blake2Hasher { + fn enumerated_trie_root(values: &[&[u8]]) -> Self::Out { + let lengths = values.iter().map(|v| (v.len() as u32).to_le()).collect::>(); + let values = values.iter().fold(Vec::new(), |mut acc, sl| { acc.extend_from_slice(sl); acc }); + let mut result: [u8; 32] = Default::default(); + unsafe { + ext_blake2_256_enumerated_trie_root.get()( + values.as_ptr(), + lengths.as_ptr(), + lengths.len() as u32, + result.as_mut_ptr() + ); + } + result.into() + } + } + + /// Declare extern functions + macro_rules! extern_functions { + ( $( - pub unsafe fn $name ( $( $arg : $arg_ty ),* ) $( -> $ret )? { - implementation::$name ( $( $arg ),* ) - } + $( #[$attr:meta] )* + fn $name:ident ( $( $arg:ident : $arg_ty:ty ),* ) $( -> $ret:ty )?; + )* + ) => { + $( + $( #[$attr] )* + #[allow(non_upper_case_globals)] + pub static $name: ExchangeableFunction $ret )?> = + ExchangeableFunction::new(extern_functions_host_impl::$name); )* - mod implementation { - extern "C" { - $( - pub fn $name ( $( $arg : $arg_ty ),* ) $( -> $ret )?; - )* + /// The exchangeable extern functions host implementations. + pub(crate) mod extern_functions_host_impl { + $( + pub unsafe fn $name ( $( $arg : $arg_ty ),* ) $( -> $ret )? { + implementation::$name ( $( $arg ),* ) + } + )* + + mod implementation { + extern "C" { + $( + pub fn $name ( $( $arg : $arg_ty ),* ) $( -> $ret )?; + )* + } } } + }; + } + + /// Host functions, provided by the executor. + /// A WebAssembly runtime module would "import" these to access the execution environment + /// (most importantly, storage) or perform heavy hash calculations. + /// See also "ext_" functions in sr-sandbox and sr-std + extern_functions! { + /// Host functions for printing, useful for debugging. + fn ext_print_utf8(utf8_data: *const u8, utf8_len: u32); + /// Print data as hex. + fn ext_print_hex(data: *const u8, len: u32); + /// Print a number + fn ext_print_num(value: u64); + + /// Set value for key in storage. + fn ext_set_storage(key_data: *const u8, key_len: u32, value_data: *const u8, value_len: u32); + /// Remove key and value from storage. + fn ext_clear_storage(key_data: *const u8, key_len: u32); + /// Checks if the given key exists in the storage. + /// + /// # Returns + /// + /// - `1` if the value exists. + /// - `0` if the value does not exists. + fn ext_exists_storage(key_data: *const u8, key_len: u32) -> u32; + /// Remove storage entries which key starts with given prefix. + fn ext_clear_prefix(prefix_data: *const u8, prefix_len: u32); + /// Gets the value of the given key from storage. + /// + /// The host allocates the memory for storing the value. + /// + /// # Returns + /// + /// - `0` if no value exists to the given key. `written_out` is set to `u32::max_value()`. + /// + /// - Otherwise, pointer to the value in memory. `written_out` contains the length of the value. + fn ext_get_allocated_storage(key_data: *const u8, key_len: u32, written_out: *mut u32) -> *mut u8; + /// Gets the value of the given key from storage. + /// + /// The value is written into `value` starting at `value_offset`. + /// + /// If the value length is greater than `value_len - value_offset`, the value is written partially. + /// + /// # Returns + /// + /// - `u32::max_value()` if the value does not exists. + /// + /// - Otherwise, the number of bytes written for value. + fn ext_get_storage_into(key_data: *const u8, key_len: u32, value_data: *mut u8, value_len: u32, value_offset: u32) -> u32; + /// Gets the trie root of the storage. + fn ext_storage_root(result: *mut u8); + /// Get the change trie root of the current storage overlay at a block with given parent. + /// + /// # Returns + /// + /// - `1` if the change trie root was found. + /// - `0` if the change trie root was not found. + fn ext_storage_changes_root(parent_hash_data: *const u8, parent_hash_len: u32, parent_num: u64, result: *mut u8) -> u32; + + /// A child storage function. + /// + /// See [`ext_set_storage`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_set_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32, value_data: *const u8, value_len: u32); + /// A child storage function. + /// + /// See [`ext_clear_storage`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_clear_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32); + /// A child storage function. + /// + /// See [`ext_exists_storage`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_exists_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32) -> u32; + /// A child storage function. + /// + /// See [`ext_kill_storage`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_kill_child_storage(storage_key_data: *const u8, storage_key_len: u32); + /// A child storage function. + /// + /// See [`ext_get_allocated_storage`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_get_allocated_child_storage( + storage_key_data: *const u8, + storage_key_len: u32, + key_data: *const u8, + key_len: u32, + written_out: *mut u32 + ) -> *mut u8; + /// A child storage function. + /// + /// See [`ext_get_storage_into`] for details. + /// + /// A child storage is used e.g. by a contract. + fn ext_get_child_storage_into( + storage_key_data: *const u8, + storage_key_len: u32, + key_data: *const u8, + key_len: u32, + value_data: *mut u8, + value_len: u32, + value_offset: u32 + ) -> u32; + /// Commits all changes and calculates the child-storage root. + /// + /// A child storage is used e.g. by a contract. + /// + /// # Returns + /// + /// - The pointer to the result vector and `written_out` contains its length. + fn ext_child_storage_root(storage_key_data: *const u8, storage_key_len: u32, written_out: *mut u32) -> *mut u8; + + /// The current relay chain identifier. + fn ext_chain_id() -> u64; + + /// Calculate a blake2_256 merkle trie root. + fn ext_blake2_256_enumerated_trie_root(values_data: *const u8, lens_data: *const u32, lens_len: u32, result: *mut u8); + /// BLAKE2_128 hash + fn ext_blake2_128(data: *const u8, len: u32, out: *mut u8); + /// BLAKE2_256 hash + fn ext_blake2_256(data: *const u8, len: u32, out: *mut u8); + /// XX64 hash + fn ext_twox_64(data: *const u8, len: u32, out: *mut u8); + /// XX128 hash + fn ext_twox_128(data: *const u8, len: u32, out: *mut u8); + /// XX256 hash + fn ext_twox_256(data: *const u8, len: u32, out: *mut u8); + /// Keccak256 hash + fn ext_keccak_256(data: *const u8, len: u32, out: *mut u8); + /// Note: ext_ed25519_verify returns 0 if the signature is correct, nonzero otherwise. + fn ext_ed25519_verify(msg_data: *const u8, msg_len: u32, sig_data: *const u8, pubkey_data: *const u8) -> u32; + /// Note: ext_sr25519_verify returns 0 if the signature is correct, nonzero otherwise. + fn ext_sr25519_verify(msg_data: *const u8, msg_len: u32, sig_data: *const u8, pubkey_data: *const u8) -> u32; + /// Note: ext_secp256k1_ecdsa_recover returns 0 if the signature is correct, nonzero otherwise. + fn ext_secp256k1_ecdsa_recover(msg_data: *const u8, sig_data: *const u8, pubkey_data: *mut u8) -> u32; + + //================================ + // Offchain-worker Context + //================================ + + /// Submit extrinsic. + fn ext_submit_extrinsic(data: *const u8, len: u32); + } +} + +pub use self::ext::*; + +impl StorageApi for () { + fn storage(key: &[u8]) -> Option> { + let mut length: u32 = 0; + unsafe { + let ptr = ext_get_allocated_storage.get()(key.as_ptr(), key.len() as u32, &mut length); + if length == u32::max_value() { + None + } else { + // Invariants required by Vec::from_raw_parts are not formally fulfilled. + // We don't allocate via String/Vec, but use a custom allocator instead. + // See #300 for more details. + Some(>::from_raw_parts(ptr, length as usize, length as usize)) + } } - }; -} - -/// Host functions, provided by the executor. -/// A WebAssembly runtime module would "import" these to access the execution environment -/// (most importantly, storage) or perform heavy hash calculations. -/// See also "ext_" functions in sr-sandbox and sr-std -extern_functions! { - /// Host functions for printing, useful for debugging. - fn ext_print_utf8(utf8_data: *const u8, utf8_len: u32); - fn ext_print_hex(data: *const u8, len: u32); - fn ext_print_num(value: u64); - - /// Set value for key in storage. - fn ext_set_storage(key_data: *const u8, key_len: u32, value_data: *const u8, value_len: u32); - /// Remove key and value from storage. - fn ext_clear_storage(key_data: *const u8, key_len: u32); - /// Checks if the given key exists in the storage. - /// - /// # Returns - /// - /// - `1` if the value exists. - /// - `0` if the value does not exists. - fn ext_exists_storage(key_data: *const u8, key_len: u32) -> u32; - /// Remove storage entries which key starts with given prefix. - fn ext_clear_prefix(prefix_data: *const u8, prefix_len: u32); - /// Gets the value of the given key from storage. - /// - /// The host allocates the memory for storing the value. - /// - /// # Returns - /// - /// - `0` if no value exists to the given key. `written_out` is set to `u32::max_value()`. - /// - /// - Otherwise, pointer to the value in memory. `written_out` contains the length of the value. - fn ext_get_allocated_storage(key_data: *const u8, key_len: u32, written_out: *mut u32) -> *mut u8; - /// Gets the value of the given key from storage. - /// - /// The value is written into `value` starting at `value_offset`. - /// - /// If the value length is greater than `value_len - value_offset`, the value is written partially. - /// - /// # Returns - /// - /// - `u32::max_value()` if the value does not exists. - /// - /// - Otherwise, the number of bytes written for value. - fn ext_get_storage_into(key_data: *const u8, key_len: u32, value_data: *mut u8, value_len: u32, value_offset: u32) -> u32; - /// Gets the trie root of the storage. - fn ext_storage_root(result: *mut u8); - /// Get the change trie root of the current storage overlay at a block with given parent. - /// - /// # Returns - /// - /// - `1` if the change trie root was found. - /// - `0` if the change trie root was not found. - fn ext_storage_changes_root(parent_hash_data: *const u8, parent_hash_len: u32, parent_num: u64, result: *mut u8) -> u32; - - /// A child storage function. - /// - /// See [`ext_set_storage`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_set_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32, value_data: *const u8, value_len: u32); - /// A child storage function. - /// - /// See [`ext_clear_storage`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_clear_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32); - /// A child storage function. - /// - /// See [`ext_exists_storage`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_exists_child_storage(storage_key_data: *const u8, storage_key_len: u32, key_data: *const u8, key_len: u32) -> u32; - /// A child storage function. - /// - /// See [`ext_kill_storage`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_kill_child_storage(storage_key_data: *const u8, storage_key_len: u32); - /// A child storage function. - /// - /// See [`ext_get_allocated_storage`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_get_allocated_child_storage( - storage_key_data: *const u8, - storage_key_len: u32, - key_data: *const u8, - key_len: u32, - written_out: *mut u32 - ) -> *mut u8; - /// A child storage function. - /// - /// See [`ext_get_storage_into`] for details. - /// - /// A child storage is used e.g. by a contract. - fn ext_get_child_storage_into( - storage_key_data: *const u8, - storage_key_len: u32, - key_data: *const u8, - key_len: u32, - value_data: *mut u8, - value_len: u32, - value_offset: u32 - ) -> u32; - /// Commits all changes and calculates the child-storage root. - /// - /// A child storage is used e.g. by a contract. - /// - /// # Returns - /// - /// - The pointer to the result vector and `written_out` contains its length. - fn ext_child_storage_root(storage_key_data: *const u8, storage_key_len: u32, written_out: *mut u32) -> *mut u8; - - /// The current relay chain identifier. - fn ext_chain_id() -> u64; - - /// Hash calculation and verification - fn ext_blake2_256_enumerated_trie_root(values_data: *const u8, lens_data: *const u32, lens_len: u32, result: *mut u8); - fn ext_blake2_128(data: *const u8, len: u32, out: *mut u8); - fn ext_blake2_256(data: *const u8, len: u32, out: *mut u8); - fn ext_twox_64(data: *const u8, len: u32, out: *mut u8); - fn ext_twox_128(data: *const u8, len: u32, out: *mut u8); - fn ext_twox_256(data: *const u8, len: u32, out: *mut u8); - fn ext_keccak_256(data: *const u8, len: u32, out: *mut u8); - /// Note: ext_ed25519_verify returns 0 if the signature is correct, nonzero otherwise. - fn ext_ed25519_verify(msg_data: *const u8, msg_len: u32, sig_data: *const u8, pubkey_data: *const u8) -> u32; - /// Note: ext_sr25519_verify returns 0 if the signature is correct, nonzero otherwise. - fn ext_sr25519_verify(msg_data: *const u8, msg_len: u32, sig_data: *const u8, pubkey_data: *const u8) -> u32; - /// Note: ext_secp256k1_ecdsa_recover returns 0 if the signature is correct, nonzero otherwise. - fn ext_secp256k1_ecdsa_recover(msg_data: *const u8, sig_data: *const u8, pubkey_data: *mut u8) -> u32; - - //================================ - // Offchain-worker Context - //================================ - - /// Submit extrinsic. - fn ext_submit_extrinsic(data: *const u8, len: u32); -} - -/// Ensures we use the right crypto when calling into native -pub trait ExternTrieCrypto { - fn enumerated_trie_root(values: &[&[u8]]) -> [u8; 32]; -} + } -// Ensures we use a Blake2_256-flavored Hasher when calling into native -impl ExternTrieCrypto for Blake2Hasher { - fn enumerated_trie_root(values: &[&[u8]]) -> [u8; 32] { - let lengths = values.iter().map(|v| (v.len() as u32).to_le()).collect::>(); - let values = values.iter().fold(Vec::new(), |mut acc, sl| { acc.extend_from_slice(sl); acc }); - let mut result: [u8; 32] = Default::default(); + fn child_storage(storage_key: &[u8], key: &[u8]) -> Option> { + let mut length: u32 = 0; unsafe { - ext_blake2_256_enumerated_trie_root.get()( - values.as_ptr(), - lengths.as_ptr(), - lengths.len() as u32, - result.as_mut_ptr() + let ptr = ext_get_allocated_child_storage.get()( + storage_key.as_ptr(), + storage_key.len() as u32, + key.as_ptr(), + key.len() as u32, + &mut length ); + if length == u32::max_value() { + None + } else { + // Invariants required by Vec::from_raw_parts are not formally fulfilled. + // We don't allocate via String/Vec, but use a custom allocator instead. + // See #300 for more details. + Some(>::from_raw_parts(ptr, length as usize, length as usize)) + } } - result } -} -/// Get `key` from storage and return a `Vec`, empty if there's a problem. -pub fn storage(key: &[u8]) -> Option> { - let mut length: u32 = 0; - unsafe { - let ptr = ext_get_allocated_storage.get()(key.as_ptr(), key.len() as u32, &mut length); - if length == u32::max_value() { - None - } else { - // Invariants required by Vec::from_raw_parts are not formally fulfilled. - // We don't allocate via String/Vec, but use a custom allocator instead. - // See #300 for more details. - Some(>::from_raw_parts(ptr, length as usize, length as usize)) + fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { + unsafe { + match ext_get_storage_into.get()( + key.as_ptr(), + key.len() as u32, + value_out.as_mut_ptr(), + value_out.len() as u32, + value_offset as u32, + ) { + none if none == u32::max_value() => None, + length => Some(length as usize), + } } } -} -/// Get `key` from child storage and return a `Vec`, empty if there's a problem. -pub fn child_storage(storage_key: &[u8], key: &[u8]) -> Option> { - let mut length: u32 = 0; - unsafe { - let ptr = ext_get_allocated_child_storage.get()( - storage_key.as_ptr(), - storage_key.len() as u32, - key.as_ptr(), - key.len() as u32, - &mut length - ); - if length == u32::max_value() { - None - } else { - // Invariants required by Vec::from_raw_parts are not formally fulfilled. - // We don't allocate via String/Vec, but use a custom allocator instead. - // See #300 for more details. - Some(>::from_raw_parts(ptr, length as usize, length as usize)) + fn read_child_storage(storage_key: &[u8], key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { + unsafe { + match ext_get_child_storage_into.get()( + storage_key.as_ptr(), storage_key.len() as u32, + key.as_ptr(), key.len() as u32, + value_out.as_mut_ptr(), value_out.len() as u32, + value_offset as u32 + ) { + none if none == u32::max_value() => None, + length => Some(length as usize), + } } } -} -/// Set the storage of some particular key to Some value. -pub fn set_storage(key: &[u8], value: &[u8]) { - unsafe { - ext_set_storage.get()( - key.as_ptr(), key.len() as u32, - value.as_ptr(), value.len() as u32 - ); + fn set_storage(key: &[u8], value: &[u8]) { + unsafe { + ext_set_storage.get()( + key.as_ptr(), key.len() as u32, + value.as_ptr(), value.len() as u32 + ); + } } -} -/// Set the child storage of some particular key to Some value. -pub fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { - unsafe { - ext_set_child_storage.get()( - storage_key.as_ptr(), storage_key.len() as u32, - key.as_ptr(), key.len() as u32, - value.as_ptr(), value.len() as u32 - ); + fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) { + unsafe { + ext_set_child_storage.get()( + storage_key.as_ptr(), storage_key.len() as u32, + key.as_ptr(), key.len() as u32, + value.as_ptr(), value.len() as u32 + ); + } } -} -/// Clear the storage of some particular key. -pub fn clear_storage(key: &[u8]) { - unsafe { - ext_clear_storage.get()( - key.as_ptr(), key.len() as u32 - ); + fn clear_storage(key: &[u8]) { + unsafe { + ext_clear_storage.get()( + key.as_ptr(), key.len() as u32 + ); + } } -} -/// Clear the storage of some particular key. -pub fn clear_child_storage(storage_key: &[u8], key: &[u8]) { - unsafe { - ext_clear_child_storage.get()( - storage_key.as_ptr(), storage_key.len() as u32, - key.as_ptr(), key.len() as u32 - ); + fn clear_child_storage(storage_key: &[u8], key: &[u8]) { + unsafe { + ext_clear_child_storage.get()( + storage_key.as_ptr(), storage_key.len() as u32, + key.as_ptr(), key.len() as u32 + ); + } } -} -/// Determine whether a particular key exists in storage. -pub fn exists_storage(key: &[u8]) -> bool { - unsafe { - ext_exists_storage.get()( - key.as_ptr(), key.len() as u32 - ) != 0 + fn exists_storage(key: &[u8]) -> bool { + unsafe { + ext_exists_storage.get()( + key.as_ptr(), key.len() as u32 + ) != 0 + } } -} -/// Determine whether a particular key exists in storage. -pub fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool { - unsafe { - ext_exists_child_storage.get()( - storage_key.as_ptr(), storage_key.len() as u32, - key.as_ptr(), key.len() as u32 - ) != 0 + fn exists_child_storage(storage_key: &[u8], key: &[u8]) -> bool { + unsafe { + ext_exists_child_storage.get()( + storage_key.as_ptr(), storage_key.len() as u32, + key.as_ptr(), key.len() as u32 + ) != 0 + } } -} -/// Clear the storage entries key of which starts with the given prefix. -pub fn clear_prefix(prefix: &[u8]) { - unsafe { - ext_clear_prefix.get()( - prefix.as_ptr(), - prefix.len() as u32 - ); + fn clear_prefix(prefix: &[u8]) { + unsafe { + ext_clear_prefix.get()( + prefix.as_ptr(), + prefix.len() as u32 + ); + } } -} -/// Clear an entire child storage. -pub fn kill_child_storage(storage_key: &[u8]) { - unsafe { - ext_kill_child_storage.get()( - storage_key.as_ptr(), - storage_key.len() as u32 - ); + fn kill_child_storage(storage_key: &[u8]) { + unsafe { + ext_kill_child_storage.get()( + storage_key.as_ptr(), + storage_key.len() as u32 + ); + } } -} -/// Get `key` from storage, placing the value into `value_out` (as much as possible) and return -/// the number of bytes that the key in storage was beyond the offset. -pub fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { - unsafe { - match ext_get_storage_into.get()( - key.as_ptr(), - key.len() as u32, - value_out.as_mut_ptr(), - value_out.len() as u32, - value_offset as u32, - ) { - none if none == u32::max_value() => None, - length => Some(length as usize), + fn storage_root() -> [u8; 32] { + let mut result: [u8; 32] = Default::default(); + unsafe { + ext_storage_root.get()(result.as_mut_ptr()); } + result } -} -/// Get `key` from child storage, placing the value into `value_out` (as much as possible) and return -/// the number of bytes that the key in storage was beyond the offset. -pub fn read_child_storage(storage_key: &[u8], key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option { - unsafe { - match ext_get_child_storage_into.get()( - storage_key.as_ptr(), storage_key.len() as u32, - key.as_ptr(), key.len() as u32, - value_out.as_mut_ptr(), value_out.len() as u32, - value_offset as u32 - ) { - none if none == u32::max_value() => None, - length => Some(length as usize), + fn child_storage_root(storage_key: &[u8]) -> Vec { + let mut length: u32 = 0; + unsafe { + let ptr = ext_child_storage_root.get()( + storage_key.as_ptr(), + storage_key.len() as u32, + &mut length + ); + // Invariants required by Vec::from_raw_parts are not formally fulfilled. + // We don't allocate via String/Vec, but use a custom allocator instead. + // See #300 for more details. + >::from_raw_parts(ptr, length as usize, length as usize) } } -} -/// The current storage's root. -pub fn storage_root() -> [u8; 32] { - let mut result: [u8; 32] = Default::default(); - unsafe { - ext_storage_root.get()(result.as_mut_ptr()); - } - result -} + fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<[u8; 32]> { + let mut result: [u8; 32] = Default::default(); + let is_set = unsafe { + ext_storage_changes_root.get()(parent_hash.as_ptr(), parent_hash.len() as u32, parent_num, result.as_mut_ptr()) + }; -/// "Commit" all existing operations and compute the resultant child storage root. -pub fn child_storage_root(storage_key: &[u8]) -> Vec { - let mut length: u32 = 0; - unsafe { - let ptr = ext_child_storage_root.get()( - storage_key.as_ptr(), - storage_key.len() as u32, - &mut length - ); - // Invariants required by Vec::from_raw_parts are not formally fulfilled. - // We don't allocate via String/Vec, but use a custom allocator instead. - // See #300 for more details. - >::from_raw_parts(ptr, length as usize, length as usize) + if is_set != 0 { + Some(result) + } else { + None + } } -} - -/// The current storage' changes root. -pub fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<[u8; 32]> { - let mut result: [u8; 32] = Default::default(); - let is_set = unsafe { - ext_storage_changes_root.get()(parent_hash.as_ptr(), parent_hash.len() as u32, parent_num, result.as_mut_ptr()) - }; - if is_set != 0 { - Some(result) - } else { - None + fn enumerated_trie_root(values: &[&[u8]]) -> H::Out { + H::enumerated_trie_root(values) } -} -/// A trie root calculated from enumerated values. -pub fn enumerated_trie_root(values: &[&[u8]]) -> [u8; 32] { - H::enumerated_trie_root(values) -} + fn trie_root< + H: Hasher + ExternTrieCrypto, + I: IntoIterator, + A: AsRef<[u8]> + Ord, + B: AsRef<[u8]>, + >(_input: I) -> H::Out { + unimplemented!() + } -/// A trie root formed from the iterated items. -pub fn trie_root< - H: Hasher + ExternTrieCrypto, - I: IntoIterator, - A: AsRef<[u8]> + Ord, - B: AsRef<[u8]>, ->(_input: I) -> [u8; 32] { - unimplemented!() + fn ordered_trie_root< + H: Hasher + ExternTrieCrypto, + I: IntoIterator, + A: AsRef<[u8]> + >(_input: I) -> H::Out { + unimplemented!() + } } -/// A trie root formed from the enumerated items. -pub fn ordered_trie_root< - H: Hasher + ExternTrieCrypto, - I: IntoIterator, - A: AsRef<[u8]> ->(_input: I) -> [u8; 32] { - unimplemented!() -} +impl OtherApi for () { + fn chain_id() -> u64 { + unsafe { + ext_chain_id.get()() + } + } -/// The current relay chain identifier. -pub fn chain_id() -> u64 { - unsafe { - ext_chain_id.get()() + fn print(value: T) { + value.print() } + } -/// Conduct a 256-bit Blake2 hash. -pub fn blake2_256(data: &[u8]) -> [u8; 32] { - let mut result: [u8; 32] = Default::default(); - unsafe { - ext_blake2_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); +impl HashingApi for () { + fn keccak_256(data: &[u8]) -> [u8; 32] { + let mut result: [u8; 32] = Default::default(); + unsafe { + ext_keccak_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result -} -/// Conduct a 128-bit Blake2 hash. -pub fn blake2_128(data: &[u8]) -> [u8; 16] { - let mut result: [u8; 16] = Default::default(); - unsafe { - ext_blake2_128.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + fn blake2_128(data: &[u8]) -> [u8; 16] { + let mut result: [u8; 16] = Default::default(); + unsafe { + ext_blake2_128.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result -} -/// Conduct a 256-bit Keccak hash. -pub fn keccak_256(data: &[u8]) -> [u8; 32] { - let mut result: [u8; 32] = Default::default(); - unsafe { - ext_keccak_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + fn blake2_256(data: &[u8]) -> [u8; 32] { + let mut result: [u8; 32] = Default::default(); + unsafe { + ext_blake2_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result -} -/// Conduct four XX hashes to give a 256-bit result. -pub fn twox_256(data: &[u8]) -> [u8; 32] { - let mut result: [u8; 32] = Default::default(); - unsafe { - ext_twox_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + fn twox_256(data: &[u8]) -> [u8; 32] { + let mut result: [u8; 32] = Default::default(); + unsafe { + ext_twox_256.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result -} -/// Conduct two XX hashes to give a 128-bit result. -pub fn twox_128(data: &[u8]) -> [u8; 16] { - let mut result: [u8; 16] = Default::default(); - unsafe { - ext_twox_128.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + fn twox_128(data: &[u8]) -> [u8; 16] { + let mut result: [u8; 16] = Default::default(); + unsafe { + ext_twox_128.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result -} -/// Conduct two XX hashes to give a 64-bit result. -pub fn twox_64(data: &[u8]) -> [u8; 8] { - let mut result: [u8; 8] = Default::default(); - unsafe { - ext_twox_64.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + fn twox_64(data: &[u8]) -> [u8; 8] { + let mut result: [u8; 8] = Default::default(); + unsafe { + ext_twox_64.get()(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); + } + result } - result } -/// Verify a ed25519 signature. -pub fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { - unsafe { - ext_ed25519_verify.get()(msg.as_ptr(), msg.len() as u32, sig.as_ptr(), pubkey.as_ref().as_ptr()) == 0 +impl CryptoApi for () { + fn ed25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { + unsafe { + ext_ed25519_verify.get()(msg.as_ptr(), msg.len() as u32, sig.as_ptr(), pubkey.as_ref().as_ptr()) == 0 + } } -} -/// Verify a sr25519 signature. -pub fn sr25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { - unsafe { - ext_sr25519_verify.get()(msg.as_ptr(), msg.len() as u32, sig.as_ptr(), pubkey.as_ref().as_ptr()) == 0 + fn sr25519_verify>(sig: &[u8; 64], msg: &[u8], pubkey: P) -> bool { + unsafe { + ext_sr25519_verify.get()(msg.as_ptr(), msg.len() as u32, sig.as_ptr(), pubkey.as_ref().as_ptr()) == 0 + } } -} -/// Verify and recover a SECP256k1 ECDSA signature. -/// - `sig` is passed in RSV format. V should be either 0/1 or 27/28. -/// - returns `None` if the signature is bad, the 64-byte pubkey (doesn't include the 0x04 prefix). -pub fn secp256k1_ecdsa_recover(sig: &[u8; 65], msg: &[u8; 32]) -> Result<[u8; 64], EcdsaVerifyError> { - let mut pubkey = [0u8; 64]; - match unsafe { - ext_secp256k1_ecdsa_recover.get()(msg.as_ptr(), sig.as_ptr(), pubkey.as_mut_ptr()) - } { - 0 => Ok(pubkey), - 1 => Err(EcdsaVerifyError::BadRS), - 2 => Err(EcdsaVerifyError::BadV), - 3 => Err(EcdsaVerifyError::BadSignature), - _ => unreachable!("`ext_secp256k1_ecdsa_recover` only returns 0, 1, 2 or 3; qed"), + fn secp256k1_ecdsa_recover(sig: &[u8; 65], msg: &[u8; 32]) -> Result<[u8; 64], EcdsaVerifyError> { + let mut pubkey = [0u8; 64]; + match unsafe { + ext_secp256k1_ecdsa_recover.get()(msg.as_ptr(), sig.as_ptr(), pubkey.as_mut_ptr()) + } { + 0 => Ok(pubkey), + 1 => Err(EcdsaVerifyError::BadRS), + 2 => Err(EcdsaVerifyError::BadV), + 3 => Err(EcdsaVerifyError::BadSignature), + _ => unreachable!("`ext_secp256k1_ecdsa_recover` only returns 0, 1, 2 or 3; qed"), + } } } -/// Submit extrinsic from the runtime. -/// -/// Depending on the kind of extrinsic it will either be: -/// 1. scheduled to be included in the next produced block (inherent) -/// 2. added to the pool and propagated (transaction) -pub fn submit_extrinsic(data: &T) { - let encoded_data = codec::Encode::encode(data); - unsafe { - ext_submit_extrinsic.get()(encoded_data.as_ptr(), encoded_data.len() as u32) +impl OffchainApi for () { + fn submit_extrinsic(data: &T) { + let encoded_data = codec::Encode::encode(data); + unsafe { + ext_submit_extrinsic.get()(encoded_data.as_ptr(), encoded_data.len() as u32) + } } } -/// Trait for things which can be printed. -pub trait Printable { - fn print(self); -} +impl Api for () {} impl<'a> Printable for &'a [u8] { fn print(self) { @@ -659,8 +653,3 @@ impl Printable for u64 { unsafe { ext_print_num.get()(self); } } } - -/// Print a printable value. -pub fn print(value: T) { - value.print(); -} diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index b637940459..e8b4072b43 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2232,7 +2232,6 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2280,7 +2279,6 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2488,7 +2486,6 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2522,7 +2519,6 @@ dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2555,7 +2551,6 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2588,7 +2583,6 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index c430e34fb8..f061884222 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -2242,7 +2242,6 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2259,7 +2258,6 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2274,7 +2272,6 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2302,7 +2299,6 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2329,7 +2325,6 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2345,7 +2340,6 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2363,7 +2357,6 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2378,7 +2371,6 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2426,7 +2418,6 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2441,7 +2432,6 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2648,7 +2638,6 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2682,7 +2671,6 @@ dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2715,7 +2703,6 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index b765abd380..52bffacebd 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, spec_version: 66, - impl_version: 66, + impl_version: 67, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index b14c919bb3..bf68ab8f3f 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -1367,7 +1367,6 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2286,7 +2285,6 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2303,7 +2301,6 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2318,7 +2315,6 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2368,7 +2364,6 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2396,7 +2391,6 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2427,7 +2421,6 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2454,7 +2447,6 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2470,7 +2462,6 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2488,7 +2479,6 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2503,7 +2493,6 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2551,7 +2540,6 @@ dependencies = [ name = "srml-system" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2566,7 +2554,6 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2580,7 +2567,6 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", @@ -2798,7 +2784,6 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2832,7 +2817,6 @@ dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2865,7 +2849,6 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", -- GitLab From 2899be9eef8821eb1b601812c038c69d7a177f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 26 Apr 2019 14:09:13 +0200 Subject: [PATCH 067/206] Fix typos and markdown (#2388) * Fix typos * Align properly * Update core/consensus/slots/src/lib.rs Co-Authored-By: cmichi * Update core/network/src/test/mod.rs Co-Authored-By: cmichi * Update core/finality-grandpa/src/communication/mod.rs Co-Authored-By: cmichi * Update core/consensus/common/src/import_queue.rs Co-Authored-By: cmichi --- README.adoc | 4 ++-- core/cli/src/params.rs | 4 ++-- core/client/db/src/cache/list_cache.rs | 6 +++--- core/client/db/src/lib.rs | 2 +- core/client/src/light/blockchain.rs | 2 +- core/client/src/light/call_executor.rs | 4 ++-- core/consensus/common/src/import_queue.rs | 2 +- core/consensus/rhd/src/lib.rs | 2 +- core/consensus/slots/src/lib.rs | 2 +- core/finality-grandpa/src/communication/mod.rs | 2 +- core/keyring/src/ed25519.rs | 2 +- core/network-libp2p/src/custom_proto/handler.rs | 2 +- core/network/src/test/mod.rs | 2 +- core/sr-primitives/src/generic/mod.rs | 2 +- core/sr-primitives/src/generic/tests.rs | 2 +- core/sr-primitives/src/transaction_validity.rs | 2 +- core/state-machine/src/changes_trie/changes_iterator.rs | 2 +- core/state-machine/src/changes_trie/mod.rs | 2 +- core/state-machine/src/changes_trie/prune.rs | 4 ++-- core/transaction-pool/graph/src/base_pool.rs | 8 ++++---- core/transaction-pool/graph/src/error.rs | 2 +- core/transaction-pool/graph/src/pool.rs | 4 ++-- core/util/fork-tree/src/lib.rs | 2 +- srml/contract/src/gas.rs | 6 +++--- srml/contract/src/lib.rs | 4 ++-- srml/contract/src/wasm/env_def/macros.rs | 2 +- srml/contract/src/wasm/mod.rs | 4 ++-- srml/contract/src/wasm/prepare.rs | 2 +- srml/support/procedural/tools/derive/src/lib.rs | 2 +- srml/support/procedural/tools/src/lib.rs | 4 ++-- srml/system/src/lib.rs | 4 ++-- 31 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.adoc b/README.adoc index 71c512b820..038ccb1a64 100644 --- a/README.adoc +++ b/README.adoc @@ -229,8 +229,8 @@ Then build the code: [source, shell] ---- -./scripts/build.sh # Builds the WebAssembly binaries -cargo build # Builds all native code +./scripts/build.sh # Builds the WebAssembly binaries +cargo build # Builds all native code ---- You can run all the tests if you like: diff --git a/core/cli/src/params.rs b/core/cli/src/params.rs index 42d98bf7ed..4de8559bc6 100644 --- a/core/cli/src/params.rs +++ b/core/cli/src/params.rs @@ -20,7 +20,7 @@ use std::path::PathBuf; use structopt::{StructOpt, clap::{arg_enum, _clap_count_exprs, App, AppSettings, SubCommand, Arg}}; use client; -/// Auxialary macro to implement `GetLogFilter` for all types that have the `shared_params` field. +/// Auxiliary macro to implement `GetLogFilter` for all types that have the `shared_params` field. macro_rules! impl_get_log_filter { ( $type:ident ) => { impl $crate::GetLogFilter for $type { @@ -564,7 +564,7 @@ pub struct ImportBlocksCmd { impl_get_log_filter!(ImportBlocksCmd); -/// The `revert` command used revert the chain to a previos state. +/// The `revert` command used revert the chain to a previous state. #[derive(Debug, StructOpt, Clone)] pub struct RevertCmd { /// Number of blocks to revert. diff --git a/core/client/db/src/cache/list_cache.rs b/core/client/db/src/cache/list_cache.rs index 67e09b580d..fcce71a538 100644 --- a/core/client/db/src/cache/list_cache.rs +++ b/core/client/db/src/cache/list_cache.rs @@ -436,7 +436,7 @@ impl Fork { } } - /// Try to append NEW block to the fork. This method willonly 'work' (return true) when block + /// Try to append NEW block to the fork. This method will only 'work' (return true) when block /// is actually appended to the fork AND the best known block of the fork is known (i.e. some /// block has been already appended to this fork after last restart). pub fn try_append(&self, parent: &ComplexBlockId) -> bool { @@ -932,7 +932,7 @@ pub mod tests { assert!(tx.removed_entries().is_empty()); assert_eq!(*tx.updated_meta(), Some(Metadata { finalized: Some(correct_id(2)), unfinalized: vec![correct_id(3)] })); - // when inserting finalized entry AND there are no previous finalzed entries + // when inserting finalized entry AND there are no previous finalized entries let cache = ListCache::new(DummyStorage::new(), 1024, correct_id(2)); let mut tx = DummyTransaction::new(); assert_eq!(cache.on_block_insert(&mut tx, correct_id(2), correct_id(3), Some(3), true).unwrap(), @@ -1031,7 +1031,7 @@ pub mod tests { // when new block is appended to unfinalized fork cache.on_transaction_commit(CommitOperation::AppendNewBlock(0, correct_id(6))); assert_eq!(cache.unfinalized[0].best_block, Some(correct_id(6))); - // when new entry is appnded to unfinalized fork + // when new entry is appended to unfinalized fork cache.on_transaction_commit(CommitOperation::AppendNewEntry(0, Entry { valid_from: correct_id(7), value: Some(7) })); assert_eq!(cache.unfinalized[0].best_block, Some(correct_id(7))); assert_eq!(cache.unfinalized[0].head, Entry { valid_from: correct_id(7), value: Some(7) }); diff --git a/core/client/db/src/lib.rs b/core/client/db/src/lib.rs index e730c0888d..d17337a665 100644 --- a/core/client/db/src/lib.rs +++ b/core/client/db/src/lib.rs @@ -764,7 +764,7 @@ impl> Backend { Ok((*hash, number, false, true)) } - // performs forced canonicaliziation with a delay after importning a non-finalized block. + // performs forced canonicaliziation with a delay after importing a non-finalized block. fn force_delayed_canonicalize( &self, transaction: &mut DBTransaction, diff --git a/core/client/src/light/blockchain.rs b/core/client/src/light/blockchain.rs index b43247034f..c38d50303e 100644 --- a/core/client/src/light/blockchain.rs +++ b/core/client/src/light/blockchain.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Light client blockchin backend. Only stores headers and justifications of recent +//! Light client blockchain backend. Only stores headers and justifications of recent //! blocks. CHT roots are stored for headers of ancient blocks. use std::{sync::{Weak, Arc}, collections::HashMap}; diff --git a/core/client/src/light/call_executor.rs b/core/client/src/light/call_executor.rs index 6fcd2f4052..cbe179b605 100644 --- a/core/client/src/light/call_executor.rs +++ b/core/client/src/light/call_executor.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Light client call exector. Executes methods on remote full nodes, fetching +//! Light client call executor. Executes methods on remote full nodes, fetching //! execution proof and checking it locally. use std::{collections::HashSet, sync::Arc, panic::UnwindSafe, result, marker::PhantomData}; @@ -406,7 +406,7 @@ pub fn prove_execution( /// Check remote contextual execution proof using given backend. /// /// Method is executed using passed header as environment' current block. -/// Proof shoul include both environment preparation proof and method execution proof. +/// Proof should include both environment preparation proof and method execution proof. pub fn check_execution_proof( executor: &E, request: &RemoteCallRequest
, diff --git a/core/consensus/common/src/import_queue.rs b/core/consensus/common/src/import_queue.rs index d1c5c69d02..160538966f 100644 --- a/core/consensus/common/src/import_queue.rs +++ b/core/consensus/common/src/import_queue.rs @@ -589,7 +589,7 @@ pub fn import_single_block>( match import_error(import_handle.check_block(hash, parent))? { BlockImportResult::ImportedUnknown { .. } => (), - r @ _ => return Ok(r), // Any other successfull result means that the block is already imported. + r => return Ok(r), // Any other successful result means that the block is already imported. } let (import_block, new_authorities) = verifier.verify(block_origin, header, justification, block.body) diff --git a/core/consensus/rhd/src/lib.rs b/core/consensus/rhd/src/lib.rs index cbdf95d987..0afe10ffce 100644 --- a/core/consensus/rhd/src/lib.rs +++ b/core/consensus/rhd/src/lib.rs @@ -613,7 +613,7 @@ impl BftService .map_or(true, |x| self.can_build_on_inner(header, x)) } - /// Get a reference to the underyling client. + /// Get a reference to the underlying client. pub fn client(&self) -> &I { &*self.client } fn can_build_on_inner(&self, header: &B::Header, live: &(B::Header, AgreementHandle)) -> bool { diff --git a/core/consensus/slots/src/lib.rs b/core/consensus/slots/src/lib.rs index 258e528f15..5f00990d0b 100644 --- a/core/consensus/slots/src/lib.rs +++ b/core/consensus/slots/src/lib.rs @@ -41,7 +41,7 @@ use codec::{Encode, Decode}; /// A worker that should be invoked at every new slot. pub trait SlotWorker { - /// The type fo the future that will be returned when a new slot is + /// The type of the future that will be returned when a new slot is /// triggered. type OnSlot: IntoFuture; diff --git a/core/finality-grandpa/src/communication/mod.rs b/core/finality-grandpa/src/communication/mod.rs index ec7ed330ac..395f820254 100644 --- a/core/finality-grandpa/src/communication/mod.rs +++ b/core/finality-grandpa/src/communication/mod.rs @@ -704,7 +704,7 @@ impl> Sink for CommitsOut { let topic = global_topic::(self.set_id.0); // the gossip validator needs to be made aware of the best commit-height we know of - // before gosipping + // before gossiping self.gossip_validator.note_commit_finalized( commit.target_number, |to, neighbor| self.network.send_message( diff --git a/core/keyring/src/ed25519.rs b/core/keyring/src/ed25519.rs index 96ade6167c..9c303b62bc 100644 --- a/core/keyring/src/ed25519.rs +++ b/core/keyring/src/ed25519.rs @@ -79,7 +79,7 @@ impl Keyring { .expect("static values are known good; qed") } - /// Returns an interator over all test accounts. + /// Returns an iterator over all test accounts. pub fn iter() -> impl Iterator { ::iter() } diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index 7c0ec61344..6794a9b12c 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -194,7 +194,7 @@ enum ProtocolState { }, /// We sometimes temporarily switch to this state during processing. If we are in this state - /// at the beginning of a method, that means something bad happend in the source code. + /// at the beginning of a method, that means something bad happened in the source code. Poisoned, } diff --git a/core/network/src/test/mod.rs b/core/network/src/test/mod.rs index 46636fa11f..5b375984b4 100644 --- a/core/network/src/test/mod.rs +++ b/core/network/src/test/mod.rs @@ -58,7 +58,7 @@ pub use test_client::TestClient; pub struct PassThroughVerifier(pub bool); #[cfg(any(test, feature = "test-helpers"))] -/// This Verifiyer accepts all data as valid +/// This `Verifier` accepts all data as valid. impl Verifier for PassThroughVerifier { fn verify( &self, diff --git a/core/sr-primitives/src/generic/mod.rs b/core/sr-primitives/src/generic/mod.rs index 47ce3cb251..b0f86f959f 100644 --- a/core/sr-primitives/src/generic/mod.rs +++ b/core/sr-primitives/src/generic/mod.rs @@ -52,7 +52,7 @@ fn encode_with_vec_prefix)>(encoder: F) -> Vec v.resize(reserve, 0); encoder(&mut v); - // need to prefix with the total length to ensure it's binary comptible with + // need to prefix with the total length to ensure it's binary compatible with // Vec. let mut length: Vec<()> = Vec::new(); length.resize(v.len() - reserve, ()); diff --git a/core/sr-primitives/src/generic/tests.rs b/core/sr-primitives/src/generic/tests.rs index 91fc8f3faf..b42c05ea4c 100644 --- a/core/sr-primitives/src/generic/tests.rs +++ b/core/sr-primitives/src/generic/tests.rs @@ -27,7 +27,7 @@ fn system_digest_item_encoding() { assert_eq!(encoded, vec![ // type = DigestItemType::AuthoritiesChange 1, - // number of items in athorities set + // number of items in authorities set 12, // authorities 10, 0, 0, 0, diff --git a/core/sr-primitives/src/transaction_validity.rs b/core/sr-primitives/src/transaction_validity.rs index 7cf3aa1d6d..d927bd74e4 100644 --- a/core/sr-primitives/src/transaction_validity.rs +++ b/core/sr-primitives/src/transaction_validity.rs @@ -49,7 +49,7 @@ pub enum TransactionValidity { requires: Vec, /// Provided tags /// - /// A list of tags this transaction provides. Successfuly importing the transaction + /// A list of tags this transaction provides. Successfully importing the transaction /// will enable other transactions that depend on (require) those tags to be included as well. /// Provided and requried tags allow Substrate to build a dependency graph of transactions /// and import them in the right (linear) order. diff --git a/core/state-machine/src/changes_trie/changes_iterator.rs b/core/state-machine/src/changes_trie/changes_iterator.rs index ad70117984..8d56e6c8ff 100644 --- a/core/state-machine/src/changes_trie/changes_iterator.rs +++ b/core/state-machine/src/changes_trie/changes_iterator.rs @@ -228,7 +228,7 @@ impl<'a, RS: 'a + RootsStorage, S: Storage, H: Hasher> DrilldownIteratorEs .ok_or_else(|| format!("Changes trie root for block {} is not found", block))?; // only return extrinsics for blocks before self.max - // most of blocks will be filtered out beore pushing to `self.blocks` + // most of blocks will be filtered out before pushing to `self.blocks` // here we just throwing away changes at digest blocks we're processing debug_assert!(block >= self.begin, "We shall not touch digests earlier than a range' begin"); if block <= self.end.number { diff --git a/core/state-machine/src/changes_trie/mod.rs b/core/state-machine/src/changes_trie/mod.rs index c29131cc0c..bce0609bbb 100644 --- a/core/state-machine/src/changes_trie/mod.rs +++ b/core/state-machine/src/changes_trie/mod.rs @@ -33,7 +33,7 @@ //! to the set of lower-level digest blocks. //! //! Changes trie only contains the top level storage changes. Sub-level changes -//! are propogated through its storage root on the top level storage. +//! are propagated through its storage root on the top level storage. mod build; mod build_iterator; diff --git a/core/state-machine/src/changes_trie/prune.rs b/core/state-machine/src/changes_trie/prune.rs index de872a3255..7a8654971a 100644 --- a/core/state-machine/src/changes_trie/prune.rs +++ b/core/state-machine/src/changes_trie/prune.rs @@ -41,9 +41,9 @@ pub fn oldest_non_pruned_trie( } } -/// Prune obslete changes tries. Puning happens at the same block, where highest +/// Prune obsolete changes tries. Pruning happens at the same block, where highest /// level digest is created. Pruning guarantees to save changes tries for last -/// `min_blocks_to_keep` blocks. We only prune changes tries at `max_digest_iterval` +/// `min_blocks_to_keep` blocks. We only prune changes tries at `max_digest_interval` /// ranges. /// Returns MemoryDB that contains all deleted changes tries nodes. pub fn prune, H: Hasher, F: FnMut(H::Out)>( diff --git a/core/transaction-pool/graph/src/base_pool.rs b/core/transaction-pool/graph/src/base_pool.rs index ad434e57d4..2b4b96839d 100644 --- a/core/transaction-pool/graph/src/base_pool.rs +++ b/core/transaction-pool/graph/src/base_pool.rs @@ -43,9 +43,9 @@ use crate::ready::ReadyTransactions; /// Successful import result. #[derive(Debug, PartialEq, Eq)] pub enum Imported { - /// Transaction was successfuly imported to Ready queue. + /// Transaction was successfully imported to Ready queue. Ready { - /// Hash of transaction that was successfuly imported. + /// Hash of transaction that was successfully imported. hash: Hash, /// Transactions that got promoted from the Future queue. promoted: Vec, @@ -54,9 +54,9 @@ pub enum Imported { /// Transactions removed from the Ready pool (replaced). removed: Vec>>, }, - /// Transaction was successfuly imported to Future queue. + /// Transaction was successfully imported to Future queue. Future { - /// Hash of transaction that was successfuly imported. + /// Hash of transaction that was successfully imported. hash: Hash, } } diff --git a/core/transaction-pool/graph/src/error.rs b/core/transaction-pool/graph/src/error.rs index 435ca922cd..bc2bc2c8c2 100644 --- a/core/transaction-pool/graph/src/error.rs +++ b/core/transaction-pool/graph/src/error.rs @@ -33,7 +33,7 @@ error_chain! { description("Runtime check for the transaction failed."), display("Invalid Transaction. Error Code: {}", e), } - /// The transaction is temporarily baned + /// The transaction is temporarily banned TemporarilyBanned { description("Transaction is temporarily banned from importing to the pool."), display("Temporarily Banned"), diff --git a/core/transaction-pool/graph/src/pool.rs b/core/transaction-pool/graph/src/pool.rs index 91ded26630..121e3ddf00 100644 --- a/core/transaction-pool/graph/src/pool.rs +++ b/core/transaction-pool/graph/src/pool.rs @@ -304,7 +304,7 @@ impl Pool { let hashes = status.pruned.iter().map(|tx| tx.hash.clone()).collect::>(); let results = self.submit_at(at, status.pruned.into_iter().map(|tx| tx.data.clone()))?; - // Collect the hashes of transactions that now became invalid (meaning that they are succesfuly pruned). + // Collect the hashes of transactions that now became invalid (meaning that they are succesfully pruned). let hashes = results.into_iter().enumerate().filter_map(|(idx, r)| match r.map_err(error::IntoPoolError::into_pool_error) { Err(Ok(err)) => match err.kind() { error::ErrorKind::InvalidTransaction(_) => Some(hashes[idx].clone()), @@ -333,7 +333,7 @@ impl Pool { /// /// Stale transactions are transaction beyond their longevity period. /// Note this function does not remove transactions that are already included in the chain. - /// See `prune_tags` ifyou want this. + /// See `prune_tags` if you want this. pub fn clear_stale(&self, at: &BlockId) -> Result<(), B::Error> { let block_number = self.api.block_id_to_number(at)? .ok_or_else(|| error::ErrorKind::Msg(format!("Invalid block id: {:?}", at)).into())? diff --git a/core/util/fork-tree/src/lib.rs b/core/util/fork-tree/src/lib.rs index f194ac8915..cba5a1535b 100644 --- a/core/util/fork-tree/src/lib.rs +++ b/core/util/fork-tree/src/lib.rs @@ -22,7 +22,7 @@ use std::fmt; use parity_codec::{Decode, Encode}; -/// Error occured when interating with the tree. +/// Error occured when iterating with the tree. #[derive(Clone, Debug, PartialEq)] pub enum Error { /// Adding duplicate node to tree. diff --git a/srml/contract/src/gas.rs b/srml/contract/src/gas.rs index b7244169c4..f42b0919f3 100644 --- a/srml/contract/src/gas.rs +++ b/srml/contract/src/gas.rs @@ -255,7 +255,7 @@ pub fn refund_unused_gas( } } -/// A little handy utility for converting a value in balance units into approximitate value in gas units +/// A little handy utility for converting a value in balance units into approximate value in gas units /// at the given gas price. pub fn approx_gas_for_balance(gas_price: BalanceOf, balance: BalanceOf) -> T::Gas { let amount_in_gas: BalanceOf = balance / gas_price; @@ -316,7 +316,7 @@ mod tests { struct DoubleTokenMetadata { multiplier: u64, } - /// A simple token that charges for the given amount multipled to + /// A simple token that charges for the given amount multiplied to /// a multiplier taken from a given metadata. #[derive(Copy, Clone, PartialEq, Eq, Debug)] struct DoubleToken(u64); @@ -324,7 +324,7 @@ mod tests { impl Token for DoubleToken { type Metadata = DoubleTokenMetadata; fn calculate_amount(&self, metadata: &DoubleTokenMetadata) -> u64 { - // Probably you want to use saturating mul in producation code. + // Probably you want to use saturating mul in production code. self.0 * metadata.multiplier } } diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index a5fa62f7ec..e9b218e097 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -308,7 +308,7 @@ decl_module! { let result = ctx.call(dest, value, &mut gas_meter, &data, exec::EmptyOutputBuf::new()); if let Ok(_) = result { - // Commit all changes that made it thus far into the persistant storage. + // Commit all changes that made it thus far into the persistent storage. DirectAccountDb.commit(ctx.overlay.into_change_set()); // Then deposit all events produced. @@ -362,7 +362,7 @@ decl_module! { let result = ctx.instantiate(endowment, &mut gas_meter, &code_hash, &data); if let Ok(_) = result { - // Commit all changes that made it thus far into the persistant storage. + // Commit all changes that made it thus far into the persistent storage. DirectAccountDb.commit(ctx.overlay.into_change_set()); // Then deposit all events produced. diff --git a/srml/contract/src/wasm/env_def/macros.rs b/srml/contract/src/wasm/env_def/macros.rs index 0b112a8258..bfb42d19d0 100644 --- a/srml/contract/src/wasm/env_def/macros.rs +++ b/srml/contract/src/wasm/env_def/macros.rs @@ -167,7 +167,7 @@ macro_rules! register_func { /// will panic if called with unexpected arguments. /// /// It's up to the user of this macro to check signatures of wasm code to be executed -/// and reject the code if any imported function has a mismached signature. +/// and reject the code if any imported function has a mismatched signature. macro_rules! define_env { ( $init_name:ident , < E: $ext_ty:tt > , $( $name:ident ( $ctx:ident $( , $names:ident : $params:ty )* ) diff --git a/srml/contract/src/wasm/mod.rs b/srml/contract/src/wasm/mod.rs index 51db3b2e56..6aa7b73f52 100644 --- a/srml/contract/src/wasm/mod.rs +++ b/srml/contract/src/wasm/mod.rs @@ -155,8 +155,8 @@ impl<'a, T: Trait> crate::exec::Vm for WasmVm<'a, T> { Err(err @ sandbox::Error::Execution) => to_execution_result(runtime, Some(err)), Err(_err @ sandbox::Error::Module) => { // `Error::Module` is returned only if instantiation or linking failed (i.e. - // wasm bianry tried to import a function that is not provided by the host). - // This shouldn't happen because validation proccess ought to reject such binaries. + // wasm binary tried to import a function that is not provided by the host). + // This shouldn't happen because validation process ought to reject such binaries. // // Because panics are really undesirable in the runtime code, we treat this as // a trap for now. Eventually, we might want to revisit this. diff --git a/srml/contract/src/wasm/prepare.rs b/srml/contract/src/wasm/prepare.rs index 53883451b4..94a38ef588 100644 --- a/srml/contract/src/wasm/prepare.rs +++ b/srml/contract/src/wasm/prepare.rs @@ -318,7 +318,7 @@ pub fn prepare_contract( (initial, Some(maximum)) => MemoryDefinition { initial, maximum }, (_, None) => { // Maximum number of pages should be always declared. - // This isn't a hard requirement and can be treated as a maxiumum set + // This isn't a hard requirement and can be treated as a maximum set // to configured maximum. return Err("Maximum number of pages should be always declared."); } diff --git a/srml/support/procedural/tools/derive/src/lib.rs b/srml/support/procedural/tools/derive/src/lib.rs index 0e3fcb2247..4bf1a5f44c 100644 --- a/srml/support/procedural/tools/derive/src/lib.rs +++ b/srml/support/procedural/tools/derive/src/lib.rs @@ -58,7 +58,7 @@ pub(crate) fn fields_access( /// For enums: /// variant are tested in order of definition. /// Empty variant is always true. -/// Please use carefully, this will fully parse successfull variant twice. +/// Please use carefully, this will fully parse successful variant twice. #[proc_macro_derive(Parse)] pub fn derive_parse(input: TokenStream) -> TokenStream { let item = parse_macro_input!(input as syn::Item); diff --git a/srml/support/procedural/tools/src/lib.rs b/srml/support/procedural/tools/src/lib.rs index fd7dd41391..1b8a580773 100644 --- a/srml/support/procedural/tools/src/lib.rs +++ b/srml/support/procedural/tools/src/lib.rs @@ -71,8 +71,8 @@ pub fn generate_hidden_includes(unique_id: &str, def_crate: &str) -> TokenStream } } -// fn to remove white spaces arount string types -// (basically whitespaces arount tokens) +// fn to remove white spaces around string types +// (basically whitespaces around tokens) pub fn clean_type_string(input: &str) -> String { input .replace(" ::", "::") diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index 92e7b6e73e..e3d77438f9 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -372,7 +372,7 @@ pub fn ensure_inherent(o: OuterOrigin) -> Result<(), &'s } impl Module { - /// Gets the index of extrinsic that is currenty executing. + /// Gets the index of extrinsic that is currently executing. pub fn extrinsic_index() -> Option { storage::unhashed::get(well_known_keys::EXTRINSIC_INDEX) } @@ -462,7 +462,7 @@ impl Module { >::put(n); } - /// Sets the index of extrinsic that is currenty executing. + /// Sets the index of extrinsic that is currently executing. #[cfg(any(feature = "std", test))] pub fn set_extrinsic_index(extrinsic_index: u32) { storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &extrinsic_index) -- GitLab From fb6be1ad9e9b74e8171e75a15dac3579d1f30694 Mon Sep 17 00:00:00 2001 From: ddorgan Date: Fri, 26 Apr 2019 13:18:55 +0100 Subject: [PATCH 068/206] Use aws image for s3-docs upload (#2389) --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91855c567c..e0fe1f6b4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -200,6 +200,7 @@ publish-s3-release: publish-s3-doc: stage: publish + image: parity/awscli:latest allow_failure: true dependencies: - build-rust-doc-release @@ -289,3 +290,23 @@ deploy-ue1-tag: environment: name: parity-prod-ue1 +.validator-deploy: &validator-deploy + stage: publish + dependencies: + - build-linux-release + image: parity/azure-ansible:v1 + allow_failure: true + when: manual + tags: + - linux-docker + +validator1: + <<: *validator-deploy + script: + - ansible-playbook -i scripts/ansible/inventory.ini -u gitlab scripts/ansible/alexander.yml -l validator1 + +validator2: + <<: *validator-deploy + script: + - ansible-playbook -i scripts/ansible/inventory.ini -u gitlab scripts/ansible/alexander.yml -l validator2 + -- GitLab From 3e8a5e0e3e174139a1c6db447bf6cae5f900000f Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Fri, 26 Apr 2019 19:01:55 +0200 Subject: [PATCH 069/206] Use trie_root instead of TrieDBMut to calculate default_child_trie_root (#2392) * Use trie_root instead of TrieDBMut to calculate default_child_trie_root * Fix no_std compile --- core/trie/src/lib.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/core/trie/src/lib.rs b/core/trie/src/lib.rs index e29402b63c..da6630e46d 100644 --- a/core/trie/src/lib.rs +++ b/core/trie/src/lib.rs @@ -158,11 +158,7 @@ pub fn is_child_trie_key_valid(storage_key: &[u8]) -> bool { /// Determine the default child trie root. pub fn default_child_trie_root(_storage_key: &[u8]) -> Vec { - let mut db = MemoryDB::default(); - let mut root = H::Out::default(); - let mut empty = TrieDBMut::::new(&mut db, &mut root); - empty.commit(); - empty.root().as_ref().to_vec() + trie_root::, Vec>(core::iter::empty()).as_ref().iter().cloned().collect() } /// Determine a child trie root given its ordered contents, closed form. H is the default hasher, but a generic @@ -377,6 +373,18 @@ mod tests { } } + #[test] + fn default_trie_root() { + let mut db = MemoryDB::default(); + let mut root = ::Out::default(); + let mut empty = TrieDBMut::::new(&mut db, &mut root); + empty.commit(); + let root1 = empty.root().as_ref().to_vec(); + let root2: Vec = trie_root::, Vec>(std::iter::empty()).as_ref().iter().cloned().collect(); + + assert_eq!(root1, root2); + } + #[test] fn empty_is_equivalent() { let input: Vec<(&[u8], &[u8])> = vec![]; -- GitLab From 4e141af70a62233022cf6a7b351ed95655583c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sat, 27 Apr 2019 14:14:00 +0200 Subject: [PATCH 070/206] Read locks once and not 2 times (#2394) --- srml/balances/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index 1e0521ca8c..7f2c1752a9 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -711,9 +711,14 @@ where if locks.is_empty() { return Ok(()) } + let now = >::block_number(); - if Self::locks(who).into_iter() - .all(|l| now >= l.until || new_balance >= l.amount || !l.reasons.contains(reason)) + if locks.into_iter() + .all(|l| + now >= l.until + || new_balance >= l.amount + || !l.reasons.contains(reason) + ) { Ok(()) } else { -- GitLab From 16bdbc6d27ac2890e659cf0d89eaa13ac0f807c4 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Sat, 27 Apr 2019 16:33:21 +0200 Subject: [PATCH 071/206] decl_storage document hasher choice (#2387) * doc * fix * grammar and line wrapping * small changes to end * Update lib.rs * update after demi's review --- srml/support/procedural/src/lib.rs | 58 +++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/srml/support/procedural/src/lib.rs b/srml/support/procedural/src/lib.rs index 5db5c0bf60..aab39224c2 100644 --- a/srml/support/procedural/src/lib.rs +++ b/srml/support/procedural/src/lib.rs @@ -40,23 +40,47 @@ use proc_macro::TokenStream; /// } /// ``` /// -/// Declaration is set with this header `(pub) trait Store for Module as Example` -/// with `Store` a (pub) trait generated associating each storage to the `Module` and -/// `as Example` setting the prefix used for storages of this module. `Example` must be unique: -/// another module with same name and same inner storage item name will conflict. +/// Declaration is set with the header `(pub) trait Store for Module as Example`, +/// with `Store` a (pub) trait generated associating each storage item to the `Module` and +/// `as Example` setting the prefix used for storage items of this module. `Example` must be unique: +/// another module with the same name and the same inner storage item name will conflict. /// /// Basic storage consists of a name and a type; supported types are: /// /// * Value: `Foo: type`: Implements [StorageValue](../srml_support/storage/trait.StorageValue.html). -/// * Map: `Foo: map type => type`: implements [StorageMap](../srml_support/storage/trait.StorageMap.html) -/// * Linked map: `Foo: linked_map type => type`: Implements [StorageMap](../srml_support/storage/trait.StorageMap.html) -/// and [EnumarableStorageMap](../srml_support/storage/trait.EnumerableStorageMap.html). -/// * Double map: `Foo: double_map u32, $hash(u32) => u32;`: Implements `StorageDoubleMap` with `$hash` representing a -/// choice of hashing algorithms available in [`Hashable` trait](../srml_support/trait.Hashable.html). +/// * Map: `Foo: map hasher($hash) type => type`: Implements [StorageMap](../srml_support/storage/trait.StorageMap.html) +/// with `$hash` representing a choice of hashing algorithms available in the +/// [`Hashable` trait](../srml_support/trait.Hashable.html). /// -/// /!\ Be careful when choosing the hash function, malicious actors could craft second keys to lower the trie. +/// `hasher($hash)` is optional and its default is `blake2_256`. /// -/// And it can be extended as such: +/// /!\ Be careful with each key in the map that is inserted in the trie `$hash(module_name ++ storage_name ++ key)`. +/// If the keys are not trusted (e.g. can be set by a user), a cryptographic `hasher` such as +/// `blake2_256` must be used. Otherwise, other values in storage can be compromised. +/// +/// * Linked map: `Foo: linked_map hasher($hash) type => type`: Same as `Map` but also implements +/// [EnumarableStorageMap](../srml_support/storage/trait.EnumerableStorageMap.html). +/// +/// * Double map: `Foo: double_map hasher($hash) u32, $hash2(u32) => u32`: Implements `StorageDoubleMap` with +/// `$hash` and `$hash2` representing choices of hashing algorithms available in the +/// [`Hashable` trait](../srml_support/trait.Hashable.html). +/// +/// `hasher($hash)` is optional and its default is `blake2_256`. +/// +/// /!\ Be careful with each key pair in the double map that is inserted in the trie. +/// The final key is calculated as follows: +/// +/// ```nocompile +/// $hash(module_name ++ storage_name ++ first_key) ++ $hash2(second_key) +/// ``` +/// +/// If the first key is untrusted, a cryptographic `hasher` such as `blake2_256` must be used. +/// Otherwise, other values of all storage items can be compromised. +/// +/// If the second key is untrusted, a cryptographic `hasher` such as `blake2_256` must be used. +/// Otherwise, other items in storage with the same first key can be compromised. +/// +/// Basic storage can be extended as such: /// /// `#vis #name get(#getter) config(#field_name) build(#closure): #type = #default;` /// @@ -100,18 +124,18 @@ use proc_macro::TokenStream; /// /// This struct can be exposed as `Config` by the `decl_runtime!` macro. /// -/// ### Module with instances +/// ### Module with Instances /// -/// The `decl_storage!` macro supports building modules with instances with the following syntax: -/// (`DefaultInstance` type is optional) +/// The `decl_storage!` macro supports building modules with instances with the following syntax +/// (`DefaultInstance` type is optional): /// /// ```nocompile /// trait Store for Module, I: Instance=DefaultInstance> as Example {} /// ``` /// -/// Then the genesis config is generated with two generic parameter `GenesisConfig` -/// and storage items are now accessible using two generic parameters, e.g.: -/// `>::get()` or `Dummy::::get()` +/// Then the genesis config is generated with two generic parameters (i.e. `GenesisConfig`) +/// and storage items are accessible using two generic parameters, e.g.: +/// `>::get()` or `Dummy::::get()`. #[proc_macro] pub fn decl_storage(input: TokenStream) -> TokenStream { storage::transformation::decl_storage_impl(input) -- GitLab From 837ef91afb5d37604e30ca0aa5fbde305f27b53f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 27 Apr 2019 16:33:42 +0200 Subject: [PATCH 072/206] Allow multiple substreams (#2379) * Allow multiple substreams * Update core/network-libp2p/src/custom_proto/handler.rs Co-Authored-By: tomaka --- .../src/custom_proto/handler.rs | 177 ++++++++++-------- 1 file changed, 94 insertions(+), 83 deletions(-) diff --git a/core/network-libp2p/src/custom_proto/handler.rs b/core/network-libp2p/src/custom_proto/handler.rs index 6794a9b12c..ee2ac22c5e 100644 --- a/core/network-libp2p/src/custom_proto/handler.rs +++ b/core/network-libp2p/src/custom_proto/handler.rs @@ -26,7 +26,7 @@ use libp2p::core::{ upgrade::{InboundUpgrade, OutboundUpgrade} }; use log::{debug, error}; -use smallvec::SmallVec; +use smallvec::{smallvec, SmallVec}; use std::{error, fmt, io, marker::PhantomData, mem, time::Duration, time::Instant}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_timer::{Delay, clock::Clock}; @@ -73,13 +73,18 @@ use void::Void; /// `Disable` or an `Enable` message from the outer layer. At any time, the outer layer is free to /// toggle the handler between the disabled and enabled states. /// -/// When the handler is enabled for the first time, if it is the dialer of the connection, it tries -/// to open a substream. The substream negotiates either a protocol named `/substrate/xxx`, where -/// `xxx` is chosen by the user. +/// When the handler switches to "enabled", it opens a substream and negotiates the protocol named +/// `/substrate/xxx`, where `xxx` is chosen by the user and depends on the chain. /// -/// Then, we have one unique substream where bidirectional communications happen. If the remote -/// closes the substream, we consider that we are now disconnected. Re-enabling is performed by -/// re-opening the substream (even if we are not the dialer of the connection). +/// For backwards compatibility reasons, when we switch to "enabled" for the first time (while we +/// are still in "init" mode) and we are the connection listener, we don't open a substream. +/// +/// In order the handle the situation where both the remote and us get enabled at the same time, +/// we tolerate multiple substreams open at the same time. Messages are transmitted on an arbitrary +/// substream. The endpoints don't try to agree on a single substream. +/// +/// We consider that we are now "closed" if the remote closes all the existing substreams. +/// Re-opening it can then be performed by closing all active substream and re-opening one. /// pub struct CustomProtoHandlerProto { /// Configuration for the protocol upgrade to negotiate. @@ -169,11 +174,11 @@ enum ProtocolState { deadline: Delay, }, - /// Backwards-compatible mode. Contains the unique substream that is open. + /// Normal operating mode. Contains the substreams that are open. /// If we are in this state, we have sent a `CustomProtocolOpen` message to the outside. Normal { - /// The unique substream where bidirectional communications happen. - substream: RegisteredProtocolSubstream, + /// The substreams where bidirectional communications happen. + substreams: SmallVec<[RegisteredProtocolSubstream; 4]>, /// Contains substreams which are being shut down. shutdown: SmallVec<[RegisteredProtocolSubstream; 4]>, }, @@ -284,8 +289,7 @@ where }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); ProtocolState::Normal { - substream: incoming.into_iter().next() - .expect("We have a check above that incoming isn't empty; QED"), + substreams: incoming.into_iter().collect(), shutdown: SmallVec::new() } } @@ -319,9 +323,11 @@ where ProtocolState::Disabled { shutdown: SmallVec::new(), reenable: false } } - ProtocolState::Normal { mut substream, mut shutdown } => { - substream.shutdown(); - shutdown.push(substream); + ProtocolState::Normal { substreams, mut shutdown } => { + for mut substream in substreams { + substream.shutdown(); + shutdown.push(substream); + } let event = CustomProtoHandlerOut::CustomProtocolClosed { result: Ok(()) }; @@ -341,13 +347,12 @@ where #[must_use] fn poll_state(&mut self) -> Option, (), CustomProtoHandlerOut>> { - let return_value; - self.state = match mem::replace(&mut self.state, ProtocolState::Poisoned) { + match mem::replace(&mut self.state, ProtocolState::Poisoned) { ProtocolState::Poisoned => { error!(target: "sub-libp2p", "Handler with {:?} is in poisoned state", self.remote_peer_id); - return_value = None; - ProtocolState::Poisoned + self.state = ProtocolState::Poisoned; + None } ProtocolState::Init { substreams, mut init_deadline } => { @@ -361,8 +366,8 @@ where Err(_) => error!(target: "sub-libp2p", "Tokio timer has errored") } - return_value = None; - ProtocolState::Init { substreams, init_deadline } + self.state = ProtocolState::Init { substreams, init_deadline }; + None } ProtocolState::Opening { mut deadline } => { @@ -373,63 +378,74 @@ where is_severe: true, error: "Timeout when opening protocol".to_string().into(), }; - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Opening { deadline } + self.state = ProtocolState::Opening { deadline }; + Some(ProtocolsHandlerEvent::Custom(event)) }, Ok(Async::NotReady) => { - return_value = None; - ProtocolState::Opening { deadline } + self.state = ProtocolState::Opening { deadline }; + None }, Err(_) => { error!(target: "sub-libp2p", "Tokio timer has errored"); deadline.reset(self.clock.now() + Duration::from_secs(60)); - return_value = None; - ProtocolState::Opening { deadline } + self.state = ProtocolState::Opening { deadline }; + None }, } } - ProtocolState::Normal { mut substream, shutdown } => { - match substream.poll() { - Ok(Async::Ready(Some(RegisteredProtocolEvent::Message(message)))) => { - let event = CustomProtoHandlerOut::CustomMessage { - message - }; - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Normal { substream, shutdown } - }, - Ok(Async::Ready(Some(RegisteredProtocolEvent::Clogged { messages }))) => { - let event = CustomProtoHandlerOut::Clogged { - messages, - }; - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Normal { substream, shutdown } - } - Ok(Async::NotReady) => { - return_value = None; - ProtocolState::Normal { substream, shutdown } - } - Ok(Async::Ready(None)) => { - let event = CustomProtoHandlerOut::CustomProtocolClosed { - result: Ok(()) - }; - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Disabled { - shutdown: shutdown.into_iter().collect(), - reenable: true + ProtocolState::Normal { mut substreams, shutdown } => { + for n in (0..substreams.len()).rev() { + let mut substream = substreams.swap_remove(n); + match substream.poll() { + Ok(Async::NotReady) => substreams.push(substream), + Ok(Async::Ready(Some(RegisteredProtocolEvent::Message(message)))) => { + let event = CustomProtoHandlerOut::CustomMessage { + message + }; + substreams.push(substream); + self.state = ProtocolState::Normal { substreams, shutdown }; + return Some(ProtocolsHandlerEvent::Custom(event)); + }, + Ok(Async::Ready(Some(RegisteredProtocolEvent::Clogged { messages }))) => { + let event = CustomProtoHandlerOut::Clogged { + messages, + }; + substreams.push(substream); + self.state = ProtocolState::Normal { substreams, shutdown }; + return Some(ProtocolsHandlerEvent::Custom(event)); } - } - Err(err) => { - let event = CustomProtoHandlerOut::CustomProtocolClosed { - result: Err(err), - }; - return_value = Some(ProtocolsHandlerEvent::Custom(event)); - ProtocolState::Disabled { - shutdown: shutdown.into_iter().collect(), - reenable: true + Ok(Async::Ready(None)) => { + let event = CustomProtoHandlerOut::CustomProtocolClosed { + result: Ok(()) + }; + substreams.push(substream); + self.state = ProtocolState::Disabled { + shutdown: shutdown.into_iter().collect(), + reenable: true + }; + return Some(ProtocolsHandlerEvent::Custom(event)); + } + Err(err) => { + if substreams.is_empty() { + let event = CustomProtoHandlerOut::CustomProtocolClosed { + result: Err(err), + }; + self.state = ProtocolState::Disabled { + shutdown: shutdown.into_iter().collect(), + reenable: true + }; + return Some(ProtocolsHandlerEvent::Custom(event)); + } else { + debug!(target: "sub-libp2p", "Error on extra substream: {:?}", err); + } } } } + + // This code is reached is none if and only if none of the substreams are in a ready state. + self.state = ProtocolState::Normal { substreams, shutdown }; + None } ProtocolState::Disabled { mut shutdown, reenable } => { @@ -437,21 +453,19 @@ where // If `reenable` is `true`, that means we should open the substreams system again // after all the substreams are closed. if reenable && shutdown.is_empty() { - return_value = Some(ProtocolsHandlerEvent::OutboundSubstreamRequest { + self.state = ProtocolState::Opening { + deadline: Delay::new(self.clock.now() + Duration::from_secs(60)) + }; + Some(ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol: SubstreamProtocol::new(self.protocol.clone()), info: (), - }); - ProtocolState::Opening { - deadline: Delay::new(self.clock.now() + Duration::from_secs(60)) - } + }) } else { - return_value = None; - ProtocolState::Disabled { shutdown, reenable } + self.state = ProtocolState::Disabled { shutdown, reenable }; + None } } - }; - - return_value + } } /// Called by `inject_fully_negotiated_inbound` and `inject_fully_negotiated_outbound`. @@ -481,17 +495,14 @@ where }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); ProtocolState::Normal { - substream, + substreams: smallvec![substream], shutdown: SmallVec::new() } } - ProtocolState::Normal { substream: existing, mut shutdown } => { - debug!(target: "sub-libp2p", "Received extra substream after having already one \ - open in backwards-compatibility mode with {:?}", self.remote_peer_id); - substream.shutdown(); - shutdown.push(substream); - ProtocolState::Normal { substream: existing, shutdown } + ProtocolState::Normal { substreams: mut existing, shutdown } => { + existing.push(substream); + ProtocolState::Normal { substreams: existing, shutdown } } ProtocolState::Disabled { mut shutdown, .. } => { @@ -505,8 +516,8 @@ where /// Sends a message to the remote. fn send_message(&mut self, message: TMessage) { match self.state { - ProtocolState::Normal { ref mut substream, .. } => - substream.send_message(message), + ProtocolState::Normal { ref mut substreams, .. } => + substreams[0].send_message(message), _ => debug!(target: "sub-libp2p", "Tried to send message over closed protocol \ with {:?}", self.remote_peer_id) -- GitLab From 7d523bad168fe6867fdd6130e77ab749c38b9101 Mon Sep 17 00:00:00 2001 From: TriplEight Date: Sat, 27 Apr 2019 20:02:02 +0200 Subject: [PATCH 073/206] image name was changed, pipeline will fail (#2397) --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0fe1f6b4e..a8141ee79e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -226,7 +226,7 @@ publish-s3-doc: stage: deploy when: manual retry: 1 - image: parity/kubectl-helm:$HELM_VERSION + image: parity/kubetools:latest <<: *build-only tags: # this is the runner that is used to deploy it -- GitLab From 7de91ae202bae7831240156a7da12d7cd1a3451b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Mon, 29 Apr 2019 08:18:21 +0200 Subject: [PATCH 074/206] More detailed instructions for Windows Setup (#2398) --- README.adoc | 81 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/README.adoc b/README.adoc index 038ccb1a64..03d81dcf41 100644 --- a/README.adoc +++ b/README.adoc @@ -173,11 +173,13 @@ You can distribute `mychain.json` so that everyone can synchronize and (dependin If you'd actually like to hack on Substrate, you can just grab the source code and build it. Ensure you have Rust and the support software installed: +==== Linux and Mac + +For Unix-based operating systems, you should run the following commands: + [source, shell] ---- curl https://sh.rustup.rs -sSf | sh -# on Windows download and run rustup-init.exe -# from https://rustup.rs instead rustup update nightly rustup target add wasm32-unknown-unknown --toolchain nightly @@ -195,27 +197,60 @@ sudo apt install cmake pkg-config libssl-dev git clang libclang-dev [source, shell] brew install cmake pkg-config openssl git llvm - - Windows (PowerShell): -+ -[source, shell] ----- -# Install LLVM -# Download and install the Pre Build Windows binaries -# of LLVM from http://releases.llvm.org/download.html - -# Install OpenSSL (through vcpkg) -mkdir \Tools -cd \Tools -git clone https://github.com/Microsoft/vcpkg.git -cd vcpkg -.\bootstrap-vcpkg.bat -.\vcpkg.exe install openssl:x64-windows-static - -$env:OPENSSL_DIR = 'C:\Tools\vcpkg\installed\x64-windows-static' -$env:OPENSSL_STATIC = 'Yes' -[System.Environment]::SetEnvironmentVariable('OPENSSL_DIR', $env:OPENSSL_DIR, [System.EnvironmentVariableTarget]::User) -[System.Environment]::SetEnvironmentVariable('OPENSSL_STATIC', $env:OPENSSL_STATIC, [System.EnvironmentVariableTarget]::User) ----- +To finish installation of Substrate, jump down to <>. + +==== Windows + +If you are trying to set up Substrate on Windows, you should do the following: + +1. First, you will need to download and install "Build Tools for Visual Studio:" + + * You can get it at this link: https://aka.ms/buildtools + * Run the installation file: `vs_buildtools.exe` + * Please ensure the Windows 10 SDK component is included when installing the Visual C++ Build Tools. + * image:https://i.imgur.com/zayVLmu.png[image] + * Restart your computer. + +2. Next, you need to install Rust: + + * Detailed instructions are provided by the https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-windows[Rust Book]. + * Download from: https://www.rust-lang.org/tools/install + * Run the installation file: `rustup-init.exe` + > Note that it should not prompt you to install vs_buildtools since you did it in step 1. + * Choose "Default Installation." + * To get started, you need Cargo's bin directory (%USERPROFILE%\.cargo\bin) in your PATH environment variable. Future applications will automatically have the correct environment, but you may need to restart your current shell. + +3. Then, you will need to run some commands in CMD to set up your Wasm Build Environment: + + rustup update nightly + rustup update stable + rustup target add wasm32-unknown-unknown --toolchain nightly + +4. Next, you install wasm-gc, which is used to slim down Wasm files: + + cargo install --git https://github.com/alexcrichton/wasm-gc --force + +5. Then, you need to install LLVM: https://releases.llvm.org/download.html + +6. Next, you need to install OpenSSL, which we will do with `vcpkg`: + + mkdir \Tools + cd \Tools + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + .\bootstrap-vcpkg.bat + .\vcpkg.exe install openssl:x64-windows-static + +7. After, you need to add OpenSSL to your System Variables: + + $env:OPENSSL_DIR = 'C:\Tools\vcpkg\installed\x64-windows-static' + $env:OPENSSL_STATIC = 'Yes' + [System.Environment]::SetEnvironmentVariable('OPENSSL_DIR', $env:OPENSSL_DIR, [System.EnvironmentVariableTarget]::User) + [System.Environment]::SetEnvironmentVariable('OPENSSL_STATIC', $env:OPENSSL_STATIC, [System.EnvironmentVariableTarget]::User) + +8. Finally, you need to install `cmake`: https://cmake.org/download/ + +==== Shared Steps Then, grab the Substrate source code: -- GitLab From 25d21add1b8502c6fa3ee099cf73284bd4372e3d Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Mon, 29 Apr 2019 09:40:08 +0200 Subject: [PATCH 075/206] refactor: Remove duplicate line. Show on separate lines to fix formatting (#2402) --- srml/example/src/lib.rs | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/srml/example/src/lib.rs b/srml/example/src/lib.rs index d1ff7cc634..6960d635ed 100644 --- a/srml/example/src/lib.rs +++ b/srml/example/src/lib.rs @@ -24,12 +24,19 @@ //! //! ### Documentation Guidelines: //! -//! +//! +//! //!