From ae6d38e1e3fdc597ec20764526854386e9d7bd33 Mon Sep 17 00:00:00 2001 From: nhpd Date: Wed, 27 Sep 2023 19:31:11 +0400 Subject: [PATCH] feat: increase limit of wasm contracts size to 3mb --- app/app.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/app.go b/app/app.go index 9d4527ad7..1299b528c 100644 --- a/app/app.go +++ b/app/app.go @@ -352,6 +352,8 @@ func New( wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *App { + overrideWasmVariables() + appCodec := encodingConfig.Marshaler legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -1249,3 +1251,11 @@ func (app *App) GetConsumerKeeper() ccvconsumerkeeper.Keeper { func (app *App) RegisterNodeService(clientCtx client.Context) { nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) } + +// overrideWasmVariables overrides the wasm variables to: +// - allow for larger wasm files +func overrideWasmVariables() { + // Override Wasm size limitation from WASMD. + wasmtypes.MaxWasmSize = 3 * 1024 * 1024 + wasmtypes.MaxProposalWasmSize = wasmtypes.MaxWasmSize +}