Skip to content

Commit df673aa

Browse files
committed
Add note about module serialization version to cost function
1 parent 6f61673 commit df673aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/vm/src/wasm_backend/engine.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ 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+
//
27+
// Please note that any changes to this function need to be accompanied by a bump of
28+
// `MODULE_SERIALIZATION_VERSION` to avoid cached modules from using different amounts of gas
29+
// compared to newly compiled ones.
2630
const GAS_PER_OPERATION: u64 = 115;
2731

2832
match operator {

0 commit comments

Comments
 (0)