Skip to content

Westend RC: remove governance post AHM #11775

@sigurpol

Description

@sigurpol

TL;DR

As followup of #11763 / #11705, we should also remove governance and opengov stack from Westend RC - not needed and used anymore post-AHM.

This follows up on #11705 which removed pallet_treasury and the Treasurer track from the relay.

What to remove

A draft list of changes to be performed below - to be double checked carefully.

From polkadot/runtime/westend/src/lib.rs construct_runtime!:

  • pallet_conviction_voting (idx 31)
  • pallet_referenda (idx 32)
  • pallet_custom_origins (idx 35) — including all remaining origin variants:
    StakingAdmin, GeneralAdmin, FellowshipAdmin, AuctionAdmin, LeaseAdmin,
    ReferendumCanceller, ReferendumKiller, SmallTipper, BigTipper, SmallSpender,
    MediumSpender, BigSpender, WhitelistedCaller, and the various FellowshipN-Dan
    variants
  • pallet_whitelist (idx 36)

Pallet indices 31, 32, 35, 36 become permanently unused (same treatment as idx 37 in #11705).

Cascading consumers to re-root or remove:

  • Every type X = EitherOf<EnsureRoot, Y> where Y is a governance
    track origin (grep in polkadot/runtime/westend/src/lib.rs for
    EitherOf<EnsureRoot, AuctionAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin,
    etc.) must be re-rooted to plain EnsureRoot.
  • polkadot/runtime/westend/src/governance/tracks.rs: delete file entirely.
  • polkadot/runtime/westend/src/governance/origins.rs: delete file entirely.
  • polkadot/runtime/westend/src/governance/mod.rs: delete module; remove all
    re-exports from lib.rs.
  • polkadot/runtime/westend/src/xcm_config.rs: remove *ToPlurality type aliases
    (GeneralAdminToPlurality, StakingAdminToPlurality,
    FellowshipAdminToPlurality), their *BodyId parameter_types, and drop
    LocalPalletOriginToLocation entirely. Rewire SendXcmOrigin to use only
    LocalOriginToLocation (or a direct EnsureRoot-based path).
  • pallet_referenda::Config::Slash =
    pallet_dap_satellite::DapSatelliteLegacyAdapter<Runtime, Balances> — goes away
    with the pallet.

System parachain cleanup (follow-on opportunity)

Once the relay has no plurality-producing origins, ParentOrParentsPlurality matchers on all 5 Westend system parachain ' AllowExplicitUnpaidExecutionFrom barriers become dead (the (1, [Plurality { .. }]) arm can never match). Can be simplified to a plain parent matcher.

Extra notes

  • Add frame_support::migrations::RemovePallet migrations for each pallet to clear orphaned storage (same pattern as the RemovePallet<"Treasury", _> in Remove RC and local treasury accounts #11705).
  • must-do: try-runtime dry-run against live Westend

Related issues

Fellowship runtime

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions