Skip to content

Commit

Permalink
collator selection config optim (#730)
Browse files Browse the repository at this point in the history
* lower min candidates to 3

* allow supermajority of tech comm to take special collator selection actions

* fix clippy
  • Loading branch information
ETeissonniere committed May 8, 2023
1 parent 49e6999 commit 2318bb9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions runtimes/eden/src/pallets_consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use crate::{constants, Aura, Balances, CollatorSelection, Runtime, RuntimeEvent, Session};
use crate::{
constants, pallets_governance::EnsureRootOrMoreThanHalfOfTechComm, Aura, Balances, CollatorSelection, Runtime,
RuntimeEvent, Session,
};
use frame_support::{parameter_types, PalletId};
use frame_system::EnsureRoot;
use primitives::{AccountId, AuraId};
use sp_runtime::impl_opaque_keys;
use sp_std::prelude::*;
Expand Down Expand Up @@ -72,17 +74,14 @@ impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const PotId: PalletId = PalletId(*b"PotStake");
pub const MaxCandidates: u32 = 1000;
pub const MinCandidates: u32 = 5;
pub const MinCandidates: u32 = 3;
pub const MaxInvulnerables: u32 = 50;
}

// We allow root only to execute privileged collator selection operations.
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;

impl pallet_collator_selection::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type UpdateOrigin = CollatorSelectionUpdateOrigin;
type UpdateOrigin = EnsureRootOrMoreThanHalfOfTechComm;
type PotId = PotId;
type MaxCandidates = MaxCandidates;
type MinCandidates = MinCandidates;
Expand Down

0 comments on commit 2318bb9

Please sign in to comment.