Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
31f7879
make docs for LocalOriginToLocation uniform across codebase
acatangiu Nov 1, 2024
7a0af10
pallet-xcm: add support for authorizing aliases
acatangiu Nov 1, 2024
879d48b
add stub weights
acatangiu Nov 6, 2024
9103e27
add benchmark code
acatangiu Nov 6, 2024
c29fc5d
add migration for authorized aliases
acatangiu Nov 6, 2024
e84293f
fix pallet-xcm authorized aliases
acatangiu Nov 6, 2024
0332aca
asset hub westend: add support for authorized aliases
acatangiu Nov 6, 2024
9447da4
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Nov 7, 2024
4611498
address comments and fix tests after rebase
acatangiu Nov 7, 2024
709cf3e
add prdoc
acatangiu Nov 7, 2024
200ccee
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Nov 7, 2024
35b4859
".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=we…
Nov 7, 2024
79bfce2
".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=ro…
Nov 7, 2024
673c3f6
".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=as…
Nov 7, 2024
ac5d4a6
".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=as…
Nov 7, 2024
70694dd
fix benchmarks
acatangiu Nov 7, 2024
61c8224
Update polkadot/xcm/pallet-xcm/src/benchmarking.rs
franciscoaguirre Nov 7, 2024
9d59105
Update polkadot/xcm/pallet-xcm/src/lib.rs
franciscoaguirre Nov 7, 2024
1b647db
Update polkadot/xcm/pallet-xcm/src/lib.rs
franciscoaguirre Nov 7, 2024
7b58df8
chore: change new_version to XCM_VERSION
franciscoaguirre Nov 7, 2024
8764367
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Nov 11, 2024
c239f8d
rename vars
acatangiu Nov 11, 2024
a606607
pallet-xcm: add expiry to authorized aliases
acatangiu Nov 12, 2024
b7ef64c
pallet-xcm: add storage deposit for authorized aliases
acatangiu Nov 12, 2024
40fcc27
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Jan 13, 2025
5bde333
fix conflicts
acatangiu Jan 13, 2025
4ed6e22
fix bugs, add tests
acatangiu Jan 14, 2025
8600075
remove alias auto-prune
acatangiu Jan 14, 2025
795e63e
define runtime APIs for authorized aliases
acatangiu Jan 14, 2025
4f35647
add events
acatangiu Jan 14, 2025
875c9ab
tweak prdoc
acatangiu Jan 14, 2025
327a2e1
remove debug prints
acatangiu Jan 14, 2025
af6abe8
fix import
acatangiu Jan 14, 2025
356c8f2
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Jan 14, 2025
29b0c0d
configure runtimes
acatangiu Jan 14, 2025
9792913
better configure runtimes
acatangiu Jan 16, 2025
31b5feb
implement runtime APIs
acatangiu Jan 16, 2025
825a4b4
fix test runtimes
acatangiu Jan 16, 2025
f2869b2
make runtime APIs truly versioned
acatangiu Jan 16, 2025
1d17ef4
fix tests
acatangiu Jan 16, 2025
bdd0f7b
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Jan 16, 2025
91e283a
fix clippy
acatangiu Jan 17, 2025
7056188
fix more test runtimes
acatangiu Jan 17, 2025
0a705ca
fix clippy
acatangiu Jan 17, 2025
caff17b
fix toml
acatangiu Jan 17, 2025
28b6989
fix benchmarks
acatangiu Jan 17, 2025
f434f45
fix prdoc
acatangiu Jan 17, 2025
ab80b6e
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Jan 17, 2025
a303dff
xcm-matcher: alias filter for remote account A to local account A
acatangiu Mar 20, 2025
a0207eb
people: add accounts aliasing test
acatangiu Mar 20, 2025
9fc747c
move test to macro for reuse
acatangiu Mar 20, 2025
c7505be
enhance macro, test multiple combinations
acatangiu Mar 21, 2025
76e2e69
implement aliasing rule for coretime and add tests
acatangiu Mar 21, 2025
d0489dd
implement aliasing rule for collectives and add tests
acatangiu Mar 21, 2025
bc42cd9
implement aliasing rule for asset hub and add tests
acatangiu Mar 21, 2025
fcfcd0a
implement aliasing rule for bridge hub and add tests
acatangiu Mar 21, 2025
561f67a
add more tests
acatangiu Mar 21, 2025
c4ba064
Merge branch 'master' of github.com:paritytech/polkadot-sdk into allo…
acatangiu Mar 21, 2025
0cb6362
add alias child locations tests
acatangiu Mar 24, 2025
74d6792
more aliasing tests
acatangiu Mar 24, 2025
97ceeb9
people: set identity for Alice on People using Alice on AH
acatangiu Mar 24, 2025
4d27dfe
Merge branch 'master' of github.com:paritytech/polkadot-sdk into allo…
acatangiu Mar 24, 2025
2bbd410
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] Mar 25, 2025
4bd4ddb
fix clippy
acatangiu Mar 25, 2025
eed5e19
adjust prdoc
acatangiu Mar 25, 2025
c1115e7
Merge branch 'master' into allow-direct-account-alias-system-chains
acatangiu Mar 25, 2025
eaaac24
fix clippy
acatangiu Mar 25, 2025
2683b6d
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Mar 25, 2025
311bb9f
fix merge
acatangiu Mar 25, 2025
04bea27
fix prdoc
acatangiu Mar 25, 2025
ffea31e
report error on trying to remove inexistent alias
acatangiu Mar 25, 2025
519d79d
add call for removing all authorized aliases for origin
acatangiu Mar 25, 2025
f7f2ba9
Merge branch 'allow-direct-account-alias-system-chains' of github.com…
acatangiu Mar 26, 2025
44c9124
fix tests
acatangiu Mar 26, 2025
55027c4
Apply suggestions from code review
acatangiu Mar 26, 2025
32d8f29
Update from github-actions[bot] running command 'fmt'
github-actions[bot] Mar 26, 2025
2bdf6ad
fix test
acatangiu Mar 26, 2025
311d140
Merge branch 'master' of github.com:paritytech/polkadot-sdk into allo…
acatangiu Mar 26, 2025
9c54d3f
fix merge damage
acatangiu Mar 26, 2025
ec3c895
add tests for authorized aliases
acatangiu Mar 26, 2025
35a1ac6
Merge branch 'allow-direct-account-alias-system-chains' of github.com…
acatangiu Mar 26, 2025
331d658
add authorized aliases cross-chain tests
acatangiu Mar 27, 2025
61a938e
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Mar 28, 2025
5491a12
use proper relative AH location
acatangiu Mar 28, 2025
f0f228f
fix clippy
acatangiu Mar 28, 2025
c6ba54b
fix test
acatangiu Mar 28, 2025
8f534cd
fix benchmarks
acatangiu Mar 28, 2025
f6e93ff
fix tests
acatangiu Mar 28, 2025
a0e573a
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Mar 31, 2025
4712e33
fix licence
acatangiu Apr 2, 2025
203ee3d
Merge branch 'master' of github.com:paritytech/polkadot-sdk into auth…
acatangiu Apr 2, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
// Estimated: `3963`
// Minimum execution time: 19_789_000 picoseconds.
Weight::from_parts(20_317_000, 3963)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `4002`
// Minimum execution time: 20_805_000 picoseconds.
Weight::from_parts(21_481_000, 4002)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ impl xcm_executor::Config for XcmConfig {
type XcmRecorder = PolkadotXcm;
}

/// Converts a local signed origin into an XCM location.
/// Forms the basis for local origins sending/executing XCMs.
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

pub type PriceForParentDelivery =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
// Estimated: `3963`
// Minimum execution time: 19_789_000 picoseconds.
Weight::from_parts(20_317_000, 3963)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `4002`
// Minimum execution time: 20_805_000 picoseconds.
Weight::from_parts(21_481_000, 4002)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use frame_support::{
},
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use pallet_xcm::{AuthorizedAliases, XcmPassthrough};
use parachains_common::{
xcm_config::{
AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier,
Expand Down Expand Up @@ -351,6 +351,12 @@ pub type TrustedTeleporters = (
IsForeignConcreteAsset<FromSiblingParachain<parachain_info::Pallet<Runtime>>>,
);

/// Defines origin aliasing rules for this chain.
///
/// - Allow any origin to alias into a child sub-location (equivalent to DescendOrigin),
/// - Allow origins explicitly authorized by the alias target location.
pub type TrustedAliasers = (AliasChildLocation, AuthorizedAliases<Runtime>);

/// Asset converter for pool assets.
/// Used to convert one asset to another, when there is a pool available between the two.
/// This type thus allows paying fees with any asset as long as there is a pool between said
Expand Down Expand Up @@ -463,16 +469,16 @@ impl xcm_executor::Config for XcmConfig {
(bridging::to_rococo::UniversalAliases, bridging::to_ethereum::UniversalAliases);
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
// We allow any origin to alias into a child sub-location (equivalent to DescendOrigin).
type Aliasers = AliasChildLocation;
type Aliasers = TrustedAliasers;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = PolkadotXcm;
}

/// Local origins on this chain are allowed to dispatch XCM sends/executions.
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

pub type PriceForParentDelivery =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use frame_support::{
fungibles::{
Create, Inspect as FungiblesInspect, InspectEnumerable, Mutate as FungiblesMutate,
},
ContainsPair,
},
weights::{Weight, WeightToFee as WeightToFeeT},
};
Expand All @@ -54,7 +55,7 @@ use std::{convert::Into, ops::Mul};
use testnet_parachains_constants::westend::{consensus::*, currency::UNITS, fee::WeightToFee};
use xcm::latest::{
prelude::{Assets as XcmAssets, *},
ROCOCO_GENESIS_HASH,
ROCOCO_GENESIS_HASH, WESTEND_GENESIS_HASH,
};
use xcm_builder::WithLatestLocationConverter;
use xcm_executor::traits::{ConvertLocation, JustTry, WeightTrader};
Expand Down Expand Up @@ -136,6 +137,7 @@ fn setup_pool_for_paying_fees_with_foreign_assets(
#[test]
fn test_buy_and_refund_weight_in_native() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -194,6 +196,7 @@ fn test_buy_and_refund_weight_in_native() {
#[test]
fn test_buy_and_refund_weight_with_swap_local_asset_xcm_trader() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -303,6 +306,7 @@ fn test_buy_and_refund_weight_with_swap_local_asset_xcm_trader() {
#[test]
fn test_buy_and_refund_weight_with_swap_foreign_asset_xcm_trader() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -413,6 +417,7 @@ fn test_buy_and_refund_weight_with_swap_foreign_asset_xcm_trader() {
#[test]
fn test_asset_xcm_take_first_trader() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -491,6 +496,7 @@ fn test_asset_xcm_take_first_trader() {
#[test]
fn test_foreign_asset_xcm_take_first_trader() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -572,6 +578,7 @@ fn test_foreign_asset_xcm_take_first_trader() {
#[test]
fn test_asset_xcm_take_first_trader_with_refund() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -651,6 +658,7 @@ fn test_asset_xcm_take_first_trader_with_refund() {
#[test]
fn test_asset_xcm_take_first_trader_refund_not_possible_since_amount_less_than_ed() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -703,6 +711,7 @@ fn test_asset_xcm_take_first_trader_refund_not_possible_since_amount_less_than_e
#[test]
fn test_that_buying_ed_refund_does_not_refund_for_take_first_trader() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -767,6 +776,7 @@ fn test_that_buying_ed_refund_does_not_refund_for_take_first_trader() {
#[test]
fn test_asset_xcm_take_first_trader_not_possible_for_non_sufficient_assets() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -828,6 +838,7 @@ fn test_assets_balances_api_works() {
use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi;

ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
Expand Down Expand Up @@ -942,6 +953,90 @@ fn test_assets_balances_api_works() {
});
}

#[test]
fn authorized_aliases_work() {
ExtBuilder::<Runtime>::default()
.with_tracing()
.with_collators(vec![AccountId::from(ALICE)])
.with_session_keys(vec![(
AccountId::from(ALICE),
AccountId::from(ALICE),
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) },
)])
.build()
.execute_with(|| {
let alice: AccountId = ALICE.into();
let local_alice = Location::new(
0,
AccountId32 { network: Some(ByGenesis(WESTEND_GENESIS_HASH)), id: ALICE },
);
let alice_on_sibling_para =
Location::new(1, [Parachain(42), AccountId32 { network: None, id: ALICE }]);
let alice_on_relay = Location::new(1, AccountId32 { network: None, id: ALICE });
let bob_on_relay = Location::new(1, AccountId32 { network: None, id: [42_u8; 32] });

// neither `alice_on_sibling_para`, `alice_on_relay`, `bob_on_relay` are allowed to
// alias into `local_alice`
for aliaser in [&alice_on_sibling_para, &alice_on_relay, &bob_on_relay] {
assert!(!<XcmConfig as xcm_executor::Config>::Aliasers::contains(
aliaser,
&local_alice
));
}

// Alice explicitly authorizes `alice_on_sibling_para` to alias her local account
assert_ok!(PolkadotXcm::add_authorized_alias(
RuntimeHelper::origin_of(alice.clone()),
Box::new(alice_on_sibling_para.clone().into())
));

// `alice_on_sibling_para` now explicitly allowed to alias into `local_alice`
assert!(<XcmConfig as xcm_executor::Config>::Aliasers::contains(
&alice_on_sibling_para,
&local_alice
));
// as expected, `alice_on_relay` and `bob_on_relay` still can't alias into `local_alice`
for aliaser in [&alice_on_relay, &bob_on_relay] {
assert!(!<XcmConfig as xcm_executor::Config>::Aliasers::contains(
aliaser,
&local_alice
));
}

// Alice explicitly authorizes `alice_on_relay` to alias her local account
assert_ok!(PolkadotXcm::add_authorized_alias(
RuntimeHelper::origin_of(alice.clone()),
Box::new(alice_on_relay.clone().into())
));
// Now both `alice_on_relay` and `alice_on_sibling_para` can alias into her local
// account
for aliaser in [&alice_on_relay, &alice_on_sibling_para] {
assert!(<XcmConfig as xcm_executor::Config>::Aliasers::contains(
aliaser,
&local_alice
));
}

// Alice removes authorization for `alice_on_relay` to alias her local account
assert_ok!(PolkadotXcm::remove_authorized_alias(
RuntimeHelper::origin_of(alice.clone()),
Box::new(alice_on_relay.clone().into())
));

// `alice_on_relay` no longer allowed to alias into `local_alice`
assert!(!<XcmConfig as xcm_executor::Config>::Aliasers::contains(
&alice_on_relay,
&local_alice
));

// `alice_on_sibling_para` still allowed to alias into `local_alice`
assert!(<XcmConfig as xcm_executor::Config>::Aliasers::contains(
&alice_on_sibling_para,
&local_alice
));
})
}

asset_test_utils::include_teleports_for_native_asset_works!(
Runtime,
AllPalletsWithoutSystem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
// Estimated: `3963`
// Minimum execution time: 19_789_000 picoseconds.
Weight::from_parts(20_317_000, 3963)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `4002`
// Minimum execution time: 20_805_000 picoseconds.
Weight::from_parts(21_481_000, 4002)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ impl xcm_executor::Config for XcmConfig {
pub type PriceForParentDelivery =
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, ParachainSystem>;

/// Converts a local signed origin into an XCM location.
/// Forms the basis for local origins sending/executing XCMs.
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

/// The means for routing XCM messages which are not for local execution into the right message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `498`
// Estimated: `3963`
// Minimum execution time: 19_789_000 picoseconds.
Weight::from_parts(20_317_000, 3963)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::AuthorizedAliasesMap` (r:1 w:1)
/// Proof: `PolkadotXcm::AuthorizedAliasesMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `4002`
// Minimum execution time: 20_805_000 picoseconds.
Weight::from_parts(21_481_000, 4002)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ impl xcm_executor::Config for XcmConfig {
pub type PriceForParentDelivery =
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, ParachainSystem>;

/// Converts a local signed origin into an XCM location.
/// Forms the basis for local origins sending/executing XCMs.
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

/// The means for routing XCM messages which are not for local execution into the right message
Expand Down
Loading
Loading