Unverified Commit 32a791ee authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

v0.8.7 (#1222)



* Bump Substrate again.

* update kusama runtmie for ensure origin

* update polkadot runtime for ensure origin

* fix imports

* root only available for runtime benchmarks

* Fix lock file

* Bump Substrate

* Update lock

* Remove questionable feature-gating.
Co-authored-by: Shawn Tabrizi's avatarShawn Tabrizi <shawntabrizi@gmail.com>
parent 3090fb08
Pipeline #96160 canceled with stages
in 12 minutes and 12 seconds
This diff is collapsed.
...@@ -4,7 +4,7 @@ path = "src/main.rs" ...@@ -4,7 +4,7 @@ path = "src/main.rs"
[package] [package]
name = "polkadot" name = "polkadot"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-availability-store" name = "polkadot-availability-store"
description = "Persistent database for parachain data" description = "Persistent database for parachain data"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-cli" name = "polkadot-cli"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot Relay-chain Client Node" description = "Polkadot Relay-chain Client Node"
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-collator" name = "polkadot-collator"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Collator node implementation" description = "Collator node implementation"
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-erasure-coding" name = "polkadot-erasure-coding"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-network" name = "polkadot-network"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot-specific networking protocol" description = "Polkadot-specific networking protocol"
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-network-test" name = "polkadot-network-test"
version = "0.8.7-dev" version = "0.8.7"
license = "GPL-3.0" license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-parachain" name = "polkadot-parachain"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Types and utilities for creating and working with parachains" description = "Types and utilities for creating and working with parachains"
edition = "2018" edition = "2018"
......
[package] [package]
name = "test-parachain-adder" name = "test-parachain-adder"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which adds to a number as its state transition" description = "Test parachain which adds to a number as its state transition"
edition = "2018" edition = "2018"
......
[package] [package]
name = "test-parachain-halt" name = "test-parachain-halt"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which executes forever" description = "Test parachain which executes forever"
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-primitives" name = "polkadot-primitives"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-rpc" name = "polkadot-rpc"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "polkadot-runtime-common" name = "polkadot-runtime-common"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
......
[package] [package]
name = "kusama-runtime" name = "kusama-runtime"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
......
...@@ -56,6 +56,7 @@ use frame_support::{ ...@@ -56,6 +56,7 @@ use frame_support::{
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter, InstanceFilter}, traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter, InstanceFilter},
weights::Weight, weights::Weight,
}; };
use system::{EnsureRoot, EnsureOneOf};
use im_online::sr25519::AuthorityId as ImOnlineId; use im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
...@@ -109,6 +110,12 @@ impl Filter<Call> for BaseFilter { ...@@ -109,6 +110,12 @@ impl Filter<Call> for BaseFilter {
pub struct IsCallable; pub struct IsCallable;
frame_support::impl_filter_stack!(IsCallable, BaseFilter, Call, is_callable); frame_support::impl_filter_stack!(IsCallable, BaseFilter, Call, is_callable);
type MoreThanHalfCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
>;
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
} }
...@@ -293,6 +300,12 @@ parameter_types! { ...@@ -293,6 +300,12 @@ parameter_types! {
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
type SlashCancelOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>
>;
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
type Currency = Balances; type Currency = Balances;
type UnixTime = Timestamp; type UnixTime = Timestamp;
...@@ -304,8 +317,8 @@ impl staking::Trait for Runtime { ...@@ -304,8 +317,8 @@ impl staking::Trait for Runtime {
type SessionsPerEra = SessionsPerEra; type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration; type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration; type SlashDeferDuration = SlashDeferDuration;
// A majority of the council can cancel the slash. // A majority of the council or root can cancel the slash.
type SlashCancelOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>; type SlashCancelOrigin = SlashCancelOrigin;
type SessionInterface = Self; type SessionInterface = Self;
type RewardCurve = RewardCurve; type RewardCurve = RewardCurve;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
...@@ -423,11 +436,11 @@ impl collective::Trait<TechnicalCollective> for Runtime { ...@@ -423,11 +436,11 @@ impl collective::Trait<TechnicalCollective> for Runtime {
impl membership::Trait<membership::Instance1> for Runtime { impl membership::Trait<membership::Instance1> for Runtime {
type Event = Event; type Event = Event;
type AddOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type AddOrigin = MoreThanHalfCouncil;
type RemoveOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RemoveOrigin = MoreThanHalfCouncil;
type SwapOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type SwapOrigin = MoreThanHalfCouncil;
type ResetOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type ResetOrigin = MoreThanHalfCouncil;
type PrimeOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type PrimeOrigin = MoreThanHalfCouncil;
type MembershipInitialized = TechnicalCommittee; type MembershipInitialized = TechnicalCommittee;
type MembershipChanged = TechnicalCommittee; type MembershipChanged = TechnicalCommittee;
} }
...@@ -445,10 +458,16 @@ parameter_types! { ...@@ -445,10 +458,16 @@ parameter_types! {
pub const TipReportDepositPerByte: Balance = 1 * CENTS; pub const TipReportDepositPerByte: Balance = 1 * CENTS;
} }
type ApproveOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>
>;
impl treasury::Trait for Runtime { impl treasury::Trait for Runtime {
type Currency = Balances; type Currency = Balances;
type ApproveOrigin = collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>; type ApproveOrigin = ApproveOrigin;
type RejectOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RejectOrigin = MoreThanHalfCouncil;
type Tippers = ElectionsPhragmen; type Tippers = ElectionsPhragmen;
type TipCountdown = TipCountdown; type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee; type TipFindersFee = TipFindersFee;
...@@ -687,8 +706,8 @@ impl identity::Trait for Runtime { ...@@ -687,8 +706,8 @@ impl identity::Trait for Runtime {
type MaxSubAccounts = MaxSubAccounts; type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields; type MaxAdditionalFields = MaxAdditionalFields;
type MaxRegistrars = MaxRegistrars; type MaxRegistrars = MaxRegistrars;
type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RegistrarOrigin = MoreThanHalfCouncil;
type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type ForceOrigin = MoreThanHalfCouncil;
} }
impl utility::Trait for Runtime { impl utility::Trait for Runtime {
......
[package] [package]
name = "polkadot-runtime" name = "polkadot-runtime"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
......
...@@ -59,6 +59,7 @@ use frame_support::{ ...@@ -59,6 +59,7 @@ use frame_support::{
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter}, traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter},
weights::Weight, weights::Weight,
}; };
use system::{EnsureRoot, EnsureOneOf};
use im_online::sr25519::AuthorityId as ImOnlineId; use im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
...@@ -135,6 +136,12 @@ impl Filter<Call> for BaseFilter { ...@@ -135,6 +136,12 @@ impl Filter<Call> for BaseFilter {
pub struct IsCallable; pub struct IsCallable;
frame_support::impl_filter_stack!(IsCallable, BaseFilter, Call, is_callable); frame_support::impl_filter_stack!(IsCallable, BaseFilter, Call, is_callable);
type MoreThanHalfCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
>;
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
} }
...@@ -313,6 +320,12 @@ parameter_types! { ...@@ -313,6 +320,12 @@ parameter_types! {
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
} }
type SlashCancelOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>
>;
impl staking::Trait for Runtime { impl staking::Trait for Runtime {
type Currency = Balances; type Currency = Balances;
type UnixTime = Timestamp; type UnixTime = Timestamp;
...@@ -325,7 +338,7 @@ impl staking::Trait for Runtime { ...@@ -325,7 +338,7 @@ impl staking::Trait for Runtime {
type BondingDuration = BondingDuration; type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration; type SlashDeferDuration = SlashDeferDuration;
// A super-majority of the council can cancel the slash. // A super-majority of the council can cancel the slash.
type SlashCancelOrigin = collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>; type SlashCancelOrigin = SlashCancelOrigin;
type SessionInterface = Self; type SessionInterface = Self;
type RewardCurve = RewardCurve; type RewardCurve = RewardCurve;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
...@@ -357,8 +370,8 @@ impl identity::Trait for Runtime { ...@@ -357,8 +370,8 @@ impl identity::Trait for Runtime {
type MaxAdditionalFields = MaxAdditionalFields; type MaxAdditionalFields = MaxAdditionalFields;
type MaxRegistrars = MaxRegistrars; type MaxRegistrars = MaxRegistrars;
type Slashed = Treasury; type Slashed = Treasury;
type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type ForceOrigin = MoreThanHalfCouncil;
type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RegistrarOrigin = MoreThanHalfCouncil;
} }
parameter_types! { parameter_types! {
...@@ -468,11 +481,11 @@ impl collective::Trait<TechnicalCollective> for Runtime { ...@@ -468,11 +481,11 @@ impl collective::Trait<TechnicalCollective> for Runtime {
impl membership::Trait<membership::Instance1> for Runtime { impl membership::Trait<membership::Instance1> for Runtime {
type Event = Event; type Event = Event;
type AddOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type AddOrigin = MoreThanHalfCouncil;
type RemoveOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RemoveOrigin = MoreThanHalfCouncil;
type SwapOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type SwapOrigin = MoreThanHalfCouncil;
type ResetOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type ResetOrigin = MoreThanHalfCouncil;
type PrimeOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type PrimeOrigin = MoreThanHalfCouncil;
type MembershipInitialized = TechnicalCommittee; type MembershipInitialized = TechnicalCommittee;
type MembershipChanged = TechnicalCommittee; type MembershipChanged = TechnicalCommittee;
} }
...@@ -490,11 +503,17 @@ parameter_types! { ...@@ -490,11 +503,17 @@ parameter_types! {
pub const TipReportDepositPerByte: Balance = 1 * CENTS; pub const TipReportDepositPerByte: Balance = 1 * CENTS;
} }
type ApproveOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>
>;
impl treasury::Trait for Runtime { impl treasury::Trait for Runtime {
type ModuleId = TreasuryModuleId; type ModuleId = TreasuryModuleId;
type Currency = Balances; type Currency = Balances;
type ApproveOrigin = collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>; type ApproveOrigin = ApproveOrigin;
type RejectOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type RejectOrigin = MoreThanHalfCouncil;
type Tippers = ElectionsPhragmen; type Tippers = ElectionsPhragmen;
type TipCountdown = TipCountdown; type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee; type TipFindersFee = TipFindersFee;
......
[package] [package]
name = "polkadot-test-runtime" name = "polkadot-test-runtime"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
......
[package] [package]
name = "westend-runtime" name = "westend-runtime"
version = "0.8.7-dev" version = "0.8.7"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
......
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