From 31e69e91176343896810d8e495569b9418bfc392 Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Wed, 18 Mar 2026 16:16:19 +0100 Subject: [PATCH 1/5] Remove pallet proxy --- Cargo.lock | 2 +- runtime/vflow/Cargo.toml | 8 +- runtime/vflow/src/benchmark.rs | 1 - runtime/vflow/src/configs/ethereum_xcm.rs | 20 +- runtime/vflow/src/configs/system.rs | 91 +------ runtime/vflow/src/lib.rs | 2 +- runtime/vflow/src/migrations.rs | 18 +- runtime/vflow/src/tests/constants_test.rs | 16 -- runtime/vflow/src/tests/storage.rs | 1 - .../vflow/src/tests/use_correct_weights.rs | 10 - runtime/vflow/src/types.rs | 10 +- runtime/vflow/src/weights.rs | 1 - runtime/vflow/src/weights/pallet_proxy.rs | 239 ------------------ 13 files changed, 34 insertions(+), 385 deletions(-) delete mode 100644 runtime/vflow/src/weights/pallet_proxy.rs diff --git a/Cargo.lock b/Cargo.lock index bd23bf7..32bbd2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17913,6 +17913,7 @@ dependencies = [ "fp-rpc", "fp-self-contained", "frame-benchmarking", + "frame-executive", "frame-support", "frame-system", "frame-system-benchmarking", @@ -17939,7 +17940,6 @@ dependencies = [ "pallet-evm-precompile-simple", "pallet-message-queue", "pallet-multisig", - "pallet-proxy", "pallet-session", "pallet-sudo", "pallet-timestamp", diff --git a/runtime/vflow/Cargo.toml b/runtime/vflow/Cargo.toml index 65e1aea..882f7ef 100644 --- a/runtime/vflow/Cargo.toml +++ b/runtime/vflow/Cargo.toml @@ -25,6 +25,7 @@ cfg-if = { workspace = true } # Substrate frame-benchmarking = {workspace = true, optional = true} +frame-executive = {workspace = true} frame-support = {workspace = true} frame-system = {workspace = true} frame-system-benchmarking = {workspace = true, optional = true} @@ -36,7 +37,6 @@ pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} pallet-deployment-permissions = {workspace = true} pallet-message-queue = {workspace = true} pallet-multisig = {workspace = true} -pallet-proxy = {workspace = true} pallet-session = {workspace = true} pallet-collator-selection = {workspace = true} pallet-sudo = {workspace = true} @@ -130,6 +130,7 @@ std = [ "fp-rpc/std", "fp-self-contained/std", "frame-benchmarking?/std", + "frame-executive/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -154,7 +155,6 @@ std = [ "pallet-evm/std", "pallet-message-queue/std", "pallet-multisig/std", - "pallet-proxy/std", "pallet-session/std", "pallet-sudo/std", "pallet-timestamp/std", @@ -210,8 +210,6 @@ runtime-benchmarks = [ "pallet-evm/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-session/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-transaction-payment/runtime-benchmarks", @@ -236,6 +234,7 @@ try-runtime = [ "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", "fp-self-contained/try-runtime", + "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", @@ -250,7 +249,6 @@ try-runtime = [ "pallet-evm/try-runtime", "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", - "pallet-proxy/try-runtime", "pallet-session/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", diff --git a/runtime/vflow/src/benchmark.rs b/runtime/vflow/src/benchmark.rs index c726ee5..8d426f3 100644 --- a/runtime/vflow/src/benchmark.rs +++ b/runtime/vflow/src/benchmark.rs @@ -18,7 +18,6 @@ frame_benchmarking::define_benchmarks!( [frame_system_extensions, SystemExtensionsBench::] [cumulus_pallet_parachain_system, ParachainSystem] [pallet_timestamp, Timestamp] - [pallet_proxy, Proxy] [pallet_utility, Utility] [pallet_multisig, Multisig] [pallet_transaction_payment, TransactionPayment] diff --git a/runtime/vflow/src/configs/ethereum_xcm.rs b/runtime/vflow/src/configs/ethereum_xcm.rs index 4afa3a1..7b21a21 100644 --- a/runtime/vflow/src/configs/ethereum_xcm.rs +++ b/runtime/vflow/src/configs/ethereum_xcm.rs @@ -16,27 +16,15 @@ //! In this module, we provide the configurations for the ethereum-xcm pallet. use crate::{ - configs::system::{ProxyType, ReservedXcmpWeight}, - AccountId, BlockNumber, Runtime, + configs::system::ReservedXcmpWeight, + AccountId, Runtime, RuntimeEvent, }; -use frame_support::ensure; use frame_system::EnsureRoot; -use sp_runtime::traits::Zero; pub struct EthereumXcmEnsureProxy; impl xcm_primitives::EnsureProxy for EthereumXcmEnsureProxy { - fn ensure_ok(delegator: AccountId, delegatee: AccountId) -> Result<(), &'static str> { - // The EVM implicitly contains an Any proxy, so we only allow for "Any" proxies - let def: pallet_proxy::ProxyDefinition = - pallet_proxy::Pallet::::find_proxy( - &delegator, - &delegatee, - Some(ProxyType::Any), - ) - .map_err(|_| "proxy error: expected `ProxyType::Any`")?; - // We only allow to use it for delay zero proxies, as the call will immediatly be executed - ensure!(def.delay.is_zero(), "proxy delay is Non-zero`"); - Ok(()) + fn ensure_ok(_delegator: AccountId, _delegatee: AccountId) -> Result<(), &'static str> { + Err("proxy pallet removed") } } diff --git a/runtime/vflow/src/configs/system.rs b/runtime/vflow/src/configs/system.rs index c69c721..3247e62 100644 --- a/runtime/vflow/src/configs/system.rs +++ b/runtime/vflow/src/configs/system.rs @@ -28,19 +28,20 @@ use crate::{ AccountId, Aura, Balance, Balances, Block, Hash, MessageQueue, Nonce, OriginCaller, PalletInfo, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, RuntimeTask, XcmpQueue, }; -use core::fmt::Debug; -use cumulus_pallet_parachain_system::{ParachainSetCode, RelayNumberMonotonicallyIncreases}; +use cumulus_pallet_parachain_system::{ + DefaultCoreSelector, ParachainSetCode, RelayNumberMonotonicallyIncreases, +}; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ derive_impl, dispatch::DispatchClass, - pallet_prelude::{ConstU32, Decode, Encode, MaxEncodedLen, TypeInfo}, + pallet_prelude::ConstU32, parameter_types, - traits::{ConstU64, Contains, InstanceFilter}, + traits::{ConstU64, Contains}, }; use frame_system::limits::{BlockLength, BlockWeights}; use polkadot_runtime_common::BlockHashCount; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +use sp_runtime::traits::IdentityLookup; use sp_version::RuntimeVersion; use sp_weights::Weight; @@ -79,18 +80,8 @@ parameter_types! { pub struct NormalFilter; impl Contains for NormalFilter { - fn contains(c: &RuntimeCall) -> bool { - match c { - // We filter anonymous proxy as they make "reserve" inconsistent - // See: https://github.com/paritytech/polkadot-sdk/blob/v1.9.0-rc2/substrate/frame/proxy/src/lib.rs#L260 - RuntimeCall::Proxy(method) => !matches!( - method, - pallet_proxy::Call::create_pure { .. } - | pallet_proxy::Call::kill_pure { .. } - | pallet_proxy::Call::remove_proxies { .. } - ), - _ => true, - } + fn contains(_c: &RuntimeCall) -> bool { + true } } @@ -203,69 +194,3 @@ impl pallet_timestamp::Config for Runtime { type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::ZKVEvmWeight; } - -parameter_types! { - pub const MaxProxies: u32 = 32; - pub const MaxPending: u32 = 32; - pub const ProxyDepositBase: Balance = deposit(1, 40); - pub const AnnouncementDepositBase: Balance = deposit(1, 48); - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); -} - -/// The type used to represent the kinds of proxying allowed. -/// If you are adding new pallets, consider adding new ProxyType variant -#[derive( - Copy, - Clone, - Decode, - parity_scale_codec::DecodeWithMemTracking, - Debug, - Default, - Encode, - Eq, - MaxEncodedLen, - Ord, - PartialEq, - PartialOrd, - TypeInfo, -)] -pub enum ProxyType { - /// Allows to proxy all calls - #[default] - Any, - /// Allows all non-transfer calls - NonTransfer, - /// Allows to finish the proxy - CancelProxy, -} - -impl InstanceFilter for ProxyType { - fn filter(&self, c: &RuntimeCall) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }), - ProxyType::CancelProxy => matches!( - c, - RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) - | RuntimeCall::Multisig { .. } - ), - } - } -} - -impl pallet_proxy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::ZKVEvmWeight; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; - type BlockNumberProvider = frame_system::Pallet; -} diff --git a/runtime/vflow/src/lib.rs b/runtime/vflow/src/lib.rs index 43a0803..85ca309 100644 --- a/runtime/vflow/src/lib.rs +++ b/runtime/vflow/src/lib.rs @@ -24,6 +24,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); pub mod configs; mod genesis_config_presets; +mod migrations; mod precompiles; pub use precompiles::Precompiles; @@ -205,7 +206,6 @@ construct_runtime!( ParachainSystem: cumulus_pallet_parachain_system = 1, Timestamp: pallet_timestamp = 2, ParachainInfo: parachain_info = 3, // No weight - Proxy: pallet_proxy = 4, Utility: pallet_utility = 5, Multisig: pallet_multisig = 6, WeightReclaim: cumulus_pallet_weight_reclaim = 7, diff --git a/runtime/vflow/src/migrations.rs b/runtime/vflow/src/migrations.rs index 1c5bcea..0ba5207 100644 --- a/runtime/vflow/src/migrations.rs +++ b/runtime/vflow/src/migrations.rs @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::Runtime; +use frame_support::{migrations::RemovePallet, parameter_types}; -/// Migrations to run on the next runtime upgrade. -pub type Unreleased = ( - pallet_session::migrations::v1::MigrateV0ToV1< - Runtime, - pallet_session::migrations::v1::InitOffenceSeverity, - >, - cumulus_pallet_aura_ext::migration::MigrateV0ToV1, -); +parameter_types! { + pub const ProxyPalletName: &'static str = "Proxy"; +} + +pub type RemoveProxyPallet = + RemovePallet::DbWeight>; + +pub type Migrations = (RemoveProxyPallet,); diff --git a/runtime/vflow/src/tests/constants_test.rs b/runtime/vflow/src/tests/constants_test.rs index 01a04a1..6192c34 100644 --- a/runtime/vflow/src/tests/constants_test.rs +++ b/runtime/vflow/src/tests/constants_test.rs @@ -87,22 +87,6 @@ mod runtime_tests { ); } - #[test] - fn proxy_constants() { - use configs::system::*; - assert_eq!(MaxProxies::get(), 32); - - assert_eq!(MaxPending::get(), 32); - - assert_eq!(ProxyDepositBase::get(), deposit(1, 40)); - - assert_eq!(AnnouncementDepositBase::get(), deposit(1, 48)); - - assert_eq!(ProxyDepositFactor::get(), deposit(0, 33)); - - assert_eq!(AnnouncementDepositFactor::get(), deposit(0, 66)); - } - #[test] fn balances_constants() { use configs::monetary::*; diff --git a/runtime/vflow/src/tests/storage.rs b/runtime/vflow/src/tests/storage.rs index 7de9d34..5d59d28 100644 --- a/runtime/vflow/src/tests/storage.rs +++ b/runtime/vflow/src/tests/storage.rs @@ -30,7 +30,6 @@ fn verify_pallet_prefixes() { assert_pallet_prefix::("ParachainSystem"); assert_pallet_prefix::("Timestamp"); assert_pallet_prefix::("ParachainInfo"); - assert_pallet_prefix::("Proxy"); assert_pallet_prefix::("Balances"); assert_pallet_prefix::("TransactionPayment"); assert_pallet_prefix::("Sudo"); diff --git a/runtime/vflow/src/tests/use_correct_weights.rs b/runtime/vflow/src/tests/use_correct_weights.rs index e56515b..d3a999a 100644 --- a/runtime/vflow/src/tests/use_correct_weights.rs +++ b/runtime/vflow/src/tests/use_correct_weights.rs @@ -65,16 +65,6 @@ fn pallet_timestamp() { ); } -#[test] -fn pallet_proxy() { - use pallet_proxy::WeightInfo; - - assert_eq!( - ::WeightInfo::create_pure(1), - weights::pallet_proxy::ZKVEvmWeight::::create_pure(1) - ); -} - #[test] fn pallet_utility() { use pallet_utility::WeightInfo; diff --git a/runtime/vflow/src/types.rs b/runtime/vflow/src/types.rs index ba23ac9..3bc7e94 100644 --- a/runtime/vflow/src/types.rs +++ b/runtime/vflow/src/types.rs @@ -34,8 +34,14 @@ pub type SignedPayload = generic::SignedPayload; pub type SignedExtra = ct::SignedExtra; /// Executive: handles dispatch to the various modules. -pub type Executive = - ct::Executive; +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + crate::migrations::Migrations, +>; /// Configures the number of blocks that can be created without submission of validity proof to the relay chain pub type ConsensusHook = ct::ConsensusHook; diff --git a/runtime/vflow/src/weights.rs b/runtime/vflow/src/weights.rs index 4d6dc2e..5a9aef4 100644 --- a/runtime/vflow/src/weights.rs +++ b/runtime/vflow/src/weights.rs @@ -29,7 +29,6 @@ pub mod pallet_deployment_permissions; pub mod pallet_evm; pub mod pallet_message_queue; pub mod pallet_multisig; -pub mod pallet_proxy; pub mod pallet_session; pub mod pallet_sudo; pub mod pallet_timestamp; diff --git a/runtime/vflow/src/weights/pallet_proxy.rs b/runtime/vflow/src/weights/pallet_proxy.rs deleted file mode 100644 index 2700141..0000000 --- a/runtime/vflow/src/weights/pallet_proxy.rs +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright 2024, Horizen Labs, Inc. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `pallet_proxy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 -//! DATE: 2026-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `c7ce67e3aa8d`, CPU: `AMD Ryzen 7 7700 8-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` - -// Executed Command: -// /usr/local/bin/vflow-node -// benchmark -// pallet -// --runtime -// /app/vflow_runtime.compact.compressed.wasm -// --genesis-builder=runtime -// --pallet -// pallet-proxy -// --extrinsic -// * -// --steps -// 50 -// --repeat -// 20 -// --heap-pages=4096 -// --header -// /data/benchmark/HEADER-APACHE2 -// --output -// /data/benchmark/runtime/vflow/src/weights/pallet_proxy.rs -// --template -// /data/benchmark/scripts/templates/deploy-weight-template.hbs -// --base-path=/tmp/tmp.ULYpBzd15e - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use crate::weights_aliases::*; -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use core::marker::PhantomData; - -/// Weights for `pallet_proxy` using the zkVerify node and recommended hardware. -pub struct ZKVEvmWeight(PhantomData); - -impl pallet_proxy::WeightInfo for ZKVEvmWeight { - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `182 + p * (25 ±0)` - // Estimated: `4310` - // Minimum execution time: 15_849_000 picoseconds. - Weight::from_parts(16_341_480, 4310) - // Standard Error: 1_209 - .saturating_add(Weight::from_parts(56_599, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `434 + a * (56 ±0) + p * (25 ±0)` - // Estimated: `5302` - // Minimum execution time: 49_382_000 picoseconds. - Weight::from_parts(49_689_624, 5302) - // Standard Error: 2_821 - .saturating_add(Weight::from_parts(279_734, 0).saturating_mul(a.into())) - // Standard Error: 2_914 - .saturating_add(Weight::from_parts(44_351, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `362 + a * (56 ±0)` - // Estimated: `5302` - // Minimum execution time: 36_267_000 picoseconds. - Weight::from_parts(36_461_213, 5302) - // Standard Error: 4_620 - .saturating_add(Weight::from_parts(283_055, 0).saturating_mul(a.into())) - // Standard Error: 4_773 - .saturating_add(Weight::from_parts(15_687, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `362 + a * (56 ±0)` - // Estimated: `5302` - // Minimum execution time: 36_367_000 picoseconds. - Weight::from_parts(36_921_832, 5302) - // Standard Error: 3_017 - .saturating_add(Weight::from_parts(273_710, 0).saturating_mul(a.into())) - // Standard Error: 3_117 - .saturating_add(Weight::from_parts(6_976, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `378 + a * (56 ±0) + p * (25 ±0)` - // Estimated: `5302` - // Minimum execution time: 46_376_000 picoseconds. - Weight::from_parts(46_181_346, 5302) - // Standard Error: 2_981 - .saturating_add(Weight::from_parts(310_511, 0).saturating_mul(a.into())) - // Standard Error: 3_080 - .saturating_add(Weight::from_parts(32_046, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn add_proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `182 + p * (25 ±0)` - // Estimated: `4310` - // Minimum execution time: 32_741_000 picoseconds. - Weight::from_parts(34_207_800, 4310) - // Standard Error: 3_043 - .saturating_add(Weight::from_parts(44_727, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn remove_proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `182 + p * (25 ±0)` - // Estimated: `4310` - // Minimum execution time: 32_020_000 picoseconds. - Weight::from_parts(33_288_835, 4310) - // Standard Error: 1_548 - .saturating_add(Weight::from_parts(56_227, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn remove_proxies(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `182 + p * (25 ±0)` - // Estimated: `4310` - // Minimum execution time: 31_880_000 picoseconds. - Weight::from_parts(31_083_331, 4310) - // Standard Error: 3_484 - .saturating_add(Weight::from_parts(2_386_089, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `194` - // Estimated: `4310` - // Minimum execution time: 36_719_000 picoseconds. - Weight::from_parts(38_126_742, 4310) - // Standard Error: 2_622 - .saturating_add(Weight::from_parts(26_454, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 30]`. - fn kill_pure(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `207 + p * (25 ±0)` - // Estimated: `4310` - // Minimum execution time: 33_853_000 picoseconds. - Weight::from_parts(35_353_094, 4310) - // Standard Error: 2_704 - .saturating_add(Weight::from_parts(54_654, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`) - fn poke_deposit() -> Weight { - // Proof Size summary in bytes: - // Measured: `459` - // Estimated: `5302` - // Minimum execution time: 64_430_000 picoseconds. - Weight::from_parts(65_702_000, 5302) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } -} From 13ed3dfa7659916b2e5abfda8607a2f9a8bdf3ac Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Thu, 19 Mar 2026 12:34:02 +0100 Subject: [PATCH 2/5] Format --- runtime/vflow/src/configs/ethereum_xcm.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runtime/vflow/src/configs/ethereum_xcm.rs b/runtime/vflow/src/configs/ethereum_xcm.rs index 7b21a21..52ece70 100644 --- a/runtime/vflow/src/configs/ethereum_xcm.rs +++ b/runtime/vflow/src/configs/ethereum_xcm.rs @@ -15,10 +15,7 @@ //! In this module, we provide the configurations for the ethereum-xcm pallet. -use crate::{ - configs::system::ReservedXcmpWeight, - AccountId, Runtime, RuntimeEvent, -}; +use crate::{configs::system::ReservedXcmpWeight, AccountId, Runtime, RuntimeEvent}; use frame_system::EnsureRoot; pub struct EthereumXcmEnsureProxy; From a0db5c3f74a4a1a7771e2eb4ee9f2aedba546583 Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Mon, 23 Mar 2026 11:31:50 +0100 Subject: [PATCH 3/5] Remove custom filter implementation --- runtime/vflow/src/configs/system.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/runtime/vflow/src/configs/system.rs b/runtime/vflow/src/configs/system.rs index 3247e62..e27bd67 100644 --- a/runtime/vflow/src/configs/system.rs +++ b/runtime/vflow/src/configs/system.rs @@ -37,7 +37,7 @@ use frame_support::{ dispatch::DispatchClass, pallet_prelude::ConstU32, parameter_types, - traits::{ConstU64, Contains}, + traits::{ConstU64, Everything}, }; use frame_system::limits::{BlockLength, BlockWeights}; use polkadot_runtime_common::BlockHashCount; @@ -78,13 +78,6 @@ parameter_types! { pub const SS58Prefix: u16 = 0; } -pub struct NormalFilter; -impl Contains for NormalFilter { - fn contains(_c: &RuntimeCall) -> bool { - true - } -} - /// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from /// [`ParaChainDefaultConfig`](`struct@frame_system::config_preludes::ParaChainDefaultConfig`), /// but overridden as needed. @@ -95,7 +88,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The basic call filter to use in dispatchable. - type BaseCallFilter = NormalFilter; + type BaseCallFilter = Everything; /// The block type. type Block = Block; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). From 4b2161e442c628486caa5d9fed9b917d382709fb Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Wed, 10 Jun 2026 16:35:03 +0200 Subject: [PATCH 4/5] Rebase fixup --- runtime/vflow/Cargo.toml | 1 + runtime/vflow/src/configs/ethereum_xcm.rs | 2 +- runtime/vflow/src/configs/system.rs | 4 +--- runtime/vflow/src/lib.rs | 1 - runtime/vflow/src/migrations.rs | 11 ++++++++++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/runtime/vflow/Cargo.toml b/runtime/vflow/Cargo.toml index 882f7ef..f87e093 100644 --- a/runtime/vflow/Cargo.toml +++ b/runtime/vflow/Cargo.toml @@ -210,6 +210,7 @@ runtime-benchmarks = [ "pallet-evm/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", + "pallet-session/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-transaction-payment/runtime-benchmarks", diff --git a/runtime/vflow/src/configs/ethereum_xcm.rs b/runtime/vflow/src/configs/ethereum_xcm.rs index 52ece70..d2085d5 100644 --- a/runtime/vflow/src/configs/ethereum_xcm.rs +++ b/runtime/vflow/src/configs/ethereum_xcm.rs @@ -15,7 +15,7 @@ //! In this module, we provide the configurations for the ethereum-xcm pallet. -use crate::{configs::system::ReservedXcmpWeight, AccountId, Runtime, RuntimeEvent}; +use crate::{configs::system::ReservedXcmpWeight, AccountId, Runtime}; use frame_system::EnsureRoot; pub struct EthereumXcmEnsureProxy; diff --git a/runtime/vflow/src/configs/system.rs b/runtime/vflow/src/configs/system.rs index e27bd67..1aef18a 100644 --- a/runtime/vflow/src/configs/system.rs +++ b/runtime/vflow/src/configs/system.rs @@ -28,9 +28,7 @@ use crate::{ AccountId, Aura, Balance, Balances, Block, Hash, MessageQueue, Nonce, OriginCaller, PalletInfo, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, RuntimeTask, XcmpQueue, }; -use cumulus_pallet_parachain_system::{ - DefaultCoreSelector, ParachainSetCode, RelayNumberMonotonicallyIncreases, -}; +use cumulus_pallet_parachain_system::{ParachainSetCode, RelayNumberMonotonicallyIncreases}; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ derive_impl, diff --git a/runtime/vflow/src/lib.rs b/runtime/vflow/src/lib.rs index 85ca309..ca25d76 100644 --- a/runtime/vflow/src/lib.rs +++ b/runtime/vflow/src/lib.rs @@ -24,7 +24,6 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); pub mod configs; mod genesis_config_presets; -mod migrations; mod precompiles; pub use precompiles::Precompiles; diff --git a/runtime/vflow/src/migrations.rs b/runtime/vflow/src/migrations.rs index 0ba5207..4738583 100644 --- a/runtime/vflow/src/migrations.rs +++ b/runtime/vflow/src/migrations.rs @@ -13,6 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use crate::Runtime; use frame_support::{migrations::RemovePallet, parameter_types}; parameter_types! { @@ -22,4 +23,12 @@ parameter_types! { pub type RemoveProxyPallet = RemovePallet::DbWeight>; -pub type Migrations = (RemoveProxyPallet,); +/// Migrations to run on the next runtime upgrade. +pub type Migrations = ( + RemoveProxyPallet, + pallet_session::migrations::v1::MigrateV0ToV1< + Runtime, + pallet_session::migrations::v1::InitOffenceSeverity, + >, + cumulus_pallet_aura_ext::migration::MigrateV0ToV1, +); From e5672d5bafee38265ac15740e1d45b3b111007e2 Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Wed, 10 Jun 2026 18:23:02 +0200 Subject: [PATCH 5/5] Revert changes leaked through rebase --- Cargo.lock | 1 - runtime/vflow/Cargo.toml | 3 --- runtime/vflow/src/migrations.rs | 2 +- runtime/vflow/src/types.rs | 10 ++-------- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32bbd2f..0b78d54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17913,7 +17913,6 @@ dependencies = [ "fp-rpc", "fp-self-contained", "frame-benchmarking", - "frame-executive", "frame-support", "frame-system", "frame-system-benchmarking", diff --git a/runtime/vflow/Cargo.toml b/runtime/vflow/Cargo.toml index f87e093..eb267fe 100644 --- a/runtime/vflow/Cargo.toml +++ b/runtime/vflow/Cargo.toml @@ -25,7 +25,6 @@ cfg-if = { workspace = true } # Substrate frame-benchmarking = {workspace = true, optional = true} -frame-executive = {workspace = true} frame-support = {workspace = true} frame-system = {workspace = true} frame-system-benchmarking = {workspace = true, optional = true} @@ -130,7 +129,6 @@ std = [ "fp-rpc/std", "fp-self-contained/std", "frame-benchmarking?/std", - "frame-executive/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -235,7 +233,6 @@ try-runtime = [ "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", "fp-self-contained/try-runtime", - "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", diff --git a/runtime/vflow/src/migrations.rs b/runtime/vflow/src/migrations.rs index 4738583..3019744 100644 --- a/runtime/vflow/src/migrations.rs +++ b/runtime/vflow/src/migrations.rs @@ -24,7 +24,7 @@ pub type RemoveProxyPallet = RemovePallet::DbWeight>; /// Migrations to run on the next runtime upgrade. -pub type Migrations = ( +pub type Unreleased = ( RemoveProxyPallet, pallet_session::migrations::v1::MigrateV0ToV1< Runtime, diff --git a/runtime/vflow/src/types.rs b/runtime/vflow/src/types.rs index 3bc7e94..ba23ac9 100644 --- a/runtime/vflow/src/types.rs +++ b/runtime/vflow/src/types.rs @@ -34,14 +34,8 @@ pub type SignedPayload = generic::SignedPayload; pub type SignedExtra = ct::SignedExtra; /// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - crate::migrations::Migrations, ->; +pub type Executive = + ct::Executive; /// Configures the number of blocks that can be created without submission of validity proof to the relay chain pub type ConsensusHook = ct::ConsensusHook;