From cd4d6cb0670e99edbf34b2b5cdf4b827fd581eab Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 14:01:50 +0530 Subject: [PATCH 1/6] Install governance and other primitives on parachain --- Cargo.lock | 6 + runtimes/parachain/Cargo.toml | 11 ++ runtimes/parachain/src/constants.rs | 4 + runtimes/parachain/src/lib.rs | 230 +++++++++++++++++++++++++++- 4 files changed, 248 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1303dbbf7..853974544 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7573,6 +7573,11 @@ dependencies = [ "pallet-bags-list", "pallet-balances", "pallet-collator-selection", + "pallet-collective", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-preimage", + "pallet-scheduler", "pallet-session", "pallet-sudo", "pallet-timestamp", @@ -7602,6 +7607,7 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "static_assertions", "substrate-wasm-builder", "thea", "thea-council", diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml index 02d4a8c1c..6a164356d 100644 --- a/runtimes/parachain/Cargo.toml +++ b/runtimes/parachain/Cargo.toml @@ -20,6 +20,7 @@ hex-literal = { workspace = true, optional = true } log = { workspace = true, default-features = false } scale-info = { workspace = true, default-features = false, features = ["derive"] } smallvec = { workspace = true } +static_assertions = {workspace = true} # Substrate frame-benchmarking = { workspace = true, default-features = false, optional = true } @@ -36,7 +37,12 @@ pallet-balances = { workspace = true, default-features = false } pallet-bags-list = { workspace = true, default-features = false, optional = true } pallet-session = { workspace = true, default-features = false } pallet-sudo = { workspace = true, default-features = false } +pallet-democracy = { workspace = true, default-features = false } +pallet-collective = { workspace = true, default-features = false } pallet-timestamp = { workspace = true, default-features = false } +pallet-elections-phragmen = { workspace = true, default-features = false } +pallet-scheduler = { workspace = true, default-features = false } +pallet-preimage = { workspace = true, default-features = false } pallet-transaction-payment = { workspace = true, default-features = false } pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = false } sp-api = { workspace = true, default-features = false } @@ -113,6 +119,11 @@ std = [ "pallet-collator-selection/std", "pallet-session/std", "pallet-sudo/std", + "pallet-democracy/std", + "pallet-collective/std", + "pallet-elections-phragmen/std", + "pallet-scheduler/std", + "pallet-preimage/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", diff --git a/runtimes/parachain/src/constants.rs b/runtimes/parachain/src/constants.rs index 574c3d5b7..b571cbe86 100644 --- a/runtimes/parachain/src/constants.rs +++ b/runtimes/parachain/src/constants.rs @@ -18,4 +18,8 @@ pub mod currency { pub const PDEX: Balance = 1_000_000_000_000; pub const DOLLARS: Balance = PDEX; // 1_000_000_000_000 pub const CENTS: Balance = DOLLARS / 100; // 10_000_000_000 + + pub const fn deposit(items: u32, bytes: u32) -> polkadex_primitives::Balance { + items as polkadex_primitives::Balance * 15 * CENTS + (bytes as polkadex_primitives::Balance) * 6 * CENTS + } } diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index 1fb5ee714..e1ba7fbca 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -10,7 +10,7 @@ mod constants; mod weights; pub mod xcm_config; -use crate::constants::currency::{CENTS, DOLLARS}; +use crate::constants::currency::{CENTS, deposit, DOLLARS}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use frame_support::{ construct_runtime, @@ -258,6 +258,7 @@ parameter_types! { .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) .build_or_panic(); pub const SS58Prefix: u16 = 89; + pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; } // Configure FRAME pallets to include in polkadex-parachain. @@ -562,6 +563,222 @@ impl thea_message_handler::Config for Runtime { type WeightInfo = thea_message_handler::weights::WeightInfo; } + +parameter_types! { + pub const PreimageMaxSize: u32 = 4096 * 1024; + pub const PreimageBaseDeposit: Balance = DOLLARS; + // One cent: PDEX 10,000 / MB + pub const PreimageByteDeposit: Balance = CENTS; +} + +impl pallet_preimage::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = pallet_preimage::weights::SubstrateWeight; + type Currency = Balances; + type ManagerOrigin = EnsureRoot; + type BaseDeposit = PreimageBaseDeposit; + type ByteDeposit = PreimageByteDeposit; +} + +parameter_types! { + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + RuntimeBlockWeights::get().max_block; + pub const MaxScheduledPerBlock: u32 = 50; + // Retry a scheduled item every 10 blocks (1 minute) until the preimage exists. + pub const NoPreimagePostponement: Option = Some(10); +} + +impl pallet_scheduler::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + type ScheduleOrigin = EnsureRoot; + type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type Preimages = Preimage; +} +use crate::constants::currency::PDEX; +parameter_types! { + // When proposals are moved to public voting + pub const LaunchPeriod: BlockNumber = 15 * DAYS; + // How long voting should last + pub const VotingPeriod: BlockNumber = 15 * DAYS; + // Fast track voting for techincal council + pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS; + // Minimum deposit for creating a proposal + pub MinimumDeposit: Balance = 100 * PDEX; + // Time between approved proposals are executed on-chain + // EnactmentPeriod > unbonding period of staking + pub const EnactmentPeriod: BlockNumber = 30 * DAYS; + // Minimum period of vote locking + // Note: VoteLockingPeriod >= EnactmentPeriod + pub const VoteLockingPeriod: BlockNumber = 30 * DAYS; + // Cool-off period before a vetoed proposal can be submitted back again + pub const CooloffPeriod: BlockNumber = 28 * DAYS; + pub const InstantAllowed: bool = true; + pub const MaxVotes: u32 = 100; + pub const MaxProposals: u32 = 100; + +} +use frame_support::traits::EitherOfDiverse; +use frame_support::traits::LockIdentifier; +use sp_staking::currency_to_vote::U128CurrencyToVote; +impl pallet_democracy::Config for Runtime { + type WeightInfo = pallet_democracy::weights::SubstrateWeight; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Preimages = Preimage; + type Currency = Balances; + type EnactmentPeriod = EnactmentPeriod; + type LaunchPeriod = LaunchPeriod; + type VotingPeriod = VotingPeriod; + type VoteLockingPeriod = VoteLockingPeriod; + type MinimumDeposit = MinimumDeposit; + type InstantAllowed = InstantAllowed; + type FastTrackVotingPeriod = FastTrackVotingPeriod; + type CooloffPeriod = CooloffPeriod; + type MaxVotes = MaxVotes; + type MaxProposals = MaxProposals; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; + /// A straight majority of the council can decide what their next motion is. + type ExternalOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + /// A majority can have the next scheduled referendum be a straight majority-carries vote. + type ExternalMajorityOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + /// A unanimous council can have the next scheduled referendum be a straight default-carries + /// (NTB) vote. + type ExternalDefaultOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + type SubmitOrigin = EnsureSigned; + /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote + /// be tabled immediately and with a shorter voting/enactment period. + type FastTrackOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + type InstantOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + // To cancel a proposal which has been passed, 2/3 of the council must agree to it. + type CancellationOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + type BlacklistOrigin = EnsureRoot; + // To cancel a proposal before it has been passed, the technical committee must be unanimous or + // Root must agree. + type CancelProposalOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + // Any single technical committee member or root origin may veto a coming council proposal, + // however they can only do it once and it lasts only for the cooloff period. + // NOTE: Technical Council cannot be greater than MAX_VETOERS + type VetoOrigin = pallet_collective::EnsureMember; + type PalletsOrigin = OriginCaller; + type Slash = (); +} + +parameter_types! { + pub const CandidacyBond: Balance = 100 * PDEX; + // 1 storage item created, key size is 32 bytes, value size is 16+16. + pub const VotingBondBase: Balance = deposit(1, 64); + // additional data per vote is 32 bytes (account id). + pub const VotingBondFactor: Balance = deposit(0, 32); + pub const TermDuration: BlockNumber = 7 * DAYS; + pub const DesiredMembers: u32 = 5; + pub const DesiredRunnersUp: u32 = 5; + pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; + pub const MaxVoters: u32 = 10*1000; + pub const MaxVotesPerVoter: u32 = 16; +} + +// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen. +static_assertions::const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); + +impl pallet_elections_phragmen::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type PalletId = ElectionsPhragmenPalletId; + type Currency = Balances; + type ChangeMembers = Council; + // NOTE: this implies that council's genesis members cannot be set directly and must come from + // this module. + type InitializeMembers = Council; + type CurrencyToVote = U128CurrencyToVote; + type CandidacyBond = CandidacyBond; + type VotingBondBase = VotingBondBase; + type VotingBondFactor = VotingBondFactor; + type LoserCandidate = (); + type KickedMember = (); + type DesiredMembers = DesiredMembers; + type DesiredRunnersUp = DesiredRunnersUp; + type TermDuration = TermDuration; + type MaxCandidates = MaxCandidates; + type MaxVoters = MaxVoters; + type MaxVotesPerVoter = MaxVotesPerVoter; + type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; +} + +parameter_types! { + pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; +} + + +type CouncilCollective = pallet_collective::Instance1; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + + +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +type EnsureRootOrHalfCouncil = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionMoreThan, +>; + +type TechnicalCollective = pallet_collective::Instance2; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type SetMembersOrigin = EnsureRootOrHalfCouncil; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + + // Create the polkadex-parachain by composing the FRAME pallets that were previously configured. construct_runtime!( pub struct Runtime { @@ -596,7 +813,14 @@ construct_runtime!( Sudo: pallet_sudo = 45, // Thea Pallet - TheaMessageHandler: thea_message_handler = 46 + TheaMessageHandler: thea_message_handler = 46, + + Elections: pallet_elections_phragmen = 47, + Council: pallet_collective:: = 48, + TechnicalCommittee: pallet_collective:: = 49, + Preimage: pallet_preimage = 50, + Scheduler: pallet_scheduler = 51, + Democracy: pallet_democracy = 52, } ); @@ -755,7 +979,7 @@ impl_runtime_apis! { } } - #[cfg(feature = "try-polkadex-parachain")] + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { log::info!("try-polkadex-parachain::on_runtime_upgrade parachain-polkadex."); From bed3e686ac49f51d7c9d55402cc329f6c175bd15 Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 14:04:34 +0530 Subject: [PATCH 2/6] cargo fmt --- runtimes/parachain/src/constants.rs | 3 ++- runtimes/parachain/src/lib.rs | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/runtimes/parachain/src/constants.rs b/runtimes/parachain/src/constants.rs index b571cbe86..01b701ef1 100644 --- a/runtimes/parachain/src/constants.rs +++ b/runtimes/parachain/src/constants.rs @@ -20,6 +20,7 @@ pub mod currency { pub const CENTS: Balance = DOLLARS / 100; // 10_000_000_000 pub const fn deposit(items: u32, bytes: u32) -> polkadex_primitives::Balance { - items as polkadex_primitives::Balance * 15 * CENTS + (bytes as polkadex_primitives::Balance) * 6 * CENTS + items as polkadex_primitives::Balance * 15 * CENTS + + (bytes as polkadex_primitives::Balance) * 6 * CENTS } } diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index e1ba7fbca..634da4b95 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -10,7 +10,7 @@ mod constants; mod weights; pub mod xcm_config; -use crate::constants::currency::{CENTS, deposit, DOLLARS}; +use crate::constants::currency::{deposit, CENTS, DOLLARS}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use frame_support::{ construct_runtime, @@ -563,7 +563,6 @@ impl thea_message_handler::Config for Runtime { type WeightInfo = thea_message_handler::weights::WeightInfo; } - parameter_types! { pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = DOLLARS; @@ -737,7 +736,6 @@ parameter_types! { pub const CouncilMaxMembers: u32 = 100; } - type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; @@ -752,7 +750,6 @@ impl pallet_collective::Config for Runtime { type MaxProposalWeight = MaxCollectivesProposalWeight; } - parameter_types! { pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; pub const TechnicalMaxProposals: u32 = 100; @@ -778,7 +775,6 @@ impl pallet_collective::Config for Runtime { type MaxProposalWeight = MaxCollectivesProposalWeight; } - // Create the polkadex-parachain by composing the FRAME pallets that were previously configured. construct_runtime!( pub struct Runtime { From 47de7d8639a8cc8893e6e05ead1d94c085e0e121 Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 14:05:17 +0530 Subject: [PATCH 3/6] Increase spec version --- runtimes/parachain/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index 634da4b95..a3d83a00a 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -179,7 +179,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadex-parachain"), impl_name: create_runtime_str!("polkadex-parachain"), authoring_version: 1, - spec_version: 16, + spec_version: 17, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 73fc7cd807bcaf35de9f39b0f2a20b1a0f41c030 Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 14:31:03 +0530 Subject: [PATCH 4/6] Increase spec version --- pallets/thea/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/thea/src/lib.rs b/pallets/thea/src/lib.rs index 974a59710..5ae109e11 100644 --- a/pallets/thea/src/lib.rs +++ b/pallets/thea/src/lib.rs @@ -382,6 +382,7 @@ pub mod pallet { stake: Balance, ) -> DispatchResult { let signer = ensure_signed(origin)?; + // Testing relayer must be removed after final audit let expected_signer = >::get(payload.network) .ok_or(Error::::NoRelayersFound)?; ensure!(signer == expected_signer, Error::::NotAnAllowlistedRelayer); From f301b065b4a2abfe2b411451bda1938e6fe91e1f Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 14:31:33 +0530 Subject: [PATCH 5/6] Increase spec version --- runtimes/mainnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 3c032444f..a0cbbe9ea 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -122,7 +122,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 370, + spec_version: 371, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, From 783e46694e39ff26d4194088b795ddf15a8f5c70 Mon Sep 17 00:00:00 2001 From: gautham Date: Mon, 12 Aug 2024 15:00:02 +0530 Subject: [PATCH 6/6] Fix CI --- nodes/parachain/src/chain_spec.rs | 4 ++++ polkadex-xcm-simulator/Cargo.toml | 10 ++++++++++ primitives/bls/Cargo.toml | 1 + runtimes/parachain/Cargo.toml | 15 +++++++++++++++ runtimes/parachain/src/lib.rs | 6 +++--- 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/nodes/parachain/src/chain_spec.rs b/nodes/parachain/src/chain_spec.rs index 841707f2f..1a01f6a60 100644 --- a/nodes/parachain/src/chain_spec.rs +++ b/nodes/parachain/src/chain_spec.rs @@ -251,8 +251,12 @@ fn create_genesis_config( ..Default::default() }, sudo: parachain_polkadex_runtime::SudoConfig { key: Some(root_key) }, + elections: Default::default(), + council: Default::default(), + technical_committee: Default::default(), assets: Default::default(), transaction_payment: Default::default(), + democracy: Default::default(), } } diff --git a/polkadex-xcm-simulator/Cargo.toml b/polkadex-xcm-simulator/Cargo.toml index a6b630800..bd46bf6e8 100644 --- a/polkadex-xcm-simulator/Cargo.toml +++ b/polkadex-xcm-simulator/Cargo.toml @@ -61,3 +61,13 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", ] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-uniques/try-runtime", + "pallet-xcm/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/primitives/bls/Cargo.toml b/primitives/bls/Cargo.toml index 872e9c0be..233fb1a8c 100644 --- a/primitives/bls/Cargo.toml +++ b/primitives/bls/Cargo.toml @@ -52,3 +52,4 @@ std = [ "tiny-bip39", "blst", ] +parachain = [] diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml index 6a164356d..0559face1 100644 --- a/runtimes/parachain/Cargo.toml +++ b/runtimes/parachain/Cargo.toml @@ -174,6 +174,13 @@ runtime-benchmarks = [ "thea-council/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", + + + "pallet-collective/runtime-benchmarks", + "pallet-democracy/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-elections-phragmen/runtime-benchmarks", ] try-runtime = [ @@ -194,6 +201,14 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-session/try-runtime", "pallet-sudo/try-runtime", + + "pallet-collective/try-runtime", + "pallet-democracy/try-runtime", + "pallet-preimage/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-elections-phragmen/try-runtime", + + "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-xcm/try-runtime", diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index a3d83a00a..2a1aae4cc 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -179,7 +179,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadex-parachain"), impl_name: create_runtime_str!("polkadex-parachain"), authoring_version: 1, - spec_version: 17, + spec_version: 18, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -437,7 +437,7 @@ impl pallet_aura::Config for Runtime { parameter_types! { pub const PotId: PalletId = PalletId(*b"PotStake"); - pub const MaxCandidates: u32 = 1000; + pub const MaxCandidates: u32 = 100; pub const MinCandidates: u32 = 5; pub const SessionLength: BlockNumber = 6 * HOURS; pub const MaxInvulnerables: u32 = 100; @@ -700,7 +700,7 @@ parameter_types! { pub const DesiredMembers: u32 = 5; pub const DesiredRunnersUp: u32 = 5; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; - pub const MaxVoters: u32 = 10*1000; + pub const MaxVoters: u32 = 10*100; pub const MaxVotesPerVoter: u32 = 16; }