Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Disabled UnpaidExecution for system parachains
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Aug 14, 2023
1 parent 3a5dfe2 commit 8348b99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ match_types! {
MultiLocation { parents: 1, interior: Here } |
MultiLocation { parents: 1, interior: X1(_) }
};
// TODO:check-parameter - (https://github.com/paritytech/parity-bridges-common/issues/2084)
// remove this and extend `AllowExplicitUnpaidExecutionFrom` with "or SystemParachains" once merged https://github.com/paritytech/polkadot/pull/7005
pub type SystemParachains: impl Contains<MultiLocation> = {
// Statemine
MultiLocation { parents: 1, interior: X1(Parachain(1000)) }
};
}

/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
Expand Down Expand Up @@ -191,8 +185,8 @@ pub type Barrier = TrailingSetTopicAsId<
(
// If the message is one that immediately attemps to pay for execution, then allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies) and system parachains get free execution.
AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality, SystemParachains)>,
// Parent and its pluralities (i.e. governance bodies) get free execution.
AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality, )>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentOrSiblings>,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ match_types! {
pub type FellowsPlurality: impl Contains<MultiLocation> = {
MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) }
};
// TODO:check-parameter - (https://github.com/paritytech/parity-bridges-common/issues/2084)
// remove this and extend `AllowExplicitUnpaidExecutionFrom` with "or SystemParachains" once merged https://github.com/paritytech/polkadot/pull/7005
pub type SystemParachains: impl Contains<MultiLocation> = {
// Statemint
MultiLocation { parents: 1, interior: X1(Parachain(1000)) } |
// Collectives
MultiLocation { parents: 1, interior: X1(Parachain(1001)) }
};
}

/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
Expand Down Expand Up @@ -196,12 +188,8 @@ pub type Barrier = TrailingSetTopicAsId<
(
// If the message is one that immediately attemps to pay for execution, then allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies), the Fellows plurality get free execution and system parachains.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
FellowsPlurality,
SystemParachains,
)>,
// Parent, its pluralities (i.e. governance bodies) and the Fellows plurality get free execution.
AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality, FellowsPlurality)>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentOrSiblings>,
),
Expand Down

0 comments on commit 8348b99

Please sign in to comment.