Skip to content

Commit 4761129

Browse files
committed
Adjust wasm op gas cost
1 parent 12de355 commit 4761129

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/vm/src/instance.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ mod tests {
914914

915915
let report2 = instance.create_gas_report();
916916
assert_eq!(report2.used_externally, 251);
917-
assert_eq!(report2.used_internally, 8461548);
917+
assert_eq!(report2.used_internally, 9589728);
918918
assert_eq!(report2.limit, LIMIT);
919919
assert_eq!(
920920
report2.remaining,
@@ -1105,7 +1105,7 @@ mod tests {
11051105
.unwrap();
11061106

11071107
let init_used = orig_gas - instance.get_gas_left();
1108-
assert_eq!(init_used, 8461799);
1108+
assert_eq!(init_used, 9589979);
11091109
}
11101110

11111111
#[test]
@@ -1130,7 +1130,7 @@ mod tests {
11301130
.unwrap();
11311131

11321132
let execute_used = gas_before_execute - instance.get_gas_left();
1133-
assert_eq!(execute_used, 11181706);
1133+
assert_eq!(execute_used, 12658786);
11341134
}
11351135

11361136
#[test]
@@ -1173,6 +1173,6 @@ mod tests {
11731173
);
11741174

11751175
let query_used = gas_before_query - instance.get_gas_left();
1176-
assert_eq!(query_used, 7142556);
1176+
assert_eq!(query_used, 8094896);
11771177
}
11781178
}

packages/vm/src/wasm_backend/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn cost(_operator: &Operator) -> u64 {
2323
// In https://github.com/CosmWasm/cosmwasm/pull/1042 a profiler is developed to
2424
// identify runtime differences between different Wasm operation, but this is not yet
2525
// precise enough to derive insights from it.
26-
150
26+
170
2727
}
2828

2929
/// Use Cranelift as the compiler backend if the feature is enabled

0 commit comments

Comments
 (0)