Unverified Commit fc100e65 authored by André Silva's avatar André Silva Committed by GitHub
Browse files

v0.17.18: Update latest substrate (#776)

* update latest substrate polkadot-master

* fix test compilation

* bump version to 0.7.18

* bump impl_version

* update substrate

* Revert "Instantiate environment with asynchronous API (#768)"

This reverts commit 989db4b8.

* update substrate

* remove unused parameter type

* bump trie-db version for tests

* fix collator test

* update substrate

* remove unnecessary service changes
parent a169ae5a
Pipeline #75063 passed with stages
in 22 minutes and 53 seconds
This diff is collapsed.
...@@ -4,7 +4,7 @@ path = "src/main.rs" ...@@ -4,7 +4,7 @@ path = "src/main.rs"
[package] [package]
name = "polkadot" name = "polkadot"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs" build = "build.rs"
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-availability-store" name = "polkadot-availability-store"
description = "Persistent database for parachain data" description = "Persistent database for parachain data"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-cli" name = "polkadot-cli"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot node implementation in Rust." description = "Polkadot node implementation in Rust."
edition = "2018" edition = "2018"
...@@ -23,7 +23,7 @@ sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polk ...@@ -23,7 +23,7 @@ sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polk
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
service = { package = "polkadot-service", path = "../service", default-features = false } service = { package = "polkadot-service", path = "../service", default-features = false }
tokio = { version = "0.2", features = ["rt-threaded"], optional = true } tokio = { version = "0.1.22", optional = true }
wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.7", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true }
......
...@@ -24,7 +24,9 @@ mod chain_spec; ...@@ -24,7 +24,9 @@ mod chain_spec;
mod browser; mod browser;
use chain_spec::ChainSpec; use chain_spec::ChainSpec;
use futures::{Future, future::{select, Either}, channel::oneshot}; use futures::{
Future, FutureExt, TryFutureExt, future::select, channel::oneshot,
};
#[cfg(feature = "cli")] #[cfg(feature = "cli")]
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use log::info; use log::info;
...@@ -215,22 +217,34 @@ pub fn run_until_exit( ...@@ -215,22 +217,34 @@ pub fn run_until_exit(
) -> error::Result<()> { ) -> error::Result<()> {
let (exit_send, exit) = oneshot::channel(); let (exit_send, exit) = oneshot::channel();
let executor = runtime.executor();
let informant = sc_cli::informant::build(&service); let informant = sc_cli::informant::build(&service);
let future = select(exit, informant)
.map(|_| Ok(()))
.compat();
let handle = runtime.spawn(select(exit, informant)); executor.spawn(future);
// we eagerly drop the service so that the internal exit future is fired, // we eagerly drop the service so that the internal exit future is fired,
// but we need to keep holding a reference to the global telemetry guard // but we need to keep holding a reference to the global telemetry guard
let _telemetry = service.telemetry(); let _telemetry = service.telemetry();
let service_res = runtime.block_on(select(service, e)); let service_res = {
let service = service
.map_err(|err| error::Error::Service(err));
let select = select(service, e)
.map(|_| Ok(()))
.compat();
runtime.block_on(select)
};
let _ = exit_send.send(()); let _ = exit_send.send(());
runtime.block_on(handle); use futures01::Future;
// TODO [andre]: timeout this future substrate/#1318
let _ = runtime.shutdown_on_idle().wait();
match service_res { service_res
Either::Left((res, _)) => res.map_err(error::Error::Service),
Either::Right((_, _)) => Ok(())
}
} }
[package] [package]
name = "polkadot-collator" name = "polkadot-collator"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Collator node implementation" description = "Collator node implementation"
edition = "2018" edition = "2018"
...@@ -21,7 +21,7 @@ polkadot-network = { path = "../network" } ...@@ -21,7 +21,7 @@ polkadot-network = { path = "../network" }
polkadot-validation = { path = "../validation" } polkadot-validation = { path = "../validation" }
polkadot-service = { path = "../service" } polkadot-service = { path = "../service" }
log = "0.4.8" log = "0.4.8"
tokio = "0.2" tokio = "0.1.22"
futures-timer = "1.0" futures-timer = "1.0"
codec = { package = "parity-scale-codec", version = "1.1.0" } codec = { package = "parity-scale-codec", version = "1.1.0" }
......
...@@ -425,7 +425,7 @@ fn run_collator_node<S, E, P, Extrinsic>( ...@@ -425,7 +425,7 @@ fn run_collator_node<S, E, P, Extrinsic>(
); );
let exit = inner_exit_2.clone(); let exit = inner_exit_2.clone();
tokio::spawn(future::select(res.boxed(), exit).map(drop)); tokio::spawn(future::select(res.boxed(), exit).map(drop).map(|_| Ok(())).compat());
}) })
}); });
...@@ -449,7 +449,7 @@ fn run_collator_node<S, E, P, Extrinsic>( ...@@ -449,7 +449,7 @@ fn run_collator_node<S, E, P, Extrinsic>(
inner_exit.clone() inner_exit.clone()
).map(drop); ).map(drop);
tokio::spawn(future); tokio::spawn(future.map(|_| Ok(())).compat());
future::ready(()) future::ready(())
}); });
......
[package] [package]
name = "polkadot-erasure-coding" name = "polkadot-erasure-coding"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-network" name = "polkadot-network"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot-specific networking protocol" description = "Polkadot-specific networking protocol"
edition = "2018" edition = "2018"
......
...@@ -35,7 +35,8 @@ use polkadot_primitives::parachain::{ ...@@ -35,7 +35,8 @@ use polkadot_primitives::parachain::{
use parking_lot::Mutex; use parking_lot::Mutex;
use sp_blockchain::Result as ClientResult; use sp_blockchain::Result as ClientResult;
use sp_api::{ApiRef, Core, RuntimeVersion, StorageProof, ApiErrorExt, ApiExt, ProvideRuntimeApi}; use sp_api::{ApiRef, Core, RuntimeVersion, StorageProof, ApiErrorExt, ApiExt, ProvideRuntimeApi};
use sp_runtime::traits::Block as BlockT; use sp_runtime::traits::{Block as BlockT, HasherFor, NumberFor};
use sp_state_machine::ChangesTrieState;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::Arc; use std::sync::Arc;
...@@ -225,12 +226,10 @@ impl ApiExt<Block> for RuntimeApi { ...@@ -225,12 +226,10 @@ impl ApiExt<Block> for RuntimeApi {
None None
} }
fn into_storage_changes< fn into_storage_changes(
T: sp_api::ChangesTrieStorage<sp_api::HasherFor<Block>, sp_api::NumberFor<Block>>
>(
&self, &self,
_: &Self::StateBackend, _: &Self::StateBackend,
_: Option<&T>, _: Option<&ChangesTrieState<HasherFor<Block>, NumberFor<Block>>>,
_: <Block as sp_api::BlockT>::Hash, _: <Block as sp_api::BlockT>::Hash,
) -> std::result::Result<sp_api::StorageChanges<Self::StateBackend, Block>, String> ) -> std::result::Result<sp_api::StorageChanges<Self::StateBackend, Block>, String>
where Self: Sized where Self: Sized
......
[package] [package]
name = "polkadot-parachain" name = "polkadot-parachain"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Types and utilities for creating and working with parachains" description = "Types and utilities for creating and working with parachains"
edition = "2018" edition = "2018"
......
...@@ -156,7 +156,7 @@ pub fn validate_candidate_internal<E: Externalities + 'static>( ...@@ -156,7 +156,7 @@ pub fn validate_candidate_internal<E: Externalities + 'static>(
) -> Result<ValidationResult, Error> { ) -> Result<ValidationResult, Error> {
let mut ext = ValidationExternalities(ParachainExt::new(externalities)); let mut ext = ValidationExternalities(ParachainExt::new(externalities));
let res = sc_executor::call_in_wasm::<_, HostFunctions>( let res = sc_executor::call_in_wasm::<HostFunctions>(
"validate_block", "validate_block",
encoded_call_data, encoded_call_data,
sc_executor::WasmExecutionMethod::Interpreted, sc_executor::WasmExecutionMethod::Interpreted,
......
[package] [package]
name = "polkadot-primitives" name = "polkadot-primitives"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-rpc" name = "polkadot-rpc"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-runtime-common" name = "polkadot-runtime-common"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
...@@ -41,7 +41,7 @@ babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate ...@@ -41,7 +41,7 @@ babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" } randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" } treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
trie-db = "0.18.0" trie-db = "0.19.2"
serde_json = "1.0.41" serde_json = "1.0.41"
[features] [features]
......
[package] [package]
name = "kusama-runtime" name = "kusama-runtime"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
...@@ -69,7 +69,7 @@ libsecp256k1 = "0.3.2" ...@@ -69,7 +69,7 @@ libsecp256k1 = "0.3.2"
tiny-keccak = "1.5.0" tiny-keccak = "1.5.0"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
trie-db = "0.18.0" trie-db = "0.19.2"
serde_json = "1.0.41" serde_json = "1.0.41"
[build-dependencies] [build-dependencies]
......
...@@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { ...@@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
impl_name: create_runtime_str!("parity-kusama"), impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2, authoring_version: 2,
spec_version: 1041, spec_version: 1041,
impl_version: 2, impl_version: 3,
apis: RUNTIME_API_VERSIONS, apis: RUNTIME_API_VERSIONS,
}; };
...@@ -571,7 +571,6 @@ parameter_types! { ...@@ -571,7 +571,6 @@ parameter_types! {
pub const PeriodSpend: Balance = 500 * DOLLARS; pub const PeriodSpend: Balance = 500 * DOLLARS;
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
pub const ChallengePeriod: BlockNumber = 7 * DAYS; pub const ChallengePeriod: BlockNumber = 7 * DAYS;
pub const MaxMembers: u32 = 999;
} }
impl society::Trait for Runtime { impl society::Trait for Runtime {
......
[package] [package]
name = "polkadot-runtime" name = "polkadot-runtime"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
...@@ -66,7 +66,7 @@ libsecp256k1 = "0.3.2" ...@@ -66,7 +66,7 @@ libsecp256k1 = "0.3.2"
tiny-keccak = "1.5.0" tiny-keccak = "1.5.0"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
trie-db = "0.18.0" trie-db = "0.19.2"
serde_json = "1.0.41" serde_json = "1.0.41"
[build-dependencies] [build-dependencies]
......
[package] [package]
name = "polkadot-service" name = "polkadot-service"
version = "0.7.17" version = "0.7.18"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
...@@ -21,7 +21,7 @@ pub mod chain_spec; ...@@ -21,7 +21,7 @@ pub mod chain_spec;
use futures::{ use futures::{
FutureExt, TryFutureExt, FutureExt, TryFutureExt,
task::{Spawn, SpawnError, FutureObj}, task::{Spawn, SpawnError, FutureObj},
compat::Future01CompatExt, compat::{Future01CompatExt, Stream01CompatExt},
}; };
use sc_client::LongestChain; use sc_client::LongestChain;
use std::sync::Arc; use std::sync::Arc;
...@@ -455,8 +455,9 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration) ...@@ -455,8 +455,9 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration)
if authority_discovery_enabled { if authority_discovery_enabled {
let network = service.network(); let network = service.network();
let dht_event_stream = network.event_stream().filter_map(|e| async move { match e { let network_event_stream = network.event_stream().compat();
Event::Dht(e) => Some(e), let dht_event_stream = network_event_stream.filter_map(|e| async move { match e {
Ok(Event::Dht(e)) => Some(e),
_ => None, _ => None,
}}).boxed(); }}).boxed();
let authority_discovery = authority_discovery::AuthorityDiscovery::new( let authority_discovery = authority_discovery::AuthorityDiscovery::new(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment