Skip to content

Commit

Permalink
up the wasm size limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ash-burnt committed Oct 19, 2024
1 parent c695ada commit 26b414d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 10 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ func NewWasmApp(
wasmOpts []wasmkeeper.Option,
baseAppOptions ...func(*baseapp.BaseApp),
) *WasmApp {
overrideWasmVariables()

interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{
ProtoFiles: proto.HybridResolver,
SigningOptions: signing.Options{
Expand Down Expand Up @@ -1381,3 +1383,11 @@ func (app *WasmApp) AutoCliOpts() autocli.AppOptions {
ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
}
}

// overrideWasmVariables overrides the wasm variables to:
// - allow for larger wasm files
func overrideWasmVariables() {
// Override Wasm size limitation from WASMD.
wasmtypes.MaxWasmSize = 2 * 1024 * 1024
wasmtypes.MaxProposalWasmSize = wasmtypes.MaxWasmSize
}
1 change: 0 additions & 1 deletion integration_tests/mint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func TestMintModuleInflationNoFees(t *testing.T) {
mintedTokens := provision.TruncateInt().Sub(math.NewInt(feesAccrued))
t.Logf("Minted tokens: %d and Token change: %d", mintedTokens.Int64(), int64(tokenChange))
require.Equal(t, mintedTokens, math.NewInt(int64(tokenChange)))

}

// Run test harness
Expand Down
4 changes: 2 additions & 2 deletions x/mint/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func (s *GenesisTestSuite) TestImportExportGenesis() {
s.Require().NoError(err)

// invalidCtx := testutil.DefaultContextWithDB(s.T(), s.key, storetypes.NewTransientStoreKey("transient_test"))
//_, err = s.keeper.GetMinter(invalidCtx.Ctx)
//s.Require().ErrorIs(err, collections.ErrNotFound)
// _, err = s.keeper.GetMinter(invalidCtx.Ctx)
// s.Require().ErrorIs(err, collections.ErrNotFound)

params, err := s.keeper.GetParams(s.sdkCtx)
s.Require().Equal(genesisState.Params, params)
Expand Down

0 comments on commit 26b414d

Please sign in to comment.