Unverified Commit 48df308e authored by Squirrel's avatar Squirrel
Browse files

Merge branch 'master' into giles-remove-light-client

parents 9ae4995c 666e67d2
Pipeline #163153 passed with stages
in 39 minutes and 37 seconds
......@@ -10168,9 +10168,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "structopt"
version = "0.3.23"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf9d950ef167e25e0bdb073cf1d68e9ad2795ac826f2f3f59647817cf23c0bfa"
checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c"
dependencies = [
"clap",
"lazy_static",
......@@ -10179,9 +10179,9 @@ dependencies = [
[[package]]
name = "structopt-derive"
version = "0.4.16"
version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0ba"
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
dependencies = [
"heck",
"proc-macro-error 1.0.4",
......
......@@ -16,7 +16,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
log = "0.4.13"
thiserror = "1.0.30"
structopt = { version = "0.3.23", optional = true }
structopt = { version = "0.3.25", optional = true }
futures = "0.3.17"
service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true }
......
......@@ -25,7 +25,7 @@ polkadot-node-core-pvf = { path = "../core/pvf" }
parity-util-mem = { version = "0.10.0", default-features = false, features = ["jemalloc-global"] }
color-eyre = { version = "0.5.11", default-features = false }
assert_matches = "1.5"
structopt = "0.3.23"
structopt = "0.3.25"
async-trait = "0.1.51"
[dev-dependencies]
......
......@@ -33,7 +33,7 @@ polkadot-runtime = { path = "../../../../runtime/polkadot" }
polkadot-runtime-common = { path = "../../../../runtime/common" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
structopt = "0.3.23"
structopt = "0.3.25"
[dev-dependencies]
log = "0.4.14"
......@@ -18,7 +18,7 @@ parity-scale-codec = { version = "2.3.1", default-features = false, features = [
futures = "0.3.17"
futures-timer = "3.0.2"
log = "0.4.13"
structopt = "0.3.23"
structopt = "0.3.25"
test-parachain-adder = { path = ".." }
polkadot-primitives = { path = "../../../../primitives" }
......
......@@ -51,7 +51,6 @@ use frame_support::{
construct_runtime, parameter_types,
traits::{
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing,
OnRuntimeUpgrade,
},
weights::Weight,
PalletId, RuntimeDebug,
......@@ -1557,186 +1556,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
(
CouncilStoragePrefixMigration,
TechnicalCommitteeStoragePrefixMigration,
TechnicalMembershipStoragePrefixMigration,
MigrateTipsPalletPrefix,
BountiesPrefixMigration,
StakingBagsListMigrationV8,
),
(),
>;
/// The payload being signed in the transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
const BOUNTIES_OLD_PREFIX: &str = "Treasury";
/// Migrate from 'Treasury' to the new prefix 'Bounties'
pub struct BountiesPrefixMigration;
impl OnRuntimeUpgrade for BountiesPrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::migrate::<Runtime, Bounties, _>(BOUNTIES_OLD_PREFIX, name)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::pre_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::post_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}
}
const COUNCIL_OLD_PREFIX: &str = "Instance1Collective";
/// Migrate from `Instance1Collective` to the new pallet prefix `Council`
pub struct CouncilStoragePrefixMigration;
impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, Council, _>(COUNCIL_OLD_PREFIX)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}
}
const TECHNICAL_COMMITTEE_OLD_PREFIX: &str = "Instance2Collective";
/// Migrate from `Instance2Collective` to the new pallet prefix `TechnicalCommittee`
pub struct TechnicalCommitteeStoragePrefixMigration;
impl OnRuntimeUpgrade for TechnicalCommitteeStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}
}
const TECHNICAL_MEMBERSHIP_OLD_PREFIX: &str = "Instance1Membership";
/// Migrate from `Instance1Membership` to the new pallet prefix `TechnicalMembership`
pub struct TechnicalMembershipStoragePrefixMigration;
impl OnRuntimeUpgrade for TechnicalMembershipStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::migrate::<Runtime, TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::pre_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::post_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}
}
const TIPS_OLD_PREFIX: &str = "Treasury";
/// Migrate pallet-tips from `Treasury` to the new pallet prefix `Tips`
pub struct MigrateTipsPalletPrefix;
impl OnRuntimeUpgrade for MigrateTipsPalletPrefix {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_tips::migrations::v4::migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_tips::migrations::v4::pre_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_tips::migrations::v4::post_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
Ok(())
}
}
// Migration to generate pallet staking's `SortedListProvider` from pre-existing nominators.
pub struct StakingBagsListMigrationV8;
impl OnRuntimeUpgrade for StakingBagsListMigrationV8 {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_staking::migrations::v8::migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::pre_migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::post_migrate::<Runtime>()
}
}
#[cfg(not(feature = "disable-runtime-api"))]
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
......
......@@ -1352,146 +1352,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
(
SetInitialHostConfiguration,
BountiesPrefixMigration,
CouncilStoragePrefixMigration,
TechnicalCommitteeStoragePrefixMigration,
TechnicalMembershipStoragePrefixMigration,
MigrateTipsPalletPrefix,
),
(),
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
const BOUNTIES_OLD_PREFIX: &str = "Treasury";
/// Migrate from 'Treasury' to the new prefix 'Bounties'
pub struct BountiesPrefixMigration;
impl OnRuntimeUpgrade for BountiesPrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::migrate::<Runtime, Bounties, _>(BOUNTIES_OLD_PREFIX, name)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::pre_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::post_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}
}
const COUNCIL_OLD_PREFIX: &str = "Instance1Collective";
/// Migrate from `Instance1Collective` to the new pallet prefix `Council`
pub struct CouncilStoragePrefixMigration;
impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, Council, _>(COUNCIL_OLD_PREFIX)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}
}
const TECHNICAL_COMMITTEE_OLD_PREFIX: &str = "Instance2Collective";
/// Migrate from `Instance2Collective` to the new pallet prefix `TechnicalCommittee`
pub struct TechnicalCommitteeStoragePrefixMigration;
impl OnRuntimeUpgrade for TechnicalCommitteeStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}
}
const TECHNICAL_MEMBERSHIP_OLD_PREFIX: &str = "Instance1Membership";
/// Migrate from `Instance1Membership` to the new pallet prefix `TechnicalMembership`
pub struct TechnicalMembershipStoragePrefixMigration;
impl OnRuntimeUpgrade for TechnicalMembershipStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnialMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::migrate::<Runtime, TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::pre_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::post_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}
}
/// Set the initial host configuration for Polkadot.
pub struct SetInitialHostConfiguration;
impl OnRuntimeUpgrade for SetInitialHostConfiguration {
......
......@@ -20,7 +20,6 @@
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
use frame_support::traits::OnRuntimeUpgrade;
use pallet_transaction_payment::CurrencyAdapter;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use primitives::v1::{
......@@ -1135,30 +1134,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
(StakingBagsListMigrationV8,),
(),
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
// Migration to generate pallet staking's `SortedListProvider` from pre-existing nominators.
pub struct StakingBagsListMigrationV8;
impl OnRuntimeUpgrade for StakingBagsListMigrationV8 {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_staking::migrations::v8::migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::pre_migrate::<Runtime>()
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::post_migrate::<Runtime>()
}
}
#[cfg(not(feature = "disable-runtime-api"))]
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
......
......@@ -21,4 +21,4 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "mas
remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" }
tokio = { version = "1", features = ["macros"] }
log = { version = "0.4.14" }
structopt = {version = "0.3.23" }
structopt = {version = "0.3.25" }
......@@ -9,7 +9,7 @@ codec = { package = "parity-scale-codec", version = "2.0.0" }
tokio = { version = "1.12", features = ["macros"] }
log = "0.4.11"
env_logger = "0.9.0"
structopt = "0.3.23"
structopt = "0.3.25"
jsonrpsee-ws-client = { version = "0.3.1", default-features = false, features = ["tokio1"] }
serde_json = "1.0"
serde = "1.0.130"
......
......@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
generate-bags = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" }
structopt = "0.3.21"
structopt = "0.3.25"
westend-runtime = { path = "../../runtime/westend" }
kusama-runtime = { path = "../../runtime/kusama" }
......
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