Skip to content

Commit

Permalink
fix reservation reply per byte weight
Browse files Browse the repository at this point in the history
  • Loading branch information
grishasobol committed Nov 26, 2024
1 parent de47744 commit c77da43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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 c77da43

Please sign in to comment.