From 0962de309591f4b15ef003d3dfd443903edcc583 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 5 Feb 2025 22:48:14 +0100 Subject: [PATCH 1/6] [AH] Disable Vested Transfers as preparation for AHM Signed-off-by: Oliver Tale-Yazdi --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 9 ++++++++- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) 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 8476548d2e..f2f6ccb9be 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -175,9 +175,16 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } +pub struct VestedTransferCalls; +impl Contains for VestedTransferCalls { + fn contains(call: &RuntimeCall) -> bool { + matches!(call, RuntimeCall::vesting(VestingCall::vested_transfer { .. })) + } +} + // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; + type BaseCallFilter = frame_support::traits::EverythingExcluding; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; 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 dc045e463b..d03a95f0b5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -193,9 +193,16 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } +pub struct VestedTransferCalls; +impl Contains for VestedTransferCalls { + fn contains(call: &RuntimeCall) -> bool { + matches!(call, RuntimeCall::vesting(VestingCall::vested_transfer { .. })) + } +} + // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; + type BaseCallFilter = frame_support::traits::EverythingExcluding; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; From 1892e66c5aa21a4db0b5fee492b3ca6b1610e33b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 5 Feb 2025 22:51:41 +0100 Subject: [PATCH 2/6] CHANGELOG Signed-off-by: Oliver Tale-Yazdi --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fac5f4a39c..0e02f95b76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Update the XCM `Weigher` from `FixedWeightBounds` to `WeightInfoBounds` with benchmarked weights for Polkadot Collectives ([polkadot-fellows/runtimes#547](https://github.com/polkadot-fellows/runtimes/pull/547)) - Increase max PoV size to 10Mib on Kusama ([polkadot-fellows/runtimes#553](https://github.com/polkadot-fellows/runtimes/pull/553)) - Update to Polkadot SDK `stable2409-4` ([polkadot-fellows/runtimes#558](https://github.com/polkadot-fellows/runtimes/pull/558)) +- Asset Hubs: disable vested transfers as preparation for the Asset Hub Migration ([polkadot-fellows/runtime#579](https://github.com/polkadot-fellows/runtimes/pull/579)) #### From [#490](https://github.com/polkadot-fellows/runtimes/pull/490) From 67a17664a1153c4a9101a4d0ad944e2cb8abf958 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 6 Feb 2025 13:07:39 +0100 Subject: [PATCH 3/6] make compile Signed-off-by: Oliver Tale-Yazdi --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 8 ++++---- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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 f2f6ccb9be..45fcfedaf7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -62,8 +62,8 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, - TransformOrigin, WithdrawReasons, + ConstU128, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, Equals, EverythingBut, + InstanceFilter, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, BoundedVec, PalletId, @@ -178,13 +178,13 @@ parameter_types! { pub struct VestedTransferCalls; impl Contains for VestedTransferCalls { fn contains(call: &RuntimeCall) -> bool { - matches!(call, RuntimeCall::vesting(VestingCall::vested_transfer { .. })) + matches!(call, RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })) } } // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::EverythingExcluding; + type BaseCallFilter = EverythingBut; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; 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 d03a95f0b5..0588fde7b4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -100,8 +100,8 @@ use frame_support::{ parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, NeverEnsureOrigin, - TransformOrigin, WithdrawReasons, + ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, Equals, EverythingBut, + InstanceFilter, NeverEnsureOrigin, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, PalletId, @@ -196,13 +196,13 @@ parameter_types! { pub struct VestedTransferCalls; impl Contains for VestedTransferCalls { fn contains(call: &RuntimeCall) -> bool { - matches!(call, RuntimeCall::vesting(VestingCall::vested_transfer { .. })) + matches!(call, RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. })) } } // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::EverythingExcluding; + type BaseCallFilter = frame_support::traits::EverythingBut; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; From 3bf03931be358bf80c2c19e2e728ff0162a4c09e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 6 Feb 2025 13:12:04 +0100 Subject: [PATCH 4/6] clippy Signed-off-by: Oliver Tale-Yazdi --- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0588fde7b4..2663e610ff 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -202,7 +202,7 @@ impl Contains for VestedTransferCalls { // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::EverythingBut; + type BaseCallFilter = EverythingBut; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type AccountId = AccountId; From 5ec5c15cacd0ce492439d3988d833ba002f567ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 7 Feb 2025 12:38:52 +0100 Subject: [PATCH 5/6] Fix test.yml --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1446245163..a0be8c9988 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -314,7 +314,6 @@ jobs: run: yarn install - name: Running ecosystem tests - working-directory: ./ecosystem-tests uses: nick-fields/retry@v3 with: timeout_minutes: 60 From de0aa30f7c64d26a662cec5ffbc1cf4c5cf4694d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 7 Feb 2025 12:58:10 +0100 Subject: [PATCH 6/6] Fix rust install --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0be8c9988..82b2239d22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -244,11 +244,11 @@ jobs: run: cat .github/env >> $GITHUB_ENV - name: Install stable toolchain - run: | - rustup install $RUST_STABLE_VERSION - rustup default $RUST_STABLE_VERSION - rustup target add wasm32-unknown-unknown - rustup component add rust-src + uses: dtolnay/rust-toolchain@master + with: + targets: "wasm32-unknown-unknown" + components: "rust-src" + toolchain: "${{env.RUST_STABLE_VERSION}}" - name: Fetch cache uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7