@@ -101,8 +101,11 @@ pub type XcmOriginToTransactDispatchOrigin = (
101101) ;
102102
103103parameter_types ! {
104- // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
105- pub UnitWeightCost : Weight = Weight :: from_parts( 1_000_000_000 , 64 * 1024 ) ;
104+ /// The amount of weight an XCM operation takes. This is a safe overestimate.
105+ pub const BaseXcmWeight : Weight = Weight :: from_parts( 1_000_000_000 , 1024 ) ;
106+ /// A temporary weight value for each XCM instruction.
107+ /// NOTE: This should be removed after we account for PoV weights.
108+ pub const TempFixedXcmWeight : Weight = Weight :: from_parts( 1_000_000_000 , 0 ) ;
106109 pub const MaxInstructions : u32 = 100 ;
107110 pub const MaxAssetsIntoHolding : u32 = 64 ;
108111 // Fellows pluralistic body.
@@ -229,7 +232,7 @@ impl xcm_executor::Config for XcmConfig {
229232 type IsTeleporter = ConcreteNativeAssetFrom < DotLocation > ;
230233 type UniversalLocation = UniversalLocation ;
231234 type Barrier = Barrier ;
232- type Weigher = FixedWeightBounds < UnitWeightCost , RuntimeCall , MaxInstructions > ;
235+ type Weigher = FixedWeightBounds < TempFixedXcmWeight , RuntimeCall , MaxInstructions > ;
233236 type Trader =
234237 UsingComponents < WeightToFee , DotLocation , AccountId , Balances , ToStakingPot < Runtime > > ;
235238 type ResponseHandler = PolkadotXcm ;
@@ -280,7 +283,7 @@ impl pallet_xcm::Config for Runtime {
280283 type XcmExecutor = XcmExecutor < XcmConfig > ;
281284 type XcmTeleportFilter = Everything ;
282285 type XcmReserveTransferFilter = Nothing ; // This parachain is not meant as a reserve location.
283- type Weigher = FixedWeightBounds < UnitWeightCost , RuntimeCall , MaxInstructions > ;
286+ type Weigher = FixedWeightBounds < BaseXcmWeight , RuntimeCall , MaxInstructions > ;
284287 type UniversalLocation = UniversalLocation ;
285288 type RuntimeOrigin = RuntimeOrigin ;
286289 type RuntimeCall = RuntimeCall ;
0 commit comments