Unverified Commit a81a23a9 authored by Gav Wood's avatar Gav Wood Committed by GitHub
Browse files

Fixes for substrate#1404 (#76)

* Fixes for substrate#1404

* Updates for latest Substrate

* Update lock file

* Update runtime.
parent 89f6c0c6
Pipeline #28448 passed with stages
in 14 minutes and 57 seconds
This diff is collapsed.
......@@ -27,6 +27,7 @@ srml-council = { git = "https://github.com/paritytech/substrate" }
srml-democracy = { git = "https://github.com/paritytech/substrate" }
srml-executive = { git = "https://github.com/paritytech/substrate" }
srml-grandpa = { git = "https://github.com/paritytech/substrate" }
srml-indices = { git = "https://github.com/paritytech/substrate" }
sr-primitives = { git = "https://github.com/paritytech/substrate" }
srml-session = { git = "https://github.com/paritytech/substrate" }
srml-staking = { git = "https://github.com/paritytech/substrate" }
......@@ -58,6 +59,7 @@ std = [
"srml-democracy/std",
"srml-executive/std",
"srml-grandpa/std",
"srml-indices/std",
"sr-primitives/std",
"srml-session/std",
"srml-staking/std",
......
......@@ -49,6 +49,7 @@ extern crate srml_council as council;
extern crate srml_democracy as democracy;
extern crate srml_executive as executive;
extern crate srml_grandpa as grandpa;
extern crate srml_indices as indices;
extern crate srml_session as session;
extern crate srml_staking as staking;
extern crate srml_sudo as sudo;
......@@ -75,10 +76,10 @@ use client::{
runtime_api as client_api,
};
use consensus_aura::api as aura_api;
use sr_primitives::{ApplyResult, CheckInherentError};
use sr_primitives::transaction_validity::TransactionValidity;
use sr_primitives::generic;
use sr_primitives::traits::{Convert, BlakeTwo256, Block as BlockT, DigestFor};
use sr_primitives::{
ApplyResult, CheckInherentError, generic, transaction_validity::TransactionValidity,
traits::{Convert, BlakeTwo256, Block as BlockT, DigestFor, StaticLookup}
};
use version::RuntimeVersion;
use grandpa::fg_primitives::{self, ScheduledChange};
use council::{motions as council_motions, voting as council_voting};
......@@ -107,7 +108,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 1,
spec_version: 102,
spec_version: 103,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
......@@ -129,6 +130,7 @@ impl system::Trait for Runtime {
type Hashing = BlakeTwo256;
type Digest = generic::Digest<Log>;
type AccountId = AccountId;
type Lookup = Indices;
type Header = generic::Header<BlockNumber, BlakeTwo256, Log>;
type Event = Event;
type Log = Log;
......@@ -138,10 +140,17 @@ impl aura::Trait for Runtime {
type HandleReport = aura::StakingSlasher<Runtime>;
}
impl indices::Trait for Runtime {
type IsDeadAccount = Balances;
type AccountIndex = AccountIndex;
type ResolveHint = indices::SimpleResolveHint<Self::AccountId, Self::AccountIndex>;
type Event = Event;
}
impl balances::Trait for Runtime {
type Balance = Balance;
type AccountIndex = AccountIndex;
type OnFreeBalanceZero = Staking;
type OnNewAccount = Indices;
type EnsureAccountLiquid = Staking;
type Event = Event;
}
......@@ -236,6 +245,7 @@ construct_runtime!(
Timestamp: timestamp::{Module, Call, Storage, Config<T>, Inherent},
// consensus' Inherent is not provided because it assumes instant-finality blocks.
Consensus: consensus::{Module, Call, Storage, Config<T>, Log(AuthoritiesChange) },
Indices: indices,
Balances: balances,
Session: session,
Staking: staking,
......@@ -253,9 +263,7 @@ construct_runtime!(
);
/// The address format for describing accounts.
pub use balances::address::Address as RawAddress;
/// The address format for describing accounts.
pub type Address = balances::Address<Runtime>;
pub type Address = <Indices as StaticLookup>::Source;
/// Block header type as expected by this runtime.
pub type Header = generic::Header<BlockNumber, BlakeTwo256, Log>;
/// Block type as expected by this runtime.
......@@ -269,7 +277,7 @@ pub type UncheckedExtrinsic = generic::UncheckedMortalCompactExtrinsic<Address,
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<Runtime, Block, balances::ChainContext<Runtime>, Balances, AllModules>;
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Balances, AllModules>;
impl_runtime_apis! {
impl client_api::Core<Block> for Runtime {
......
......@@ -457,7 +457,7 @@ mod tests {
use sr_io::{TestExternalities, with_externalities};
use substrate_primitives::{H256, Blake2Hasher};
use sr_primitives::{generic, BuildStorage};
use sr_primitives::traits::BlakeTwo256;
use sr_primitives::traits::{BlakeTwo256, IdentityLookup};
use primitives::{parachain::{CandidateReceipt, HeadData, ValidityAttestation}, SessionKey};
use keyring::Keyring;
use {consensus, timestamp};
......@@ -482,6 +482,7 @@ mod tests {
type Hashing = BlakeTwo256;
type Digest = generic::Digest<::Log>;
type AccountId = ::AccountId;
type Lookup = IdentityLookup<::AccountId>;
type Header = ::Header;
type Event = ();
type Log = ::Log;
......
......@@ -177,6 +177,7 @@ dependencies = [
"srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-indices 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-session 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-sudo 0.1.0 (git+https://github.com/paritytech/substrate)",
......@@ -272,7 +273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "sr-api-macros"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -283,7 +284,7 @@ dependencies = [
[[package]]
name = "sr-io"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -295,7 +296,7 @@ dependencies = [
[[package]]
name = "sr-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -309,7 +310,7 @@ dependencies = [
[[package]]
name = "sr-std"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -317,7 +318,7 @@ dependencies = [
[[package]]
name = "sr-version"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -329,7 +330,7 @@ dependencies = [
[[package]]
name = "srml-aura"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -349,7 +350,7 @@ dependencies = [
[[package]]
name = "srml-balances"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -367,7 +368,7 @@ dependencies = [
[[package]]
name = "srml-consensus"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -384,7 +385,7 @@ dependencies = [
[[package]]
name = "srml-council"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -404,7 +405,7 @@ dependencies = [
[[package]]
name = "srml-democracy"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -423,7 +424,7 @@ dependencies = [
[[package]]
name = "srml-executive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -439,7 +440,7 @@ dependencies = [
[[package]]
name = "srml-grandpa"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -455,10 +456,28 @@ dependencies = [
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
]
[[package]]
name = "srml-indices"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.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.80 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
"sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-support 0.1.0 (git+https://github.com/paritytech/substrate)",
"srml-system 0.1.0 (git+https://github.com/paritytech/substrate)",
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
]
[[package]]
name = "srml-metadata"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -469,7 +488,7 @@ dependencies = [
[[package]]
name = "srml-session"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -489,7 +508,7 @@ dependencies = [
[[package]]
name = "srml-staking"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -511,7 +530,7 @@ dependencies = [
[[package]]
name = "srml-sudo"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -530,7 +549,7 @@ dependencies = [
[[package]]
name = "srml-support"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -545,7 +564,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -557,7 +576,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural-tools"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -568,7 +587,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural-tools-derive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -578,7 +597,7 @@ dependencies = [
[[package]]
name = "srml-system"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -595,7 +614,7 @@ dependencies = [
[[package]]
name = "srml-timestamp"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -612,7 +631,7 @@ dependencies = [
[[package]]
name = "srml-treasury"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -630,7 +649,7 @@ dependencies = [
[[package]]
name = "srml-upgrade-key"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -654,7 +673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "substrate-client"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)",
......@@ -667,7 +686,7 @@ dependencies = [
[[package]]
name = "substrate-consensus-aura-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 0.1.0 (git+https://github.com/paritytech/substrate)",
......@@ -681,7 +700,7 @@ dependencies = [
[[package]]
name = "substrate-finality-grandpa-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -694,7 +713,7 @@ dependencies = [
[[package]]
name = "substrate-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
source = "git+https://github.com/paritytech/substrate#553e78d0fe7f3dc29d56454de3b71f6893a16a1a"
dependencies = [
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
......@@ -787,6 +806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-indices 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-metadata 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-session 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
"checksum srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)" = "<none>"
......
......@@ -26,6 +26,7 @@ srml-council = { git = "https://github.com/paritytech/substrate", default-featur
srml-democracy = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-executive = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-indices = { git = "https://github.com/paritytech/substrate", default-features = false }
sr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-session = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-staking = { git = "https://github.com/paritytech/substrate", default-features = false }
......
......@@ -20,7 +20,8 @@ use primitives::{H256, Ed25519AuthorityId as AuthorityId, ed25519};
use polkadot_runtime::{
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, TreasuryConfig,
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill,
CouncilVotingConfig, GrandpaConfig, UpgradeKeyConfig, SudoConfig, Permill
CouncilVotingConfig, GrandpaConfig, UpgradeKeyConfig, SudoConfig, IndicesConfig,
Permill
};
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
......@@ -57,6 +58,9 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
authorities: initial_authorities.clone(),
}),
system: None,
indices: Some(IndicesConfig {
ids: endowed_accounts.clone(),
}),
balances: Some(BalancesConfig {
balances: endowed_accounts.iter().map(|&k| (k, 10_000_000 * DOLLARS)).collect(),
transaction_base_fee: 1 * CENTS,
......@@ -64,7 +68,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
existential_deposit: 1 * DOLLARS,
transfer_fee: 1 * CENTS,
creation_fee: 1 * CENTS,
reclaim_rebate: 1 * CENTS,
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
......@@ -160,13 +163,15 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>, upgrade_key: H256) ->
authorities: initial_authorities.clone(),
}),
system: None,
indices: Some(IndicesConfig {
ids: endowed_accounts.clone(),
}),
balances: Some(BalancesConfig {
transaction_base_fee: 1,
transaction_byte_fee: 0,
existential_deposit: 500,
transfer_fee: 0,
creation_fee: 0,
reclaim_rebate: 0,
balances: endowed_accounts.iter().map(|&k|(k, (1u128 << 60))).collect(),
}),
session: Some(SessionConfig {
......
......@@ -176,7 +176,7 @@ construct_service_factory! {
gossip_duration: Duration::new(4, 0), // FIXME: make this available through chainspec?
local_key: key.clone(),
justification_period: 4096,
name: Some(service.config.name.clone())
name: Some(service.config.name.clone()),
},
link_half,
grandpa::NetworkBridge::new(service.network()),
......
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