From c77da438cffacd1c6c629b548a89807462f99963 Mon Sep 17 00:00:00 2001 From: Gregory Sobol Date: Tue, 26 Nov 2024 14:16:05 +0100 Subject: [PATCH] fix reservation reply per byte weight --- pallets/gear/src/schedule.rs | 2 +- runtime/vara/src/tests.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pallets/gear/src/schedule.rs b/pallets/gear/src/schedule.rs index 6be4e52b349..33f1672ef6a 100644 --- a/pallets/gear/src/schedule.rs +++ b/pallets/gear/src/schedule.rs @@ -1077,7 +1077,7 @@ impl Default for SyscallWeights { gr_reply_commit: cost(W::::gr_reply_commit), gr_reply_commit_wgas: cost(W::::gr_reply_commit_wgas), gr_reservation_reply: cost(W::::gr_reservation_reply), - gr_reservation_reply_per_byte: cost(W::::gr_reservation_reply_per_kb), + gr_reservation_reply_per_byte: cost_byte(W::::gr_reservation_reply_per_kb), gr_reservation_reply_commit: cost(W::::gr_reservation_reply_commit), gr_reply_input: cost(W::::gr_reply_input), gr_reply_input_wgas: cost(W::::gr_reply_input_wgas), diff --git a/runtime/vara/src/tests.rs b/runtime/vara/src/tests.rs index 2f31c0c25ba..0e3b5b50360 100644 --- a/runtime/vara/src/tests.rs +++ b/runtime/vara/src/tests.rs @@ -18,7 +18,7 @@ use super::*; use crate::Runtime; -use frame_support::{dispatch::GetDispatchInfo, traits::StorageInstance}; +use frame_support::dispatch::GetDispatchInfo; use frame_system::limits::WeightsPerClass; use gear_core::costs::LazyPagesCosts; use pallet_gear::{InstructionWeights, MemoryWeights, SyscallWeights}; @@ -32,6 +32,8 @@ use sp_runtime::AccountId32; #[cfg(feature = "dev")] #[test] fn bridge_storages_have_correct_prefixes() { + use frame_support::traits::StorageInstance; + // # SAFETY: Do not change storage prefixes without total bridge re-deploy. const PALLET_PREFIX: &str = "GearEthBridge"; @@ -268,7 +270,7 @@ fn syscall_weights_test() { gr_reply_commit: 13_000_000.into(), gr_reply_commit_wgas: 12_000_000.into(), gr_reservation_reply: 9_500_000.into(), - gr_reservation_reply_per_byte: 800_000.into(), + gr_reservation_reply_per_byte: 800.into(), gr_reservation_reply_commit: 9_000_000.into(), gr_reply_push: 2_000_000.into(), gr_reply: 14_500_000.into(),