From 582f4882923634907fd04232e74d6e9ed9551d55 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 20 Nov 2025 21:44:00 +0300 Subject: [PATCH 1/3] Bump mockall from 0.11.4 to 0.13.1 --- Cargo.lock | 76 ++++++++++++++++++++++++++++++++++++++++-------------- Cargo.toml | 2 +- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d33302f65..e0e68eac3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5281,8 +5281,22 @@ dependencies = [ "downcast", "fragile", "lazy_static", - "mockall_derive", - "predicates", + "mockall_derive 0.11.4", + "predicates 2.1.5", + "predicates-tree", +] + +[[package]] +name = "mockall" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "mockall_derive 0.13.1", + "predicates 3.1.3", "predicates-tree", ] @@ -5298,6 +5312,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "mockall_derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "multer" version = "2.1.0" @@ -5751,7 +5777,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.107", @@ -5969,7 +5995,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "parity-scale-codec", "scale-info", "serde", @@ -5985,7 +6011,7 @@ version = "0.1.0" dependencies = [ "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "parity-scale-codec", "scale-info", "sp-core", @@ -6024,7 +6050,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "pallet-balances", "pallet-evm-balances", "pallet-evm-system", @@ -6135,7 +6161,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "parity-scale-codec", "primitives-ethereum", "scale-info", @@ -6216,7 +6242,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "parity-scale-codec", "scale-info", "sp-core", @@ -6278,7 +6304,7 @@ version = "0.1.0" dependencies = [ "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "pallet-bioauth", "pallet-bootnodes", "pallet-humanode-session", @@ -6297,7 +6323,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "pallet-bioauth", "pallet-bootnodes", "pallet-session", @@ -6443,7 +6469,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "pallet-balances", "pallet-pot", "parity-scale-codec", @@ -6522,7 +6548,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "once_cell", "pallet-balances", "parity-scale-codec", @@ -6869,7 +6895,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "mockall", + "mockall 0.13.1", "num_enum 0.7.5", "pallet-bioauth", "pallet-evm", @@ -6903,7 +6929,7 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "mockall", + "mockall 0.13.1", "pallet-evm-accounts-mapping", "parity-scale-codec", "primitives-ethereum", @@ -6922,7 +6948,7 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "mockall", + "mockall 0.13.1", "num_enum 0.7.5", "pallet-balances", "pallet-evm", @@ -7002,6 +7028,16 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "predicates-core", +] + [[package]] name = "predicates-core" version = "1.0.6" @@ -7780,7 +7816,7 @@ dependencies = [ "async-trait", "facetec-api-client", "hex", - "mockall", + "mockall 0.13.1", "parity-scale-codec", "primitives-auth-ticket", "primitives-liveness-data", @@ -8210,7 +8246,7 @@ dependencies = [ "futures-timer", "libp2p-identity", "log", - "mockall", + "mockall 0.11.4", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -8480,7 +8516,7 @@ dependencies = [ "linked_hash_set", "log", "lru 0.8.1", - "mockall", + "mockall 0.11.4", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", @@ -8611,7 +8647,7 @@ dependencies = [ "libp2p", "log", "lru 0.8.1", - "mockall", + "mockall 0.11.4", "parity-scale-codec", "prost", "prost-build", @@ -11551,7 +11587,7 @@ name = "vesting-scheduling-timestamp" version = "0.1.0" dependencies = [ "frame-support", - "mockall", + "mockall 0.13.1", "num-traits", "pallet-vesting", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 86425e102..370eb5270 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ indoc = { version = "2.0", default-features = false } jsonrpsee = { version = "0.16.3", default-features = false } libsecp256k1 = { version = "0.7", default-features = false } log = { version = "0.4", default-features = false } -mockall = { version = "0.11", default-features = false } +mockall = { version = "0.13", default-features = false } num = { version = "0.4", default-features = false } num-traits = { version = "0.2", default-features = false } num_enum = { version = "0.7", default-features = false } From fe68d700291300e00cad308673222ef00ff3e55f Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 20 Nov 2025 21:44:27 +0300 Subject: [PATCH 2/3] Update features snapshot --- utils/checks/snapshots/features.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index 60ec42106..8512f616c 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -1689,8 +1689,12 @@ - os-poll - name: mockall 0.11.4 features: [] +- name: mockall 0.13.1 + features: [] - name: mockall_derive 0.11.4 features: [] +- name: mockall_derive 0.13.1 + features: [] - name: multer 2.1.0 features: - default @@ -2212,6 +2216,8 @@ - float-cmp - normalize-line-endings - regex +- name: predicates 3.1.3 + features: [] - name: predicates-core 1.0.6 features: [] - name: predicates-tree 1.0.9 From 99ef7f43ad9df851abf16faff530a6116e4477e0 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 20 Nov 2025 21:50:42 +0300 Subject: [PATCH 3/3] Apply coming changes --- crates/pallet-currency-swap/src/benchmarking.rs | 4 ++-- crates/pallet-evm-system/src/mock.rs | 6 +++--- crates/pallet-token-claims/src/benchmarking.rs | 3 ++- crates/pallet-vesting/src/benchmarking.rs | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crates/pallet-currency-swap/src/benchmarking.rs b/crates/pallet-currency-swap/src/benchmarking.rs index db75376b2..05b942948 100644 --- a/crates/pallet-currency-swap/src/benchmarking.rs +++ b/crates/pallet-currency-swap/src/benchmarking.rs @@ -77,8 +77,8 @@ benchmarks! { impl Interface for crate::mock::Test { type Data = ( std::sync::MutexGuard<'static, ()>, - mock::__mock_MockCurrencySwap_CurrencySwap_9230394375286242749::__estimate_swapped_balance::Context, - mock::__mock_MockCurrencySwap_CurrencySwap_9230394375286242749::__swap::Context, + mock::__mock_MockCurrencySwap_primitives_currency_swap__CurrencySwap_9230394375286242749::__estimate_swapped_balance::Context, + mock::__mock_MockCurrencySwap_primitives_currency_swap__CurrencySwap_9230394375286242749::__swap::Context, ); fn prepare() -> Self::Data { diff --git a/crates/pallet-evm-system/src/mock.rs b/crates/pallet-evm-system/src/mock.rs index f39ee285b..e935fab49 100644 --- a/crates/pallet-evm-system/src/mock.rs +++ b/crates/pallet-evm-system/src/mock.rs @@ -15,7 +15,7 @@ mock! { pub DummyOnNewAccount {} impl OnNewAccount for DummyOnNewAccount { - pub fn on_new_account(who: &H160); + fn on_new_account(who: &H160); } } @@ -24,7 +24,7 @@ mock! { pub DummyOnKilledAccount {} impl OnKilledAccount for DummyOnKilledAccount { - pub fn on_killed_account(who: &H160); + fn on_killed_account(who: &H160); } } @@ -74,7 +74,7 @@ mock! { pub IsPrecompile {} impl IsPrecompile for IsPrecompile { - pub fn is_precompile(who: &H160) -> bool; + fn is_precompile(who: &H160) -> bool; } } diff --git a/crates/pallet-token-claims/src/benchmarking.rs b/crates/pallet-token-claims/src/benchmarking.rs index 502955201..c1ceb60a0 100644 --- a/crates/pallet-token-claims/src/benchmarking.rs +++ b/crates/pallet-token-claims/src/benchmarking.rs @@ -250,7 +250,8 @@ impl Interface for crate::mock::Test { #[cfg(test)] impl VestingInterface for ::VestingInterface { - type Data = mock::__mock_MockVestingInterface_VestingInterface::__lock_under_vesting::Context; + type Data = + mock::__mock_MockVestingInterface_traits__VestingInterface::__lock_under_vesting::Context; fn prepare() -> Self::Data { let lock_under_vesting_ctx = mock::MockVestingInterface::lock_under_vesting_context(); diff --git a/crates/pallet-vesting/src/benchmarking.rs b/crates/pallet-vesting/src/benchmarking.rs index 658112af6..faad3ce13 100644 --- a/crates/pallet-vesting/src/benchmarking.rs +++ b/crates/pallet-vesting/src/benchmarking.rs @@ -131,7 +131,7 @@ impl Interface for crate::mock::Test { impl SchedulingDriver for ::SchedulingDriver { type Data = ( std::sync::MutexGuard<'static, ()>, - mock::__mock_MockSchedulingDriver_SchedulingDriver::__compute_balance_under_lock::Context, + mock::__mock_MockSchedulingDriver_traits__SchedulingDriver::__compute_balance_under_lock::Context, ); fn prepare_init() -> Self::Data {