Skip to content

Commit bf6c731

Browse files
gilescopejoepetrowskibkontur
authored
nit: diff minimisation between asset hub runtimes (#2951)
* diff minimisation between runtimes * another nit * Update parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs Co-authored-by: joe petrowski <[email protected]> * Update parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs Co-authored-by: joe petrowski <[email protected]> * Upgrade english * Removed unused `CheckedExtrinsic` (#2972) --------- Co-authored-by: joe petrowski <[email protected]> Co-authored-by: Branislav Kontur <[email protected]>
1 parent bd72f4c commit bf6c731

File tree

12 files changed

+8
-32
lines changed

12 files changed

+8
-32
lines changed

cumulus/parachain-template/runtime/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ pub type SignedExtra = (
110110
pub type UncheckedExtrinsic =
111111
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
112112

113-
/// Extrinsic type that has already been checked.
114-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
115-
116113
/// Executive: handles dispatch to the various modules.
117114
pub type Executive = frame_executive::Executive<
118115
Runtime,

cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ parameter_types! {
602602
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
603603
}
604604

605-
/// We allow root the StakingAdmin to execute privileged collator selection operations.
605+
/// We allow root and the `StakingAdmin` to execute privileged collator selection operations.
606606
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
607607
EnsureRoot<AccountId>,
608608
EnsureXcm<IsVoiceOfBody<GovernanceLocation, StakingAdminBodyId>>,
@@ -803,8 +803,6 @@ pub type SignedExtra = (
803803
/// Unchecked extrinsic type as expected by this runtime.
804804
pub type UncheckedExtrinsic =
805805
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
806-
/// Extrinsic type that has already been checked.
807-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
808806
/// Migrations to apply on runtime upgrade.
809807
pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,);
810808

cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ impl pallet_xcm::Config for Runtime {
470470
RuntimeCall,
471471
MaxInstructions,
472472
>;
473-
474473
type UniversalLocation = UniversalLocation;
475474
type RuntimeOrigin = RuntimeOrigin;
476475
type RuntimeCall = RuntimeCall;

cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ impl Default for ProxyType {
408408
Self::Any
409409
}
410410
}
411+
411412
impl InstanceFilter<RuntimeCall> for ProxyType {
412413
fn filter(&self, c: &RuntimeCall) -> bool {
413414
match self {
@@ -786,8 +787,6 @@ pub type SignedExtra = (
786787
/// Unchecked extrinsic type as expected by this runtime.
787788
pub type UncheckedExtrinsic =
788789
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
789-
/// Extrinsic type that has already been checked.
790-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
791790
/// Migrations to apply on runtime upgrade.
792791
pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,);
793792

@@ -1032,7 +1031,6 @@ impl_runtime_apis! {
10321031
Vec<frame_benchmarking::BenchmarkList>,
10331032
Vec<frame_support::traits::StorageInfo>,
10341033
) {
1035-
10361034
use frame_benchmarking::{Benchmarking, BenchmarkList};
10371035
use frame_support::traits::StorageInfoTrait;
10381036
use frame_system_benchmarking::Pallet as SystemBench;

cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub type CurrencyTransactor = CurrencyAdapter<
8686
(),
8787
>;
8888

89-
/// `AssetId/Balance` converter for `TrustBackedAssets``
89+
/// `AssetId`/`Balance` converter for `TrustBackedAssets`.
9090
pub type TrustBackedAssetsConvertedConcreteId =
9191
assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;
9292

@@ -346,7 +346,7 @@ impl Contains<RuntimeCall> for SafeCallFilter {
346346
pallet_uniques::Call::set_accept_ownership { .. } |
347347
pallet_uniques::Call::set_collection_max_supply { .. } |
348348
pallet_uniques::Call::set_price { .. } |
349-
pallet_uniques::Call::buy_item { .. },
349+
pallet_uniques::Call::buy_item { .. }
350350
)
351351
)
352352
}

cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,11 @@ impl pallet_asset_conversion::Config for Runtime {
321321
type PalletId = AssetConversionPalletId;
322322
type AllowMultiAssetPools = AllowMultiAssetPools;
323323
type MaxSwapPathLength = ConstU32<4>;
324-
325324
type MultiAssetId = Box<MultiLocation>;
326325
type MultiAssetIdConverter =
327326
MultiLocationConverter<WestendLocation, LocalAndForeignAssetsMultiLocationMatcher>;
328-
329327
type MintMinLiquidity = ConstU128<100>;
330-
331328
type WeightInfo = weights::pallet_asset_conversion::WeightInfo<Runtime>;
332-
333329
#[cfg(feature = "runtime-benchmarks")]
334330
type BenchmarkHelper =
335331
crate::xcm_config::BenchmarkMultiLocationConverter<parachain_info::Pallet<Runtime>>;
@@ -588,9 +584,9 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
588584
type RuntimeEvent = RuntimeEvent;
589585
type OnSystemEvent = ();
590586
type SelfParaId = parachain_info::Pallet<Runtime>;
591-
type OutboundXcmpMessageSource = XcmpQueue;
592587
type DmpMessageHandler = DmpQueue;
593588
type ReservedDmpWeight = ReservedDmpWeight;
589+
type OutboundXcmpMessageSource = XcmpQueue;
594590
type XcmpMessageHandler = XcmpQueue;
595591
type ReservedXcmpWeight = ReservedXcmpWeight;
596592
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;

cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use {cumulus_primitives_core::ParaId, sp_core::Get};
5151

5252
parameter_types! {
5353
pub const WestendLocation: MultiLocation = MultiLocation::parent();
54-
pub RelayNetwork: Option<NetworkId> = Some(NetworkId::Westend);
54+
pub const RelayNetwork: Option<NetworkId> = Some(NetworkId::Westend);
5555
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
5656
pub UniversalLocation: InteriorMultiLocation =
5757
X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into()));

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ pub type SignedExtra = (
105105
pub type UncheckedExtrinsic =
106106
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
107107

108-
/// Extrinsic type that has already been checked.
109-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
110-
111108
/// Migrations to apply on runtime upgrade.
112109
pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,);
113110

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ pub type SignedExtra = (
105105
pub type UncheckedExtrinsic =
106106
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
107107

108-
/// Extrinsic type that has already been checked.
109-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
110-
111108
/// Migrations to apply on runtime upgrade.
112109
pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,);
113110

cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,8 @@ pub type SignedExtra = (
623623
/// Unchecked extrinsic type as expected by this runtime.
624624
pub type UncheckedExtrinsic =
625625
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
626-
/// Extrinsic type that has already been checked.
627-
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
628-
// All migrations executed on runtime upgrade as a nested tuple of types implementing
629-
// `OnRuntimeUpgrade`. Included migrations must be idempotent.
626+
/// All migrations executed on runtime upgrade as a nested tuple of types implementing
627+
/// `OnRuntimeUpgrade`. Included migrations must be idempotent.
630628
type Migrations = (
631629
// v9420
632630
import_kusama_fellowship::Migration<Runtime, FellowshipCollectiveInstance>,

0 commit comments

Comments
 (0)