mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Collectives: xcm base weights (#2550)
This commit is contained in:
@@ -101,8 +101,11 @@ pub type XcmOriginToTransactDispatchOrigin = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
|
/// The amount of weight an XCM operation takes. This is a safe overestimate.
|
||||||
pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
|
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 MaxInstructions: u32 = 100;
|
||||||
pub const MaxAssetsIntoHolding: u32 = 64;
|
pub const MaxAssetsIntoHolding: u32 = 64;
|
||||||
// Fellows pluralistic body.
|
// Fellows pluralistic body.
|
||||||
@@ -225,7 +228,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type IsTeleporter = ConcreteNativeAssetFrom<DotLocation>;
|
type IsTeleporter = ConcreteNativeAssetFrom<DotLocation>;
|
||||||
type UniversalLocation = UniversalLocation;
|
type UniversalLocation = UniversalLocation;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
type Weigher = FixedWeightBounds<TempFixedXcmWeight, RuntimeCall, MaxInstructions>;
|
||||||
type Trader =
|
type Trader =
|
||||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||||
type ResponseHandler = PolkadotXcm;
|
type ResponseHandler = PolkadotXcm;
|
||||||
@@ -276,7 +279,7 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
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 UniversalLocation = UniversalLocation;
|
||||||
type RuntimeOrigin = RuntimeOrigin;
|
type RuntimeOrigin = RuntimeOrigin;
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
|
|||||||
Reference in New Issue
Block a user