[Backport] #2550 and substrate deps update to runtimes release (#2553)

* Collectives: xcm base weights (#2550)

* Update substrate dependencies

---------

Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
This commit is contained in:
Egor_P
2023-05-10 10:12:51 +02:00
committed by GitHub
parent 3b01ad3deb
commit 5754de6ad3
2 changed files with 197 additions and 194 deletions
Generated
+190 -190
View File
File diff suppressed because it is too large Load Diff
@@ -101,8 +101,11 @@ pub type XcmOriginToTransactDispatchOrigin = (
);
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
/// The amount of weight an XCM operation takes. This is a safe overestimate.
pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024);
/// A temporary weight value for each XCM instruction.
/// NOTE: This should be removed after we account for PoV weights.
pub const TempFixedXcmWeight: Weight = Weight::from_parts(1_000_000_000, 0);
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
// Fellows pluralistic body.
@@ -229,7 +232,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = ConcreteNativeAssetFrom<DotLocation>;
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type Weigher = FixedWeightBounds<TempFixedXcmWeight, RuntimeCall, MaxInstructions>;
type Trader =
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
type ResponseHandler = PolkadotXcm;
@@ -280,7 +283,7 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;