Companion PR for #5501 and #5680 (#1012)

* Companion PR for #5501

* Bump runtime versions

* add MaxRegistrars config

* Pull substrate master in PR-5501

* Attempt to fix pin commit again

* update to substrate master

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: André Silva <andre.beat@gmail.com>
This commit is contained in:
Wei Tang
2020-04-24 17:39:40 +02:00
committed by GitHub
parent 8151b175bc
commit 5733869389
5 changed files with 144 additions and 139 deletions
+127 -126
View File
File diff suppressed because it is too large Load Diff
+6 -4
View File
@@ -83,7 +83,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1060,
spec_version: 1061,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -641,6 +641,7 @@ parameter_types! {
pub const SubAccountDeposit: Balance = 2 * DOLLARS; // 53 bytes on-chain
pub const MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
pub const MaxRegistrars: u32 = 20;
}
impl identity::Trait for Runtime {
@@ -652,6 +653,7 @@ impl identity::Trait for Runtime {
type SubAccountDeposit = SubAccountDeposit;
type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields;
type MaxRegistrars = MaxRegistrars;
type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}
@@ -934,19 +936,19 @@ sp_api::impl_runtime_apis! {
}
impl babe_primitives::BabeApi<Block> for Runtime {
fn configuration() -> babe_primitives::BabeConfiguration {
fn configuration() -> babe_primitives::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
babe_primitives::BabeConfiguration {
babe_primitives::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: PRIMARY_PROBABILITY,
genesis_authorities: Babe::authorities(),
randomness: Babe::randomness(),
secondary_slots: true,
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryPlainSlots,
}
}
+3 -3
View File
@@ -851,19 +851,19 @@ sp_api::impl_runtime_apis! {
}
impl babe_primitives::BabeApi<Block> for Runtime {
fn configuration() -> babe_primitives::BabeConfiguration {
fn configuration() -> babe_primitives::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
babe_primitives::BabeConfiguration {
babe_primitives::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: PRIMARY_PROBABILITY,
genesis_authorities: Babe::authorities(),
randomness: Babe::randomness(),
secondary_slots: true,
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryPlainSlots,
}
}
+3 -3
View File
@@ -646,19 +646,19 @@ sp_api::impl_runtime_apis! {
}
impl babe_primitives::BabeApi<Block> for Runtime {
fn configuration() -> babe_primitives::BabeConfiguration {
fn configuration() -> babe_primitives::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
babe_primitives::BabeConfiguration {
babe_primitives::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: PRIMARY_PROBABILITY,
genesis_authorities: Babe::authorities(),
randomness: Babe::randomness(),
secondary_slots: true,
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryPlainSlots,
}
}
+5 -3
View File
@@ -483,6 +483,7 @@ parameter_types! {
pub const SubAccountDeposit: Balance = 2 * DOLLARS; // 53 bytes on-chain
pub const MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
pub const MaxRegistrars: u32 = 20;
}
impl identity::Trait for Runtime {
@@ -494,6 +495,7 @@ impl identity::Trait for Runtime {
type SubAccountDeposit = SubAccountDeposit;
type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields;
type MaxRegistrars = MaxRegistrars;
type RegistrarOrigin = system::EnsureRoot<AccountId>;
type ForceOrigin = system::EnsureRoot<AccountId>;
}
@@ -741,19 +743,19 @@ sp_api::impl_runtime_apis! {
}
impl babe_primitives::BabeApi<Block> for Runtime {
fn configuration() -> babe_primitives::BabeConfiguration {
fn configuration() -> babe_primitives::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
babe_primitives::BabeConfiguration {
babe_primitives::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: PRIMARY_PROBABILITY,
genesis_authorities: Babe::authorities(),
randomness: Babe::randomness(),
secondary_slots: true,
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryPlainSlots,
}
}