Runtime: Kusama gets Society v2 (#7356)

* Remove println

* Kusama gets the new society

* Integrate migration

* Formatting

* Add Society weights

* Remive diener

* Fixes

* Update Cargo.toml

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Add real historical payment info for Society.

* Fixes

* Bump Substrate

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
Gavin Wood
2023-06-18 18:54:31 +02:00
committed by GitHub
parent ced77b3d30
commit a846d00866
12 changed files with 972 additions and 265 deletions
+16 -19
View File
@@ -105,6 +105,9 @@ mod weights;
// Voter bag threshold definitions.
mod bag_thresholds;
// Historical information of society finances.
mod past_payouts;
// XCM configurations.
pub mod xcm_config;
@@ -863,14 +866,6 @@ impl pallet_recovery::Config for Runtime {
}
parameter_types! {
pub const CandidateDeposit: Balance = 10 * QUID;
pub const WrongSideDeduction: Balance = 2 * QUID;
pub const MaxStrikes: u32 = 10;
pub const RotationPeriod: BlockNumber = 7 * DAYS;
pub const PeriodSpend: Balance = 500 * QUID;
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
pub const ChallengePeriod: BlockNumber = 7 * DAYS;
pub const MaxCandidateIntake: u32 = 1;
pub const SocietyPalletId: PalletId = PalletId(*b"py/socie");
}
@@ -878,18 +873,17 @@ impl pallet_society::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
type CandidateDeposit = CandidateDeposit;
type WrongSideDeduction = WrongSideDeduction;
type MaxStrikes = MaxStrikes;
type PeriodSpend = PeriodSpend;
type MembershipChanged = ();
type RotationPeriod = RotationPeriod;
type MaxLockDuration = MaxLockDuration;
type GraceStrikes = ConstU32<10>;
type PeriodSpend = ConstU128<{ 500 * QUID }>;
type VotingPeriod = ConstU32<{ 5 * DAYS }>;
type ClaimPeriod = ConstU32<{ 2 * DAYS }>;
type MaxLockDuration = ConstU32<{ 36 * 30 * DAYS }>;
type FounderSetOrigin = EnsureRoot<AccountId>;
type SuspensionJudgementOrigin = pallet_society::EnsureFounder<Runtime>;
type ChallengePeriod = ChallengePeriod;
type MaxCandidateIntake = MaxCandidateIntake;
type ChallengePeriod = ConstU32<{ 7 * DAYS }>;
type MaxPayouts = ConstU32<8>;
type MaxBids = ConstU32<512>;
type PalletId = SocietyPalletId;
type WeightInfo = weights::pallet_society::WeightInfo<Runtime>;
}
parameter_types! {
@@ -1529,6 +1523,7 @@ pub mod migrations {
pallet_offences::migration::v1::MigrateToV1<Runtime>,
runtime_common::session::migration::ClearOldSessionStorage<Runtime>,
);
pub type V0943 = (
SetStorageVersions,
// Remove UMP dispatch queue <https://github.com/paritytech/polkadot/pull/6271>
@@ -1537,7 +1532,8 @@ pub mod migrations {
);
/// Unreleased migrations. Add new ones here:
pub type Unreleased = ();
pub type Unreleased =
(pallet_society::migrations::MigrateToV2<Runtime, (), past_payouts::PastPayouts>,);
/// Migrations that set `StorageVersion`s we missed to set.
pub struct SetStorageVersions;
@@ -1641,6 +1637,7 @@ mod benches {
[pallet_referenda, FellowshipReferenda]
[pallet_scheduler, Scheduler]
[pallet_session, SessionBench::<Runtime>]
[pallet_society, Society]
[pallet_staking, Staking]
[frame_system, SystemBench::<Runtime>]
[pallet_timestamp, Timestamp]