diff --git a/CHANGELOG.md b/CHANGELOG.md index d5206b9c71..b89aeb9cd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,6 +112,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - [#8021](https://github.com/paritytech/polkadot-sdk/pull/8021): XCMP: use batching when enqueuing inbound messages This PR implements batching for the XCMP inbound enqueueing logic, which leads to an about ~75x performance improvement for that specific code. - [#9202](https://github.com/paritytech/polkadot-sdk/pull/9202): `apply_authorized_force_set_current_code` does not need to consume the whole block +- Proxy type `NonTranfer`: Use a whitelist of calls and remove some not useful calls from the whitelist ([polkadot-fellows/runtimes/pull/646](https://github.com/polkadot-fellows/runtimes/pull/646)) - Add Snowbridge V2 pallets, to enable Snowbridge V2 bridging: [polkadot-fellows/runtimes/pull/796](https://github.com/polkadot-fellows/runtimes/pull/796)) ## [1.6.1] 24.06.2025 diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 910ee911d3..0351bc07a9 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -549,16 +549,22 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - RuntimeCall::Assets { .. } | - RuntimeCall::NftFractionalization { .. } | - RuntimeCall::Nfts { .. } | - RuntimeCall::Uniques { .. } | + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | // We allow calling `vest` and merging vesting schedules, but obviously not // vested transfers. - RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) + RuntimeCall::Vesting(pallet_vesting::Call::vest { .. }) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other { .. }) | + RuntimeCall::Vesting(pallet_vesting::Call::merge_schedules { .. }) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::RemoteProxyRelayChain(_) ), ProxyType::CancelProxy => matches!( c, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index ab99944874..15c7ad3a29 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -499,15 +499,21 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - RuntimeCall::Assets { .. } | - RuntimeCall::Nfts { .. } | - RuntimeCall::Uniques { .. } | + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | // We allow calling `vest` and merging vesting schedules, but obviously not // vested transfers. - RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) + RuntimeCall::Vesting(pallet_vesting::Call::vest { .. }) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other { .. }) | + RuntimeCall::Vesting(pallet_vesting::Call::merge_schedules { .. }) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) ), ProxyType::CancelProxy => matches!( c, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index cf103ac503..98653874ad 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -336,7 +336,30 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }), + ProxyType::NonTransfer => matches!( + c, + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Preimage(_) | + RuntimeCall::Alliance(_) | + RuntimeCall::AllianceMotion(_) | + RuntimeCall::FellowshipCollective(_) | + RuntimeCall::FellowshipReferenda(_) | + RuntimeCall::FellowshipCore(_) | + RuntimeCall::FellowshipSalary(_) | + RuntimeCall::FellowshipTreasury(_) | + RuntimeCall::AmbassadorCollective(_) | + RuntimeCall::AmbassadorReferenda(_) | + RuntimeCall::AmbassadorCore(_) | + RuntimeCall::AmbassadorSalary(_) | + RuntimeCall::AmbassadorTreasury(_) + ), ProxyType::CancelProxy => matches!( c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) | diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 5f36dfd3bc..597b8dce7b 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -533,18 +533,24 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - // `purchase`, `renew`, `transfer` and `purchase_credit` are pretty self explanatory. - RuntimeCall::Broker(pallet_broker::Call::purchase { .. }) | - RuntimeCall::Broker(pallet_broker::Call::renew { .. }) | - RuntimeCall::Broker(pallet_broker::Call::transfer { .. }) | - RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) | - // `pool` doesn't transfer, but it defines the account to be paid for contributions - RuntimeCall::Broker(pallet_broker::Call::pool { .. }) | - // `assign` is essentially a transfer of a region NFT - RuntimeCall::Broker(pallet_broker::Call::assign { .. }) + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + // We don't allow `purchase`, `renew`, `transfer`, `purchase_credit`, + // `pool` doesn't transfer, but it defines the account to be paid for contributions, + // `assign` is essentially a transfer of a region NFT. + RuntimeCall::Broker(pallet_broker::Call::claim_revenue { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_region { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_contribution { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_history { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_renewal { .. }) ), ProxyType::CancelProxy => matches!( c, diff --git a/system-parachains/coretime/coretime-polkadot/src/lib.rs b/system-parachains/coretime/coretime-polkadot/src/lib.rs index 4ab80b5e75..be611a03d6 100644 --- a/system-parachains/coretime/coretime-polkadot/src/lib.rs +++ b/system-parachains/coretime/coretime-polkadot/src/lib.rs @@ -537,18 +537,24 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - // `purchase`, `renew`, `transfer` and `purchase_credit` are pretty self explanatory. - RuntimeCall::Broker(pallet_broker::Call::purchase { .. }) | - RuntimeCall::Broker(pallet_broker::Call::renew { .. }) | - RuntimeCall::Broker(pallet_broker::Call::transfer { .. }) | - RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) | - // `pool` doesn't transfer, but it defines the account to be paid for contributions - RuntimeCall::Broker(pallet_broker::Call::pool { .. }) | - // `assign` is essentially a transfer of a region NFT - RuntimeCall::Broker(pallet_broker::Call::assign { .. }) + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + // We don't allow `purchase`, `renew`, `transfer`, `purchase_credit`, + // `pool` doesn't transfer, but it defines the account to be paid for contributions, + // `assign` is essentially a transfer of a region NFT. + RuntimeCall::Broker(pallet_broker::Call::claim_revenue { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_region { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_contribution { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_history { .. }) | + RuntimeCall::Broker(pallet_broker::Call::drop_renewal { .. }) ), ProxyType::CancelProxy => matches!( c, diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 06a60f0f6e..3f1d8d9d8e 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -189,8 +189,26 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => - !matches!(c, RuntimeCall::Balances { .. } | RuntimeCall::EncointerBalances { .. }), + ProxyType::NonTransfer => matches!( + c, + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Collective(_) | + RuntimeCall::Membership(_) | + RuntimeCall::EncointerScheduler(_) | + RuntimeCall::EncointerCeremonies(_) | + RuntimeCall::EncointerCommunities(_) | + RuntimeCall::EncointerBazaar(_) | + RuntimeCall::EncointerReputationCommitments(_) | + RuntimeCall::EncointerFaucet(_) | + RuntimeCall::EncointerDemocracy(_) | + RuntimeCall::EncointerTreasuries(_) + ), ProxyType::BazaarEdit => matches!( c, RuntimeCall::EncointerBazaar(EncointerBazaarCall::create_offering { .. }) | diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index e4007fe2d1..7581c76cd1 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -486,15 +486,39 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - // `request_judgement` puts up a deposit to transfer to a registrar - RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }) | - // `set_subs` and `add_sub` will take and repatriate deposits from the proxied - // account, should not be allowed. - RuntimeCall::Identity(pallet_identity::Call::add_sub { .. }) | - RuntimeCall::Identity(pallet_identity::Call::set_subs { .. }) + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + // We don't allow: + // `request_judgement` puts up a deposit to transfer to a registrar, + // `set_subs` and `add_sub` will take and repatriate deposits from the proxied + // account, should not be allowed. + RuntimeCall::Identity(pallet_identity::Call::add_registrar { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::clear_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::cancel_request { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_fee { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_account_id { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_fields { .. }) | + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Identity(pallet_identity::Call::kill_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::rename_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::remove_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::quit_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::add_username_authority { .. }) | + RuntimeCall::Identity( + pallet_identity::Call::remove_username_authority { .. } + ) | RuntimeCall::Identity(pallet_identity::Call::set_username_for { .. }) | + RuntimeCall::Identity(pallet_identity::Call::accept_username { .. }) | + RuntimeCall::Identity(pallet_identity::Call::remove_expired_approval { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_primary_username { .. }) ), ProxyType::CancelProxy => matches!( c, diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs index f6a746d57b..9cc753800e 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -473,15 +473,39 @@ impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( + ProxyType::NonTransfer => matches!( c, - RuntimeCall::Balances { .. } | - // `request_judgement` puts up a deposit to transfer to a registrar - RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }) | - // `set_subs` and `add_sub` will take and repatriate deposits from the proxied - // account, should not be allowed. - RuntimeCall::Identity(pallet_identity::Call::add_sub { .. }) | - RuntimeCall::Identity(pallet_identity::Call::set_subs { .. }) + RuntimeCall::System(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + // We don't allow: + // `request_judgement` puts up a deposit to transfer to a registrar, + // `set_subs` and `add_sub` will take and repatriate deposits from the proxied + // account, should not be allowed. + RuntimeCall::Identity(pallet_identity::Call::add_registrar { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::clear_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::cancel_request { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_fee { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_account_id { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_fields { .. }) | + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Identity(pallet_identity::Call::kill_identity { .. }) | + RuntimeCall::Identity(pallet_identity::Call::rename_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::remove_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::quit_sub { .. }) | + RuntimeCall::Identity(pallet_identity::Call::add_username_authority { .. }) | + RuntimeCall::Identity( + pallet_identity::Call::remove_username_authority { .. } + ) | RuntimeCall::Identity(pallet_identity::Call::set_username_for { .. }) | + RuntimeCall::Identity(pallet_identity::Call::accept_username { .. }) | + RuntimeCall::Identity(pallet_identity::Call::remove_expired_approval { .. }) | + RuntimeCall::Identity(pallet_identity::Call::set_primary_username { .. }) ), ProxyType::CancelProxy => matches!( c,