From b2968a49ecdf5ac6d85b9e95eeccb4ca18f43459 Mon Sep 17 00:00:00 2001 From: Dmitry Novikov Date: Tue, 16 Jul 2024 19:03:55 +0400 Subject: [PATCH] extend log, bump runtime version --- pallets/gear-program/src/migrations/mod.rs | 12 ++++++++++-- runtime/vara/src/lib.rs | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pallets/gear-program/src/migrations/mod.rs b/pallets/gear-program/src/migrations/mod.rs index f86a5480542..379590d07ed 100644 --- a/pallets/gear-program/src/migrations/mod.rs +++ b/pallets/gear-program/src/migrations/mod.rs @@ -47,6 +47,8 @@ pub mod v8_fix { { fn on_runtime_upgrade() -> Weight { let mut weight = Weight::from_parts(0, 0); + let mut count_without_lock = 0; + let mut count_without_balance_and_lock = 0; if Pallet::::on_chain_storage_version() == StorageVersion::new(8) { log::info!("Running asap fix migrations"); @@ -60,14 +62,16 @@ pub mod v8_fix { if CurrencyOf::::total_balance(&program_id) - CurrencyOf::::free_balance(&program_id) != ed { let mut to_set_lock = true; + count_without_lock += 1; if CurrencyOf::::free_balance(&program_id) < ed { + count_without_balance_and_lock += 1; match ::Paymaster::pay( &program_id, (), ed, ) { - Ok(_) => {} + Ok(_) => {}, Err(e) => { to_set_lock = false; @@ -92,7 +96,11 @@ pub mod v8_fix { weight = Weight::from_parts(200_000_000, 0); - log::info!("✅ Successfully fixed migrated storage"); + log::info!( + "✅ Successfully fixed migrated storage: wout lock {}, wout lock and balance {}", + count_without_lock, + count_without_balance_and_lock + ); } else { log::info!("🟠 Migration requires onchain version 8, so was skipped"); } diff --git a/runtime/vara/src/lib.rs b/runtime/vara/src/lib.rs index c3bac531559..8a2a368b58e 100644 --- a/runtime/vara/src/lib.rs +++ b/runtime/vara/src/lib.rs @@ -169,7 +169,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // The version of the runtime specification. A full node will not attempt to use its native // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, // `spec_version`, and `authoring_version` are the same between Wasm and native. - spec_version: 1420, + spec_version: 1421, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,