Update to latest Substrate master (#320)

* Make `collator::Network` require `Send + Sync` to make it work

* Update packages

* Update to latest Substrate

* Make it compile and make tests work

* Use `polkadot-master`

* Fix CI

* Remove `build.sh` from readmes

* Delete old stuff

* Bring one back
This commit is contained in:
Bastian Köcher
2019-07-09 16:33:49 +02:00
committed by André Silva
parent d99f721540
commit c0b065837e
28 changed files with 728 additions and 4717 deletions
+25 -11
View File
@@ -21,7 +21,7 @@ use polkadot_primitives::{AccountId, SessionKey};
use polkadot_runtime::{
GenesisConfig, CouncilSeatsConfig, DemocracyConfig, SystemConfig, AuraConfig,
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill, SessionKeys,
GrandpaConfig, SudoConfig, IndicesConfig, CuratedGrandpaConfig, StakerStatus,
GrandpaConfig, SudoConfig, IndicesConfig, CuratedGrandpaConfig, StakerStatus, WASM_BINARY,
};
use telemetry::TelemetryEndpoints;
use hex_literal::hex;
@@ -76,8 +76,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
GenesisConfig {
system: Some(SystemConfig {
// TODO: Change after Substrate 1252 is fixed (https://github.com/paritytech/substrate/issues/1252)
code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(),
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
balances: Some(BalancesConfig {
@@ -93,10 +92,9 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
.collect::<Vec<_>>(),
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().map(|x| x.1.clone()).collect(),
keys: initial_authorities.iter().map(|x| (
x.1.clone(),
SessionKeys(x.2.clone(), x.2.clone()),
SessionKeys { ed25519: x.2.clone() },
)).collect::<Vec<_>>(),
}),
staking: Some(StakingConfig {
@@ -203,8 +201,7 @@ pub fn testnet_genesis(
GenesisConfig {
system: Some(SystemConfig {
// TODO: Change after Substrate 1252 is fixed (https://github.com/paritytech/substrate/issues/1252)
code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(),
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(IndicesConfig {
@@ -215,10 +212,9 @@ pub fn testnet_genesis(
vesting: vec![],
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().map(|x| x.1.clone()).collect(),
keys: initial_authorities.iter().map(|x| (
x.1.clone(),
SessionKeys(x.2.clone(), x.2.clone()),
SessionKeys { ed25519: x.2.clone() },
)).collect::<Vec<_>>(),
}),
staking: Some(StakingConfig {
@@ -277,7 +273,16 @@ fn development_config_genesis() -> GenesisConfig {
/// Development config (single validator Alice)
pub fn development_config() -> ChainSpec {
ChainSpec::from_genesis("Development", "dev", development_config_genesis, vec![], None, Some(DEFAULT_PROTOCOL_ID), None, None)
ChainSpec::from_genesis(
"Development",
"dev",
development_config_genesis,
vec![],
None,
Some(DEFAULT_PROTOCOL_ID),
None,
None,
)
}
fn local_testnet_genesis() -> GenesisConfig {
@@ -293,5 +298,14 @@ fn local_testnet_genesis() -> GenesisConfig {
/// Local testnet config (multivalidator Alice + Bob)
pub fn local_testnet_config() -> ChainSpec {
ChainSpec::from_genesis("Local Testnet", "local_testnet", local_testnet_genesis, vec![], None, Some(DEFAULT_PROTOCOL_ID), None, None)
ChainSpec::from_genesis(
"Local Testnet",
"local_testnet",
local_testnet_genesis,
vec![],
None,
Some(DEFAULT_PROTOCOL_ID),
None,
None,
)
}