Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Ambassador Program #291

Merged
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,15 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Add `pallet-vesting` to Asset Hubs ([polkadot-fellows/runtimes#269](https://github.com/polkadot-fellows/runtimes/pull/269))
- Fix Kusama Coretime launch issues: import leases and fix renewals for short leases ([polkadot-fellows/runtimes#276](https://github.com/polkadot-fellows/runtimes/pull/276))
- The Ambassador Program ([polkadot-fellows/runtimes#291](https://github.com/polkadot-fellows/runtimes/pull/291))

### Changed

- Remove DMP queue and allow `system::authorize_upgrade` in XCM's call filter ([polkadot-fellows/runtimes#280](https://github.com/polkadot-fellows/runtimes/pull/280))

### Fixed

- Bumped `bp-header-chain` dependency and added migration to Polkadot Bridge Hub to unstuck
bridge with Kusama. Details may be found in relevant
[polkadot-sdk](https://github.com/paritytech/polkadot-sdk/pull/4208) PR.
- Fix Kusama Coretime launch issues: import leases and fix renewals for short leases ([polkadot-fellows/runtimes#276](https://github.com/polkadot-fellows/runtimes/pull/276))

## [1.2.1] 09.04.2024

28 changes: 28 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -264,6 +264,32 @@ impl Contains<Location> for FellowshipEntities {
}
}

pub struct AmbassadorEntities;
impl Contains<Location> for AmbassadorEntities {
Comment on lines +264 to +265
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't have anything for the BodyId. I guess they have no power outside their Treasury/Salary so maybe it is not important. We just have to make sure to add this if they ever do get some new power or need that origin. Perhaps put it in docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I cannot come up with a good location for such doc. If some collective plurality gets to manage something in Asset Hub, an engineer will need only to update an ensure origin impl for some pallet. I think an engineer should keep in mind that xcm execution is not for free by default.
We can also just grant a free xcm execution for all Collectives Parachain pluralities, but I am not sure if that will be true for all future pluralities.

fn contains(location: &Location) -> bool {
matches!(
location.unpack(),
(
1,
[
Parachain(system_parachain::COLLECTIVES_ID),
PalletInstance(
collectives_polkadot_runtime_constants::AMBASSADOR_SALARY_PALLET_INDEX
)
]
) | (
1,
[
Parachain(system_parachain::COLLECTIVES_ID),
PalletInstance(
collectives_polkadot_runtime_constants::AMBASSADOR_TREASURY_PALLET_INDEX
)
]
)
)
}
}

pub struct ParentOrParentsPlurality;
impl Contains<Location> for ParentOrParentsPlurality {
fn contains(location: &Location) -> bool {
@@ -475,6 +501,7 @@ pub type Barrier = TrailingSetTopicAsId<
FellowshipEntities,
Equals<RelayTreasuryLocation>,
Equals<bridging::SiblingBridgeHub>,
AmbassadorEntities,
)>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentRelayOrSiblingParachains>,
@@ -500,6 +527,7 @@ pub type WaivedLocations = (
RelayOrOtherSystemParachains<AllSiblingSystemParachains, Runtime>,
Equals<RelayTreasuryLocation>,
FellowshipEntities,
AmbassadorEntities,
);

/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
Original file line number Diff line number Diff line change
@@ -16,8 +16,14 @@

#![no_std]

/// Polkadot Collectives Salary pallet instance.
/// Polkadot Fellowship Salary pallet instance.
pub const FELLOWSHIP_SALARY_PALLET_INDEX: u8 = 64;

/// Polkadot Collectives Treasury pallet instance.
/// Polkadot Fellowship Treasury pallet instance.
pub const FELLOWSHIP_TREASURY_PALLET_INDEX: u8 = 65;

/// Polkadot Ambassador Salary pallet instance.
pub const AMBASSADOR_SALARY_PALLET_INDEX: u8 = 74;

/// Polkadot Ambassador Treasury pallet instance.
pub const AMBASSADOR_TREASURY_PALLET_INDEX: u8 = 75;
Loading
Loading