Skip to content

Commit 6bb4ab8

Browse files
authored
Align xcm configs (#1542)
1 parent ebd695a commit 6bb4ab8

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

runtime/crab/src/pallets/polkadot_xcm.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<
9797
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
9898
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
9999
// get free execution.
100-
xcm_builder::AllowUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
100+
xcm_builder::AllowExplicitUnpaidExecutionFrom<
101+
xcm_config::ParentOrParentsPlurality,
102+
>,
101103
// Subscriptions for version tracking are OK.
102104
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,
103105
),

runtime/darwinia/src/pallets/polkadot_xcm.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ frame_support::parameter_types! {
2727
pub const MaxInstructions: u32 = 100;
2828
/// A temporary weight value for each XCM instruction.
2929
/// NOTE: This should be removed after we account for PoV weights.
30+
pub const TempFixedXcmWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(1_000_000_000, 0);
3031
pub SelfReserve: Location = Location::new(
3132
0,
3233
[PalletInstance(<Balances as frame_support::traits::PalletInfoAccess>::index() as u8)]
@@ -120,7 +121,7 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
120121
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
121122
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
122123
// get free execution.
123-
xcm_builder::AllowUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
124+
xcm_builder::AllowExplicitUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
124125
// Subscriptions for version tracking are OK.
125126
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,
126127
),
@@ -226,7 +227,7 @@ impl xcm_executor::Config for XcmExecutorConfig {
226227
type UniversalAliases = frame_support::traits::Nothing;
227228
// Teleporting is disabled.
228229
type UniversalLocation = UniversalLocation;
229-
type Weigher = XcmWeigher;
230+
type Weigher = xcm_builder::FixedWeightBounds<TempFixedXcmWeight, RuntimeCall, MaxInstructions>;
230231
type XcmSender = XcmRouter;
231232
}
232233

@@ -247,7 +248,7 @@ impl pallet_xcm::Config for Runtime {
247248
type SovereignAccountOf = LocationToAccountId;
248249
type TrustedLockers = ();
249250
type UniversalLocation = UniversalLocation;
250-
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
251+
type Weigher = XcmWeigher;
251252
type WeightInfo = pallet_xcm::TestWeightInfo;
252253
type XcmExecuteFilter = frame_support::traits::Everything;
253254
type XcmExecutor = xcm_executor::XcmExecutor<XcmExecutorConfig>;

runtime/koi/src/pallets/polkadot_xcm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
120120
// If the message is one that immediately attemps to pay for execution, then
121121
// allow it.
122122
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
123+
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
124+
// get free execution.
123125
xcm_builder::AllowExplicitUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
124126
// Subscriptions for version tracking are OK.
125127
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,

0 commit comments

Comments
 (0)