Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double wasm size #438

Merged
merged 1 commit into from
Jan 31, 2024
Merged
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
10 changes: 7 additions & 3 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ import (
minttypes "github.com/notional-labs/composable/v6/x/mint/types"

"github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
wasm08Keeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper"
wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types"
wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types"

ibc_hooks "github.com/notional-labs/composable/v6/x/ibc-hooks"
ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper"
Expand Down Expand Up @@ -251,7 +252,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appCodec, appKeepers.keys[ibchost.StoreKey], appKeepers.GetSubspace(ibchost.ModuleName), appKeepers.StakingKeeper, appKeepers.UpgradeKeeper, appKeepers.ScopedIBCKeeper,
)

appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasmtypes.StoreKey], authorityAddress, homePath, &appKeepers.IBCKeeper.ClientKeeper)
appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasm08types.StoreKey], authorityAddress, homePath, &appKeepers.IBCKeeper.ClientKeeper)

// ICA Host keeper
appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper(
Expand Down Expand Up @@ -371,12 +372,15 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
panic(fmt.Sprintf("error while reading wasm config: %s", err))
}

// increase default wasm size in all wasmd related codes (as on Neutorn/Osmosis)
wasmtypes.MaxWasmSize *= 2

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
availableCapabilities := strings.Join(AllCapabilities(), ",")
appKeepers.WasmKeeper = wasm.NewKeeper(
appCodec,
appKeepers.keys[wasm.StoreKey],
appKeepers.keys[wasmtypes.StoreKey],
appKeepers.AccountKeeper,
appKeepers.BankKeeper,
appKeepers.StakingKeeper,
Expand Down
Loading