Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve XCM v2 compatibility modifying proof size #2228

Merged
merged 4 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion runtime/moonbase/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ where

parameter_types! {
pub const BaseXcmWeight: Weight
= Weight::from_parts(200_000_000u64, xcm_primitives::DEFAULT_PROOF_SIZE);
= Weight::from_parts(200_000_000u64, 0);
pub const MaxAssetsForTransfer: usize = 2;
// This is how we are going to detect whether the asset is a Reserve asset
// This however is the chain part only
Expand Down
5 changes: 2 additions & 3 deletions runtime/moonbeam/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use orml_xcm_support::MultiNativeAsset;
use xcm_primitives::{
AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToMultiLocation, AsAssetType,
FirstAssetTrader, SignedToAccountId20, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact,
DEFAULT_PROOF_SIZE,
};

use parity_scale_codec::{Decode, Encode};
Expand Down Expand Up @@ -199,7 +198,7 @@ pub type XcmOriginToTransactDispatchOrigin = (

parameter_types! {
/// The amount of weight an XCM operation takes. This is safe overestimate.
pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0);
/// Maximum number of instructions in a single XCM fragment. A sanity check against
/// weight caculations getting too crazy.
pub MaxInstructions: u32 = 100;
Expand Down Expand Up @@ -456,7 +455,7 @@ where
}

parameter_types! {
pub const BaseXcmWeight: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub const BaseXcmWeight: Weight = Weight::from_parts(200_000_000u64, 0);
pub const MaxAssetsForTransfer: usize = 2;

// This is how we are going to detect whether the asset is a Reserve asset
Expand Down
5 changes: 2 additions & 3 deletions runtime/moonriver/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use orml_xcm_support::MultiNativeAsset;
use xcm_primitives::{
AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToMultiLocation, AsAssetType,
FirstAssetTrader, SignedToAccountId20, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact,
DEFAULT_PROOF_SIZE,
};

use parity_scale_codec::{Decode, Encode};
Expand Down Expand Up @@ -209,7 +208,7 @@ pub type XcmOriginToTransactDispatchOrigin = (

parameter_types! {
/// The amount of weight an XCM operation takes. This is safe overestimate.
pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0);
/// Maximum number of instructions in a single XCM fragment. A sanity check against
/// weight caculations getting too crazy.
pub MaxInstructions: u32 = 100;
Expand Down Expand Up @@ -472,7 +471,7 @@ where
}

parameter_types! {
pub const BaseXcmWeight: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub const BaseXcmWeight: Weight = Weight::from_parts(200_000_000u64, 0);
pub const MaxAssetsForTransfer: usize = 2;

// This is how we are going to detect whether the asset is a Reserve asset
Expand Down