Unalias Substrate Imports (#1530)

* cargo.toml updates

* session and system

* more

* more

* more

* more

* more

* fix

* compiles

* fix tests

* fix more tests

* fix mock

* fix deleted space

* Update validation/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update Cargo.lock

* update rococo

* remove unused warning

* update add benchmarks

* rename weight file

* forgot a file

* Update chain_spec.rs

* Revert "remove unused warning"

This reverts commit 4227cd0d1525286fb466dccb817564c9b37f8645.

* fix merge

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-08-04 15:23:33 +02:00
committed by GitHub
parent c01aa8bae8
commit 73f09e5154
54 changed files with 1680 additions and 1690 deletions
+103 -103
View File
@@ -33,7 +33,7 @@ use telemetry::TelemetryEndpoints;
use hex_literal::hex;
use babe_primitives::AuthorityId as BabeId;
use grandpa::AuthorityId as GrandpaId;
use im_online::sr25519::{AuthorityId as ImOnlineId};
use pallet_im_online::sr25519::{AuthorityId as ImOnlineId};
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use pallet_staking::Forcing;
@@ -153,27 +153,27 @@ fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::Gene
const STASH: u128 = 100 * DOTS;
polkadot::GenesisConfig {
system: Some(polkadot::SystemConfig {
frame_system: Some(polkadot::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
balances: Some(polkadot::BalancesConfig {
pallet_balances: Some(polkadot::BalancesConfig {
balances: endowed_accounts.iter()
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
.collect(),
}),
indices: Some(polkadot::IndicesConfig {
pallet_indices: Some(polkadot::IndicesConfig {
indices: vec![],
}),
session: Some(polkadot::SessionConfig {
pallet_session: Some(polkadot::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
polkadot_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(polkadot::StakingConfig {
pallet_staking: Some(polkadot::StakingConfig {
validator_count: 50,
minimum_validator_count: 4,
stakers: initial_authorities
@@ -185,21 +185,21 @@ fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::Gene
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
elections_phragmen: Some(Default::default()),
democracy: Some(Default::default()),
collective_Instance1: Some(polkadot::CouncilConfig {
pallet_elections_phragmen: Some(Default::default()),
pallet_democracy: Some(Default::default()),
pallet_collective_Instance1: Some(polkadot::CouncilConfig {
members: vec![],
phantom: Default::default(),
}),
collective_Instance2: Some(polkadot::TechnicalCommitteeConfig {
pallet_collective_Instance2: Some(polkadot::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
}),
membership_Instance1: Some(Default::default()),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(polkadot::AuthorityDiscoveryConfig {
pallet_membership_Instance1: Some(Default::default()),
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(polkadot::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(polkadot::ParachainsConfig {
@@ -213,7 +213,7 @@ fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::Gene
claims: vec![],
vesting: vec![],
}),
vesting: Some(polkadot::VestingConfig {
pallet_vesting: Some(polkadot::VestingConfig {
vesting: vec![],
}),
}
@@ -305,27 +305,27 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi
const STASH: u128 = 100 * WND;
westend::GenesisConfig {
system: Some(westend::SystemConfig {
frame_system: Some(westend::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
balances: Some(westend::BalancesConfig {
pallet_balances: Some(westend::BalancesConfig {
balances: endowed_accounts.iter()
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
.collect(),
}),
indices: Some(westend::IndicesConfig {
pallet_indices: Some(westend::IndicesConfig {
indices: vec![],
}),
session: Some(westend::SessionConfig {
pallet_session: Some(westend::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
westend_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(westend::StakingConfig {
pallet_staking: Some(westend::StakingConfig {
validator_count: 50,
minimum_validator_count: 4,
stakers: initial_authorities
@@ -337,10 +337,10 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(westend::AuthorityDiscoveryConfig {
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(westend::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(westend::ParachainsConfig {
@@ -350,10 +350,10 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi
parachains: vec![],
_phdata: Default::default(),
}),
vesting: Some(westend::VestingConfig {
pallet_vesting: Some(westend::VestingConfig {
vesting: vec![],
}),
sudo: Some(westend::SudoConfig {
pallet_sudo: Some(westend::SudoConfig {
key: endowed_accounts[0].clone(),
}),
}
@@ -508,30 +508,30 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
const STASH: u128 = 100 * ROC;
rococo_runtime::GenesisConfig {
system: Some(rococo_runtime::SystemConfig {
frame_system: Some(rococo_runtime::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
balances: Some(rococo_runtime::BalancesConfig {
pallet_balances: Some(rococo_runtime::BalancesConfig {
balances: endowed_accounts.iter()
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
.collect(),
}),
indices: Some(rococo_runtime::IndicesConfig {
pallet_indices: Some(rococo_runtime::IndicesConfig {
indices: vec![],
}),
session: Some(rococo_runtime::SessionConfig {
pallet_session: Some(rococo_runtime::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
rococo_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(rococo_runtime::AuthorityDiscoveryConfig {
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(rococo_runtime::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(rococo_runtime::ParachainsConfig {
@@ -541,10 +541,10 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
parachains: vec![],
_phdata: Default::default(),
}),
vesting: Some(rococo_runtime::VestingConfig {
pallet_vesting: Some(rococo_runtime::VestingConfig {
vesting: vec![],
}),
sudo: Some(rococo_runtime::SudoConfig {
pallet_sudo: Some(rococo_runtime::SudoConfig {
key: endowed_accounts[0].clone(),
}),
}
@@ -636,27 +636,27 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
const STASH: u128 = 100 * KSM;
kusama::GenesisConfig {
system: Some(kusama::SystemConfig {
frame_system: Some(kusama::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
balances: Some(kusama::BalancesConfig {
pallet_balances: Some(kusama::BalancesConfig {
balances: endowed_accounts.iter()
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
.collect(),
}),
indices: Some(kusama::IndicesConfig {
pallet_indices: Some(kusama::IndicesConfig {
indices: vec![],
}),
session: Some(kusama::SessionConfig {
pallet_session: Some(kusama::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
kusama_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(kusama::StakingConfig {
pallet_staking: Some(kusama::StakingConfig {
validator_count: 50,
minimum_validator_count: 4,
stakers: initial_authorities
@@ -668,21 +668,21 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
elections_phragmen: Some(Default::default()),
democracy: Some(Default::default()),
collective_Instance1: Some(kusama::CouncilConfig {
pallet_elections_phragmen: Some(Default::default()),
pallet_democracy: Some(Default::default()),
pallet_collective_Instance1: Some(kusama::CouncilConfig {
members: vec![],
phantom: Default::default(),
}),
collective_Instance2: Some(kusama::TechnicalCommitteeConfig {
pallet_collective_Instance2: Some(kusama::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
}),
membership_Instance1: Some(Default::default()),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(kusama::AuthorityDiscoveryConfig {
pallet_membership_Instance1: Some(Default::default()),
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(kusama::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(kusama::ParachainsConfig {
@@ -696,7 +696,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
claims: vec![],
vesting: vec![],
}),
vesting: Some(kusama::VestingConfig {
pallet_vesting: Some(kusama::VestingConfig {
vesting: vec![],
}),
}
@@ -844,24 +844,24 @@ pub fn polkadot_testnet_genesis(
const STASH: u128 = 100 * DOTS;
polkadot::GenesisConfig {
system: Some(polkadot::SystemConfig {
frame_system: Some(polkadot::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(polkadot::IndicesConfig {
pallet_indices: Some(polkadot::IndicesConfig {
indices: vec![],
}),
balances: Some(polkadot::BalancesConfig {
pallet_balances: Some(polkadot::BalancesConfig {
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
}),
session: Some(polkadot::SessionConfig {
pallet_session: Some(polkadot::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
polkadot_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(polkadot::StakingConfig {
pallet_staking: Some(polkadot::StakingConfig {
minimum_validator_count: 1,
validator_count: 2,
stakers: initial_authorities.iter()
@@ -872,21 +872,21 @@ pub fn polkadot_testnet_genesis(
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
elections_phragmen: Some(Default::default()),
democracy: Some(polkadot::DemocracyConfig::default()),
collective_Instance1: Some(polkadot::CouncilConfig {
pallet_elections_phragmen: Some(Default::default()),
pallet_democracy: Some(polkadot::DemocracyConfig::default()),
pallet_collective_Instance1: Some(polkadot::CouncilConfig {
members: vec![],
phantom: Default::default(),
}),
collective_Instance2: Some(polkadot::TechnicalCommitteeConfig {
pallet_collective_Instance2: Some(polkadot::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
}),
membership_Instance1: Some(Default::default()),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(polkadot::AuthorityDiscoveryConfig {
pallet_membership_Instance1: Some(Default::default()),
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(polkadot::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(polkadot::ParachainsConfig {
@@ -900,7 +900,7 @@ pub fn polkadot_testnet_genesis(
claims: vec![],
vesting: vec![],
}),
vesting: Some(polkadot::VestingConfig {
pallet_vesting: Some(polkadot::VestingConfig {
vesting: vec![],
}),
}
@@ -919,24 +919,24 @@ pub fn kusama_testnet_genesis(
const STASH: u128 = 100 * KSM;
kusama::GenesisConfig {
system: Some(kusama::SystemConfig {
frame_system: Some(kusama::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(kusama::IndicesConfig {
pallet_indices: Some(kusama::IndicesConfig {
indices: vec![],
}),
balances: Some(kusama::BalancesConfig {
pallet_balances: Some(kusama::BalancesConfig {
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
}),
session: Some(kusama::SessionConfig {
pallet_session: Some(kusama::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
kusama_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(kusama::StakingConfig {
pallet_staking: Some(kusama::StakingConfig {
minimum_validator_count: 1,
validator_count: 2,
stakers: initial_authorities.iter()
@@ -947,21 +947,21 @@ pub fn kusama_testnet_genesis(
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
elections_phragmen: Some(Default::default()),
democracy: Some(kusama::DemocracyConfig::default()),
collective_Instance1: Some(kusama::CouncilConfig {
pallet_elections_phragmen: Some(Default::default()),
pallet_democracy: Some(kusama::DemocracyConfig::default()),
pallet_collective_Instance1: Some(kusama::CouncilConfig {
members: vec![],
phantom: Default::default(),
}),
collective_Instance2: Some(kusama::TechnicalCommitteeConfig {
pallet_collective_Instance2: Some(kusama::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
}),
membership_Instance1: Some(Default::default()),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(kusama::AuthorityDiscoveryConfig {
pallet_membership_Instance1: Some(Default::default()),
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(kusama::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(kusama::ParachainsConfig {
@@ -975,7 +975,7 @@ pub fn kusama_testnet_genesis(
claims: vec![],
vesting: vec![],
}),
vesting: Some(kusama::VestingConfig {
pallet_vesting: Some(kusama::VestingConfig {
vesting: vec![],
}),
}
@@ -994,24 +994,24 @@ pub fn westend_testnet_genesis(
const STASH: u128 = 100 * DOTS;
westend::GenesisConfig {
system: Some(westend::SystemConfig {
frame_system: Some(westend::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(westend::IndicesConfig {
pallet_indices: Some(westend::IndicesConfig {
indices: vec![],
}),
balances: Some(westend::BalancesConfig {
pallet_balances: Some(westend::BalancesConfig {
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
}),
session: Some(westend::SessionConfig {
pallet_session: Some(westend::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
westend_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
staking: Some(westend::StakingConfig {
pallet_staking: Some(westend::StakingConfig {
minimum_validator_count: 1,
validator_count: 2,
stakers: initial_authorities.iter()
@@ -1022,10 +1022,10 @@ pub fn westend_testnet_genesis(
slash_reward_fraction: Perbill::from_percent(10),
.. Default::default()
}),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(westend::AuthorityDiscoveryConfig {
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(westend::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(westend::ParachainsConfig {
@@ -1035,10 +1035,10 @@ pub fn westend_testnet_genesis(
parachains: vec![],
_phdata: Default::default(),
}),
vesting: Some(westend::VestingConfig {
pallet_vesting: Some(westend::VestingConfig {
vesting: vec![],
}),
sudo: Some(westend::SudoConfig {
pallet_sudo: Some(westend::SudoConfig {
key: root_key,
}),
}
@@ -1056,27 +1056,27 @@ pub fn rococo_testnet_genesis(
const ENDOWMENT: u128 = 1_000_000 * DOTS;
rococo_runtime::GenesisConfig {
system: Some(rococo_runtime::SystemConfig {
frame_system: Some(rococo_runtime::SystemConfig {
code: wasm_binary.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(rococo_runtime::IndicesConfig {
pallet_indices: Some(rococo_runtime::IndicesConfig {
indices: vec![],
}),
balances: Some(rococo_runtime::BalancesConfig {
pallet_balances: Some(rococo_runtime::BalancesConfig {
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
}),
session: Some(rococo_runtime::SessionConfig {
pallet_session: Some(rococo_runtime::SessionConfig {
keys: initial_authorities.iter().map(|x| (
x.0.clone(),
x.0.clone(),
rococo_session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone(), x.6.clone()),
)).collect::<Vec<_>>(),
}),
babe: Some(Default::default()),
grandpa: Some(Default::default()),
im_online: Some(Default::default()),
authority_discovery: Some(rococo_runtime::AuthorityDiscoveryConfig {
pallet_babe: Some(Default::default()),
pallet_grandpa: Some(Default::default()),
pallet_im_online: Some(Default::default()),
pallet_authority_discovery: Some(rococo_runtime::AuthorityDiscoveryConfig {
keys: vec![],
}),
parachains: Some(rococo_runtime::ParachainsConfig {
@@ -1086,10 +1086,10 @@ pub fn rococo_testnet_genesis(
parachains: vec![],
_phdata: Default::default(),
}),
vesting: Some(rococo_runtime::VestingConfig {
pallet_vesting: Some(rococo_runtime::VestingConfig {
vesting: vec![],
}),
sudo: Some(rococo_runtime::SudoConfig {
pallet_sudo: Some(rococo_runtime::SudoConfig {
key: root_key,
}),
}
+2 -2
View File
@@ -31,7 +31,7 @@ pub trait RuntimeApiCollection:
+ grandpa_primitives::GrandpaApi<Block>
+ ParachainHost<Block>
+ sp_block_builder::BlockBuilder<Block>
+ system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ sp_api::Metadata<Block>
+ sp_offchain::OffchainWorkerApi<Block>
@@ -50,7 +50,7 @@ where
+ grandpa_primitives::GrandpaApi<Block>
+ ParachainHost<Block>
+ sp_block_builder::BlockBuilder<Block>
+ system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ sp_api::Metadata<Block>
+ sp_offchain::OffchainWorkerApi<Block>