Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
773 changes: 358 additions & 415 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod browser;

use chain_spec::ChainSpec;
use futures::{
Future, FutureExt, TryFutureExt, future::select, channel::oneshot,
Future, FutureExt, TryFutureExt, future::select, channel::oneshot, compat::Compat,
};
#[cfg(feature = "cli")]
use tokio::runtime::Runtime;
Expand Down Expand Up @@ -156,7 +156,7 @@ where
|exit, _cli_args, custom_args, mut config| {
info!("{}", version.name);
info!(" version {}", config.full_version());
info!(" by {}, 2017-2019", version.author);
info!(" by {}, 2017-2020", version.author);
info!("Chain specification: {}", config.chain_spec.name());
info!("Native runtime: {}", D::native_version().runtime_version);
if is_kusama {
Expand All @@ -171,6 +171,10 @@ where
config.custom = service::CustomConfiguration::default();
config.custom.authority_discovery_enabled = custom_args.authority_discovery_enabled;
let runtime = Runtime::new().map_err(|e| format!("{:?}", e))?;
config.tasks_executor = {
let runtime_handle = runtime.executor();
Some(Box::new(move |fut| { runtime_handle.spawn(Compat::new(fut.map(Ok))); }))
};
match config.roles {
service::Roles::LIGHT =>
run_until_exit(
Expand Down
3 changes: 1 addition & 2 deletions runtime/common/src/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,12 +968,11 @@ mod tests {
}

impl session::Trait for Test {
type OnSessionEnding = ();
type SessionManager = ();
type Keys = UintAuthorityId;
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
type SessionHandler = session::TestSessionHandler;
type Event = ();
type SelectInitialValidators = staking::Module<Self>;
type ValidatorId = u64;
type ValidatorIdOf = staking::StashOf<Self>;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
Expand Down
3 changes: 1 addition & 2 deletions runtime/common/src/registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,11 @@ mod tests {
}

impl session::Trait for Test {
type OnSessionEnding = ();
type SessionManager = ();
type Keys = UintAuthorityId;
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
type SessionHandler = session::TestSessionHandler;
type Event = ();
type SelectInitialValidators = ();
type ValidatorId = u64;
type ValidatorIdOf = ();
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
Expand Down
2 changes: 1 addition & 1 deletion runtime/kusama/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
use wasm_builder_runner::{build_current_project, WasmBuilderSource};

fn main() {
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.8"));
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.9"));
}
7 changes: 3 additions & 4 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1042,
impl_version: 3,
spec_version: 1043,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};

Expand Down Expand Up @@ -241,14 +241,13 @@ parameter_types! {
}

impl session::Trait for Runtime {
type OnSessionEnding = Staking;
type SessionManager = Staking;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type ShouldEndSession = Babe;
type Event = Event;
type Keys = SessionKeys;
type ValidatorId = AccountId;
type ValidatorIdOf = staking::StashOf<Self>;
type SelectInitialValidators = Staking;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
use wasm_builder_runner::{build_current_project, WasmBuilderSource};

fn main() {
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.8"));
build_current_project("wasm_binary.rs", WasmBuilderSource::Crates("1.0.9"));
}
3 changes: 1 addition & 2 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,13 @@ parameter_types! {
}

impl session::Trait for Runtime {
type OnSessionEnding = Staking;
type SessionManager = Staking;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type ShouldEndSession = Babe;
type Event = Event;
type Keys = SessionKeys;
type ValidatorId = AccountId;
type ValidatorIdOf = staking::StashOf<Self>;
type SelectInitialValidators = Staking;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
}

Expand Down
6 changes: 3 additions & 3 deletions service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod chain_spec;
use futures::{
FutureExt, TryFutureExt,
task::{Spawn, SpawnError, FutureObj},
compat::{Future01CompatExt, Stream01CompatExt},
compat::Future01CompatExt,
};
use sc_client::LongestChain;
use std::sync::Arc;
Expand Down Expand Up @@ -455,9 +455,9 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(config: Configuration)

if authority_discovery_enabled {
let network = service.network();
let network_event_stream = network.event_stream().compat();
let network_event_stream = network.event_stream();
let dht_event_stream = network_event_stream.filter_map(|e| async move { match e {
Ok(Event::Dht(e)) => Some(e),
Event::Dht(e) => Some(e),
_ => None,
}}).boxed();
let authority_discovery = authority_discovery::AuthorityDiscovery::new(
Expand Down
2 changes: 1 addition & 1 deletion test-parachains/adder/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use wasm_builder_runner::{build_current_project_with_rustflags, WasmBuilderSourc
fn main() {
build_current_project_with_rustflags(
"wasm_binary.rs",
WasmBuilderSource::Crates("1.0.7"),
WasmBuilderSource::Crates("1.0.9"),
"-C link-arg=--export=__heap_base",
);
}
2 changes: 1 addition & 1 deletion test-parachains/halt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use wasm_builder_runner::{build_current_project_with_rustflags, WasmBuilderSourc
fn main() {
build_current_project_with_rustflags(
"wasm_binary.rs",
WasmBuilderSource::Crates("1.0.7"),
WasmBuilderSource::Crates("1.0.9"),
"-C link-arg=--export=__heap_base",
);
}