mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Society v2 (#11324)
* New Society * More logic drafting * More work * Building * Some tests * Fixes * Improvements to the voting process * More tests * Test number 20 * Tests * 30 tests * Another test] * All tests enabled * Minor stuff * generate_storage_alias: Rewrite as proc macro attribute This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This makes storage aliases work in migrations for all kind of chains and not just for the ones that use predefined prefixes. * Maintenance operations don't pay fee * Fix compilation and FMT * Moare fixes * Migrations * Fix tests and add migration testing * Introduce lazy-cleanup and avoid unbounded prefix removal * Fixes * Fixes * [WIP][Society] Adding benchmarking to the v2. (#11776) * [Society] Adding benchmarking to the v2. * [Society] Code review. * [Society] Better code. * Using clear() + clear_prefix() and adding more tests. * Benchmarking again... * Fix Cargo * Fixes * Fixes * Spelling * Fix benchmarks * Another fix * Remove println --------- Co-authored-by: Bastian Köcher <info@kchr.de> Co-authored-by: Artur Gontijo <arturgontijo@users.noreply.github.com>
This commit is contained in:
@@ -1398,14 +1398,14 @@ impl pallet_recovery::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CandidateDeposit: Balance = 10 * DOLLARS;
|
||||
pub const WrongSideDeduction: Balance = 2 * DOLLARS;
|
||||
pub const MaxStrikes: u32 = 10;
|
||||
pub const RotationPeriod: BlockNumber = 80 * HOURS;
|
||||
pub const GraceStrikes: u32 = 10;
|
||||
pub const SocietyVotingPeriod: BlockNumber = 80 * HOURS;
|
||||
pub const ClaimPeriod: BlockNumber = 80 * HOURS;
|
||||
pub const PeriodSpend: Balance = 500 * DOLLARS;
|
||||
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
|
||||
pub const ChallengePeriod: BlockNumber = 7 * DAYS;
|
||||
pub const MaxCandidateIntake: u32 = 10;
|
||||
pub const MaxPayouts: u32 = 10;
|
||||
pub const MaxBids: u32 = 10;
|
||||
pub const SocietyPalletId: PalletId = PalletId(*b"py/socie");
|
||||
}
|
||||
|
||||
@@ -1414,18 +1414,17 @@ impl pallet_society::Config for Runtime {
|
||||
type PalletId = SocietyPalletId;
|
||||
type Currency = Balances;
|
||||
type Randomness = RandomnessCollectiveFlip;
|
||||
type CandidateDeposit = CandidateDeposit;
|
||||
type WrongSideDeduction = WrongSideDeduction;
|
||||
type MaxStrikes = MaxStrikes;
|
||||
type GraceStrikes = GraceStrikes;
|
||||
type PeriodSpend = PeriodSpend;
|
||||
type MembershipChanged = ();
|
||||
type RotationPeriod = RotationPeriod;
|
||||
type VotingPeriod = SocietyVotingPeriod;
|
||||
type ClaimPeriod = ClaimPeriod;
|
||||
type MaxLockDuration = MaxLockDuration;
|
||||
type FounderSetOrigin =
|
||||
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>;
|
||||
type SuspensionJudgementOrigin = pallet_society::EnsureFounder<Runtime>;
|
||||
type MaxCandidateIntake = MaxCandidateIntake;
|
||||
type ChallengePeriod = ChallengePeriod;
|
||||
type MaxPayouts = MaxPayouts;
|
||||
type MaxBids = MaxBids;
|
||||
type WeightInfo = pallet_society::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -2048,6 +2047,7 @@ mod benches {
|
||||
[pallet_scheduler, Scheduler]
|
||||
[pallet_glutton, Glutton]
|
||||
[pallet_session, SessionBench::<Runtime>]
|
||||
[pallet_society, Society]
|
||||
[pallet_staking, Staking]
|
||||
[pallet_state_trie_migration, StateTrieMigration]
|
||||
[pallet_sudo, Sudo]
|
||||
|
||||
Reference in New Issue
Block a user