From 169eb9eb096485f4ed5d81ff3dfa231e670c8320 Mon Sep 17 00:00:00 2001 From: Srinivas Baride Date: Thu, 12 Jan 2023 14:42:37 +0530 Subject: [PATCH 1/2] Added more allowed messages on ICA --- upgrades/handler.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/upgrades/handler.go b/upgrades/handler.go index 7ac27195..cdec1c8c 100644 --- a/upgrades/handler.go +++ b/upgrades/handler.go @@ -25,6 +25,7 @@ import ( ibcicacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" ibcicahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" ibcicatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" hubutils "github.com/sentinel-official/hub/utils" custommintkeeper "github.com/sentinel-official/hub/x/mint/keeper" @@ -61,10 +62,17 @@ func Handler( sdk.MsgTypeURL(&distributiontypes.MsgWithdrawDelegatorReward{}), sdk.MsgTypeURL(&distributiontypes.MsgWithdrawValidatorCommission{}), sdk.MsgTypeURL(&govtypes.MsgVote{}), + sdk.MsgTypeURL(&govtypes.MsgVoteWeighted{}), + sdk.MsgTypeURL(&ibctransfertypes.MsgTransfer{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgCreateValidator{}), sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgEditValidator{}), + sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), + sdk.MsgTypeURL(&wasmtypes.MsgExecuteContract{}), + sdk.MsgTypeURL(&wasmtypes.MsgInstantiateContract{}), + sdk.MsgTypeURL(&wasmtypes.MsgInstantiateContract2{}), + sdk.MsgTypeURL(&wasmtypes.MsgStoreCode{}), }, } ) From 5b6f915f3e06ae030b1ae7ec90ea5d43963e3c34 Mon Sep 17 00:00:00 2001 From: Srinivas Baride Date: Thu, 12 Jan 2023 15:54:43 +0530 Subject: [PATCH 2/2] Using cache context with existing event manager in Endblock --- x/vpn/abci.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/x/vpn/abci.go b/x/vpn/abci.go index 335fea4d..2229cca5 100644 --- a/x/vpn/abci.go +++ b/x/vpn/abci.go @@ -10,8 +10,14 @@ import ( "github.com/sentinel-official/hub/x/vpn/keeper" ) +func cacheContext(c sdk.Context) (cc sdk.Context, writeCache func()) { + cms := c.MultiStore().CacheMultiStore() + cc = c.WithMultiStore(cms) + return cc, cms.Write +} + func EndBlock(ctx sdk.Context, k keeper.Keeper) abcitypes.ValidatorUpdates { - ctx, write := ctx.CacheContext() + ctx, write := cacheContext(ctx) defer write() node.EndBlock(ctx, k.Node)