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

Update to latest substrate (#66)

* Update to latest substrate

* Fix as much as I can

* Store key out of Environment::init

* Fix service compile
parent 7c90366c
Pipeline #27926 passed with stages
in 17 minutes and 18 seconds
This diff is collapsed.
......@@ -16,7 +16,7 @@
//! Errors that can occur during the consensus process.
use primitives::AuthorityId;
use primitives::Ed25519AuthorityId as AuthorityId;
use runtime_primitives::RuntimeString;
error_chain! {
......
......@@ -77,7 +77,7 @@ use polkadot_primitives::{
};
use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt, CandidateSignature};
use polkadot_primitives::parachain::{AttestedCandidate, ParachainHost, Statement as PrimitiveStatement};
use primitives::{AuthorityId, ed25519};
use primitives::{Ed25519AuthorityId as AuthorityId, ed25519};
use runtime_primitives::traits::ProvideRuntimeApi;
use tokio::runtime::TaskExecutor;
use tokio::timer::{Delay, Interval};
......@@ -348,6 +348,7 @@ struct AttestationTracker {
pub struct ProposerFactory<C, N, P, TxApi: PoolChainApi> {
parachain_consensus: Arc<ParachainConsensus<C, N, P>>,
transaction_pool: Arc<Pool<TxApi>>,
key: Arc<ed25519::Pair>,
_service_handle: ServiceHandle,
}
......@@ -384,13 +385,14 @@ impl<C, N, P, TxApi> ProposerFactory<C, N, P, TxApi> where
client,
parachain_consensus.clone(),
thread_pool,
key,
key.clone(),
extrinsic_store,
);
ProposerFactory {
parachain_consensus,
transaction_pool,
key,
_service_handle: service_handle,
}
}
......@@ -412,10 +414,10 @@ impl<C, N, P, TxApi> consensus::Environment<Block, AuraConsensusData> for Propos
&self,
parent_header: &Header,
authorities: &[AuthorityId],
sign_with: Arc<ed25519::Pair>,
) -> Result<Self::Proposer, Error> {
let parent_hash = parent_header.hash();
let parent_id = BlockId::hash(parent_hash);
let sign_with = self.key.clone();
let tracker = self.parachain_consensus.get_or_instantiate(
parent_hash,
authorities,
......
......@@ -67,7 +67,7 @@ pub type AccountIndex = u32;
/// The Ed25519 pub key of an session that belongs to an authority of the relay chain. This is
/// exactly equivalent to what the substrate calls an "authority".
pub type SessionKey = primitives::AuthorityId;
pub type SessionKey = primitives::Ed25519AuthorityId;
/// Indentifier for a chain. 32-bit should be plenty.
pub type ChainId = u32;
......@@ -92,7 +92,7 @@ pub type Signature = runtime_primitives::Ed25519Signature;
pub type Balance = u128;
/// Header type.
pub type Header = generic::Header<BlockNumber, BlakeTwo256, generic::DigestItem<Hash, AccountId>>;
pub type Header = generic::Header<BlockNumber, BlakeTwo256, generic::DigestItem<Hash, SessionKey>>;
/// Block type.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// Block ID.
......
......@@ -107,7 +107,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 1,
spec_version: 101,
spec_version: 102,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
......@@ -265,7 +265,7 @@ pub type SignedBlock = generic::SignedBlock<Block>;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId<Block>;
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedMortalExtrinsic<Address, Nonce, Call, Signature>;
pub type UncheckedExtrinsic = generic::UncheckedMortalCompactExtrinsic<Address, Nonce, Call, Signature>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
......
......@@ -78,6 +78,14 @@ dependencies = [
"proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "impl-codec"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "integer-sqrt"
version = "0.1.0"
......@@ -182,6 +190,17 @@ dependencies = [
"substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)",
]
[[package]]
name = "primitive-types"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"impl-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"uint 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "proc-macro-hack"
version = "0.4.1"
......@@ -253,7 +272,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#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -264,7 +283,7 @@ dependencies = [
[[package]]
name = "sr-io"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -276,7 +295,7 @@ dependencies = [
[[package]]
name = "sr-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -290,7 +309,7 @@ dependencies = [
[[package]]
name = "sr-std"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -298,7 +317,7 @@ dependencies = [
[[package]]
name = "sr-version"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -310,7 +329,7 @@ dependencies = [
[[package]]
name = "srml-aura"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -330,7 +349,7 @@ dependencies = [
[[package]]
name = "srml-balances"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -348,7 +367,7 @@ dependencies = [
[[package]]
name = "srml-consensus"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -365,7 +384,7 @@ dependencies = [
[[package]]
name = "srml-council"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -385,7 +404,7 @@ dependencies = [
[[package]]
name = "srml-democracy"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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 +423,7 @@ dependencies = [
[[package]]
name = "srml-executive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -420,7 +439,7 @@ dependencies = [
[[package]]
name = "srml-grandpa"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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 +458,7 @@ dependencies = [
[[package]]
name = "srml-metadata"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -450,7 +469,7 @@ dependencies = [
[[package]]
name = "srml-session"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -470,7 +489,7 @@ dependencies = [
[[package]]
name = "srml-staking"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -492,7 +511,7 @@ dependencies = [
[[package]]
name = "srml-sudo"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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-support"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -526,7 +545,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -538,7 +557,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural-tools"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -549,7 +568,7 @@ dependencies = [
[[package]]
name = "srml-support-procedural-tools-derive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -559,7 +578,7 @@ dependencies = [
[[package]]
name = "srml-system"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -576,7 +595,7 @@ dependencies = [
[[package]]
name = "srml-timestamp"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -593,7 +612,7 @@ dependencies = [
[[package]]
name = "srml-treasury"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -611,7 +630,7 @@ dependencies = [
[[package]]
name = "srml-upgrade-key"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -635,7 +654,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#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -648,7 +667,7 @@ dependencies = [
[[package]]
name = "substrate-consensus-aura-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -662,7 +681,7 @@ dependencies = [
[[package]]
name = "substrate-finality-grandpa-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
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)",
......@@ -675,19 +694,17 @@ dependencies = [
[[package]]
name = "substrate-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate#f847f59fd713f1553a9602ec10fa33c0cf8d2fef"
source = "git+https://github.com/paritytech/substrate#a456f8f116f4999a5c0d6aac12a52d3a22abdc82"
dependencies = [
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
"hash256-std-hasher 0.9.0 (git+https://github.com/paritytech/trie)",
"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)",
"primitive-types 0.1.4 (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.80 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-std 0.1.0 (git+https://github.com/paritytech/substrate)",
"uint 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
......@@ -738,6 +755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum hash256-std-hasher 0.9.0 (git+https://github.com/paritytech/trie)" = "<none>"
"checksum hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4da5f0e01bd8a71a224a4eedecaacfcabda388dbb7a80faf04d3514287572d95"
"checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a"
"checksum impl-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c88568d828291c50eed30cd7fb9f8e688ad0013620186fa3e777b9f206c79f2"
"checksum integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)" = "<none>"
"checksum integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea155abb3ba6f382a75f1418988c05fe82959ed9ce727de427f9cfd425b0c903"
"checksum mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f2d82b34c7fb11bb41719465c060589e291d505ca4735ea30016a91f6fc79c3b"
......@@ -746,6 +764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
"checksum parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dca389ea5e1632c89b2ce54f7e2b4a8a8c9d278042222a91e0bf95451218cb4c"
"checksum parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa42c2cb493b60b12c75b26e8c94cb734af4df4d7f2cc229dc04c1953dac189"
"checksum primitive-types 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f47c18b4601125931d69fcf7b000c2c16a304e4f84d58218d6470b4502e00b58"
"checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8"
"checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a"
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
......
......@@ -16,7 +16,7 @@
//! Polkadot chain configurations.
use primitives::{H256, AuthorityId, ed25519};
use primitives::{H256, Ed25519AuthorityId as AuthorityId, ed25519};
use polkadot_runtime::{
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, TreasuryConfig,
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill,
......@@ -82,6 +82,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
bonding_duration: 60 * MINUTES,
offline_slash_grace: 4,
minimum_validator_count: 4,
invulnerables: initial_authorities.iter().cloned().map(Into::into).collect(),
}),
democracy: Some(DemocracyConfig {
launch_period: 10 * MINUTES, // 1 day per public referendum
......@@ -184,6 +185,7 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>, upgrade_key: H256) ->
current_offline_slash: 0,
current_session_reward: 0,
offline_slash_grace: 0,
invulnerables: initial_authorities.iter().cloned().map(Into::into).collect(),
}),
democracy: Some(DemocracyConfig {
launch_period: 9,
......
......@@ -179,6 +179,7 @@ construct_service_factory! {
},
link_half,
grandpa::NetworkBridge::new(service.network()),
service.on_exit(),
)?;
executor.spawn(voter);
......@@ -228,6 +229,7 @@ construct_service_factory! {
client,
Arc::new(proposer_factory),
service.network(),
service.on_exit(),
);
executor.spawn(task);
......@@ -273,4 +275,3 @@ construct_service_factory! {
}},
}
}
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