Skip to content

Conversation

@bkontur
Copy link
Contributor

@bkontur bkontur commented Jun 20, 2025

Closes: paritytech/polkadot-sdk#7578
Relates: paritytech/polkadot-sdk#7541
Relates: paritytech/polkadot-sdk#7566

TBD: as a preparation for AHM for Kusama (intentionally not based on dev-asset-hub-migration for now - I will left TODO when needed some migration state or whatever)

This PR introduces all relevant changes and settings for RC and system parachains related to the migration of OpenGov to Kusama AssetHub. The counterpart for Polkadot AssetHub can be found here: #626.

Key features

  • Kusama Collectives/Fellows stays on the RC (AHM does not migrate them)
    • Means that AH needs to accept whitelisting call from the RC,
      /// Origin commanded by Polkadot Fellows (3rd Dan fellows or greater).
      Fellows,
      
  • Kusama People needs to accept GeneralAdmin voice plurality from AH and RC
  • All system parachains needs to accept StakingAdmin from AH and RC because of CollatorSelectionUpdateOrigin
    • Except AssetHub needs to accept StakingAdmin from local OpenGov AH and RC

Plan

  • let's collect all the changes for OpenGov on AH (final, post migration)
    • We could even merge this to AHK with some disabled call filtering for OpenGov
  • then add tweaks to RC/AH for migration

TODO

  • collect all TODOs on the way
  • adjust all system paras to trust OpenGov on AH
  • add all the relevant tests from [AHM] OpenGov for Polkadot AH tweaks #626 @karolk91
  • add all the relevant tests for treasury spending
  • check Proxy setting
  • separate security audit?
  • make sure that Kusama Fellows on the RC can whitelist for AH OpenGov
  • check AuctionAdmin, LeaseAdmin origin propagation for RC

Questions

  • type Paymaster = correct impl for local assets/accounts (VersionedAssetId / VersionedLocation is enought instead of locatable ones?)
    • Align the LocalPay for AHP
  • TreasuryInteriorLocation how is the account with PALLET_ID=18 migrated on AH?
  • pub const GovernanceLocation: Location = Location::parent(); usually used for collators selection - search for // TODO: split GovernanceOnRcLocation and GovernanceOnAhLocation - because we don't send migration start to other system paras
  • Do we need AssetRateWithNative on AH?
    • Check how the AHM migrations is done for this

type SpendOrigin = TreasurySpender;

// TODO: Do we still need `VersionedLocatableAsset`? (Check treasury migration!)
type AssetKind = VersionedAssetId;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muharem I checked how the treasury is migrated and also: https://github.com/polkadot-fellows/runtimes/blob/dev-asset-hub-migration/pallets/rc-migrator/src/treasury.md
With support only for LocalPay and Location { parents: 0, interior: Here }, can we just use VersionedAssetId and VersionedLocation instead of VersionedLocatableAsset and VersionedLocatableAccount?

Instead of this:

type AssetKind = VersionedLocatableAsset;
type Beneficiary = VersionedLocatableAccount;

to use:

type AssetKind = VersionedAssetId;
type Beneficiary = VersionedLocation;

@bkontur bkontur force-pushed the bko-ahm-kusama-governance-tweaks branch from 3dc1623 to 83c833d Compare July 3, 2025 11:00
@bkontur bkontur force-pushed the bko-ahm-kusama-governance-tweaks branch from b765d16 to 6903926 Compare July 7, 2025 16:42
fellowship-merge-bot bot pushed a commit that referenced this pull request Jul 11, 2025
This PR introduces test case scenarios to verify if parachain is able to
process `authorize_upgrade` call as if it was send via governance chain
(a Relay Chain for purpose of this PR)

These test cases were introduced to
[polkadot-sdk](https://github.com/search?q=repo%3Aparitytech%2Fpolkadot-sdk%20governance_authorize_upgrade_works&type=code)
and suggested via
[comment](paritytech/polkadot-sdk#7566 (comment))
that it would be nice to port, so this is just integration of existing
testnets cases for production networks

This PR also introduces integration tests covering all system chains
that simulates real network upgrade using whitelisting (via Collectives
chain in case of Polkadot)

### Test Coverage

| Chain | Unit Tests | Integration Tests |

|-------------------------|--------------------------------------|-------------------------------------|
| Polkadot Asset Hub | ✅ | ✅ |
| Polkadot Coretime | ✅ | ✅ |
| Polkadot Collectives | ✅ | ✅ |
| Polkadot Bridge Hub | ✅ | ✅ |
| Polkadot People | ✅ | ✅ |
| Kusama Asset Hub | ✅ | ✅ |
| Kusama Coretime | ✅ | ✅ |
| Kusama Bridge Hub | ✅ | ✅ |
| Kusama People | ✅ | ✅ |
| Kusama Encointer | ✅ |_Lack of mocked network definition_
[here](https://github.com/polkadot-fellows/runtimes/blob/2fb47566718a974c261b68fffaae500be5581820/integration-tests/emulated/networks/kusama-system/src/lib.rs#L40)
|
| Kusama Relay | _Not applicable_ | ✅ |
| Polkadot Relay | _Not applicable_ | ✅ |
| Kusama Glutton | _Not supported: `BasicParachainRuntime` not
implemented_ | _Lack of mocked network definition_
[here](https://github.com/polkadot-fellows/runtimes/blob/2fb47566718a974c261b68fffaae500be5581820/integration-tests/emulated/networks/kusama-system/src/lib.rs#L40)|

### Follow-up:

For AHM, we will add also the tests for OpenGov on AHs:
#776
#626

---------

Co-authored-by: Branislav Kontur <[email protected]>
@bkontur bkontur moved this to In progress in Plaza: AHM Jul 24, 2025
@karolk91 karolk91 mentioned this pull request Sep 3, 2025
2 tasks
bkontur added a commit that referenced this pull request Sep 4, 2025
Merging #776 to
#856

## TODO

- [x] waiting for @muharem confirmation on several comments bellow
- [ ] @karolk91 fix either here or follow-up:
https://github.com/polkadot-fellows/runtimes/pull/626/files#r2322701735

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: muharem <[email protected]>
@bkontur
Copy link
Contributor Author

bkontur commented Sep 5, 2025

closing in favor of #877 (which is already merged)

@bkontur bkontur closed this Sep 5, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Plaza: AHM Sep 5, 2025
@bkontur bkontur deleted the bko-ahm-kusama-governance-tweaks branch September 5, 2025 11:12
bkontur added a commit that referenced this pull request Sep 5, 2025
Closes: paritytech/polkadot-sdk#7578
Relates: paritytech/polkadot-sdk#7541
Relates: paritytech/polkadot-sdk#7566

This PR introduces all relevant changes and settings for RC and system
parachains related to the migration of OpenGov to **Polkadot** AssetHub.
The counterpart for **Kusama** AssetHub can be found here:
~#776
#877.

## TODO

- [x] check/setup governance origin/root/plurality propagation from
migrated AssetHub governance to relaychain (before/during/after AHM)
- [x] check/setup governance origin/root/plurality propagation from
migrated AssetHub governance to system parachains (before/during/after
AHM)
- [x] add integration tests that ensure governance can
`authorize_upgrade` relay/system chains
- [x] Add `LocalPalletOrSignedOriginToLocation` to the AH
- [x] All system parachains needs to accept `StakingAdmin` from AH and
RC because of `CollatorSelectionUpdateOrigin`
- [x] Except AssetHub needs to accept `StakingAdmin` from local OpenGov
AH and RC
- [x] Add the test that AH's OpenGov RuntimeOrigin:root is propagated to
the relaychain as root (should work because of `EnsureXcmOrigin`)

---------

Co-authored-by: Karol Kokoszka <[email protected]>
Co-authored-by: Karol Kokoszka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Governance migration Relay->AH

2 participants