[westend] Remove pallet_treasury from RC and clean up system parachains matchers#11763
[westend] Remove pallet_treasury from RC and clean up system parachains matchers#11763
Conversation
…ers (#11705) Remove pallet_treasury entirely from Westend relay chain. Drain residual treasury funds to relay-local DAP satellite via migration. Relay only since other system parachains have zero funds on their local treasury accounts. Remove RelayTreasuryLocation matchers from all Westend system parachains. Closes #11705.
|
/cmd prdoc --audience runtime_dev --bump major |
…time_dev --bump major'
|
@acatangiu , this should address your comment here (on top of the changes already landed in #11700) and should close #11705. Note that a similar issue has been opened also in the fellowship runtime (polkadot-fellows/runtimes#1144). |
| use xcm_executor::traits::ConvertLocation; | ||
|
|
||
| // Fund Fellowship Treasury from Westend Treasury and spend from Fellowship Treasury. | ||
| /// Fellowship treasury can spend funds on Asset Hub to a beneficiary. |
There was a problem hiding this comment.
This test was made by two parts:
- Fund fellowship treasury from relay treasury (but relay treasury is now gone!)
- Fellowship treasury spends to Alice via FellowshipTreasury::spend from Fellows origin => still valid, independent of relay treasury
I have replaced 1. with a force_set_balance for the fellowship treasury account on AH, and kept Part 2 as-is.
This largely overlaps with the AH test create_and_claim_treasury_spend here so it might be fine to just remove this test (and related file). The main differences is that here we are using Fellows origin (enum variant) vs root , and WND vs USDT. Added value is somehow small but not null. I am fine with both approaches (keeping or 🪓 )
There was a problem hiding this comment.
Worth keeping this, imo! Using a different asset/origin combination is indeed added value, however small; I don't think the second or two it takes to run this negatively offsets that value 👍
| @@ -189,6 +189,8 @@ pub type Migrations = ( | |||
| // permanent | |||
| pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>, | |||
| cumulus_pallet_aura_ext::migration::MigrateV0ToV1<Runtime>, | |||
There was a problem hiding this comment.
(unrelated to this PR) move this above the // permanent in the list of migrations since it should not be permanent - actually I think this already ran a long time ago and should just be removed (same for most/all above)
There was a problem hiding this comment.
I would prefer to do a cleanup of all non permanent migrations we can remove in an ad-hoc PR since, as you have mentioned, it's not in the scope of this one (but I agree that it should be tackled as part of our spring cleaning tasks 😃 ). I have created #11771 as umbrella issue to do cleanup of all these migrations.
| // #11705: drain residual relay-treasury XCM payouts into DAP satellite. | ||
| pallet_dap_satellite::migrations::DrainLegacyTreasuryToDapSatellite<Runtime>, |
There was a problem hiding this comment.
this is intended as a "permanent" migration, right? aka keep it around until we see there is no more activity on the legacy treasury account?
There was a problem hiding this comment.
it's idempotent so doesn't hurt but it is meant to be one-shot only and then can be removed since there should be no activity on this account - so should live above permanent. Moved.
| PalletInstance(<Uniques as PalletInfoAccess>::index() as u8).into(); | ||
| pub CheckingAccount: AccountId = PolkadotXcm::check_account(); | ||
| pub StakingPot: AccountId = CollatorSelection::account_id(); | ||
| pub RelayTreasuryLocation: Location = (Parent, PalletInstance(westend_runtime_constants::TREASURY_PALLET_ID)).into(); |
There was a problem hiding this comment.
does this need a migration too? or is it empty on AH?
There was a problem hiding this comment.
it's empty on AH post AHM so this is just code cleanup and AFAIU no post-AHM flow needs that Location to have execution/fee privileges and no further migration is needed.
| // StakingAdmin pluralistic body. | ||
| pub const StakingAdminBodyId: BodyId = BodyId::Defense; | ||
| // FellowshipAdmin pluralistic body. | ||
| pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); |
There was a problem hiding this comment.
why are these not used anymore? I guess it was using the RC ones and those no longer exist, but they still exist on AH/Collectives, no? confused 🙈
There was a problem hiding this comment.
My understanding - to be double-checked: this was and is dead / unused code.
The aliases being removed (*ToPlurality, *BodyId, LocalPalletOriginToLocation) were defined but never referenced.
SendXcmOrigin uses LocalOriginToLocation
impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>; // <--- HERELocalPalletOriginToLocation was not used.
|
Review required! Latest push from author must always be reviewed |
Removed pallet_conviction_voting, pallet_referenda, pallet_custom_origins, and pallet_whitelist from the Westend relay chain runtime. Governance now lives on AssetHub. - Re-rooted all EitherOf<EnsureRoot, GovernanceOrigin> to plain EnsureRoot - Added RemovePallet migrations for ConvictionVoting, Referenda, Origins, and Whitelist - Replaced ParentOrParentsPlurality with IsParentsOnly<ConstU8<1>> on all 5 Westend system parachains (dead code post-governance removal) - Removed relay governance integration tests (open_gov_on_relay, fellows_whitelist_call) Closes #11775.
This reverts commit afbfb30.
py/trsry-derived account into the local DAP satellite buffer on the relay and on each Westend system parachain (bridge-hub, collectives, coretime, people).Closes #11705.
NOTE: a followup PR will remove also all remaining OpenGov related pallets from RC (issue #11775, stacked PR: #11796).