Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.55.0...HEAD)

- Lower `DefaultMaxCallDepth` [\#2244](https://github.com/CosmWasm/wasmd/pull/2244)

## [v0.55.0](https://github.com/CosmWasm/wasmd/tree/v0.55.0) (2025-03-11)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.54.0...v0.55.0)
Expand Down
5 changes: 5 additions & 0 deletions tests/system/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ var (
const oogMsg = "out of gas"
return expErrWithMsg(t, err, args, oogMsg)
}
// ErrMaxCallDepthMatcher requires error with "max call depth exceeded" message
ErrMaxCallDepthMatcher RunErrorAssert = func(t assert.TestingT, err error, args ...interface{}) bool {
const expMsg = "max call depth exceeded"
return expErrWithMsg(t, err, args, expMsg)
}
// ErrTimeoutMatcher requires time out message
ErrTimeoutMatcher RunErrorAssert = func(t assert.TestingT, err error, args ...interface{}) bool {
const expMsg = "timed out waiting for tx to be included in a block"
Expand Down
2 changes: 1 addition & 1 deletion tests/system/fraud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestRecursiveMsgsExternalTrigger(t *testing.T) {
}{
"simulation": {
gas: "auto",
expErrMatcher: ErrOutOfGasMatcher,
expErrMatcher: ErrMaxCallDepthMatcher,
},
}
for name, spec := range specs {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/types/wasm_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// DefaultMaxQueryStackSize maximum size of the stack of recursive queries a contract can make
const DefaultMaxQueryStackSize uint32 = 10

const DefaultMaxCallDepth uint32 = 500
const DefaultMaxCallDepth uint32 = 100

// WasmEngine defines the WASM contract runtime engine.
type WasmEngine interface {
Expand Down