From 727922d38553ecbdcccc887f5474a5cdf73e27db Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Tue, 2 Apr 2024 21:45:04 +0200 Subject: [PATCH] build: increased max block size to 10MB --- app/setup_handlers.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/setup_handlers.go b/app/setup_handlers.go index 39ec7d9e4..eaae63baf 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -20,6 +20,16 @@ func setUpgradeHandler(app *ElysApp) { func(ctx sdk.Context, plan upgradetypes.Plan, vm m.VersionMap) (m.VersionMap, error) { app.Logger().Info("Running upgrade handler for " + version.Version) + // Set max block size to 10MB + app.Logger().Info("Setting max block size to 10MB") + + consensusParams, err := app.ConsensusParamsKeeper.Get(ctx) + if err != nil { + return nil, err + } + consensusParams.Block.MaxBytes = int64(10485760) + app.ConsensusParamsKeeper.Set(ctx, consensusParams) + return app.mm.RunMigrations(ctx, app.configurator, vm) }, )