Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
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
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ democracy = { package = "srml-democracy", git = "https://github.com/paritytech/s
executive = { package = "srml-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
finality-tracker = { package = "srml-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
grandpa = { package = "srml-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
im-online = { package = "srml-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
indices = { package = "srml-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
session = { package = "srml-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
Expand Down Expand Up @@ -77,6 +78,7 @@ std = [
"executive/std",
"finality-tracker/std",
"grandpa/std",
"im-online/std",
"indices/std",
"sr-primitives/std",
"session/std",
Expand Down
10 changes: 10 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ impl treasury::Trait for Runtime {
type Burn = Burn;
}

impl im_online::Trait for Runtime {
type AuthorityId = AuraId;
type Call = Call;
type Event = Event;
type SessionsPerEra = SessionsPerEra;
type UncheckedExtrinsic = UncheckedExtrinsic;
type IsValidAuthorityId = Aura;
}

impl grandpa::Trait for Runtime {
type Event = Event;
}
Expand Down Expand Up @@ -394,6 +403,7 @@ construct_runtime!(
Parachains: parachains::{Module, Call, Storage, Config<T>, Inherent, Origin},
Slots: slots::{Module, Call, Storage, Event<T>},
Sudo: sudo,
ImOnline: im_online::{default, ValidateUnsigned},
}
);

Expand Down
9 changes: 9 additions & 0 deletions service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use polkadot_runtime::{
GenesisConfig, CouncilConfig, ElectionsConfig, DemocracyConfig, SystemConfig, AuraConfig,
SessionConfig, StakingConfig, BalancesConfig, Perbill, SessionKeys, TechnicalCommitteeConfig,
GrandpaConfig, SudoConfig, IndicesConfig, CuratedGrandpaConfig, StakerStatus, WASM_BINARY,
ImOnlineConfig,
};
use polkadot_runtime::constants::{currency::DOTS, time::*};
use telemetry::TelemetryEndpoints;
Expand Down Expand Up @@ -126,6 +127,10 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
curated_grandpa: Some(CuratedGrandpaConfig {
shuffle_period: 1024,
}),
im_online: Some(ImOnlineConfig {
gossip_at: 0,
last_new_era_start: 0,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove those two properties from the config in the next version of the module.

}),
}
}

Expand Down Expand Up @@ -256,6 +261,10 @@ pub fn testnet_genesis(
curated_grandpa: Some(CuratedGrandpaConfig {
shuffle_period: 1024,
}),
im_online: Some(ImOnlineConfig {
gossip_at: 0,
last_new_era_start: 0,
}),
}
}

Expand Down