Skip to content

Commit 84bcb39

Browse files
authored
Merge pull request #193 from CosmWasm/document-max-gas
Increase and document the MaxGas limit
2 parents 3dc9bed + 7f02f57 commit 84bcb39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

x/wasm/internal/keeper/keeper.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import (
2828
// Rough timing have 88k gas at 90us, which is equal to 1k sdk gas... (one read)
2929
const GasMultiplier = 100
3030

31-
// MaxGas for a contract is 900 million (enforced in rust)
32-
const MaxGas = 900_000_000
31+
// MaxGas for a contract is 10 billion wasmer gas (enforced in rust to prevent overflow)
32+
// The limit for v0.9.3 is defined here: https://github.com/CosmWasm/cosmwasm/blob/v0.9.3/packages/vm/src/backends/singlepass.rs#L15-L23
33+
// (this will be increased in future releases)
34+
const MaxGas = 10_000_000_000
3335

3436
// InstanceCost is how much SDK gas we charge each time we load a WASM instance.
3537
// Creating a new instance is costly, and this helps put a recursion limit to contracts calling contracts.

0 commit comments

Comments
 (0)