git.delta.rocks / unique-network / refs/commits / bfab6035a123

difftreelog

Merge pull request #1044 from UniqueNetwork/fix/forbid-relay-as-root

Yaroslav Bolyukin2023-11-27parents: #425f6c1 #5bf7ef4.patch.diff
in: master
Forbid relay as root

5 files changed

addedjs-packages/tests/sub/governance/electsudo.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/js-packages/tests/sub/governance/electsudo.test.ts
@@ -0,0 +1,99 @@
+import type {IKeyringPair} from '@polkadot/types/types';
+import {usingPlaygrounds, itSub, expect, Pallets, requirePalletsOrSkip, describeGov} from '../../util/index.js';
+import {Event} from '@unique/playgrounds/unique.dev.js';
+import {initCouncil, democracyLaunchPeriod, democracyVotingPeriod, democracyEnactmentPeriod, clearCouncil, clearTechComm, initTechComm, ITechComms} from './util.js';
+import type {ICounselors} from './util.js';
+
+describeGov('Governance: Elect Sudo', () => {
+  let sudoer: IKeyringPair;
+  let donor: IKeyringPair;
+  let counselors: ICounselors;
+  let techComm: ITechComms;
+
+  const moreThanHalfCouncilThreshold = 3;
+
+  before(async function() {
+    await usingPlaygrounds(async (helper, privateKey) => {
+      requirePalletsOrSkip(this, helper, [Pallets.Council]);
+
+      sudoer = await privateKey('//Alice');
+      donor = await privateKey({url: import.meta.url});
+      counselors = await initCouncil(donor, sudoer);
+      techComm = await initTechComm(donor, sudoer);
+    });
+  });
+
+  after(async () => {
+    await clearCouncil(sudoer);
+    await clearTechComm(sudoer);
+  });
+
+  itSub('Democracy can elect a sudo account', async ({helper}) => {
+    const [newAccount] = await helper.arrange.createAccounts([1000n], donor);
+    const newSudoKey = newAccount.address;
+
+    // Have to use `afterEach` here instead of `after` to ensure it will be executed before `describe.after`.
+    afterEach(async () => {
+      // For some reason, the outer helper API is not initialized inside `afterEach`.
+      await usingPlaygrounds(async (helper) => {
+        await helper.executeExtrinsic(
+          newAccount,
+          'api.tx.sudo.setKey',
+          [sudoer.address],
+          false,
+        );
+      });
+    });
+
+    const democracyProposal = helper.constructApiCall('api.tx.utility.dispatchAs', [
+      {
+        system: {
+          Signed: sudoer.address,
+        },
+      },
+      helper.constructApiCall('api.tx.sudo.setKey', [newSudoKey]),
+    ]);
+
+    const councilProposal = await helper.democracy.externalProposeDefaultCall(democracyProposal);
+
+    const proposeResult = await helper.council.collective.propose(
+      counselors.filip,
+      councilProposal,
+      moreThanHalfCouncilThreshold,
+    );
+
+    const councilProposedEvent = Event.Council.Proposed.expect(proposeResult);
+    const proposalIndex = councilProposedEvent.proposalIndex;
+    const proposalHash = councilProposedEvent.proposalHash;
+
+    await helper.council.collective.vote(counselors.alex, proposalHash, proposalIndex, true);
+    await helper.council.collective.vote(counselors.charu, proposalHash, proposalIndex, true);
+    await helper.council.collective.vote(counselors.filip, proposalHash, proposalIndex, true);
+
+    await helper.council.collective.close(counselors.filip, proposalHash, proposalIndex);
+
+    const democracyStartedEvent = await helper.wait.expectEvent(democracyLaunchPeriod, Event.Democracy.Started);
+    const democracyReferendumIndex = democracyStartedEvent.referendumIndex;
+    const democracyThreshold = democracyStartedEvent.threshold;
+
+    expect(democracyThreshold).to.be.equal('SuperMajorityAgainst');
+
+    await helper.democracy.vote(newAccount, democracyReferendumIndex, {
+      Standard: {
+        vote: {
+          aye: true,
+          conviction: 1,
+        },
+        balance: 800n,
+      },
+    });
+
+    const passedReferendumEvent = await helper.wait.expectEvent(democracyVotingPeriod, Event.Democracy.Passed);
+    expect(passedReferendumEvent.referendumIndex).to.be.equal(democracyReferendumIndex);
+
+    await helper.wait.expectEvent(democracyEnactmentPeriod, Event.Scheduler.Dispatched);
+    const currentSudoKey = await helper.callRpc('api.query.sudo.key', [])
+      .then(k => k.toString());
+    expect(currentSudoKey).to.be.equal(newSudoKey);
+  });
+});
modifiedjs-packages/tests/xcm/lowLevelXcmQuartz.test.tsdiffbeforeafterboth
--- a/js-packages/tests/xcm/lowLevelXcmQuartz.test.ts
+++ b/js-packages/tests/xcm/lowLevelXcmQuartz.test.ts
@@ -298,67 +298,3 @@
     await testHelper.rejectReserveTransferUNQfrom('shiden', alice);
   });
 });
-
-describeXCM('[XCMLL] Integration test: The relay can do some root ops', () => {
-  let sudoer: IKeyringPair;
-
-  before(async function () {
-    await usingRelayPlaygrounds(relayUrl, async (_, privateKey) => {
-      sudoer = await privateKey('//Alice');
-    });
-  });
-
-  // At the moment there is no reliable way
-  // to establish the correspondence between the `ExecutedDownward` event
-  // and the relay's sent message due to `SetTopic` instruction
-  // containing an unpredictable topic silently added by the relay's messages on the router level.
-  // This changes the message hash on arrival to our chain.
-  //
-  // See:
-  // * The relay's router: https://github.com/paritytech/polkadot-sdk/blob/f60318f68687e601c47de5ad5ca88e2c3f8139a7/polkadot/runtime/westend/src/xcm_config.rs#L83
-  // * The `WithUniqueTopic` helper: https://github.com/paritytech/polkadot-sdk/blob/945ebbbcf66646be13d5b1d1bc26c8b0d3296d9e/polkadot/xcm/xcm-builder/src/routing.rs#L36
-  //
-  // Because of this, we insert time gaps between tests so
-  // different `ExecutedDownward` events won't interfere with each other.
-  afterEach(async () => {
-    await usingPlaygrounds(async (helper) => {
-      await helper.wait.newBlocks(3);
-    });
-  });
-
-  itSub('The relay can set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'plain');
-  });
-
-  itSub('The relay can batch set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'batch');
-  });
-
-  itSub('The relay can batchAll set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'batchAll');
-  });
-
-  itSub('The relay can forceBatch set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'forceBatch');
-  });
-
-  itSub('[negative] The relay cannot set balance', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'plain');
-  });
-
-  itSub('[negative] The relay cannot set balance via batch', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'batch');
-  });
-
-  itSub('[negative] The relay cannot set balance via batchAll', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'batchAll');
-  });
-
-  itSub('[negative] The relay cannot set balance via forceBatch', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'forceBatch');
-  });
-
-  itSub('[negative] The relay cannot set balance via dispatchAs', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'dispatchAs');
-  });
-});
modifiedjs-packages/tests/xcm/lowLevelXcmUnique.test.tsdiffbeforeafterboth
--- a/js-packages/tests/xcm/lowLevelXcmUnique.test.ts
+++ b/js-packages/tests/xcm/lowLevelXcmUnique.test.ts
@@ -364,67 +364,3 @@
     await testHelper.rejectReserveTransferUNQfrom('astar', alice);
   });
 });
-
-describeXCM('[XCMLL] Integration test: The relay can do some root ops', () => {
-  let sudoer: IKeyringPair;
-
-  before(async function () {
-    await usingRelayPlaygrounds(relayUrl, async (_, privateKey) => {
-      sudoer = await privateKey('//Alice');
-    });
-  });
-
-  // At the moment there is no reliable way
-  // to establish the correspondence between the `ExecutedDownward` event
-  // and the relay's sent message due to `SetTopic` instruction
-  // containing an unpredictable topic silently added by the relay's messages on the router level.
-  // This changes the message hash on arrival to our chain.
-  //
-  // See:
-  // * The relay's router: https://github.com/paritytech/polkadot-sdk/blob/f60318f68687e601c47de5ad5ca88e2c3f8139a7/polkadot/runtime/westend/src/xcm_config.rs#L83
-  // * The `WithUniqueTopic` helper: https://github.com/paritytech/polkadot-sdk/blob/945ebbbcf66646be13d5b1d1bc26c8b0d3296d9e/polkadot/xcm/xcm-builder/src/routing.rs#L36
-  //
-  // Because of this, we insert time gaps between tests so
-  // different `ExecutedDownward` events won't interfere with each other.
-  afterEach(async () => {
-    await usingPlaygrounds(async (helper) => {
-      await helper.wait.newBlocks(3);
-    });
-  });
-
-  itSub('The relay can set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'plain');
-  });
-
-  itSub('The relay can batch set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'batch');
-  });
-
-  itSub('The relay can batchAll set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'batchAll');
-  });
-
-  itSub('The relay can forceBatch set storage', async () => {
-    await testHelper.relayIsPermittedToSetStorage(sudoer, 'forceBatch');
-  });
-
-  itSub('[negative] The relay cannot set balance', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'plain');
-  });
-
-  itSub('[negative] The relay cannot set balance via batch', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'batch');
-  });
-
-  itSub('[negative] The relay cannot set balance via batchAll', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'batchAll');
-  });
-
-  itSub('[negative] The relay cannot set balance via forceBatch', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'forceBatch');
-  });
-
-  itSub('[negative] The relay cannot set balance via dispatchAs', async () => {
-    await testHelper.relayIsNotPermittedToSetBalance(sudoer, 'dispatchAs');
-  });
-});
modifiedjs-packages/tests/xcm/xcm.types.tsdiffbeforeafterboth
--- a/js-packages/tests/xcm/xcm.types.ts
+++ b/js-packages/tests/xcm/xcm.types.ts
@@ -505,117 +505,4 @@
       await expectFailedToTransact(helper, messageSent);
     });
   }
-
-  private async _relayXcmTransactSetStorage(variant: 'plain' | 'batch' | 'batchAll' | 'forceBatch') {
-    // eslint-disable-next-line require-await
-    return await usingPlaygrounds(async (helper) => {
-      const relayForceKV = () => {
-        const random = Math.random();
-        const key = `relay-forced-key (instance: ${random})`;
-        const val = `relay-forced-value (instance: ${random})`;
-        const call = helper.constructApiCall('api.tx.system.setStorage', [[[key, val]]]).method.toHex();
-
-        return {
-          call,
-          key,
-          val,
-        };
-      };
-
-      if(variant == 'plain') {
-        const kv = relayForceKV();
-        return {
-          program: helper.arrange.makeUnpaidSudoTransactProgram({
-            weightMultiplier: 1,
-            call: kv.call,
-          }),
-          kvs: [kv],
-        };
-      } else {
-        const kv0 = relayForceKV();
-        const kv1 = relayForceKV();
-
-        const batchCall = helper.constructApiCall(`api.tx.utility.${variant}`, [[kv0.call, kv1.call]]).method.toHex();
-        return {
-          program: helper.arrange.makeUnpaidSudoTransactProgram({
-            weightMultiplier: 2,
-            call: batchCall,
-          }),
-          kvs: [kv0, kv1],
-        };
-      }
-    });
-  }
-
-  async relayIsPermittedToSetStorage(relaySudoer: IKeyringPair, variant: 'plain' | 'batch' | 'batchAll' | 'forceBatch') {
-    const {program, kvs} = await this._relayXcmTransactSetStorage(variant);
-
-    await usingRelayPlaygrounds(relayUrl, async (helper) => {
-      await helper.getSudo().executeExtrinsic(relaySudoer, 'api.tx.xcmPallet.send', [
-        this._uniqueChainMultilocationForRelay(),
-        program,
-      ]);
-    });
-
-    await usingPlaygrounds(async (helper) => {
-      await expectDownwardXcmComplete(helper);
-
-      for(const kv of kvs) {
-        const forcedValue = await helper.callRpc('api.rpc.state.getStorage', [kv.key]);
-        expect(hexToString(forcedValue.toHex())).to.be.equal(kv.val);
-      }
-    });
-  }
-
-  private async _relayXcmTransactSetBalance(variant: 'plain' | 'batch' | 'batchAll' | 'forceBatch' | 'dispatchAs') {
-    // eslint-disable-next-line require-await
-    return await usingPlaygrounds(async (helper) => {
-      const emptyAccount = helper.arrange.createEmptyAccount().address;
-
-      const forceSetBalanceCall = helper.constructApiCall('api.tx.balances.forceSetBalance', [emptyAccount, 10_000n]).method.toHex();
-
-      let call;
-
-      if(variant == 'plain') {
-        call = forceSetBalanceCall;
-
-      } else if(variant == 'dispatchAs') {
-        call = helper.constructApiCall('api.tx.utility.dispatchAs', [
-          {
-            system: 'Root',
-          },
-          forceSetBalanceCall,
-        ]).method.toHex();
-      } else {
-        call = helper.constructApiCall(`api.tx.utility.${variant}`, [[forceSetBalanceCall]]).method.toHex();
-      }
-
-      return {
-        program: helper.arrange.makeUnpaidSudoTransactProgram({
-          weightMultiplier: 1,
-          call,
-        }),
-        emptyAccount,
-      };
-    });
-  }
-
-  async relayIsNotPermittedToSetBalance(
-    relaySudoer: IKeyringPair,
-    variant: 'plain' | 'batch' | 'batchAll' | 'forceBatch' | 'dispatchAs',
-  ) {
-    const {program, emptyAccount} = await this._relayXcmTransactSetBalance(variant);
-
-    await usingRelayPlaygrounds(relayUrl, async (helper) => {
-      await helper.getSudo().executeExtrinsic(relaySudoer, 'api.tx.xcmPallet.send', [
-        this._uniqueChainMultilocationForRelay(),
-        program,
-      ]);
-    });
-
-    await usingPlaygrounds(async (helper) => {
-      await expectDownwardXcmNoPermission(helper);
-      expect(await helper.balance.getSubstrate(emptyAccount)).to.be.equal(0n);
-    });
-  }
 }
modifiedruntime/common/config/xcm/mod.rsdiffbeforeafterboth
after · runtime/common/config/xcm/mod.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use cumulus_primitives_core::ParaId;18use frame_support::{19	parameter_types,20	traits::{ConstU32, Everything, Get, Nothing, ProcessMessageError},21};22use frame_system::EnsureRoot;23use pallet_xcm::XcmPassthrough;24use polkadot_parachain_primitives::primitives::Sibling;25use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery;26use sp_std::marker::PhantomData;27use staging_xcm::{28	latest::{prelude::*, MultiLocation, Weight},29	v3::Instruction,30};31use staging_xcm_builder::{32	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, ParentIsPreset, RelayChainAsNative,33	SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,34	SignedToAccountId32, SovereignSignedViaLocation,35};36use staging_xcm_executor::{37	traits::{Properties, ShouldExecute},38	XcmExecutor,39};40use up_common::types::AccountId;4142use crate::{43	xcm_barrier::Barrier, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem,44	PolkadotXcm, RelayNetwork, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue,45};4647#[cfg(feature = "foreign-assets")]48pub mod foreignassets;4950#[cfg(not(feature = "foreign-assets"))]51pub mod nativeassets;5253#[cfg(feature = "foreign-assets")]54pub use foreignassets as xcm_assets;55#[cfg(not(feature = "foreign-assets"))]56pub use nativeassets as xcm_assets;57use xcm_assets::{AssetTransactor, IsReserve, Trader};5859#[cfg(feature = "governance")]60use crate::runtime_common::config::governance;6162parameter_types! {63	pub const RelayLocation: MultiLocation = MultiLocation::parent();64	pub RelayOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();65	pub UniversalLocation: InteriorMultiLocation = (66		GlobalConsensus(crate::RelayNetwork::get()),67		Parachain(ParachainInfo::get().into()),68	).into();69	pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into())));7071	// One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.72	pub UnitWeightCost: Weight = Weight::from_parts(1_000_000, 1000); // ?73	pub const MaxInstructions: u32 = 100;74}7576/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used77/// when determining ownership of accounts for asset transacting and when attempting to use XCM78/// `Transact` in order to determine the dispatch Origin.79pub type LocationToAccountId = (80	// The parent (Relay-chain) origin converts to the default `AccountId`.81	ParentIsPreset<AccountId>,82	// Sibling parachain origins convert to AccountId via the `ParaId::into`.83	SiblingParachainConvertsVia<Sibling, AccountId>,84	// Straight up local `AccountId32` origins just alias directly to `AccountId`.85	AccountId32Aliases<RelayNetwork, AccountId>,86);8788/// No local origins on this chain are allowed to dispatch XCM sends/executions.89pub type LocalOriginToLocation = (SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>,);9091/// The means for routing XCM messages which are not for local execution into the right message92/// queues.93pub type XcmRouter = (94	// Two routers - use UMP to communicate with the relay chain:95	cumulus_primitives_utility::ParentAsUmp<ParachainSystem, PolkadotXcm, ()>,96	// ..and XCMP to communicate with the sibling chains.97	XcmpQueue,98);99100/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,101/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can102/// biases the kind of local `Origin` it will become.103pub type XcmOriginToTransactDispatchOrigin = (104	// Sovereign account converter; this attempts to derive an `AccountId` from the origin location105	// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for106	// foreign chains who want to have a local sovereign account on this chain which they control.107	SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,108	// Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when109	// recognised.110	RelayChainAsNative<RelayOrigin, RuntimeOrigin>,111	// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when112	// recognised.113	SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,114	// Native signed account converter; this just converts an `AccountId32` origin into a normal115	// `Origin::Signed` origin of the same 32-byte value.116	SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,117	// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.118	XcmPassthrough<RuntimeOrigin>,119);120121pub trait TryPass {122	fn try_pass<Call>(123		origin: &MultiLocation,124		message: &mut [Instruction<Call>],125	) -> Result<(), ProcessMessageError>;126}127128#[impl_trait_for_tuples::impl_for_tuples(30)]129impl TryPass for Tuple {130	fn try_pass<Call>(131		origin: &MultiLocation,132		message: &mut [Instruction<Call>],133	) -> Result<(), ProcessMessageError> {134		for_tuples!( #(135			Tuple::try_pass(origin, message)?;136		)* );137138		Ok(())139	}140}141142/// Deny executing the XCM if it matches any of the Deny filter regardless of anything else.143/// If it passes the Deny, and matches one of the Allow cases then it is let through.144pub struct DenyThenTry<Deny, Allow>(PhantomData<Deny>, PhantomData<Allow>)145where146	Deny: TryPass,147	Allow: ShouldExecute;148149impl<Deny, Allow> ShouldExecute for DenyThenTry<Deny, Allow>150where151	Deny: TryPass,152	Allow: ShouldExecute,153{154	fn should_execute<Call>(155		origin: &MultiLocation,156		message: &mut [Instruction<Call>],157		max_weight: Weight,158		properties: &mut Properties,159	) -> Result<(), ProcessMessageError> {160		Deny::try_pass(origin, message)?;161		Allow::should_execute(origin, message, max_weight, properties)162	}163}164165pub type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;166167pub struct XcmExecutorConfig<T>(PhantomData<T>);168impl<T> staging_xcm_executor::Config for XcmExecutorConfig<T>169where170	T: pallet_configuration::Config,171{172	type RuntimeCall = RuntimeCall;173	type XcmSender = XcmRouter;174	// How to withdraw and deposit an asset.175	type AssetTransactor = AssetTransactor;176	type OriginConverter = XcmOriginToTransactDispatchOrigin;177	type IsReserve = IsReserve;178	type IsTeleporter = (); // Teleportation is disabled179	type UniversalLocation = UniversalLocation;180	type Barrier = Barrier;181	type Weigher = Weigher;182	type Trader = Trader<T>;183	type ResponseHandler = PolkadotXcm;184	type SubscriptionService = PolkadotXcm;185	type PalletInstancesInfo = AllPalletsWithSystem;186	type MaxAssetsIntoHolding = ConstU32<8>;187188	type AssetTrap = PolkadotXcm;189	type AssetClaims = PolkadotXcm;190	type AssetLocker = ();191	type AssetExchanger = ();192	type FeeManager = ();193	type MessageExporter = ();194	type UniversalAliases = Nothing;195	type CallDispatcher = RuntimeCall;196	type SafeCallFilter = Nothing;197	type Aliasers = Nothing;198}199200#[cfg(feature = "runtime-benchmarks")]201parameter_types! {202	pub ReachableDest: Option<MultiLocation> = Some(Parent.into());203}204205impl pallet_xcm::Config for Runtime {206	type RuntimeEvent = RuntimeEvent;207	type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;208	type XcmRouter = XcmRouter;209	type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;210	type XcmExecuteFilter = Everything;211	type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;212	type XcmTeleportFilter = Everything;213	type XcmReserveTransferFilter = Everything;214	type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;215	type RuntimeOrigin = RuntimeOrigin;216	type RuntimeCall = RuntimeCall;217	const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;218	type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;219	type UniversalLocation = UniversalLocation;220	type Currency = Balances;221	type CurrencyMatcher = ();222	type TrustedLockers = ();223	type SovereignAccountOf = LocationToAccountId;224	type MaxLockers = ConstU32<8>;225	type WeightInfo = crate::weights::xcm::SubstrateWeight<Runtime>;226	type AdminOrigin = EnsureRoot<AccountId>;227	type MaxRemoteLockConsumers = ConstU32<0>;228	type RemoteLockConsumerIdentifier = ();229	#[cfg(feature = "runtime-benchmarks")]230	type ReachableDest = ReachableDest;231}232233impl cumulus_pallet_xcm::Config for Runtime {234	type RuntimeEvent = RuntimeEvent;235	type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;236}237impl cumulus_pallet_xcmp_queue::Config for Runtime {238	type WeightInfo = ();239	type RuntimeEvent = RuntimeEvent;240	type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;241	type ChannelInfo = ParachainSystem;242	type VersionWrapper = PolkadotXcm;243	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;244245	#[cfg(feature = "governance")]246	type ControllerOrigin = governance::RootOrTechnicalCommitteeMember;247248	#[cfg(not(feature = "governance"))]249	type ControllerOrigin = frame_system::EnsureRoot<AccountId>;250251	type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;252	type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;253}254255impl cumulus_pallet_dmp_queue::Config for Runtime {256	type RuntimeEvent = RuntimeEvent;257	type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;258	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;259}