Skip to content

Commit

Permalink
remove pallet_membership (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
frank0528 authored Oct 10, 2024
1 parent 9745533 commit 5b7c2ba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 44 deletions.
18 changes: 0 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ pub fn dev_testnet_genesis(
im_online: ImOnlineConfig { keys: vec![] },
authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },
grandpa: GrandpaConfig { authorities: vec![] },
technical_membership: Default::default(),
treasury: Default::default(),
// vesting: Default::default(),
assets: pallet_assets::GenesisConfig {
Expand Down Expand Up @@ -524,7 +523,6 @@ pub fn testnet_genesis(
im_online: ImOnlineConfig { keys: vec![] },
authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },
grandpa: GrandpaConfig { authorities: vec![] },
technical_membership: Default::default(),
treasury: Default::default(),
// vesting: Default::default(),
assets: Default::default(),
Expand Down Expand Up @@ -807,7 +805,6 @@ pub fn mainnet_genesis(
im_online: ImOnlineConfig { keys: vec![] },
authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },
grandpa: GrandpaConfig { authorities: vec![] },
technical_membership: Default::default(),
treasury: Default::default(),
// vesting: Default::default(),
assets: Default::default(),
Expand Down
4 changes: 0 additions & 4 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ pallet-im-online = { workspace = true }
pallet-indices = { workspace = true }
pallet-identity = { workspace = true }
# pallet-lottery = { workspace = true }
pallet-membership = { workspace = true }
# pallet-message-queue = { workspace = true }
pallet-multisig = { workspace = true }
pallet-nomination-pools = { workspace = true }
Expand Down Expand Up @@ -180,7 +179,6 @@ std = [
"pallet-indices/std",
"sp-inherents/std",
# "pallet-lottery/std",
"pallet-membership/std",
# "pallet-message-queue/std",
"pallet-multisig/std",
"pallet-nomination-pools/std",
Expand Down Expand Up @@ -289,7 +287,6 @@ runtime-benchmarks = [
"pallet-im-online/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
# "pallet-lottery/runtime-benchmarks",
"pallet-membership/runtime-benchmarks",
# "pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
Expand Down Expand Up @@ -338,7 +335,6 @@ try-runtime = [
"pallet-indices/try-runtime",
"pallet-identity/try-runtime",
# "pallet-lottery/try-runtime",
"pallet-membership/try-runtime",
# "pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nomination-pools/try-runtime",
Expand Down
24 changes: 5 additions & 19 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,11 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime {
}
}

type EnsureRootOrHalfCouncil = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
>;

impl pallet_election_provider_multi_phase::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
Expand Down Expand Up @@ -996,23 +1001,6 @@ impl pallet_collective::Config<TechnicalCollective> for Runtime {
type MaxProposalWeight = MaxCollectivesProposalWeight;
}

type EnsureRootOrHalfCouncil = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
>;
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
type RuntimeEvent = RuntimeEvent;
type AddOrigin = EnsureRootOrHalfCouncil;
type RemoveOrigin = EnsureRootOrHalfCouncil;
type SwapOrigin = EnsureRootOrHalfCouncil;
type ResetOrigin = EnsureRootOrHalfCouncil;
type PrimeOrigin = EnsureRootOrHalfCouncil;
type MembershipInitialized = TechnicalCommittee;
type MembershipChanged = TechnicalCommittee;
type MaxMembers = TechnicalMaxMembers;
type WeightInfo = pallet_membership::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const ProposalBondMinimum: Balance = 1 * DOLLARS;
Expand Down Expand Up @@ -1613,7 +1601,6 @@ construct_runtime!(
TechnicalCommittee: pallet_collective::<Instance2> = 14,
Elections: pallet_elections_phragmen = 15,
ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 16,
TechnicalMembership: pallet_membership::<Instance1> = 17,
Treasury: pallet_treasury = 18,
ImOnline: pallet_im_online = 19,
AuthorityDiscovery: pallet_authority_discovery = 20,
Expand Down Expand Up @@ -1729,7 +1716,6 @@ mod benches {
[pallet_identity, Identity]
[pallet_im_online, ImOnline]
[pallet_indices, Indices]
[pallet_membership, TechnicalMembership]
[pallet_multisig, Multisig]
//[pallet_nomination_pools, NominationPoolsBench::<Runtime>]
//[pallet_offences, OffencesBench::<Runtime>]
Expand Down

0 comments on commit 5b7c2ba

Please sign in to comment.