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

Upgrade to sdk 47 #869

Closed
wants to merge 156 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
74933f6
change ibc module paths
faddat Apr 21, 2023
f71e170
Squashed commit of the following:
faddat Apr 21, 2023
7df6152
Squashed commit of the following:
faddat Apr 21, 2023
60ab699
remove buf.work.yaml and don't tidy when building protos
faddat Apr 21, 2023
3c02c23
rebuild proto files
faddat Apr 21, 2023
29aa2d9
simapp, cometbft-db and cometbft
faddat Apr 21, 2023
be01b99
don't use rest and update ibc client types
faddat Apr 21, 2023
95285ce
tidy is successful
faddat Apr 21, 2023
2356e5b
resolve imports in app,go
faddat Apr 21, 2023
610c717
fix api change
vuong177 Apr 21, 2023
ee7ab46
apply change in gov and staking in 47
vuong177 Apr 22, 2023
7ff4cfe
init genesis in democracy module
vuong177 Apr 22, 2023
379e170
Merge branch 'main' into sdk-47-fifth-go-notional
faddat Apr 22, 2023
90a96d6
Merge pull request #2 from notional-labs/upgrade-ccv-module
faddat Apr 22, 2023
6959eb1
fixing build
sontrinh16 Apr 22, 2023
637ecd0
pull upstream
sontrinh16 Apr 22, 2023
08814ef
update code for 47
sontrinh16 Apr 22, 2023
3232541
Squashed commit of the following:
vuong177 Apr 22, 2023
4523f2f
change govtypes, update ccvstaking, ccvgov, ccvdistr newAppModule
sontrinh16 Apr 22, 2023
b41dc4b
update get content from MsgExecLegacyContent
sontrinh16 Apr 22, 2023
36aeac8
modufy check whitelist content
sontrinh16 Apr 22, 2023
7b37a38
update consumer and provider keeper hooks
sontrinh16 Apr 22, 2023
5fc20eb
update proof path
pysel Apr 23, 2023
c760d17
update Slash in staking keeper's signature
pysel Apr 23, 2023
abd1062
regenerate mocks for staking keeper
pysel Apr 23, 2023
558a14b
tidy
pysel Apr 23, 2023
e5e5a60
update provider hooks: return errors
pysel Apr 23, 2023
4341b1d
lint ccv/provider/keeper: sdkerrors + math.Int
pysel Apr 23, 2023
7c8ed57
ccv/consumer/keeper: pass correct args to Slash()
pysel Apr 23, 2023
4425c3e
ccv/consumer/keeper: lint: migrate to cosmossdk.io/(errors/math)
pysel Apr 23, 2023
5095a22
sdk.Int -> math.Int
pysel Apr 23, 2023
91e0fac
app: register newer GRPC services (https://github.com/cosmos/cosmos-s…
pysel Apr 23, 2023
76eabf4
consumer-democracy: new signature for NewApp() + remove invCheckPerio…
pysel Apr 23, 2023
378d86d
consumer: new signature for NewApp() + remove invCheckPeriod from App…
pysel Apr 23, 2023
6a60dbd
provider: new signature for NewApp() + remove invCheckPeriod from App…
pysel Apr 23, 2023
8d1df7a
Revert "ccv/consumer/keeper: pass correct args to Slash()"
pysel Apr 23, 2023
480c393
Revert "update Slash in staking keeper's signature"
pysel Apr 23, 2023
33ef3b3
Revert "regenerate mocks for staking keeper"
pysel Apr 23, 2023
7b7ac96
minor change
sontrinh16 Apr 23, 2023
96ed21d
pull upstream
sontrinh16 Apr 23, 2023
b22d85b
minor change
sontrinh16 Apr 23, 2023
5e44c0d
replace deprecated ibctranferkeeper func sendtransfer
sontrinh16 Apr 23, 2023
57e0877
x/ccv/types: sdk.Int -> math.Int, update sdkerrors path
pysel Apr 24, 2023
4479d85
regenerate mocks
pysel Apr 24, 2023
f696002
minor update mock
sontrinh16 Apr 24, 2023
9950a0a
remove all usage of rest
sontrinh16 Apr 24, 2023
36eb87e
slash functoin fix by fork sdk
vuong177 Apr 24, 2023
b4a000d
remove unnecessary SA1019 disabler
pysel Apr 24, 2023
c24a75f
global midration from sdkerrors to cosmossdk.io/errors
pysel Apr 24, 2023
341b9f4
Merge branch 'sdk-47-fifth-go-notional' into ruslan/wip-interchain-v47
pysel Apr 24, 2023
9e957fd
Merge pull request #3 from notional-labs/ruslan/wip-interchain-v47
pysel Apr 24, 2023
4175788
regenerate mocks: exclude transfertypes import
pysel Apr 24, 2023
6911e6a
simtypes.WeightedProposalContent -> WeightedProposalMsg. Deprecated
pysel Apr 24, 2023
02c17ac
go fmt file
pysel Apr 24, 2023
ce7dfa4
update getParams for consumerkeeper and add SlashWithInfractionReason
sontrinh16 Apr 24, 2023
c73c836
Merge pull request #5 from notional-labs/ruslan/megalint
faddat Apr 24, 2023
2404232
Merge pull request #6 from notional-labs/staking_api
faddat Apr 24, 2023
e67ec72
Merge pull request #4 from notional-labs/api-fix
vuong177 Apr 24, 2023
b991b74
Update Makefile
faddat Apr 24, 2023
f122c43
add unit tests to Makefile
pysel Apr 24, 2023
2d0f1df
dockerignore
pysel Apr 24, 2023
2e53ea6
Update .dockerignore
faddat Apr 24, 2023
9d7d2c4
Merge pull request #7 from notional-labs/ruslan/dockerignore
pysel Apr 24, 2023
d825fd7
change back to deleteProposal
sontrinh16 Apr 24, 2023
fc740f4
add consensus keeper to Apps + remove redundant invCheckPeriod
pysel Apr 24, 2023
c9360b6
Merge pull request #8 from notional-labs/ruslan/cons-params-keeper
faddat Apr 24, 2023
51c12be
rename ec.Marshaler to ec.Codec
pysel Apr 25, 2023
d6ef7e2
change all appearences of -b block to -b sync
pysel Apr 25, 2023
90eb98e
stragglers: Marshaler -> Codec migration
pysel Apr 25, 2023
7f3727c
lint docs
pysel Apr 25, 2023
0293dec
modulesToExport: add to ExportAppStateAndValidators
pysel Apr 25, 2023
326022a
Merge pull request #9 from notional-labs/ruslan/ics-47-wip
faddat Apr 25, 2023
de54787
sdk.Int -> math.Int
faddat Apr 25, 2023
c5c4b1d
minor change
sontrinh16 Apr 27, 2023
a7eb186
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
sontrinh16 Apr 27, 2023
652e682
Merge branch 'main' into sdk-47-fifth-go-notional
faddat Apr 27, 2023
182ae4b
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
sontrinh16 Apr 27, 2023
61838d9
remove test
pysel Apr 27, 2023
60859fd
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
faddat Apr 27, 2023
c7f1ad8
bump versions
faddat Apr 27, 2023
2912b0a
Merge remote-tracking branch 'origin/main' into sdk-47-fifth-go-notional
faddat Apr 27, 2023
1114d92
seperate two types of WhitelistedParams
vuong177 Apr 27, 2023
ec7d13b
Merge remote-tracking branch 'origin/main' into sdk-47-fifth-go-notional
faddat Apr 28, 2023
2a12810
fix deleteForbiddenProposal
sontrinh16 Apr 28, 2023
b2336af
revert legacy whitelist params and fix democracy gov whitelist test
sontrinh16 Apr 29, 2023
8879a50
update forbidden ante test
sontrinh16 Apr 29, 2023
56d889d
add comment and minor change
sontrinh16 Apr 29, 2023
c0db902
fix conflict
sontrinh16 Apr 29, 2023
7ab751a
clean up
sontrinh16 Apr 29, 2023
81f05be
Merge pull request #11 from notional-labs/new-params-update
faddat Apr 29, 2023
d619741
Merge remote-tracking branch 'origin/main' into sdk-47-fifth-go-notional
faddat Apr 29, 2023
094b539
fix lints
faddat Apr 29, 2023
4f16472
Create go-tests.yml
faddat Apr 20, 2023
fac7646
run unit tests separately and use the verbose flag for e2e
faddat Apr 29, 2023
4e75553
update LegacyWhitelistedParams: only whitelist ibc params
vuong177 Apr 29, 2023
b0b8034
trigger ci
faddat Apr 29, 2023
d85cdde
disable legacy parameter changes
faddat Apr 30, 2023
a367ebf
Revert "trigger ci"
faddat Apr 30, 2023
cc7e707
remove unnecessary initgenesis
sontrinh16 May 1, 2023
8fbd22b
Merge branch 'main' into sdk-47-fifth-go-notional
faddat May 2, 2023
bcad4d5
Merge branch 'main' into sdk-47-fifth-go-notional
faddat May 3, 2023
301bf3b
fix: unboding do not found
vuong177 May 3, 2023
3fd87a5
root.go: cd and cdd don't need valset in genesis
vuong177 May 3, 2023
040e7cd
Merge branch 'main' into sdk-47-fifth-go-notional
faddat May 3, 2023
e8199e1
fix: use sdk47 staking keeper interface
MSalopek Apr 28, 2023
d8a4462
fix: change encoding used by provider app [unstable]
MSalopek May 3, 2023
d09d4d9
fix: use mainline ibc-go/v7 in integration tests
MSalopek May 4, 2023
99747c3
fix: refactor difftest setup procedure
MSalopek May 5, 2023
bed4735
merge main
sontrinh16 May 5, 2023
c2e2d84
Merge remote-tracking branch 'origin/upgrade-47-with-fixes' into sdk-…
faddat May 6, 2023
aba247a
fix lints
faddat May 6, 2023
2db9c3b
use a different version of go in docker
faddat May 6, 2023
e5f9554
update proto builder to latest
faddat May 6, 2023
1c2af97
update go.mod
faddat May 6, 2023
85900f9
tidy
faddat May 6, 2023
9188917
apply MSalopek patch to cosmos-sdk so work may continue
faddat May 6, 2023
ab3c27b
organize go.mod and add thanks
faddat May 6, 2023
8061ba7
bump the version of hermes used in docs and images
faddat May 6, 2023
f7c1707
run e2e verbose so we can see where it breaks
faddat May 6, 2023
97d255d
cleanup root.go
faddat May 6, 2023
cd44160
fix consumer democracy, begin fixes on consumer and producer
faddat May 6, 2023
9834efb
tidy
faddat May 6, 2023
7ac4077
cleanup cd
faddat May 6, 2023
2aa1830
cleanup producer
faddat May 6, 2023
911cf12
fix provider app
faddat May 6, 2023
9b183e2
use genesis command with add-genesis-account subcommand
faddat May 6, 2023
44ad916
use genesis subcommand
faddat May 6, 2023
f266184
return only rootCmd
faddat May 6, 2023
9ba5aa6
add defaultMsgValidator to provider genutil
sontrinh16 May 6, 2023
f887e87
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
sontrinh16 May 6, 2023
b83ce51
trigger ci
faddat May 7, 2023
e6f2198
submit-legacy-proposal
faddat May 7, 2023
33048da
add err handler
sontrinh16 May 7, 2023
1627e4e
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
sontrinh16 May 7, 2023
c5f32d5
test is description summary or nah?
faddat May 7, 2023
ad1f8e4
Merge branch 'sdk-47-fifth-go-notional' of https://github.com/notiona…
faddat May 7, 2023
02af1a3
Revert "test is description summary or nah?"
faddat May 7, 2023
b0056d2
dunno why this would work tbh...
faddat May 7, 2023
ead85a7
Revert "dunno why this would work tbh..."
faddat May 7, 2023
58f03ca
begin changing prop types
faddat May 7, 2023
35bbd4c
summary
faddat May 7, 2023
7a96230
summary
faddat May 7, 2023
be4bb44
use legacy proposal type with summary field
faddat May 7, 2023
f1eea47
update example proposal commands
faddat May 7, 2023
d19f1e2
add type
faddat May 7, 2023
73bfc81
proposal type
faddat May 7, 2023
0720c66
fix gov cli
vuong177 May 7, 2023
6642233
legacy router
vuong177 May 7, 2023
05e01e5
minor
vuong177 May 7, 2023
7bceaae
remove type flag in gov proposal, it's not exist
vuong177 May 7, 2023
26c7fb7
async broadcast
vuong177 May 7, 2023
fe5c2a4
change broadcast type to sync
vuong177 May 7, 2023
4b2eb8d
add sleep time
vuong177 May 7, 2023
55f4a42
gov proposal changed
vuong177 May 7, 2023
b212c44
gjson
vuong177 May 7, 2023
f3107b3
minor
vuong177 May 7, 2023
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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git/
Dockerfile
*.md
.gitignore
.gitattributes
scripts/
.vscode/
.github/
proto/
9 changes: 3 additions & 6 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Automated Tests
name: E2E Tests
on:
push:
branches:
Expand All @@ -9,7 +9,7 @@ on:
- main
- release/v*
jobs:
Automated_Tests:
E2E_Tests:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -23,8 +23,5 @@ jobs:
with:
go-version: "1.19" # The Go version to download (if necessary) and use.

- name: Unit, integration and difference tests
run: go test ./...

- name: E2E tests
run: make test-e2e-short
run: go run ./tests/e2e/... --happy-path-only --verbose
15 changes: 15 additions & 0 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test ./...
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax=docker/dockerfile:1

FROM golang:1.19-alpine AS is-builder

FROM golang:1.20-alpine AS is-builder

ENV PACKAGES curl make git libc-dev bash gcc linux-headers
RUN apk add --no-cache $PACKAGES
Expand Down Expand Up @@ -28,7 +29,7 @@ RUN go mod tidy
RUN make install

# Get Hermes build
FROM informalsystems/hermes:1.2.0 AS hermes-builder
FROM informalsystems/hermes:1.4.1 AS hermes-builder

FROM --platform=linux/amd64 fedora:36
RUN dnf update -y
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.gaia
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ WORKDIR /interchain-security
RUN make install

# Get Hermes build
FROM informalsystems/hermes:1.2.0 AS hermes-builder
FROM informalsystems/hermes:1.4.1 AS hermes-builder

FROM --platform=linux/amd64 fedora:36
RUN dnf update -y
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ install: go.sum
test:
go test ./... && go run ./tests/e2e/...

# run all unit tests
test-unit:
go test ./...

# run unit and integration tests
test-short:
go test ./x/... ./app/... ./tests/integration/...
Expand Down Expand Up @@ -101,7 +105,7 @@ $(BUILDDIR)/:
### Protobuf ###
###############################################################################

containerProtoVer=0.9.0
containerProtoVer=0.13.0
containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer)
containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer)
Expand Down Expand Up @@ -130,11 +134,11 @@ proto-lint:
proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main

TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.5/proto/tendermint
TM_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.37.0/proto/tendermint
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.7.1
CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.9.0
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.45.13-ics/proto/cosmos
SDK_PROTO_URL = https://raw.githubusercontent.com/notional-labs/cosmos-sdk/sdkv47-ics/proto/cosmos

TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
TM_ABCI_TYPES = third_party/proto/tendermint/abci
Expand Down Expand Up @@ -175,7 +179,7 @@ proto-update-deps:
## Importing of tendermint protobuf definitions currently requires the
## use of `sed` in order to build properly with cosmos-sdk's proto file layout
## (which is the standard Buf.build FILE_LAYOUT)
## Issue link: https://github.com/tendermint/tendermint/issues/5021
## Issue link: https://github.com/cometbft/cometbft/issues/5021
@mkdir -p $(TM_TYPES)
@curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto
@curl -sSL $(TM_URL)/types/params.proto > $(TM_TYPES)/params.proto
Expand Down
104 changes: 98 additions & 6 deletions app/consumer-democracy/ante/forbidden_proposals_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,117 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
ccvgov "github.com/cosmos/interchain-security/x/ccv/democracy/governance"
)

type ForbiddenProposalsDecorator struct {
IsProposalWhitelisted func(govtypes.Content) bool
keeperMap map[string]interface{}
isLegacyProposalWhitelisted func(govv1beta1.Content) bool
isParamChangeWhitelisted func(map[ccvgov.ParamChangeKey]struct{}) bool
isModuleWhiteList func(string) bool
}

func NewForbiddenProposalsDecorator(whiteListFn func(govtypes.Content) bool) ForbiddenProposalsDecorator {
return ForbiddenProposalsDecorator{IsProposalWhitelisted: whiteListFn}
func NewForbiddenProposalsDecorator(
whiteListFn func(govv1beta1.Content) bool,
isParamChangeWhitelisted func(map[ccvgov.ParamChangeKey]struct{}) bool,
keeperMap map[string]interface{},
isModuleWhiteList func(string) bool,
) ForbiddenProposalsDecorator {
return ForbiddenProposalsDecorator{
isLegacyProposalWhitelisted: whiteListFn,
keeperMap: keeperMap,
isParamChangeWhitelisted: isParamChangeWhitelisted,
isModuleWhiteList: isModuleWhiteList,
}
}

func (decorator ForbiddenProposalsDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
currHeight := ctx.BlockHeight()

for _, msg := range tx.GetMsgs() {
submitProposalMgs, ok := msg.(*govtypes.MsgSubmitProposal)
submitProposalMgs, ok := msg.(*govv1.MsgSubmitProposal)
// if the message is MsgSubmitProposal, check if proposal is whitelisted
if ok {
if !decorator.IsProposalWhitelisted(submitProposalMgs.GetContent()) {
messages := submitProposalMgs.GetMessages()
checkFlag := true

for _, message := range messages {

sdkMsg, ok := message.GetCachedValue().(*govv1.MsgExecLegacyContent)
if !ok {
if decorator.isModuleWhiteList(message.TypeUrl) {
m := message.GetCachedValue()
switch m := m.(type) {
case *minttypes.MsgUpdateParams:
if keeper, ok := decorator.keeperMap[message.TypeUrl].(mintkeeper.Keeper); ok {
newParam := m.Params
currentParam := keeper.GetParams(ctx)
ccvgov.CheckIfParamKeyIsWhitelisted(&checkFlag, message.TypeUrl, currentParam, newParam, decorator.isParamChangeWhitelisted)
} else {
checkFlag = false
}
case *banktypes.MsgUpdateParams:
if keeper, ok := decorator.keeperMap[message.TypeUrl].(bankkeeper.Keeper); ok {
newParam := m.Params
currentParam := keeper.GetParams(ctx)
ccvgov.CheckIfParamKeyIsWhitelisted(&checkFlag, message.TypeUrl, currentParam, newParam, decorator.isParamChangeWhitelisted)
} else {
checkFlag = false
}
case *distrtypes.MsgUpdateParams:
if keeper, ok := decorator.keeperMap[message.TypeUrl].(distrkeeper.Keeper); ok {
newParam := m.Params
currentParam := keeper.GetParams(ctx)
ccvgov.CheckIfParamKeyIsWhitelisted(&checkFlag, message.TypeUrl, currentParam, newParam, decorator.isParamChangeWhitelisted)
} else {
checkFlag = false
}
case *stakingtypes.MsgUpdateParams:
if keeper, ok := decorator.keeperMap[message.TypeUrl].(stakingkeeper.Keeper); ok {
newParam := m.Params
currentParam := keeper.GetParams(ctx)
ccvgov.CheckIfParamKeyIsWhitelisted(&checkFlag, message.TypeUrl, currentParam, newParam, decorator.isParamChangeWhitelisted)
} else {
checkFlag = false
}
case *govv1.MsgUpdateParams:
if keeper, ok := decorator.keeperMap[message.TypeUrl].(govkeeper.Keeper); ok {
newParam := m.Params
currentParam := keeper.GetParams(ctx)
ccvgov.CheckIfParamKeyIsWhitelisted(&checkFlag, message.TypeUrl, currentParam, newParam, decorator.isParamChangeWhitelisted)
} else {
checkFlag = false
}
default:
checkFlag = false
}
} else {
checkFlag = false
}
} else {
content, err := govv1.LegacyContentFromMessage(sdkMsg)
if err != nil {
continue
}
if !decorator.isLegacyProposalWhitelisted(content) {
checkFlag = false
}
}
}

if !checkFlag {
return ctx, fmt.Errorf("tx contains unsupported proposal message types at height %d", currHeight)
}
}
Expand Down
Loading