Skip to content

Commit

Permalink
fix(runtime): reservation reply per byte weight (#4361)
Browse files Browse the repository at this point in the history
  • Loading branch information
grishasobol authored Nov 26, 2024
1 parent 147bbbd commit f481bb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/gas_metering/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl Default for SyscallWeights {
proof_size: 0,
},
gr_reservation_reply_per_byte: Weight {
ref_time: 803373,
ref_time: 784,
proof_size: 0,
},
gr_reservation_reply_commit: Weight {
Expand Down
2 changes: 1 addition & 1 deletion pallets/gear/src/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ impl<T: Config> Default for SyscallWeights<T> {
gr_reply_commit: cost(W::<T>::gr_reply_commit),
gr_reply_commit_wgas: cost(W::<T>::gr_reply_commit_wgas),
gr_reservation_reply: cost(W::<T>::gr_reservation_reply),
gr_reservation_reply_per_byte: cost(W::<T>::gr_reservation_reply_per_kb),
gr_reservation_reply_per_byte: cost_byte(W::<T>::gr_reservation_reply_per_kb),
gr_reservation_reply_commit: cost(W::<T>::gr_reservation_reply_commit),
gr_reply_input: cost(W::<T>::gr_reply_input),
gr_reply_input_wgas: cost(W::<T>::gr_reply_input_wgas),
Expand Down
6 changes: 4 additions & 2 deletions runtime/vara/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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";

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit f481bb2

Please sign in to comment.