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

[pallet_xcm] Customizable/extendable remote_message estimation #7424

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
74ac9c1
[pallet_xcm] Customizable/extendable `remote_message` estimation
bkontur Jun 24, 2023
25d67c6
Rename back weight->weigh
bkontur Jun 24, 2023
8297c87
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Jun 30, 2023
1120b80
DestinationWeigher used in all runtimes
bkontur Jun 30, 2023
a53930e
fmt
bkontur Jun 30, 2023
9605074
Nits
bkontur Jul 3, 2023
db5d966
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Jul 3, 2023
9477e78
Update xcm/xcm-builder/src/weight.rs
bkontur Jul 31, 2023
2e7e369
Doc
bkontur Jul 31, 2023
f9c46fe
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Jul 31, 2023
e54cddf
Fix compile
bkontur Aug 1, 2023
fcc310f
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Aug 1, 2023
4f9007e
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
Aug 3, 2023
9aec446
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Aug 16, 2023
69eae3f
".git/.scripts/commands/fmt/fmt.sh"
Aug 16, 2023
8ddc82e
Fix import
bkontur Aug 17, 2023
9e44153
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Aug 17, 2023
f571ec8
Update xcm/pallet-xcm/src/lib.rs
bkontur Aug 17, 2023
404ac44
".git/.scripts/commands/fmt/fmt.sh"
Aug 17, 2023
537361e
Adds Tuple support for `ProvideWeighableInstructions` and impl for `W…
bkontur Aug 17, 2023
90dfcfe
Merge remote-tracking branch 'origin/master' into bko-pallet-xcm-remo…
bkontur Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ use xcm_builder::{
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UniversalWeigherAdapter,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -406,6 +406,11 @@ impl pallet_xcm::Config for Runtime {
RuntimeCall,
MaxInstructions,
>;
type DestinationWeigher = UniversalWeigherAdapter<
// use local weight for remote message and hope for the best.
WeightInfoBounds<crate::weights::xcm::KusamaXcmWeight<()>, (), MaxInstructions>,
(XcmRouter,),
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
8 changes: 7 additions & 1 deletion runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
UniversalWeigherAdapter, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -415,6 +416,11 @@ impl pallet_xcm::Config for Runtime {
RuntimeCall,
MaxInstructions,
>;
type DestinationWeigher = UniversalWeigherAdapter<
// use local weight for remote message and hope for the best.
WeightInfoBounds<crate::weights::xcm::PolkadotXcmWeight<()>, (), MaxInstructions>,
(XcmRouter,),
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
10 changes: 8 additions & 2 deletions runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic,
TakeWeightCredit, TrailingSetTopicAsId, UniversalWeigherAdapter, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -351,6 +351,7 @@ pub type LocalOriginToLocation = (
// And a usual Signed origin to be used in XCM as a corresponding AccountId32
SignedToAccountId32<RuntimeOrigin, AccountId, ThisNetwork>,
);

impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
Expand All @@ -364,6 +365,11 @@ impl pallet_xcm::Config for Runtime {
// transfer.
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type DestinationWeigher = UniversalWeigherAdapter<
// use local weight for remote message and hope for the best.
FixedWeightBounds<BaseXcmWeight, (), MaxInstructions>,
(XcmRouter,),
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
16 changes: 9 additions & 7 deletions runtime/test-runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use frame_system::EnsureRoot;
use xcm::latest::prelude::*;
use xcm_builder::{
AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, SignedAccountId32AsNative,
SignedToAccountId32,
SignedToAccountId32, UniversalWeigherAdapter,
};
use xcm_executor::{
traits::{TransactAsset, WeightTrader},
Expand Down Expand Up @@ -132,21 +132,24 @@ impl pallet_xcm::Config for crate::Runtime {
// The config types here are entirely configurable, since the only one that is sorely needed
// is `XcmExecutor`, which will be used in unit tests located in xcm-executor.
type RuntimeEvent = crate::RuntimeEvent;
type ExecuteXcmOrigin = EnsureXcmOrigin<crate::RuntimeOrigin, LocalOriginToLocation>;
type UniversalLocation = UniversalLocation;
type Currency = crate::Balances;
type CurrencyMatcher = ();
type SendXcmOrigin = EnsureXcmOrigin<crate::RuntimeOrigin, LocalOriginToLocation>;
type Weigher = FixedWeightBounds<BaseXcmWeight, crate::RuntimeCall, MaxInstructions>;
type XcmRouter = DoNothingRouter;
type ExecuteXcmOrigin = EnsureXcmOrigin<crate::RuntimeOrigin, LocalOriginToLocation>;
type XcmExecuteFilter = Everything;
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, crate::RuntimeCall, MaxInstructions>;
type DestinationWeigher =
UniversalWeigherAdapter<FixedWeightBounds<BaseXcmWeight, (), MaxInstructions>, ()>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = crate::RuntimeOrigin;
type RuntimeCall = crate::RuntimeCall;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type Currency = crate::Balances;
type CurrencyMatcher = ();
type AdminOrigin = EnsureRoot<crate::AccountId>;
type TrustedLockers = ();
type SovereignAccountOf = ();
type MaxLockers = frame_support::traits::ConstU32<8>;
Expand All @@ -155,5 +158,4 @@ impl pallet_xcm::Config for crate::Runtime {
type WeightInfo = pallet_xcm::TestWeightInfo;
#[cfg(feature = "runtime-benchmarks")]
type ReachableDest = ReachableDest;
type AdminOrigin = EnsureRoot<crate::AccountId>;
}
8 changes: 7 additions & 1 deletion runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ use xcm_builder::{
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
TrailingSetTopicAsId, UniversalWeigherAdapter, UsingComponents, WeightInfoBounds,
WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -291,6 +292,11 @@ impl pallet_xcm::Config for Runtime {
type XcmReserveTransferFilter = Everything;
type Weigher =
WeightInfoBounds<weights::xcm::WestendXcmWeight<RuntimeCall>, RuntimeCall, MaxInstructions>;
type DestinationWeigher = UniversalWeigherAdapter<
// use local weight for remote message and hope for the best.
WeightInfoBounds<weights::xcm::WestendXcmWeight<()>, (), MaxInstructions>,
(XcmRouter,),
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
17 changes: 10 additions & 7 deletions xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub use pallet::*;
use xcm_executor::{
traits::{
CheckSuspension, ClaimAssets, ConvertLocation, DropAssets, MatchesFungible, OnResponse,
QueryHandler, QueryResponseStatus, VersionChangeNotifier, WeightBounds,
QueryHandler, QueryResponseStatus, UniversalWeigher, VersionChangeNotifier, WeightBounds,
},
Assets,
};
Expand Down Expand Up @@ -219,6 +219,9 @@ pub mod pallet {
/// Means of measuring the weight consumed by an XCM message locally.
type Weigher: WeightBounds<<Self as SysConfig>::RuntimeCall>;

/// Means of approximating the weight consumed by an XCM program at the destination.
type DestinationWeigher: UniversalWeigher;

/// This chain's Universal Location.
type UniversalLocation: Get<InteriorMultiLocation>;

Expand Down Expand Up @@ -1223,14 +1226,14 @@ impl<T: Config> Pallet<T> {
Some(weight_limit) => weight_limit,
None => {
let fees = fees.clone();
let mut remote_message = Xcm(vec![
let remote_message = Xcm(vec![
ReserveAssetDeposited(assets.clone()),
ClearOrigin,
BuyExecution { fees, weight_limit: Limited(Weight::zero()) },
DepositAsset { assets: Wild(AllCounted(max_assets)), beneficiary },
]);
// use local weight for remote message and hope for the best.
let remote_weight = T::Weigher::weight(&mut remote_message)
// estimate remote_message weight
let remote_weight = T::DestinationWeigher::weigh(dest, remote_message)
.map_err(|()| Error::<T>::UnweighableMessage)?;
Limited(remote_weight)
},
Expand Down Expand Up @@ -1283,14 +1286,14 @@ impl<T: Config> Pallet<T> {
Some(weight_limit) => weight_limit,
None => {
let fees = fees.clone();
let mut remote_message = Xcm(vec![
let remote_message = Xcm(vec![
ReceiveTeleportedAsset(assets.clone()),
ClearOrigin,
BuyExecution { fees, weight_limit: Limited(Weight::zero()) },
DepositAsset { assets: Wild(AllCounted(max_assets)), beneficiary },
]);
// use local weight for remote message and hope for the best.
let remote_weight = T::Weigher::weight(&mut remote_message)
// estimate remote_message weight
let remote_weight = T::DestinationWeigher::weigh(dest, remote_message)
.map_err(|()| Error::<T>::UnweighableMessage)?;
Limited(remote_weight)
},
Expand Down
15 changes: 13 additions & 2 deletions xcm/pallet-xcm/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ use xcm_builder::{
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, Case, ChildParachainAsNative, ChildParachainConvertsVia,
ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible,
FixedWeightBounds, IsConcrete, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit,
FixedWeightBounds, IsConcrete, ProvideWeighableInstructions, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UniversalWeigherAdapter,
};
use xcm_executor::XcmExecutor;

Expand Down Expand Up @@ -319,6 +319,13 @@ parameter_types! {
pub ReachableDest: Option<MultiLocation> = Some(Parachain(1000).into());
}

pub struct AdditionalDestinationInstructions;
impl ProvideWeighableInstructions<()> for AdditionalDestinationInstructions {
fn provide_for(_dest: impl Into<MultiLocation>, _message: &Xcm<()>) -> Vec<Instruction<()>> {
sp_std::vec![SetTopic([13; 32])]
}
}

impl pallet_xcm::Config for Test {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
Expand All @@ -329,6 +336,10 @@ impl pallet_xcm::Config for Test {
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type DestinationWeigher = UniversalWeigherAdapter<
FixedWeightBounds<BaseXcmWeight, (), MaxInstructions>,
AdditionalDestinationInstructions,
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
12 changes: 10 additions & 2 deletions xcm/pallet-xcm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ fn teleport_assets_works() {
Xcm(vec![
ReceiveTeleportedAsset((Here, SEND_AMOUNT).into()),
ClearOrigin,
buy_limited_execution((Here, SEND_AMOUNT), Weight::from_parts(4000, 4000)),
buy_limited_execution(
(Here, SEND_AMOUNT),
// 4 instruction + AdditionalDestinationInstructions adds 1 instruction
Weight::from_parts(5000, 5000)
),
DepositAsset { assets: AllCounted(1).into(), beneficiary: dest },
]),
)]
Expand Down Expand Up @@ -508,7 +512,11 @@ fn reserve_transfer_assets_works() {
Xcm(vec![
ReserveAssetDeposited((Parent, SEND_AMOUNT).into()),
ClearOrigin,
buy_limited_execution((Parent, SEND_AMOUNT), Weight::from_parts(4000, 4000)),
buy_limited_execution(
(Parent, SEND_AMOUNT),
// 4 instruction + AdditionalDestinationInstructions adds 1 instruction
Weight::from_parts(5000, 5000)
),
DepositAsset { assets: AllCounted(1).into(), beneficiary: dest },
]),
)]
Expand Down
3 changes: 2 additions & 1 deletion xcm/xcm-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ pub use nonfungibles_adapter::{

mod weight;
pub use weight::{
FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds,
FixedRateOfFungible, FixedWeightBounds, ProvideWeighableInstructions, TakeRevenue,
UniversalWeigherAdapter, UsingComponents, WeightInfoBounds,
};

mod matches_token;
Expand Down
15 changes: 14 additions & 1 deletion xcm/xcm-builder/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use frame_system::unique;
use parity_scale_codec::Encode;
use sp_std::{marker::PhantomData, result::Result};
use sp_std::{marker::PhantomData, result::Result, vec, vec::Vec};
use xcm::prelude::*;

/// Wrapper router which, if the message does not already end with a `SetTopic` instruction,
Expand Down Expand Up @@ -61,6 +61,19 @@ impl<Inner: SendXcm> SendXcm for WithUniqueTopic<Inner> {
}
}

/// Implementation of `ProvideWeighableInstructions` for `WithUniqueTopic` which adds additional
/// `SetTopic` instruction.
impl<RuntimeCall, Inner> super::ProvideWeighableInstructions<RuntimeCall>
for WithUniqueTopic<Inner>
{
fn provide_for(
_dest: impl Into<MultiLocation>,
message: &Xcm<RuntimeCall>,
) -> Vec<Instruction<RuntimeCall>> {
vec![SetTopic(unique(message))]
}
}

pub trait SourceTopic {
fn source_topic(entropy: impl Encode) -> XcmHash;
}
Expand Down
40 changes: 38 additions & 2 deletions xcm/xcm-builder/src/weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ use frame_support::{
};
use parity_scale_codec::Decode;
use sp_runtime::traits::{SaturatedConversion, Saturating, Zero};
use sp_std::{marker::PhantomData, result::Result};
use sp_std::{marker::PhantomData, result::Result, vec, vec::Vec};
use xcm::latest::{prelude::*, Weight};
use xcm_executor::{
traits::{WeightBounds, WeightTrader},
traits::{UniversalWeigher, WeightBounds, WeightTrader},
Assets,
};

Expand Down Expand Up @@ -114,6 +114,42 @@ where
}
}

/// Adapter for `UniversalWeigher` which can estimate weights for an XCM program,
/// that is executed on destination with possibility to add additional instructions on the way (e.g.
/// SetTopic, UniversalOrigin, ...).
pub struct UniversalWeigherAdapter<Weigher, AdditionalInstructions>(
PhantomData<(Weigher, AdditionalInstructions)>,
);
impl<Weigher: WeightBounds<()>, AdditionalInstructions: ProvideWeighableInstructions<()>>
UniversalWeigher for UniversalWeigherAdapter<Weigher, AdditionalInstructions>
{
fn weigh(dest: impl Into<MultiLocation>, mut message: Xcm<()>) -> Result<Weight, ()> {
message.0.extend(AdditionalInstructions::provide_for(dest, &message));
Weigher::weight(&mut message)
}
}

/// Function trait for generating instruction for (dest, message).
pub trait ProvideWeighableInstructions<RuntimeCall> {
fn provide_for(
dest: impl Into<MultiLocation>,
message: &Xcm<RuntimeCall>,
) -> Vec<Instruction<RuntimeCall>>;
}

#[impl_trait_for_tuples::impl_for_tuples(30)]
impl<RuntimeCall> ProvideWeighableInstructions<RuntimeCall> for Tuple {
fn provide_for(
dest: impl Into<MultiLocation>,
message: &Xcm<RuntimeCall>,
) -> Vec<Instruction<RuntimeCall>> {
let dest = dest.into();
let mut res = vec![];
for_tuples!( #( res.extend_from_slice(&Tuple::provide_for(dest, message)); )* );
res
}
}

/// Function trait for handling some revenue. Similar to a negative imbalance (credit) handler, but
/// for a `MultiAsset`. Sensible implementations will deposit the asset in some known treasury or
/// block-author account.
Expand Down
4 changes: 3 additions & 1 deletion xcm/xcm-builder/tests/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, FixedWeightBounds,
IsChildSystemParachain, IsConcrete, MintLocation, RespectSuspension, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UniversalWeigherAdapter,
};

pub type AccountId = AccountId32;
Expand Down Expand Up @@ -224,6 +224,8 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type DestinationWeigher =
UniversalWeigherAdapter<FixedWeightBounds<BaseXcmWeight, (), MaxInstructions>, ()>;
type RuntimeCall = RuntimeCall;
type RuntimeOrigin = RuntimeOrigin;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
Expand Down
2 changes: 1 addition & 1 deletion xcm/xcm-executor/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub use transact_asset::TransactAsset;
mod weight;
#[deprecated = "Use `sp_runtime::traits::` instead"]
pub use sp_runtime::traits::{Identity, TryConvertInto as JustTry};
pub use weight::{WeightBounds, WeightTrader};
pub use weight::{UniversalWeigher, WeightBounds, WeightTrader};

pub mod prelude {
pub use super::{
Expand Down
4 changes: 3 additions & 1 deletion xcm/xcm-simulator/example/src/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use xcm_builder::{
CurrencyAdapter as XcmCurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds,
IsConcrete, NativeAsset, NoChecking, NonFungiblesAdapter, ParentIsPreset,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation,
SovereignSignedViaLocation, UniversalWeigherAdapter,
};
use xcm_executor::{
traits::{ConvertLocation, JustTry},
Expand Down Expand Up @@ -429,6 +429,8 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = Nothing;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type DestinationWeigher =
UniversalWeigherAdapter<FixedWeightBounds<UnitWeightCost, (), MaxInstructions>, ()>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
Expand Down
Loading