diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c594d58b2e6e..168f1419c37b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -173,7 +173,7 @@ build, in which case we can fall back on `go mod tidy -v`. ## Protobuf -We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/cosmos/gogoproto) to generate code for use in Cosmos SDK. +We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos SDK. For determinstic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it. diff --git a/Makefile b/Makefile index cb4698bf781e..3fdcd3400cd2 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,7 @@ mocks: $(MOCKS_DIR) $(mockgen_cmd) -source=types/module/module.go -package mocks -destination tests/mocks/types_module_module.go $(mockgen_cmd) -source=types/invariant.go -package mocks -destination tests/mocks/types_invariant.go $(mockgen_cmd) -source=types/router.go -package mocks -destination tests/mocks/types_router.go - $(mockgen_cmd) -package mocks -destination tests/mocks/grpc_server.go github.com/cosmos/gogoproto/grpc Server + $(mockgen_cmd) -package mocks -destination tests/mocks/grpc_server.go github.com/gogo/protobuf/grpc Server $(mockgen_cmd) -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger .PHONY: mocks @@ -382,41 +382,69 @@ devdoc-update: ### Protobuf ### ############################################################################### -protoVer=0.11.2 -protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) -protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) +containerProtoVer=v0.2 +containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer) +containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer) +containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer) +containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer) proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - @$(protoImage) sh ./scripts/protocgen.sh + @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ + sh ./scripts/protocgen.sh; fi + +# This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed +proto-gen-any: + @echo "Generating Protobuf Any" + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) sh ./scripts/protocgen-any.sh proto-swagger-gen: @echo "Generating Protobuf Swagger" - @$(protoImage) sh ./scripts/protoc-swagger-gen.sh + @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ + sh ./scripts/protoc-swagger-gen.sh; fi proto-format: - @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; + @echo "Formatting Protobuf files" + @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \ + find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi + proto-lint: - @$(protoImage) buf lint --error-format=json + @$(DOCKER_BUF) lint --error-format=json proto-check-breaking: - @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=osmosis-main + @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=v0.44.3x-osmo-v5 + -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.37.0-rc1/proto/tendermint +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint +GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos +COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master +CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3 -TM_CRYPTO_TYPES = proto/tendermint/crypto -TM_ABCI_TYPES = proto/tendermint/abci -TM_TYPES = proto/tendermint/types -TM_VERSION = proto/tendermint/version -TM_LIBS = proto/tendermint/libs/bits -TM_P2P = proto/tendermint/p2p +TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto +TM_ABCI_TYPES = third_party/proto/tendermint/abci +TM_TYPES = third_party/proto/tendermint/types +TM_VERSION = third_party/proto/tendermint/version +TM_LIBS = third_party/proto/tendermint/libs/bits +TM_P2P = third_party/proto/tendermint/p2p + +GOGO_PROTO_TYPES = third_party/proto/gogoproto +COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto +CONFIO_TYPES = third_party/proto/confio proto-update-deps: - @echo "Updating Protobuf dependencies" + @mkdir -p $(GOGO_PROTO_TYPES) + @curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto + + @mkdir -p $(COSMOS_PROTO_TYPES) + @curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto +## 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 @mkdir -p $(TM_ABCI_TYPES) @curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto @@ -440,9 +468,13 @@ proto-update-deps: @mkdir -p $(TM_P2P) @curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto - $(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update + @mkdir -p $(CONFIO_TYPES) + @curl -sSL $(CONFIO_URL)/proofs.proto > $(CONFIO_TYPES)/proofs.proto +## insert go package option into proofs.proto file +## Issue link: https://github.com/confio/ics23/issues/32 + @sed -i '4ioption go_package = "github.com/confio/ics23/go";' $(CONFIO_TYPES)/proofs.proto -.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps +.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps ############################################################################### ### Localnet ### diff --git a/baseapp/abci.go b/baseapp/abci.go index 6dfb6d9bc0ca..702028694980 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -11,7 +11,7 @@ import ( "syscall" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "google.golang.org/grpc/codes" @@ -44,8 +44,6 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC // req.InitialHeight is 1 by default. initHeader := tmproto.Header{ChainID: req.ChainId, Time: req.Time} - app.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId) - // If req.InitialHeight is > 1, then we set the initial version in the // stores. if req.InitialHeight > 1 { @@ -57,11 +55,9 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC } } - // initialize states with a correct header + // initialize the deliver state and check state with a correct header app.setDeliverState(initHeader) app.setCheckState(initHeader) - app.setPrepareProposalState(initHeader) - app.setProcessProposalState(initHeader) if err := app.SetAppVersion(initialAppVersion); err != nil { panic(err) @@ -71,10 +67,10 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC // done after the deliver state and context have been set as it's persisted // to state. if req.ConsensusParams != nil { - // When InitChain is called, the app version should either be absent and - // determined by the application or set to 0. Panic if it's not. - if req.ConsensusParams.Version != nil && req.ConsensusParams.Version.App != initialAppVersion { - panic(AppVersionError{Actual: req.ConsensusParams.Version.App, Initial: initialAppVersion}) + // When InitChain is called, the app version should either be absent and determined by the application + // or set to 0. Panic if it's not. + if req.ConsensusParams.Version != nil && req.ConsensusParams.Version.AppVersion != initialAppVersion { + panic(AppVersionError{Actual: req.ConsensusParams.Version.AppVersion, Initial: initialAppVersion}) } app.StoreConsensusParams(app.deliverState.ctx, req.ConsensusParams) @@ -152,6 +148,12 @@ func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo { } } +// SetOption implements the ABCI interface. +func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption) { + // TODO: Implement! + return +} + // FilterPeerByAddrPort filters peers by address/port. func (app *BaseApp) FilterPeerByAddrPort(info string) abci.ResponseQuery { if app.addrPeerFilter != nil { @@ -199,20 +201,21 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg // add block gas meter var gasMeter sdk.GasMeter - if maxGas := app.GetMaximumBlockGas(app.deliverState.ctx); maxGas > 0 { + if maxGas := app.getMaximumBlockGas(app.deliverState.ctx); maxGas > 0 { gasMeter = sdk.NewGasMeter(maxGas) } else { gasMeter = sdk.NewInfiniteGasMeter() } // NOTE: header hash is not set in NewContext, so we manually set it here + app.deliverState.ctx = app.deliverState.ctx. WithBlockGasMeter(gasMeter). WithHeaderHash(req.Hash). WithConsensusParams(app.GetConsensusParams(app.deliverState.ctx)) - // We also set block gas meter to checkState in case the application needs to - // verify gas consumption during (Re)CheckTx. + // we also set block gas meter to checkState in case the application needs to + // verify gas consumption during (Re)CheckTx if app.checkState != nil { app.checkState.ctx = app.checkState.ctx. WithBlockGasMeter(gasMeter). @@ -248,59 +251,6 @@ func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBloc return res } -// PrepareProposal implements the PrepareProposal ABCI method and returns a -// ResponsePrepareProposal object to the client. The PrepareProposal method is -// responsible for allowing the block proposer to perform application-dependent -// work in a block before proposing it. -// -// Transactions can be modified, removed, or added by the application. Since the -// application maintains its own local mempool, it will ignore the transactions -// provided to it in RequestPrepareProposal. Instead, it will determine which -// transactions to return based on the mempool's semantics and the MaxTxBytes -// provided by the client's request. -// -// Note, there is no need to execute the transactions for validity as they have -// already passed CheckTx. -// -// Ref: https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-060-abci-1.0.md -// Ref: https://github.com/tendermint/tendermint/blob/main/spec/abci/abci%2B%2B_basic_concepts.md -func (app *BaseApp) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - ctx := app.getContextForTx(runTxPrepareProposal, []byte{}) - if app.prepareProposal == nil { - panic("PrepareProposal method not set") - } - - return app.prepareProposal(ctx, req) -} - -// ProcessProposal implements the ProcessProposal ABCI method and returns a -// ResponseProcessProposal object to the client. The ProcessProposal method is -// responsible for allowing execution of application-dependent work in a proposed -// block. Note, the application defines the exact implementation details of -// ProcessProposal. In general, the application must at the very least ensure -// that all transactions are valid. If all transactions are valid, then we inform -// Tendermint that the Status is ACCEPT. However, the application is also able -// to implement optimizations such as executing the entire proposed block -// immediately. It may even execute the block in parallel. -// -// Ref: https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-060-abci-1.0.md -// Ref: https://github.com/tendermint/tendermint/blob/main/spec/abci/abci%2B%2B_basic_concepts.md -func (app *BaseApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { - if app.processProposal == nil { - panic("app.ProcessProposal is not set") - } - - ctx := app.processProposalState.ctx. - WithVoteInfos(app.voteInfos). - WithBlockHeight(req.Height). - WithBlockTime(req.Time). - WithHeaderHash(req.Hash). - WithProposer(req.ProposerAddress). - WithConsensusParams(app.GetConsensusParams(app.processProposalState.ctx)) - - return app.processProposal(ctx, req) -} - // CheckTx implements the ABCI interface and executes a tx in CheckTx mode. In // CheckTx mode, messages are not executed. This means messages are only validated // and only the AnteHandler is executed. State is persisted to the BaseApp's @@ -394,8 +344,6 @@ func (app *BaseApp) Commit() (res abci.ResponseCommit) { // NOTE: This is safe because Tendermint holds a lock on the mempool for // Commit. Use the header from this latest block. app.setCheckState(header) - app.setPrepareProposalState(header) - app.setProcessProposalState(header) // empty/reset the deliver state app.deliverState = nil @@ -638,7 +586,7 @@ func queryListContainsReq(req abci.RequestQuery) bool { } func (app *BaseApp) handleQueryGRPC(handler GRPCQueryHandler, req abci.RequestQuery) abci.ResponseQuery { - ctx, err := app.CreateQueryContext(req.Height, req.Prove) + ctx, err := app.createQueryContext(req.Height, req.Prove) if err != nil { return sdkerrors.QueryResultWithDebug(err, app.trace) } @@ -689,9 +637,9 @@ func checkNegativeHeight(height int64) error { return nil } -// CreateQueryContext creates a new sdk.Context for a query, taking as args +// createQueryContext creates a new sdk.Context for a query, taking as args // the block height and whether the query needs a proof or not. -func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, error) { +func (app *BaseApp) createQueryContext(height int64, prove bool) (sdk.Context, error) { if err := checkNegativeHeight(height); err != nil { return sdk.Context{}, err } @@ -988,7 +936,7 @@ func handleQueryCustom(app *BaseApp, path []string, req abci.RequestQuery) abci. return sdkerrors.QueryResultWithDebug(sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "no custom querier found for route %s", path[1]), app.trace) } - ctx, err := app.CreateQueryContext(req.Height, req.Prove) + ctx, err := app.createQueryContext(req.Height, req.Prove) if err != nil { return sdkerrors.QueryResultWithDebug(err, app.trace) } diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index e4897efdcc26..ead6c5e68fb3 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -1,1289 +1,106 @@ -package baseapp_test +package baseapp import ( - "bytes" "fmt" - "strings" "testing" - "github.com/cosmos/gogoproto/jsonpb" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/baseapp" - baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/testutil/mock" + snaphotstestutil "github.com/cosmos/cosmos-sdk/testutil/snapshots" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/signing" ) -func TestABCI_Info(t *testing.T) { - suite := NewBaseAppSuite(t) - - reqInfo := abci.RequestInfo{} - res := suite.baseApp.Info(reqInfo) - - require.Equal(t, "", res.Version) - require.Equal(t, t.Name(), res.GetData()) - require.Equal(t, int64(0), res.LastBlockHeight) - require.Equal(t, []uint8(nil), res.LastBlockAppHash) - - appVersion, err := suite.baseApp.GetAppVersion() - require.NoError(t, err) - - require.Equal(t, appVersion, res.AppVersion) -} - -func TestABCI_InitChain(t *testing.T) { - name := t.Name() - db := dbm.NewMemDB() +func TestGetBlockRentionHeight(t *testing.T) { logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db, nil) - - capKey := sdk.NewKVStoreKey("main") - capKey2 := sdk.NewKVStoreKey("key2") - app.MountStores(capKey, capKey2) - - // set a value in the store on init chain - key, value := []byte("hello"), []byte("goodbye") - var initChainer sdk.InitChainer = func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - store := ctx.KVStore(capKey) - store.Set(key, value) - return abci.ResponseInitChain{} - } - - query := abci.RequestQuery{ - Path: "/store/main/key", - Data: key, - } - - // initChain is nil - nothing happens - app.InitChain(abci.RequestInitChain{}) - res := app.Query(query) - require.Equal(t, 0, len(res.Value)) - - // set initChainer and try again - should see the value - app.SetInitChainer(initChainer) - - // stores are mounted and private members are set - sealing baseapp - err := app.LoadLatestVersion() // needed to make stores non-nil - require.Nil(t, err) - require.Equal(t, int64(0), app.LastBlockHeight()) - - initChainRes := app.InitChain(abci.RequestInitChain{AppStateBytes: []byte("{}"), ChainId: "test-chain-id"}) // must have valid JSON genesis file, even if empty - - // The AppHash returned by a new chain is the sha256 hash of "". - // $ echo -n '' | sha256sum - // e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - require.Equal( - t, - []byte{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}, - initChainRes.AppHash, - ) - - // assert that chainID is set correctly in InitChain - chainID := getDeliverStateCtx(app).ChainID() - require.Equal(t, "test-chain-id", chainID, "ChainID in deliverState not set correctly in InitChain") - - chainID = getCheckStateCtx(app).ChainID() - require.Equal(t, "test-chain-id", chainID, "ChainID in checkState not set correctly in InitChain") - - app.Commit() - res = app.Query(query) - require.Equal(t, int64(1), app.LastBlockHeight()) - require.Equal(t, value, res.Value) - - // reload app - app = baseapp.NewBaseApp(name, logger, db, nil) - app.SetInitChainer(initChainer) - app.MountStores(capKey, capKey2) - err = app.LoadLatestVersion() // needed to make stores non-nil - require.Nil(t, err) - require.Equal(t, int64(1), app.LastBlockHeight()) - - // ensure we can still query after reloading - res = app.Query(query) - require.Equal(t, value, res.Value) - - // commit and ensure we can still query - header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(abci.RequestBeginBlock{Header: header}) - app.Commit() - - res = app.Query(query) - require.Equal(t, value, res.Value) -} - -func TestABCI_InitChain_WithInitialHeight(t *testing.T) { - name := t.Name() db := dbm.NewMemDB() - logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db, nil) - - app.InitChain( - abci.RequestInitChain{ - InitialHeight: 3, - }, - ) - app.Commit() - - require.Equal(t, int64(3), app.LastBlockHeight()) -} - -func TestABCI_BeginBlock_WithInitialHeight(t *testing.T) { name := t.Name() - db := dbm.NewMemDB() - logger := defaultLogger() - app := baseapp.NewBaseApp(name, logger, db, nil) - - app.InitChain( - abci.RequestInitChain{ - InitialHeight: 3, - }, - ) - - require.PanicsWithError(t, "invalid height: 4; expected: 3", func() { - app.BeginBlock(abci.RequestBeginBlock{ - Header: tmproto.Header{ - Height: 4, - }, - }) - }) - - app.BeginBlock(abci.RequestBeginBlock{ - Header: tmproto.Header{ - Height: 3, - }, - }) - app.Commit() - - require.Equal(t, int64(3), app.LastBlockHeight()) -} - -func TestABCI_GRPCQuery(t *testing.T) { - grpcQueryOpt := func(bapp *baseapp.BaseApp) { - testdata.RegisterQueryServer( - bapp.GRPCQueryRouter(), - testdata.QueryImpl{}, - ) - } - - suite := NewBaseAppSuite(t, grpcQueryOpt) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - suite.baseApp.Commit() - - req := testdata.SayHelloRequest{Name: "foo"} - reqBz, err := req.Marshal() + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), snaphotstestutil.GetTempDir(t)) require.NoError(t, err) - reqQuery := abci.RequestQuery{ - Data: reqBz, - Path: "/testdata.Query/SayHello", - } - - resQuery := suite.baseApp.Query(reqQuery) - require.Equal(t, abci.CodeTypeOK, resQuery.Code, resQuery) - - var res testdata.SayHelloResponse - require.NoError(t, res.Unmarshal(resQuery.Value)) - require.Equal(t, "Hello foo!", res.Greeting) -} - -func TestABCI_P2PQuery(t *testing.T) { - addrPeerFilterOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAddrPeerFilter(func(addrport string) abci.ResponseQuery { - require.Equal(t, "1.1.1.1:8000", addrport) - return abci.ResponseQuery{Code: uint32(3)} - }) - } - - idPeerFilterOpt := func(bapp *baseapp.BaseApp) { - bapp.SetIDPeerFilter(func(id string) abci.ResponseQuery { - require.Equal(t, "testid", id) - return abci.ResponseQuery{Code: uint32(4)} - }) - } - - suite := NewBaseAppSuite(t, addrPeerFilterOpt, idPeerFilterOpt) - - addrQuery := abci.RequestQuery{ - Path: "/p2p/filter/addr/1.1.1.1:8000", - } - res := suite.baseApp.Query(addrQuery) - require.Equal(t, uint32(3), res.Code) - - idQuery := abci.RequestQuery{ - Path: "/p2p/filter/id/testid", - } - res = suite.baseApp.Query(idQuery) - require.Equal(t, uint32(4), res.Code) -} - -func TestABCI_ListSnapshots(t *testing.T) { - ssCfg := SnapshotsConfig{ - blocks: 5, - blockTxs: 4, - snapshotInterval: 2, - snapshotKeepRecent: 2, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - } - - suite := NewBaseAppSuiteWithSnapshots(t, ssCfg) - - resp := suite.baseApp.ListSnapshots(abci.RequestListSnapshots{}) - for _, s := range resp.Snapshots { - require.NotEmpty(t, s.Hash) - require.NotEmpty(t, s.Metadata) - - s.Hash = nil - s.Metadata = nil - } - - require.Equal(t, abci.ResponseListSnapshots{Snapshots: []*abci.Snapshot{ - {Height: 4, Format: snapshottypes.CurrentFormat, Chunks: 2}, - {Height: 2, Format: snapshottypes.CurrentFormat, Chunks: 1}, - }}, resp) -} - -func TestABCI_SnapshotWithPruning(t *testing.T) { testCases := map[string]struct { - ssCfg SnapshotsConfig - expectedSnapshots []*abci.Snapshot - }{ - "prune nothing with snapshot": { - ssCfg: SnapshotsConfig{ - blocks: 20, - blockTxs: 2, - snapshotInterval: 5, - snapshotKeepRecent: 1, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - }, - expectedSnapshots: []*abci.Snapshot{ - {Height: 20, Format: snapshottypes.CurrentFormat, Chunks: 5}, - }, - }, - "prune everything with snapshot": { - ssCfg: SnapshotsConfig{ - blocks: 20, - blockTxs: 2, - snapshotInterval: 5, - snapshotKeepRecent: 1, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), - }, - expectedSnapshots: []*abci.Snapshot{ - {Height: 20, Format: snapshottypes.CurrentFormat, Chunks: 5}, - }, - }, - "default pruning with snapshot": { - ssCfg: SnapshotsConfig{ - blocks: 20, - blockTxs: 2, - snapshotInterval: 5, - snapshotKeepRecent: 1, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), - }, - expectedSnapshots: []*abci.Snapshot{ - {Height: 20, Format: snapshottypes.CurrentFormat, Chunks: 5}, - }, - }, - "custom": { - ssCfg: SnapshotsConfig{ - blocks: 25, - blockTxs: 2, - snapshotInterval: 5, - snapshotKeepRecent: 2, - pruningOpts: pruningtypes.NewCustomPruningOptions(12, 12), - }, - expectedSnapshots: []*abci.Snapshot{ - {Height: 25, Format: snapshottypes.CurrentFormat, Chunks: 6}, - {Height: 20, Format: snapshottypes.CurrentFormat, Chunks: 5}, - }, - }, - "no snapshots": { - ssCfg: SnapshotsConfig{ - blocks: 10, - blockTxs: 2, - snapshotInterval: 0, // 0 implies disable snapshots - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - }, - expectedSnapshots: []*abci.Snapshot{}, - }, - "keep all snapshots": { - ssCfg: SnapshotsConfig{ - blocks: 10, - blockTxs: 2, - snapshotInterval: 3, - snapshotKeepRecent: 0, // 0 implies keep all snapshots - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - }, - expectedSnapshots: []*abci.Snapshot{ - {Height: 9, Format: snapshottypes.CurrentFormat, Chunks: 2}, - {Height: 6, Format: snapshottypes.CurrentFormat, Chunks: 2}, - {Height: 3, Format: snapshottypes.CurrentFormat, Chunks: 1}, - }, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - suite := NewBaseAppSuiteWithSnapshots(t, tc.ssCfg) - - resp := suite.baseApp.ListSnapshots(abci.RequestListSnapshots{}) - for _, s := range resp.Snapshots { - require.NotEmpty(t, s.Hash) - require.NotEmpty(t, s.Metadata) - - s.Hash = nil - s.Metadata = nil - } - - require.Equal(t, abci.ResponseListSnapshots{Snapshots: tc.expectedSnapshots}, resp) - - // Validate that heights were pruned correctly by querying the state at the last height that should be present relative to latest - // and the first height that should be pruned. - // - // Exceptions: - // * Prune nothing: should be able to query all heights (we only test first and latest) - // * Prune default: should be able to query all heights (we only test first and latest) - // * The reason for default behaving this way is that we only commit 20 heights but default has 100_000 keep-recent - var lastExistingHeight int64 - if tc.ssCfg.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.ssCfg.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { - lastExistingHeight = 1 - } else { - // Integer division rounds down so by multiplying back we get the last height at which we pruned - lastExistingHeight = int64((tc.ssCfg.blocks/tc.ssCfg.pruningOpts.Interval)*tc.ssCfg.pruningOpts.Interval - tc.ssCfg.pruningOpts.KeepRecent) - } - - // Query 1 - res := suite.baseApp.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight}) - require.NotNil(t, res, "height: %d", lastExistingHeight) - require.NotNil(t, res.Value, "height: %d", lastExistingHeight) - - // Query 2 - res = suite.baseApp.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight - 1}) - require.NotNil(t, res, "height: %d", lastExistingHeight-1) - - if tc.ssCfg.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.ssCfg.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { - // With prune nothing or default, we query height 0 which translates to the latest height. - require.NotNil(t, res.Value, "height: %d", lastExistingHeight-1) - } - }) - } -} - -func TestABCI_LoadSnapshotChunk(t *testing.T) { - ssCfg := SnapshotsConfig{ - blocks: 2, - blockTxs: 5, - snapshotInterval: 2, - snapshotKeepRecent: snapshottypes.CurrentFormat, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - } - suite := NewBaseAppSuiteWithSnapshots(t, ssCfg) - - testCases := map[string]struct { - height uint64 - format uint32 - chunk uint32 - expectEmpty bool - }{ - "Existing snapshot": {2, snapshottypes.CurrentFormat, 1, false}, - "Missing height": {100, snapshottypes.CurrentFormat, 1, true}, - "Missing format": {2, snapshottypes.CurrentFormat + 1, 1, true}, - "Missing chunk": {2, snapshottypes.CurrentFormat, 9, true}, - "Zero height": {0, snapshottypes.CurrentFormat, 1, true}, - "Zero format": {2, 0, 1, true}, - "Zero chunk": {2, snapshottypes.CurrentFormat, 0, false}, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - resp := suite.baseApp.LoadSnapshotChunk(abci.RequestLoadSnapshotChunk{ - Height: tc.height, - Format: tc.format, - Chunk: tc.chunk, - }) - if tc.expectEmpty { - require.Equal(t, abci.ResponseLoadSnapshotChunk{}, resp) - return - } - - require.NotEmpty(t, resp.Chunk) - }) - } -} - -func TestABCI_OfferSnapshot_Errors(t *testing.T) { - ssCfg := SnapshotsConfig{ - blocks: 0, - blockTxs: 0, - snapshotInterval: 2, - snapshotKeepRecent: 2, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - } - suite := NewBaseAppSuiteWithSnapshots(t, ssCfg) - - m := snapshottypes.Metadata{ChunkHashes: [][]byte{{1}, {2}, {3}}} - metadata, err := m.Marshal() - require.NoError(t, err) - - hash := []byte{1, 2, 3} - - testCases := map[string]struct { - snapshot *abci.Snapshot - result abci.ResponseOfferSnapshot_Result - }{ - "nil snapshot": {nil, abci.ResponseOfferSnapshot_REJECT}, - "invalid format": {&abci.Snapshot{ - Height: 1, Format: 9, Chunks: 3, Hash: hash, Metadata: metadata, - }, abci.ResponseOfferSnapshot_REJECT_FORMAT}, - "incorrect chunk count": {&abci.Snapshot{ - Height: 1, Format: snapshottypes.CurrentFormat, Chunks: 2, Hash: hash, Metadata: metadata, - }, abci.ResponseOfferSnapshot_REJECT}, - "no chunks": {&abci.Snapshot{ - Height: 1, Format: snapshottypes.CurrentFormat, Chunks: 0, Hash: hash, Metadata: metadata, - }, abci.ResponseOfferSnapshot_REJECT}, - "invalid metadata serialization": {&abci.Snapshot{ - Height: 1, Format: snapshottypes.CurrentFormat, Chunks: 0, Hash: hash, Metadata: []byte{3, 1, 4}, - }, abci.ResponseOfferSnapshot_REJECT}, - } - for name, tc := range testCases { - tc := tc - t.Run(name, func(t *testing.T) { - resp := suite.baseApp.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: tc.snapshot}) - require.Equal(t, tc.result, resp.Result) - }) - } - - // Offering a snapshot after one has been accepted should error - resp := suite.baseApp.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: &abci.Snapshot{ - Height: 1, - Format: snapshottypes.CurrentFormat, - Chunks: 3, - Hash: []byte{1, 2, 3}, - Metadata: metadata, - }}) - require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ACCEPT}, resp) - - resp = suite.baseApp.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: &abci.Snapshot{ - Height: 2, - Format: snapshottypes.CurrentFormat, - Chunks: 3, - Hash: []byte{1, 2, 3}, - Metadata: metadata, - }}) - require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ABORT}, resp) -} - -func TestABCI_ApplySnapshotChunk(t *testing.T) { - srcCfg := SnapshotsConfig{ - blocks: 4, - blockTxs: 10, - snapshotInterval: 2, - snapshotKeepRecent: 2, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - } - srcSuite := NewBaseAppSuiteWithSnapshots(t, srcCfg) - - targetCfg := SnapshotsConfig{ - blocks: 0, - blockTxs: 0, - snapshotInterval: 2, - snapshotKeepRecent: 2, - pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), - } - targetSuite := NewBaseAppSuiteWithSnapshots(t, targetCfg) - - // fetch latest snapshot to restore - respList := srcSuite.baseApp.ListSnapshots(abci.RequestListSnapshots{}) - require.NotEmpty(t, respList.Snapshots) - snapshot := respList.Snapshots[0] - - // make sure the snapshot has at least 3 chunks - require.GreaterOrEqual(t, snapshot.Chunks, uint32(3), "Not enough snapshot chunks") - - // begin a snapshot restoration in the target - respOffer := targetSuite.baseApp.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: snapshot}) - require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ACCEPT}, respOffer) - - // We should be able to pass an invalid chunk and get a verify failure, before - // reapplying it. - respApply := targetSuite.baseApp.ApplySnapshotChunk(abci.RequestApplySnapshotChunk{ - Index: 0, - Chunk: []byte{9}, - Sender: "sender", - }) - require.Equal(t, abci.ResponseApplySnapshotChunk{ - Result: abci.ResponseApplySnapshotChunk_RETRY, - RefetchChunks: []uint32{0}, - RejectSenders: []string{"sender"}, - }, respApply) - - // fetch each chunk from the source and apply it to the target - for index := uint32(0); index < snapshot.Chunks; index++ { - respChunk := srcSuite.baseApp.LoadSnapshotChunk(abci.RequestLoadSnapshotChunk{ - Height: snapshot.Height, - Format: snapshot.Format, - Chunk: index, - }) - require.NotNil(t, respChunk.Chunk) - - respApply := targetSuite.baseApp.ApplySnapshotChunk(abci.RequestApplySnapshotChunk{ - Index: index, - Chunk: respChunk.Chunk, - }) - require.Equal(t, abci.ResponseApplySnapshotChunk{ - Result: abci.ResponseApplySnapshotChunk_ACCEPT, - }, respApply) - } - - // the target should now have the same hash as the source - require.Equal(t, srcSuite.baseApp.LastCommitID(), targetSuite.baseApp.LastCommitID()) -} - -func TestABCI_EndBlock(t *testing.T) { - db := dbm.NewMemDB() - name := t.Name() - logger := defaultLogger() - - cp := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ - MaxGas: 5000000, - }, - } - - app := baseapp.NewBaseApp(name, logger, db, nil) - app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) - app.InitChain(abci.RequestInitChain{ - ConsensusParams: cp, - }) - - app.SetEndBlocker(func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return abci.ResponseEndBlock{ - ValidatorUpdates: []abci.ValidatorUpdate{ - {Power: 100}, - }, - } - }) - app.Seal() - - res := app.EndBlock(abci.RequestEndBlock{}) - require.Len(t, res.GetValidatorUpdates(), 1) - require.Equal(t, int64(100), res.GetValidatorUpdates()[0].Power) - require.Equal(t, cp.Block.MaxGas, res.ConsensusParamUpdates.Block.MaxGas) -} - -func TestABCI_CheckTx(t *testing.T) { - // This ante handler reads the key and checks that the value matches the - // current counter. This ensures changes to the KVStore persist across - // successive CheckTx runs. - counterKey := []byte("counter-key") - anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, counterKey)) } - suite := NewBaseAppSuite(t, anteOpt) - - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, counterKey}) - - nTxs := int64(5) - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - for i := int64(0); i < nTxs; i++ { - tx := newTxCounter(t, suite.txConfig, i, 0) // no messages - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - r := suite.baseApp.CheckTx(abci.RequestCheckTx{Tx: txBytes}) - require.True(t, r.IsOK(), fmt.Sprintf("%v", r)) - require.Empty(t, r.GetEvents()) - } - - checkStateStore := getCheckStateCtx(suite.baseApp).KVStore(capKey1) - storedCounter := getIntFromStore(t, checkStateStore, counterKey) - - // ensure AnteHandler ran - require.Equal(t, nTxs, storedCounter) - - // if a block is committed, CheckTx state should be reset - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")}) - - require.NotNil(t, getCheckStateCtx(suite.baseApp).BlockGasMeter(), "block gas meter should have been set to checkState") - require.NotEmpty(t, getCheckStateCtx(suite.baseApp).HeaderHash()) - - suite.baseApp.EndBlock(abci.RequestEndBlock{}) - suite.baseApp.Commit() - - checkStateStore = getCheckStateCtx(suite.baseApp).KVStore(capKey1) - storedBytes := checkStateStore.Get(counterKey) - require.Nil(t, storedBytes) -} - -func TestABCI_DeliverTx(t *testing.T) { - anteKey := []byte("ante-key") - anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } - suite := NewBaseAppSuite(t, anteOpt) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - deliverKey := []byte("deliver-key") - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) - - nBlocks := 3 - txPerHeight := 5 - - for blockN := 0; blockN < nBlocks; blockN++ { - header := tmproto.Header{Height: int64(blockN) + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - for i := 0; i < txPerHeight; i++ { - counter := int64(blockN*txPerHeight + i) - tx := newTxCounter(t, suite.txConfig, counter, counter) - - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - - events := res.GetEvents() - require.Len(t, events, 3, "should contain ante handler, message type and counter events respectively") - require.Equal(t, sdk.MarkEventsToIndex(counterEvent("ante_handler", counter).ToABCIEvents(), map[string]struct{}{})[0], events[0], "ante handler event") - require.Equal(t, sdk.MarkEventsToIndex(counterEvent(sdk.EventTypeMessage, counter).ToABCIEvents(), map[string]struct{}{})[0], events[2], "msg handler update counter event") - } - - suite.baseApp.EndBlock(abci.RequestEndBlock{}) - suite.baseApp.Commit() - } -} - -func TestABCI_DeliverTx_MultiMsg(t *testing.T) { - anteKey := []byte("ante-key") - anteOpt := func(bapp *baseapp.BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } - suite := NewBaseAppSuite(t, anteOpt) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - deliverKey := []byte("deliver-key") - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) - - deliverKey2 := []byte("deliver-key2") - baseapptestutil.RegisterCounter2Server(suite.baseApp.MsgServiceRouter(), Counter2ServerImpl{t, capKey1, deliverKey2}) - - // run a multi-msg tx - // with all msgs the same route - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - tx := newTxCounter(t, suite.txConfig, 0, 0, 1, 2) - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - - store := getDeliverStateCtx(suite.baseApp).KVStore(capKey1) - - // tx counter only incremented once - txCounter := getIntFromStore(t, store, anteKey) - require.Equal(t, int64(1), txCounter) - - // msg counter incremented three times - msgCounter := getIntFromStore(t, store, deliverKey) - require.Equal(t, int64(3), msgCounter) - - // replace the second message with a Counter2 - tx = newTxCounter(t, suite.txConfig, 1, 3) - - builder := suite.txConfig.NewTxBuilder() - msgs := tx.GetMsgs() - msgs = append(msgs, &baseapptestutil.MsgCounter2{Counter: 0}) - msgs = append(msgs, &baseapptestutil.MsgCounter2{Counter: 1}) - - builder.SetMsgs(msgs...) - builder.SetMemo(tx.GetMemo()) - setTxSignature(t, builder, 0) - - txBytes, err = suite.txConfig.TxEncoder()(builder.GetTx()) - require.NoError(t, err) - - res = suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - - store = getDeliverStateCtx(suite.baseApp).KVStore(capKey1) - - // tx counter only incremented once - txCounter = getIntFromStore(t, store, anteKey) - require.Equal(t, int64(2), txCounter) - - // original counter increments by one - // new counter increments by two - msgCounter = getIntFromStore(t, store, deliverKey) - require.Equal(t, int64(4), msgCounter) - - msgCounter2 := getIntFromStore(t, store, deliverKey2) - require.Equal(t, int64(2), msgCounter2) -} - -func TestABCI_Query_SimulateTx(t *testing.T) { - gasConsumed := uint64(5) - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasConsumed)) - return - }) - } - suite := NewBaseAppSuite(t, anteOpt) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{gasConsumed}) - - nBlocks := 3 - for blockN := 0; blockN < nBlocks; blockN++ { - count := int64(blockN + 1) - header := tmproto.Header{Height: count} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - tx := newTxCounter(t, suite.txConfig, count, count) - - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.Nil(t, err) - - // simulate a message, check gas reported - gInfo, result, err := suite.baseApp.Simulate(txBytes) - require.NoError(t, err) - require.NotNil(t, result) - require.Equal(t, gasConsumed, gInfo.GasUsed) - - // simulate again, same result - gInfo, result, err = suite.baseApp.Simulate(txBytes) - require.NoError(t, err) - require.NotNil(t, result) - require.Equal(t, gasConsumed, gInfo.GasUsed) - - // simulate by calling Query with encoded tx - query := abci.RequestQuery{ - Path: "/app/simulate", - Data: txBytes, - } - queryResult := suite.baseApp.Query(query) - require.True(t, queryResult.IsOK(), queryResult.Log) - - var simRes sdk.SimulationResponse - require.NoError(t, jsonpb.Unmarshal(strings.NewReader(string(queryResult.Value)), &simRes)) - - require.Equal(t, gInfo, simRes.GasInfo) - require.Equal(t, result.Log, simRes.Result.Log) - require.Equal(t, result.Events, simRes.Result.Events) - require.True(t, bytes.Equal(result.Data, simRes.Result.Data)) - - suite.baseApp.EndBlock(abci.RequestEndBlock{}) - suite.baseApp.Commit() - } -} - -func TestABCI_InvalidTransaction(t *testing.T) { - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - return - }) - } - - suite := NewBaseAppSuite(t, anteOpt) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - // transaction with no messages - { - emptyTx := suite.txConfig.NewTxBuilder().GetTx() - _, result, err := suite.baseApp.Deliver(suite.txConfig.TxEncoder(), emptyTx) - require.Error(t, err) - require.Nil(t, result) - - space, code, _ := sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrInvalidRequest.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrInvalidRequest.ABCICode(), code, err) - } - - // transaction where ValidateBasic fails - { - testCases := []struct { - tx signing.Tx - fail bool - }{ - {newTxCounter(t, suite.txConfig, 0, 0), false}, - {newTxCounter(t, suite.txConfig, -1, 0), false}, - {newTxCounter(t, suite.txConfig, 100, 100), false}, - {newTxCounter(t, suite.txConfig, 100, 5, 4, 3, 2, 1), false}, - - {newTxCounter(t, suite.txConfig, 0, -1), true}, - {newTxCounter(t, suite.txConfig, 0, 1, -2), true}, - {newTxCounter(t, suite.txConfig, 0, 1, 2, -10, 5), true}, - } - - for _, testCase := range testCases { - tx := testCase.tx - _, result, err := suite.baseApp.Deliver(suite.txConfig.TxEncoder(), tx) - - if testCase.fail { - require.Error(t, err) - - space, code, _ := sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrInvalidSequence.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrInvalidSequence.ABCICode(), code, err) - } else { - require.NotNil(t, result) - } - } - } - - // transaction with no known route - { - txBuilder := suite.txConfig.NewTxBuilder() - txBuilder.SetMsgs(&baseapptestutil.MsgCounter2{}) - setTxSignature(t, txBuilder, 0) - unknownRouteTx := txBuilder.GetTx() - - _, result, err := suite.baseApp.Deliver(suite.txConfig.TxEncoder(), unknownRouteTx) - require.Error(t, err) - require.Nil(t, result) - - space, code, _ := sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrUnknownRequest.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrUnknownRequest.ABCICode(), code, err) - - txBuilder = suite.txConfig.NewTxBuilder() - txBuilder.SetMsgs(&baseapptestutil.MsgCounter{}, &baseapptestutil.MsgCounter2{}) - setTxSignature(t, txBuilder, 0) - unknownRouteTx = txBuilder.GetTx() - - _, result, err = suite.baseApp.Deliver(suite.txConfig.TxEncoder(), unknownRouteTx) - require.Error(t, err) - require.Nil(t, result) - - space, code, _ = sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrUnknownRequest.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrUnknownRequest.ABCICode(), code, err) - } - - // Transaction with an unregistered message - { - txBuilder := suite.txConfig.NewTxBuilder() - txBuilder.SetMsgs(&testdata.MsgCreateDog{}) - tx := txBuilder.GetTx() - - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.EqualValues(t, sdkerrors.ErrTxDecode.ABCICode(), res.Code) - require.EqualValues(t, sdkerrors.ErrTxDecode.Codespace(), res.Codespace) - } -} - -func TestABCI_TxGasLimits(t *testing.T) { - gasGranted := uint64(10) - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) - - // AnteHandlers must have their own defer/recover in order for the BaseApp - // to know how much gas was used! This is because the GasMeter is created in - // the AnteHandler, but if it panics the context won't be set properly in - // runTx's recover call. - defer func() { - if r := recover(); r != nil { - switch rType := r.(type) { - case sdk.ErrorOutOfGas: - err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) - default: - panic(r) - } - } - }() - - count, _ := parseTxMemo(t, tx) - newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") - - return newCtx, nil - }) - } - - suite := NewBaseAppSuite(t, anteOpt) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - testCases := []struct { - tx signing.Tx - gasUsed uint64 - fail bool - }{ - {newTxCounter(t, suite.txConfig, 0, 0), 0, false}, - {newTxCounter(t, suite.txConfig, 1, 1), 2, false}, - {newTxCounter(t, suite.txConfig, 9, 1), 10, false}, - {newTxCounter(t, suite.txConfig, 1, 9), 10, false}, - {newTxCounter(t, suite.txConfig, 10, 0), 10, false}, - {newTxCounter(t, suite.txConfig, 0, 10), 10, false}, - {newTxCounter(t, suite.txConfig, 0, 8, 2), 10, false}, - {newTxCounter(t, suite.txConfig, 0, 5, 1, 1, 1, 1, 1), 10, false}, - {newTxCounter(t, suite.txConfig, 0, 5, 1, 1, 1, 1), 9, false}, - - {newTxCounter(t, suite.txConfig, 9, 2), 11, true}, - {newTxCounter(t, suite.txConfig, 2, 9), 11, true}, - {newTxCounter(t, suite.txConfig, 9, 1, 1), 11, true}, - {newTxCounter(t, suite.txConfig, 1, 8, 1, 1), 11, true}, - {newTxCounter(t, suite.txConfig, 11, 0), 11, true}, - {newTxCounter(t, suite.txConfig, 0, 11), 11, true}, - {newTxCounter(t, suite.txConfig, 0, 5, 11), 16, true}, - } - - for i, tc := range testCases { - tx := tc.tx - gInfo, result, err := suite.baseApp.Deliver(suite.txConfig.TxEncoder(), tx) - - // check gas used and wanted - require.Equal(t, tc.gasUsed, gInfo.GasUsed, fmt.Sprintf("tc #%d; gas: %v, result: %v, err: %s", i, gInfo, result, err)) - - // check for out of gas - if !tc.fail { - require.NotNil(t, result, fmt.Sprintf("%d: %v, %v", i, tc, err)) - } else { - require.Error(t, err) - require.Nil(t, result) - - space, code, _ := sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrOutOfGas.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrOutOfGas.ABCICode(), code, err) - } - } -} - -func TestABCI_MaxBlockGasLimits(t *testing.T) { - gasGranted := uint64(10) - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) - - defer func() { - if r := recover(); r != nil { - switch rType := r.(type) { - case sdk.ErrorOutOfGas: - err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) - default: - panic(r) - } - } - }() - - count, _ := parseTxMemo(t, tx) - newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") - - return - }) - } - - suite := NewBaseAppSuite(t, anteOpt) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ - MaxGas: 100, - }, - }, - }) - - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - testCases := []struct { - tx signing.Tx - numDelivers int - gasUsedPerDeliver uint64 - fail bool - failAfterDeliver int - }{ - {newTxCounter(t, suite.txConfig, 0, 0), 0, 0, false, 0}, - {newTxCounter(t, suite.txConfig, 9, 1), 2, 10, false, 0}, - {newTxCounter(t, suite.txConfig, 10, 0), 3, 10, false, 0}, - {newTxCounter(t, suite.txConfig, 10, 0), 10, 10, false, 0}, - {newTxCounter(t, suite.txConfig, 2, 7), 11, 9, false, 0}, - {newTxCounter(t, suite.txConfig, 10, 0), 10, 10, false, 0}, // hit the limit but pass - - {newTxCounter(t, suite.txConfig, 10, 0), 11, 10, true, 10}, - {newTxCounter(t, suite.txConfig, 10, 0), 15, 10, true, 10}, - {newTxCounter(t, suite.txConfig, 9, 0), 12, 9, true, 11}, // fly past the limit - } - - for i, tc := range testCases { - tx := tc.tx - - // reset the block gas - header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - // execute the transaction multiple times - for j := 0; j < tc.numDelivers; j++ { - _, result, err := suite.baseApp.Deliver(suite.txConfig.TxEncoder(), tx) - - ctx := getDeliverStateCtx(suite.baseApp) - - // check for failed transactions - if tc.fail && (j+1) > tc.failAfterDeliver { - require.Error(t, err, fmt.Sprintf("tc #%d; result: %v, err: %s", i, result, err)) - require.Nil(t, result, fmt.Sprintf("tc #%d; result: %v, err: %s", i, result, err)) - - space, code, _ := sdkerrors.ABCIInfo(err, false) - require.EqualValues(t, sdkerrors.ErrOutOfGas.Codespace(), space, err) - require.EqualValues(t, sdkerrors.ErrOutOfGas.ABCICode(), code, err) - require.True(t, ctx.BlockGasMeter().IsOutOfGas()) - } else { - // check gas used and wanted - blockGasUsed := ctx.BlockGasMeter().GasConsumed() - expBlockGasUsed := tc.gasUsedPerDeliver * uint64(j+1) - require.Equal( - t, expBlockGasUsed, blockGasUsed, - fmt.Sprintf("%d,%d: %v, %v, %v, %v", i, j, tc, expBlockGasUsed, blockGasUsed, result), - ) - - require.NotNil(t, result, fmt.Sprintf("tc #%d; currDeliver: %d, result: %v, err: %s", i, j, result, err)) - require.False(t, ctx.BlockGasMeter().IsPastLimit()) - } - } - } -} - -func TestABCI_GasConsumptionBadTx(t *testing.T) { - gasWanted := uint64(5) - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasWanted)) - - defer func() { - if r := recover(); r != nil { - switch rType := r.(type) { - case sdk.ErrorOutOfGas: - log := fmt.Sprintf("out of gas in location: %v", rType.Descriptor) - err = sdkerrors.Wrap(sdkerrors.ErrOutOfGas, log) - default: - panic(r) - } - } - }() - - counter, failOnAnte := parseTxMemo(t, tx) - newCtx.GasMeter().ConsumeGas(uint64(counter), "counter-ante") - if failOnAnte { - return newCtx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") - } - - return - }) - } - - suite := NewBaseAppSuite(t, anteOpt) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ - MaxGas: 9, - }, - }, - }) - - header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - tx := newTxCounter(t, suite.txConfig, 5, 0) - tx = setFailOnAnte(t, suite.txConfig, tx, true) - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - - // require next tx to fail due to black gas limit - tx = newTxCounter(t, suite.txConfig, 5, 0) - txBytes, err = suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - res = suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) -} - -func TestABCI_Query(t *testing.T) { - key, value := []byte("hello"), []byte("goodbye") - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - store := ctx.KVStore(capKey1) - store.Set(key, value) - return - }) - } - - suite := NewBaseAppSuite(t, anteOpt) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImplGasMeterOnly{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - // NOTE: "/store/key1" tells us KVStore - // and the final "/key" says to use the data as the - // key in the given KVStore ... - query := abci.RequestQuery{ - Path: "/store/key1/key", - Data: key, - } - tx := newTxCounter(t, suite.txConfig, 0, 0) - - // query is empty before we do anything - res := suite.baseApp.Query(query) - require.Equal(t, 0, len(res.Value)) - - // query is still empty after a CheckTx - _, resTx, err := suite.baseApp.Check(suite.txConfig.TxEncoder(), tx) - require.NoError(t, err) - require.NotNil(t, resTx) - - res = suite.baseApp.Query(query) - require.Equal(t, 0, len(res.Value)) - - // query is still empty after a DeliverTx before we commit - header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) - - _, resTx, err = suite.baseApp.Deliver(suite.txConfig.TxEncoder(), tx) - require.NoError(t, err) - require.NotNil(t, resTx) - - res = suite.baseApp.Query(query) - require.Equal(t, 0, len(res.Value)) - - // query returns correct value after Commit - suite.baseApp.Commit() - - res = suite.baseApp.Query(query) - require.Equal(t, value, res.Value) -} - -func TestABCI_GetBlockRetentionHeight(t *testing.T) { - logger := defaultLogger() - db := dbm.NewMemDB() - name := t.Name() - - snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), t.TempDir()) - require.NoError(t, err) - - testCases := map[string]struct { - bapp *baseapp.BaseApp + bapp *BaseApp maxAgeBlocks int64 commitHeight int64 expected int64 }{ "defaults": { - bapp: baseapp.NewBaseApp(name, logger, db, nil), + bapp: NewBaseApp(name, logger, db, nil), maxAgeBlocks: 0, commitHeight: 499000, expected: 0, }, "pruning unbonding time only": { - bapp: baseapp.NewBaseApp(name, logger, db, nil, baseapp.SetMinRetainBlocks(1)), + bapp: NewBaseApp(name, logger, db, nil, SetMinRetainBlocks(1)), maxAgeBlocks: 362880, commitHeight: 499000, expected: 136120, }, "pruning iavl snapshot only": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), - baseapp.SetMinRetainBlocks(1), - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(10000, 1)), + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), + SetMinRetainBlocks(1), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(10000, 1)), ), maxAgeBlocks: 0, commitHeight: 499000, expected: 489000, }, "pruning state sync snapshot only": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), - baseapp.SetMinRetainBlocks(1), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), + SetMinRetainBlocks(1), ), maxAgeBlocks: 0, commitHeight: 499000, expected: 349000, }, "pruning min retention only": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetMinRetainBlocks(400000), + SetMinRetainBlocks(400000), ), maxAgeBlocks: 0, commitHeight: 499000, expected: 99000, }, "pruning all conditions": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), - baseapp.SetMinRetainBlocks(400000), - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(400000), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 499000, expected: 99000, }, "no pruning due to no persisted state": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), - baseapp.SetMinRetainBlocks(400000), - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(400000), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 10000, expected: 0, }, "disable pruning": { - bapp: baseapp.NewBaseApp( + bapp: NewBaseApp( name, logger, db, nil, - baseapp.SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), - baseapp.SetMinRetainBlocks(0), - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), + SetPruning(pruningtypes.NewCustomPruningOptions(0, 0)), + SetMinRetainBlocks(0), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(50000, 3)), ), maxAgeBlocks: 362880, commitHeight: 499000, @@ -1294,10 +111,10 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) { for name, tc := range testCases { tc := tc - tc.bapp.SetParamStore(¶mStore{db: dbm.NewMemDB()}) + tc.bapp.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) tc.bapp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{ - Evidence: &tmproto.EvidenceParams{ + ConsensusParams: &abci.ConsensusParams{ + Evidence: &tmprototypes.EvidenceParams{ MaxAgeNumBlocks: tc.maxAgeBlocks, }, }, @@ -1309,157 +126,24 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) { } } -func TestABCI_Proposal_HappyPath(t *testing.T) { - anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - - suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) - baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) +// Test and ensure that negative heights always cause errors. +// See issue https://github.com/cosmos/cosmos-sdk/issues/7662. +func TestBaseAppCreateQueryContextRejectsNegativeHeights(t *testing.T) { + t.Parallel() - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - suite.baseApp.BeginBlock(abci.RequestBeginBlock{ - Header: tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1}, - }) - - tx := newTxCounter(t, suite.txConfig, 0, 1) - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) - - reqCheckTx := abci.RequestCheckTx{ - Tx: txBytes, - Type: abci.CheckTxType_New, - } - suite.baseApp.CheckTx(reqCheckTx) - - tx2 := newTxCounter(t, suite.txConfig, 1, 1) - - tx2Bytes, err := suite.txConfig.TxEncoder()(tx2) - require.NoError(t, err) - - err = pool.Insert(sdk.Context{}, tx2) - require.NoError(t, err) - - reqPrepareProposal := abci.RequestPrepareProposal{ - MaxTxBytes: 1000, - } - resPrepareProposal := suite.baseApp.PrepareProposal(reqPrepareProposal) - require.Equal(t, 2, len(resPrepareProposal.Txs)) - - reqProposalTxBytes := [2][]byte{ - txBytes, - tx2Bytes, - } - reqProcessProposal := abci.RequestProcessProposal{ - Txs: reqProposalTxBytes[:], - } - - resProcessProposal := suite.baseApp.ProcessProposal(reqProcessProposal) - require.Equal(t, abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) - - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.Equal(t, 1, pool.CountTx()) - - require.NotEmpty(t, res.Events) - require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) -} - -func TestABCI_PrepareProposal_ReachedMaxBytes(t *testing.T) { - anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) - - baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - for i := 0; i < 100; i++ { - tx2 := newTxCounter(t, suite.txConfig, int64(i), int64(i)) - err := pool.Insert(sdk.Context{}, tx2) - require.NoError(t, err) - } - - reqPrepareProposal := abci.RequestPrepareProposal{ - MaxTxBytes: 1500, - } - resPrepareProposal := suite.baseApp.PrepareProposal(reqPrepareProposal) - require.Equal(t, 10, len(resPrepareProposal.Txs)) -} - -func TestABCI_PrepareProposal_BadEncoding(t *testing.T) { - anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) - - baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - tx := newTxCounter(t, suite.txConfig, 0, 0) - err := pool.Insert(sdk.Context{}, tx) - require.NoError(t, err) - - reqPrepareProposal := abci.RequestPrepareProposal{ - MaxTxBytes: 1000, - } - resPrepareProposal := suite.baseApp.PrepareProposal(reqPrepareProposal) - require.Equal(t, 1, len(resPrepareProposal.Txs)) -} - -func TestABCI_PrepareProposal_Failures(t *testing.T) { - anteKey := []byte("ante-key") - pool := mempool.NewSenderNonceMempool() - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - suite := NewBaseAppSuite(t, anteOpt, baseapp.SetMempool(pool)) - - baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), NoopCounterServerImpl{}) - - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) - - tx := newTxCounter(t, suite.txConfig, 0, 0) - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) + logger := defaultLogger() + db := dbm.NewMemDB() + name := t.Name() + app := NewBaseApp(name, logger, db, nil) - reqCheckTx := abci.RequestCheckTx{ - Tx: txBytes, - Type: abci.CheckTxType_New, + proves := []bool{ + false, true, } - checkTxRes := suite.baseApp.CheckTx(reqCheckTx) - require.True(t, checkTxRes.IsOK()) - - failTx := newTxCounter(t, suite.txConfig, 1, 1) - failTx = setFailOnAnte(t, suite.txConfig, failTx, true) - - err = pool.Insert(sdk.Context{}, failTx) - require.NoError(t, err) - require.Equal(t, 2, pool.CountTx()) - - req := abci.RequestPrepareProposal{ - MaxTxBytes: 1000, + for _, prove := range proves { + t.Run(fmt.Sprintf("prove=%t", prove), func(t *testing.T) { + sctx, err := app.createQueryContext(-10, true) + require.Error(t, err) + require.Equal(t, sctx, sdk.Context{}) + }) } - res := suite.baseApp.PrepareProposal(req) - require.Equal(t, 1, len(res.Txs)) } diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index a484851b3d52..ace972a21daa 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -1,13 +1,12 @@ package baseapp import ( - "errors" "fmt" "math" "reflect" "strings" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" @@ -20,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/store/rootmulti" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/exported" ) @@ -30,8 +28,6 @@ const ( runTxModeReCheck // Recheck a (pending) transaction after a commit runTxModeSimulate // Simulate a transaction runTxModeDeliver // Deliver a transaction - runTxPrepareProposal - runTxProcessProposal ) var ( @@ -62,21 +58,17 @@ type BaseApp struct { // nolint: maligned grpcQueryRouter *GRPCQueryRouter // router for redirecting gRPC query calls msgServiceRouter *MsgServiceRouter // router for redirecting Msg service messages interfaceRegistry types.InterfaceRegistry - txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx - txEncoder sdk.TxEncoder // marshal sdk.Tx into []byte - mempool mempool.Mempool // application-side mempool + txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx anteHandler sdk.AnteHandler // ante handler for fee and auth postHandler sdk.AnteHandler // post handler, optional, e.g. for tips - initChainer sdk.InitChainer // initialize state with validators and state blob - prepareProposal sdk.PrepareProposalHandler // the handler which runs on ABCI PrepareProposal - processProposal sdk.ProcessProposalHandler // the handler which runs on ABCI ProcessProposal - beginBlocker sdk.BeginBlocker // logic to run before any txs - endBlocker sdk.EndBlocker // logic to run after all txs, and to determine valset changes - addrPeerFilter sdk.PeerFilter // filter peers by address and port - idPeerFilter sdk.PeerFilter // filter peers by node ID - fauxMerkleMode bool // if true, IAVL MountStores uses MountStoresDB for simulation speed. + initChainer sdk.InitChainer // initialize state with validators and state blob + beginBlocker sdk.BeginBlocker // logic to run before any txs + endBlocker sdk.EndBlocker // logic to run after all txs, and to determine valset changes + addrPeerFilter sdk.PeerFilter // filter peers by address and port + idPeerFilter sdk.PeerFilter // filter peers by node ID + fauxMerkleMode bool // if true, IAVL MountStores uses MountStoresDB for simulation speed. // manages snapshots, i.e. dumps of app state at certain intervals snapshotManager *snapshots.Manager @@ -85,10 +77,8 @@ type BaseApp struct { // nolint: maligned // // checkState is set on InitChain and reset on Commit // deliverState is set on InitChain and BeginBlock and set to nil on Commit - checkState *state // for CheckTx - deliverState *state // for DeliverTx - processProposalState *state // for ProcessProposal - prepareProposalState *state // for PrepareProposal + checkState *state // for CheckTx + deliverState *state // for DeliverTx // an inter-block write-through cache provided to the context during deliverState interBlockCache sdk.MultiStorePersistentCache @@ -176,18 +166,6 @@ func NewBaseApp( option(app) } - if app.mempool == nil { - app.SetMempool(mempool.NewSenderNonceMempool()) - } - - if app.prepareProposal == nil { - app.SetPrepareProposal(app.DefaultPrepareProposal()) - } - - if app.processProposal == nil { - app.SetProcessProposal(app.DefaultProcessProposal()) - } - if app.interBlockCache != nil { app.cms.SetInterBlockCache(app.interBlockCache) } @@ -220,11 +198,6 @@ func (app *BaseApp) Trace() bool { // MsgServiceRouter returns the MsgServiceRouter of a BaseApp. func (app *BaseApp) MsgServiceRouter() *MsgServiceRouter { return app.msgServiceRouter } -// SetMsgServiceRouter sets the MsgServiceRouter of a BaseApp. -func (app *BaseApp) SetMsgServiceRouter(msgServiceRouter *MsgServiceRouter) { - app.msgServiceRouter = msgServiceRouter -} - // MountStores mounts all IAVL or DB stores to the provided keys in the BaseApp // multistore. func (app *BaseApp) MountStores(keys ...sdk.StoreKey) { @@ -342,16 +315,8 @@ func (app *BaseApp) init() error { panic("cannot call initFromMainStore: baseapp already sealed") } - emptyHeader := tmproto.Header{} - - // Needed for the export command which inits from store but never calls - // InitChain. - app.setCheckState(emptyHeader) - - // Needed for ABCI Replay Blocks mode which calls Prepare/Process proposal - // (InitChain is not called). - app.setPrepareProposalState(emptyHeader) - app.setProcessProposalState(emptyHeader) + // needed for the export command which inits from store but never calls initchain + app.setCheckState(tmproto.Header{}) appVersion, err := app.GetAppVersion() if err != nil { @@ -361,7 +326,6 @@ func (app *BaseApp) init() error { if err := app.SetAppVersion(appVersion); err != nil { return err } - app.Seal() rms, ok := app.cms.(*rootmulti.Store) @@ -423,28 +387,6 @@ func (app *BaseApp) Seal() { app.sealed = true } // IsSealed returns true if the BaseApp is sealed and false otherwise. func (app *BaseApp) IsSealed() bool { return app.sealed } -// setPrepareProposalState sets the BaseApp's prepareProposalState with a -// branched multi-store (i.e. a CacheMultiStore) and a new Context with the -// same multi-store branch, and provided header. It is set on InitChain and Commit. -func (app *BaseApp) setPrepareProposalState(header tmproto.Header) { - ms := app.cms.CacheMultiStore() - app.prepareProposalState = &state{ - ms: ms, - ctx: sdk.NewContext(ms, header, false, app.logger), - } -} - -// setProcessProposalState sets the BaseApp's processProposalState with a -// branched multi-store (i.e. a CacheMultiStore) and a new Context with the -// same multi-store branch, and provided header. It is set on InitChain and Commit. -func (app *BaseApp) setProcessProposalState(header tmproto.Header) { - ms := app.cms.CacheMultiStore() - app.processProposalState = &state{ - ms: ms, - ctx: sdk.NewContext(ms, header, false, app.logger), - } -} - // setCheckState sets the BaseApp's checkState with a branched multi-store // (i.e. a CacheMultiStore) and a new Context with the same multi-store branch, // provided header, and minimum gas prices set. It is set on InitChain and reset @@ -471,15 +413,15 @@ func (app *BaseApp) setDeliverState(header tmproto.Header) { // GetConsensusParams returns the current consensus parameters from the BaseApp's // ParamStore. If the BaseApp has no ParamStore defined, nil is returned. -func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams { +func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams { if app.paramStore == nil { return nil } - cp := new(tmproto.ConsensusParams) + cp := new(abci.ConsensusParams) if app.paramStore.Has(ctx, ParamStoreKeyBlockParams) { - var bp tmproto.BlockParams + var bp abci.BlockParams app.paramStore.Get(ctx, ParamStoreKeyBlockParams, &bp) cp.Block = &bp @@ -504,7 +446,7 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams panic(err) } cp.Version = &tmproto.VersionParams{ - App: appVersion, + AppVersion: appVersion, } return cp } @@ -517,7 +459,7 @@ func (app *BaseApp) AddRunTxRecoveryHandler(handlers ...RecoveryHandler) { } // StoreConsensusParams sets the consensus parameters to the baseapp's param store. -func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) { +func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) { if app.paramStore == nil { panic("cannot store consensus params with no params store set") } @@ -536,10 +478,10 @@ func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusP // deserialized by the state-synching node to be validated in Tendermint. } -// GetMaximumBlockGas gets the maximum gas from the consensus params. It panics +// getMaximumBlockGas gets the maximum gas from the consensus params. It panics // if maximum block gas is less than negative one and returns zero if negative // one. -func (app *BaseApp) GetMaximumBlockGas(ctx sdk.Context) uint64 { +func (app *BaseApp) getMaximumBlockGas(ctx sdk.Context) uint64 { cp := app.GetConsensusParams(ctx) if cp == nil || cp.Block == nil { return 0 @@ -571,7 +513,7 @@ func (app *BaseApp) validateHeight(req abci.RequestBeginBlock) error { // previous commit). The height we're expecting is the initial height. expectedHeight = app.initialHeight } else { - // This case can mean two things: + // This case can means two things: // - either there was already a previous commit in the store, in which // case we increment the version from there, // - or there was no previous commit, and initial version was not set, @@ -602,35 +544,23 @@ func validateBasicTxMsgs(msgs []sdk.Msg) error { return nil } -// Returns the application's deliverState if app is in runTxModeDeliver, +// Returns the applications's deliverState if app is in runTxModeDeliver, // otherwise it returns the application's checkstate. func (app *BaseApp) getState(mode runTxMode) *state { - switch mode { - case runTxModeDeliver: + if mode == runTxModeDeliver { return app.deliverState - - case runTxPrepareProposal: - return app.prepareProposalState - - case runTxProcessProposal: - return app.processProposalState - - default: - return app.checkState } + + return app.checkState } // retrieve the context for the tx w/ txBytes and other memoized values. func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) sdk.Context { - modeState := app.getState(mode) - if modeState == nil { - panic(fmt.Sprintf("state is nil for mode %v", mode)) - } - - ctx := modeState.ctx. + ctx := app.getState(mode).ctx. WithTxBytes(txBytes). - WithVoteInfos(app.voteInfos). - WithConsensusParams(app.GetConsensusParams(modeState.ctx)) + WithVoteInfos(app.voteInfos) + + ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) if mode == runTxModeReCheck { ctx = ctx.WithIsReCheckTx(true) @@ -672,7 +602,7 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, err error) { // NOTE: GasWanted should be returned by the AnteHandler. GasUsed is // determined by the GasMeter. We need access to the context to get the gas - // meter, so we initialize upfront. + // meter so we initialize upfront. var gasWanted uint64 ctx := app.getContextForTx(mode, txBytes) @@ -693,11 +623,9 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re gInfo = sdk.GasInfo{GasWanted: gasWanted, GasUsed: ctx.GasMeter().GasConsumed()} }() - var blockGasConsumed bool - - // Note, consumeBlockGas makes sure block gas is consumed at most once. It - // must happen after tx processing, and must be executed even if tx processing - // fails. Hence, we use trick with `defer`. + blockGasConsumed := false + // consumeBlockGas makes sure block gas is consumed at most once. It must happen after + // tx processing, and must be execute even if tx processing fails. Hence we use trick with `defer` consumeBlockGas := func() { if !blockGasConsumed { blockGasConsumed = true @@ -766,16 +694,6 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re anteEvents = events.ToABCIEvents() } - if mode == runTxModeCheck { - if err := app.mempool.Insert(ctx, tx); err != nil { - return gInfo, nil, anteEvents, err - } - } else if mode == runTxModeDeliver { - if err := app.mempool.Remove(tx); err != nil && !errors.Is(err, mempool.ErrTxNotFound) { - return gInfo, nil, anteEvents, fmt.Errorf("failed to remove tx from mempool: %w", err) - } - } - // Create a new Context based off of the existing Context with a MultiStore branch // in case message processing fails. At this point, the MultiStore // is a branch of a branch. @@ -788,7 +706,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re if err == nil { // Run optional postHandlers. // - // Note: If the postHandler fails, we also revert the runMsgs state. + // Note: If the postHandler fails, we also revert the runMsgs state! if app.postHandler != nil { newCtx, err := app.postHandler(runMsgCtx, tx, mode == runTxModeSimulate) if err != nil { @@ -803,11 +721,11 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re consumeBlockGas() msCache.Write() - } - if len(anteEvents) > 0 && (mode == runTxModeDeliver || mode == runTxModeSimulate) { - // append the events in the order of occurrence - result.Events = append(anteEvents, result.Events...) + if len(anteEvents) > 0 { + // append the events in the order of occurrence + result.Events = append(anteEvents, result.Events...) + } } } @@ -892,90 +810,3 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s Events: events.ToABCIEvents(), }, nil } - -// DefaultPrepareProposal returns the default implementation for processing an -// ABCI proposal. The application's mempool is enumerated and all valid -// transactions are added to the proposal. Transactions are valid if they: -// -// 1) Successfully encode to bytes. -// 2) Are valid (i.e. pass runTx, AnteHandler only). -// -// Enumeration is halted once RequestPrepareProposal.MaxBytes of transactions is -// reached or the mempool is exhausted. -// -// Note that step (2) is identical to the validation step performed in -// DefaultProcessProposal. It is very important that the same validation logic -// is used in both steps, and applications must ensure that this is the case in -// non-default handlers. -func (app *BaseApp) DefaultPrepareProposal() sdk.PrepareProposalHandler { - return func(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - var ( - txsBytes [][]byte - byteCount int64 - ) - - iterator := app.mempool.Select(ctx, req.Txs) - for iterator != nil { - memTx := iterator.Tx() - - bz, err := app.txEncoder(memTx) - if err != nil { - panic(err) - } - - txSize := int64(len(bz)) - - // NOTE: Since runTx was already executed in CheckTx, which calls - // mempool.Insert, ideally everything in the pool should be valid. - // some mempool implementations may insert invalid txs, so we check again. - _, _, _, err = app.runTx(runTxPrepareProposal, bz) - if err != nil { - if err := app.mempool.Remove(memTx); err != nil && !errors.Is(err, mempool.ErrTxNotFound) { - panic(err) - } - - iterator = iterator.Next() - continue - } else if byteCount += txSize; byteCount <= req.MaxTxBytes { - txsBytes = append(txsBytes, bz) - } else { - break - } - - iterator = iterator.Next() - } - - return abci.ResponsePrepareProposal{Txs: txsBytes} - } -} - -// DefaultProcessProposal returns the default implementation for processing an -// ABCI proposal. -// -// Every transaction in the proposal must pass 2 conditions: -// -// 1. The transaction bytes must decode to a valid transaction. -// 2. The transaction must be valid (i.e. pass runTx, AnteHandler only). -// -// If any transaction fails to pass either condition, the proposal is rejected. -// Note that step (2) is identical to the validation step performed in -// DefaultPrepareProposal. It is very important that the same validation logic -// is used in both steps, and applications must ensure that this is the case in -// non-default handlers. -func (app *BaseApp) DefaultProcessProposal() sdk.ProcessProposalHandler { - return func(ctx sdk.Context, req abci.RequestProcessProposal) abci.ResponseProcessProposal { - for _, txBytes := range req.Txs { - _, err := app.txDecoder(txBytes) - if err != nil { - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} - } - - _, _, _, err = app.runTx(runTxProcessProposal, txBytes) - if err != nil { - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} - } - } - - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} - } -} diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 9928caff2979..247ebc3a51ec 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -1,30 +1,38 @@ -package baseapp_test +package baseapp import ( + "bytes" + "encoding/binary" + "encoding/json" "fmt" + "io/ioutil" "math/rand" + "os" + "strings" + "sync" "testing" "time" + "github.com/gogo/protobuf/jsonpb" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/baseapp" - baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/testutil/mock" + snaphotstestutil "github.com/cosmos/cosmos-sdk/testutil/snapshots" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" ) var ( @@ -32,152 +40,159 @@ var ( capKey2 = sdk.NewKVStoreKey("key2") ) -type ( - BaseAppSuite struct { - baseApp *baseapp.BaseApp - cdc *codec.ProtoCodec - txConfig client.TxConfig - } +type setupConfig struct { + blocks uint64 + blockTxs int + snapshotInterval uint64 + snapshotKeepEvery uint32 + pruningOpts pruningtypes.PruningOptions +} - SnapshotsConfig struct { - blocks uint64 - blockTxs int - snapshotInterval uint64 - snapshotKeepRecent uint32 - pruningOpts pruningtypes.PruningOptions - } -) +func defaultLogger() log.Logger { + return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") +} -func NewBaseAppSuite(t *testing.T, opts ...func(*baseapp.BaseApp)) *BaseAppSuite { - cdc := codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) - baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry()) +func newBaseApp(name string, options ...func(*BaseApp)) *BaseApp { + db := dbm.NewMemDB() + return newBaseAppWithDB(name, db, options...) +} - txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) +func newBaseAppWithDB(name string, db dbm.DB, options ...func(*BaseApp)) *BaseApp { logger := defaultLogger() - db := dbm.NewMemDB() + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + return NewBaseApp(name, logger, db, testTxDecoder(codec), options...) +} - app := baseapp.NewBaseApp(t.Name(), logger, db, txConfig.TxDecoder(), opts...) - require.Equal(t, t.Name(), app.Name()) +func registerTestCodec(cdc *codec.LegacyAmino) { + // register Tx, Msg + sdk.RegisterLegacyAminoCodec(cdc) - app.SetInterfaceRegistry(cdc.InterfaceRegistry()) - app.MsgServiceRouter().SetInterfaceRegistry(cdc.InterfaceRegistry()) - app.MountStores(capKey1, capKey2) - app.SetParamStore(¶mStore{db: dbm.NewMemDB()}) - app.SetTxDecoder(txConfig.TxDecoder()) - app.SetTxEncoder(txConfig.TxEncoder()) + // register test types + cdc.RegisterConcrete(&txTest{}, "cosmos-sdk/baseapp/txTest", nil) + cdc.RegisterConcrete(&msgCounter{}, "cosmos-sdk/baseapp/msgCounter", nil) + cdc.RegisterConcrete(&msgCounter2{}, "cosmos-sdk/baseapp/msgCounter2", nil) + cdc.RegisterConcrete(&msgKeyValue{}, "cosmos-sdk/baseapp/msgKeyValue", nil) + cdc.RegisterConcrete(&msgNoRoute{}, "cosmos-sdk/baseapp/msgNoRoute", nil) +} - // mount stores and seal - require.Nil(t, app.LoadLatestVersion()) +// aminoTxEncoder creates a amino TxEncoder for testing purposes. +func aminoTxEncoder() sdk.TxEncoder { + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) - return &BaseAppSuite{ - baseApp: app, - cdc: cdc, - txConfig: txConfig, - } + return legacytx.StdTxConfig{Cdc: cdc}.TxEncoder() } -func getQueryBaseapp(t *testing.T) *baseapp.BaseApp { - db := dbm.NewMemDB() - name := t.Name() - app := baseapp.NewBaseApp(name, defaultLogger(), db, nil) - - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) - app.Commit() +// simple one store baseapp +func setupBaseApp(t *testing.T, options ...func(*BaseApp)) (*BaseApp, error) { + app := newBaseApp(t.Name(), options...) + require.Equal(t, t.Name(), app.Name()) - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) - app.Commit() + app.MountStores(capKey1, capKey2) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) - return app + // stores are mounted + err := app.LoadLatestVersion() + return app, err } -func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...func(*baseapp.BaseApp)) *BaseAppSuite { - snapshotTimeout := 1 * time.Minute - snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), t.TempDir()) - require.NoError(t, err) +// simple one store baseapp with data and snapshots. Each tx is 1 MB in size (uncompressed). +func setupBaseAppWithSnapshots(t *testing.T, config *setupConfig) (*BaseApp, func(), error) { + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + routerOpt := func(bapp *BaseApp) { + bapp.Router().AddRoute(sdk.NewRoute(routeMsgKeyValue, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + kv := msg.(*msgKeyValue) + bapp.cms.GetCommitKVStore(capKey2).Set(kv.Key, kv.Value) + return &sdk.Result{}, nil + })) + } - suite := NewBaseAppSuite( - t, - append( - opts, - baseapp.SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(cfg.snapshotInterval, cfg.snapshotKeepRecent)), - baseapp.SetPruning(cfg.pruningOpts), - )..., - ) + snapshotTimeout := 90 * time.Second + snapshotDir, err := ioutil.TempDir("", "baseapp") + require.NoError(t, err) + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), snapshotDir) + require.NoError(t, err) + teardown := func() { + os.RemoveAll(snapshotDir) + } - baseapptestutil.RegisterKeyValueServer(suite.baseApp.MsgServiceRouter(), MsgKeyValueImpl{}) + app, err := setupBaseApp(t, routerOpt, SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(config.snapshotInterval, uint32(config.snapshotKeepEvery))), SetPruning(config.pruningOpts)) + if err != nil { + return nil, nil, err + } - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) + app.InitChain(abci.RequestInitChain{}) r := rand.New(rand.NewSource(3920758213583)) keyCounter := 0 - - for height := int64(1); height <= int64(cfg.blocks); height++ { - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) - - for txNum := 0; txNum < cfg.blockTxs; txNum++ { - msgs := []sdk.Msg{} + for height := int64(1); height <= int64(config.blocks); height++ { + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) + for txNum := 0; txNum < config.blockTxs; txNum++ { + tx := txTest{Msgs: []sdk.Msg{}} for msgNum := 0; msgNum < 100; msgNum++ { key := []byte(fmt.Sprintf("%v", keyCounter)) value := make([]byte, 10000) - _, err := r.Read(value) require.NoError(t, err) - - msgs = append(msgs, &baseapptestutil.MsgKeyValue{Key: key, Value: value}) + tx.Msgs = append(tx.Msgs, msgKeyValue{Key: key, Value: value}) keyCounter++ } - - builder := suite.txConfig.NewTxBuilder() - builder.SetMsgs(msgs...) - setTxSignature(t, builder, 0) - - txBytes, err := suite.txConfig.TxEncoder()(builder.GetTx()) + txBytes, err := codec.Marshal(tx) require.NoError(t, err) - - resp := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + resp := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.True(t, resp.IsOK(), "%v", resp.String()) } + app.EndBlock(abci.RequestEndBlock{Height: height}) + app.Commit() - suite.baseApp.EndBlock(abci.RequestEndBlock{Height: height}) - suite.baseApp.Commit() - - // wait for snapshot to be taken, since it happens asynchronously - if cfg.snapshotInterval > 0 && uint64(height)%cfg.snapshotInterval == 0 { + // Wait for snapshot to be taken, since it happens asynchronously. + if config.snapshotInterval > 0 && uint64(height)%config.snapshotInterval == 0 { start := time.Now() for { if time.Since(start) > snapshotTimeout { t.Errorf("timed out waiting for snapshot after %v", snapshotTimeout) } - snapshot, err := snapshotStore.Get(uint64(height), snapshottypes.CurrentFormat) require.NoError(t, err) - if snapshot != nil { break } - time.Sleep(100 * time.Millisecond) } } } - return suite + return app, teardown, nil +} + +func TestMountStores(t *testing.T) { + app, err := setupBaseApp(t) + require.NoError(t, err) + + // check both stores + store1 := app.cms.GetCommitKVStore(capKey1) + require.NotNil(t, store1) + store2 := app.cms.GetCommitKVStore(capKey2) + require.NotNil(t, store2) } +// Test that we can make commits and then reload old versions. +// Test that LoadLatestVersion actually does. func TestLoadVersion(t *testing.T) { logger := defaultLogger() - pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) // make a cap key and mount the store err := app.LoadLatestVersion() // needed to make stores non-nil require.Nil(t, err) - emptyCommitID := storetypes.CommitID{} + emptyCommitID := sdk.CommitID{} // fresh store has zero/empty last commit lastHeight := app.LastBlockHeight() @@ -189,81 +204,75 @@ func TestLoadVersion(t *testing.T) { header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() - commitID1 := storetypes.CommitID{Version: 1, Hash: res.Data} + commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} // execute a block, collect commit ID header = tmproto.Header{Height: 2} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res = app.Commit() - commitID2 := storetypes.CommitID{Version: 2, Hash: res.Data} + commitID2 := sdk.CommitID{Version: 2, Hash: res.Data} // reload with LoadLatestVersion - app = baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) app.MountStores() - err = app.LoadLatestVersion() require.Nil(t, err) - testLoadVersionHelper(t, app, int64(2), commitID2) - // Reload with LoadVersion, see if you can commit the same block and get - // the same result. - app = baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + // reload with LoadVersion, see if you can commit the same block and get + // the same result + app = NewBaseApp(name, logger, db, nil, pruningOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) err = app.LoadVersion(1) require.Nil(t, err) - testLoadVersionHelper(t, app, int64(1), commitID1) - app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() - testLoadVersionHelper(t, app, int64(2), commitID2) } -func TestSetLoader(t *testing.T) { - useDefaultLoader := func(app *baseapp.BaseApp) { - app.SetStoreLoader(baseapp.DefaultStoreLoader) - } - - initStore := func(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db, log.NewNopLogger()) - rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) - - key := sdk.NewKVStoreKey(storeKey) - rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) - - err := rs.LoadLatestVersion() - require.Nil(t, err) - require.Equal(t, int64(0), rs.LastCommitID().Version) - - // write some data in substore - kv, _ := rs.GetStore(key).(storetypes.KVStore) - require.NotNil(t, kv) - kv.Set(k, v) - - commitID := rs.Commit() - require.Equal(t, int64(1), commitID.Version) - } - - checkStore := func(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) { - rs := rootmulti.NewStore(db, log.NewNopLogger()) - rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) +func useDefaultLoader(app *BaseApp) { + app.SetStoreLoader(DefaultStoreLoader) +} - key := sdk.NewKVStoreKey(storeKey) - rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) +func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) + key := sdk.NewKVStoreKey(storeKey) + rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) + err := rs.LoadLatestVersion() + require.Nil(t, err) + require.Equal(t, int64(0), rs.LastCommitID().Version) + + // write some data in substore + kv, _ := rs.GetStore(key).(storetypes.KVStore) + require.NotNil(t, kv) + kv.Set(k, v) + commitID := rs.Commit() + require.Equal(t, int64(1), commitID.Version) +} - err := rs.LoadLatestVersion() - require.Nil(t, err) - require.Equal(t, ver, rs.LastCommitID().Version) +func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) { + rs := rootmulti.NewStore(db, log.NewNopLogger()) + rs.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) + key := sdk.NewKVStoreKey(storeKey) + rs.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) + err := rs.LoadLatestVersion() + require.Nil(t, err) + require.Equal(t, ver, rs.LastCommitID().Version) - // query data in substore - kv, _ := rs.GetStore(key).(storetypes.KVStore) - require.NotNil(t, kv) - require.Equal(t, v, kv.Get(k)) - } + // query data in substore + kv, _ := rs.GetStore(key).(storetypes.KVStore) + require.NotNil(t, kv) + require.Equal(t, v, kv.Get(k)) +} - testCases := map[string]struct { - setLoader func(*baseapp.BaseApp) +// Test that we can make commits and then reload old versions. +// Test that LoadLatestVersion actually does. +func TestSetLoader(t *testing.T) { + cases := map[string]struct { + setLoader func(*BaseApp) origStoreKey string loadStoreKey string }{ @@ -281,18 +290,20 @@ func TestSetLoader(t *testing.T) { k := []byte("key") v := []byte("value") - for name, tc := range testCases { + for name, tc := range cases { + tc := tc t.Run(name, func(t *testing.T) { // prepare a db with some data db := dbm.NewMemDB() initStore(t, db, tc.origStoreKey, k, v) // load the app with the existing db - opts := []func(*baseapp.BaseApp){baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing))} + opts := []func(*BaseApp){SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing))} if tc.setLoader != nil { opts = append(opts, tc.setLoader) } - app := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) + app := NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) + app.SetParamStore(&mock.ParamStore{Db: db}) app.MountStores(sdk.NewKVStoreKey(tc.loadStoreKey)) err := app.LoadLatestVersion() require.Nil(t, err) @@ -311,10 +322,10 @@ func TestSetLoader(t *testing.T) { func TestVersionSetterGetter(t *testing.T) { logger := defaultLogger() - pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) require.Equal(t, "", app.Version()) res := app.Query(abci.RequestQuery{Path: "app/version"}) @@ -324,7 +335,6 @@ func TestVersionSetterGetter(t *testing.T) { versionString := "1.0.0" app.SetVersion(versionString) require.Equal(t, versionString, app.Version()) - res = app.Query(abci.RequestQuery{Path: "app/version"}) require.True(t, res.IsOK()) require.Equal(t, versionString, string(res.Value)) @@ -332,10 +342,11 @@ func TestVersionSetterGetter(t *testing.T) { func TestLoadVersionInvalid(t *testing.T) { logger := log.NewNopLogger() - pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) + pruningOpt := SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + app := NewBaseApp(name, logger, db, nil, pruningOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) err := app.LoadLatestVersion() require.Nil(t, err) @@ -347,10 +358,11 @@ func TestLoadVersionInvalid(t *testing.T) { header := tmproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() - commitID1 := storetypes.CommitID{Version: 1, Hash: res.Data} + commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} // create a new app with the stores mounted under the same cap key - app = baseapp.NewBaseApp(name, logger, db, nil, pruningOpt) + app = NewBaseApp(name, logger, db, nil, pruningOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) // require we can load the latest version err = app.LoadVersion(1) @@ -362,298 +374,2142 @@ func TestLoadVersionInvalid(t *testing.T) { require.Error(t, err) } -func TestOptionFunction(t *testing.T) { - testChangeNameHelper := func(name string) func(*baseapp.BaseApp) { - return func(bap *baseapp.BaseApp) { - bap.SetName(name) - } +func TestLoadVersionPruning(t *testing.T) { + logger := log.NewNopLogger() + pruningOptions := pruningtypes.NewCustomPruningOptions(10, 15) + pruningOpt := SetPruning(pruningOptions) + db := dbm.NewMemDB() + name := t.Name() + + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), snaphotstestutil.GetTempDir(t)) + require.NoError(t, err) + snapshotOpt := SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(3, 1)) + + app := NewBaseApp(name, logger, db, nil, pruningOpt, snapshotOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) + + // make a cap key and mount the store + capKey := sdk.NewKVStoreKey("key1") + app.MountStores(capKey) + + err = app.LoadLatestVersion() // needed to make stores non-nil + require.Nil(t, err) + + emptyCommitID := sdk.CommitID{} + + // fresh store has zero/empty last commit + lastHeight := app.LastBlockHeight() + lastID := app.LastCommitID() + require.Equal(t, int64(0), lastHeight) + require.Equal(t, emptyCommitID, lastID) + + var lastCommitID sdk.CommitID + + // Commit 15 blocks, of which 15 (latest) is kept in addition to 5-14 inclusive + // (keep recent) and 3 (snapshot-interval). + for i := int64(1); i <= 15; i++ { + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) + res := app.Commit() + lastCommitID = sdk.CommitID{Version: i, Hash: res.Data} + } + + for _, v := range []int64{1, 2, 3, 4} { + _, err = app.cms.CacheMultiStoreWithVersion(v) + require.NoError(t, err) + } + + for _, v := range []int64{3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} { + _, err = app.cms.CacheMultiStoreWithVersion(v) + require.NoError(t, err) } + // reload with LoadLatestVersion, check it loads last version + app = NewBaseApp(name, logger, db, nil, pruningOpt, snapshotOpt) + app.SetParamStore(&mock.ParamStore{Db: db}) + app.MountStores(capKey) + + err = app.LoadLatestVersion() + require.Nil(t, err) + testLoadVersionHelper(t, app, int64(15), lastCommitID) +} + +func testLoadVersionHelper(t *testing.T, app *BaseApp, expectedHeight int64, expectedID sdk.CommitID) { + lastHeight := app.LastBlockHeight() + lastID := app.LastCommitID() + require.Equal(t, expectedHeight, lastHeight) + require.Equal(t, expectedID, lastID) +} + +func TestOptionFunction(t *testing.T) { logger := defaultLogger() db := dbm.NewMemDB() - bap := baseapp.NewBaseApp("starting name", logger, db, nil, testChangeNameHelper("new name")) - require.Equal(t, bap.Name(), "new name", "BaseApp should have had name changed via option function") + bap := NewBaseApp("starting name", logger, db, nil, testChangeNameHelper("new name")) + require.Equal(t, bap.name, "new name", "BaseApp should have had name changed via option function") +} + +func testChangeNameHelper(name string) func(*BaseApp) { + return func(bap *BaseApp) { + bap.name = name + } +} + +// Test that txs can be unmarshalled and read and that +// correct error codes are returned when not +func TestTxDecoder(t *testing.T) { + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + app := newBaseApp(t.Name()) + tx := newTxCounter(1, 0) + txBytes := codec.MustMarshal(tx) + + dTx, err := app.txDecoder(txBytes) + require.NoError(t, err) + + cTx := dTx.(txTest) + require.Equal(t, tx.Counter, cTx.Counter) +} + +// Test that Info returns the latest committed state. +func TestInfo(t *testing.T) { + app := newBaseApp(t.Name()) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) + app.InitChain(abci.RequestInitChain{}) + + // ----- test an empty response ------- + reqInfo := abci.RequestInfo{} + res := app.Info(reqInfo) + + // should be empty + assert.Equal(t, "", res.Version) + assert.Equal(t, t.Name(), res.GetData()) + assert.Equal(t, int64(0), res.LastBlockHeight) + require.Equal(t, []uint8(nil), res.LastBlockAppHash) + + appVersion, err := app.GetAppVersion() + require.NoError(t, err) + + assert.Equal(t, appVersion, res.AppVersion) } func TestBaseAppOptionSeal(t *testing.T) { - suite := NewBaseAppSuite(t) + app, err := setupBaseApp(t) + require.NoError(t, err) require.Panics(t, func() { - suite.baseApp.SetName("") + app.SetName("") + }) + require.Panics(t, func() { + app.SetVersion("") }) require.Panics(t, func() { - suite.baseApp.SetVersion("") + app.SetDB(nil) }) require.Panics(t, func() { - suite.baseApp.SetDB(nil) + app.SetCMS(nil) }) require.Panics(t, func() { - suite.baseApp.SetCMS(nil) + app.SetInitChainer(nil) }) require.Panics(t, func() { - suite.baseApp.SetInitChainer(nil) + app.SetBeginBlocker(nil) }) require.Panics(t, func() { - suite.baseApp.SetBeginBlocker(nil) + app.SetEndBlocker(nil) }) require.Panics(t, func() { - suite.baseApp.SetEndBlocker(nil) + app.SetAnteHandler(nil) }) require.Panics(t, func() { - suite.baseApp.SetAnteHandler(nil) + app.SetAddrPeerFilter(nil) }) require.Panics(t, func() { - suite.baseApp.SetAddrPeerFilter(nil) + app.SetIDPeerFilter(nil) }) require.Panics(t, func() { - suite.baseApp.SetIDPeerFilter(nil) + app.SetFauxMerkleMode() }) require.Panics(t, func() { - suite.baseApp.SetFauxMerkleMode() + app.SetRouter(NewRouter()) }) } -func TestTxDecoder(t *testing.T) { - cdc := codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) - baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry()) - - // patch in TxConfig instead of using an output from x/auth/tx - txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) - - tx := newTxCounter(t, txConfig, 1, 0) - txBytes, err := txConfig.TxEncoder()(tx) - require.NoError(t, err) - - dTx, err := txConfig.TxDecoder()(txBytes) - require.NoError(t, err) - - counter, _ := parseTxMemo(t, tx) - dTxCounter, _ := parseTxMemo(t, dTx) - require.Equal(t, counter, dTxCounter) +func TestSetMinGasPrices(t *testing.T) { + minGasPrices := sdk.DecCoins{sdk.NewInt64DecCoin("stake", 5000)} + app := newBaseApp(t.Name(), SetMinGasPrices(minGasPrices.String())) + require.Equal(t, minGasPrices, app.minGasPrices) } -func TestCustomRunTxPanicHandler(t *testing.T) { - customPanicMsg := "test panic" - anteErr := sdkerrors.Register("fakeModule", 100500, "fakeError") - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - panic(sdkerrors.Wrap(anteErr, "anteHandler")) - }) +func TestInitChainer(t *testing.T) { + name := t.Name() + // keep the db and logger ourselves so + // we can reload the same app later + db := dbm.NewMemDB() + logger := defaultLogger() + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: db}) + capKey := sdk.NewKVStoreKey("main") + capKey2 := sdk.NewKVStoreKey("key2") + app.MountStores(capKey, capKey2) + + // set a value in the store on init chain + key, value := []byte("hello"), []byte("goodbye") + var initChainer sdk.InitChainer = func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { + store := ctx.KVStore(capKey) + store.Set(key, value) + return abci.ResponseInitChain{} } - suite := NewBaseAppSuite(t, anteOpt) - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) + query := abci.RequestQuery{ + Path: "/store/main/key", + Data: key, + } - header := tmproto.Header{Height: 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + // initChainer is nil - nothing happens + app.InitChain(abci.RequestInitChain{}) + res := app.Query(query) + require.Equal(t, 0, len(res.Value)) - suite.baseApp.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { - err, ok := recoveryObj.(error) - if !ok { - return nil - } + // set initChainer and try again - should see the value + app.SetInitChainer(initChainer) - if anteErr.Is(err) { - panic(customPanicMsg) - } else { - return nil - } - }) + // stores are mounted and private members are set - sealing baseapp + err := app.LoadLatestVersion() // needed to make stores non-nil + require.Nil(t, err) + require.Equal(t, int64(0), app.LastBlockHeight()) - // transaction should panic with custom handler above - { - tx := newTxCounter(t, suite.txConfig, 0, 0) + initChainRes := app.InitChain(abci.RequestInitChain{AppStateBytes: []byte("{}"), ChainId: "test-chain-id"}) // must have valid JSON genesis file, even if empty - require.PanicsWithValue(t, customPanicMsg, func() { - suite.baseApp.Deliver(suite.txConfig.TxEncoder(), tx) - }) - } -} + // The AppHash returned by a new chain is the sha256 hash of "". + // $ echo -n '' | sha256sum + // e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + require.Equal( + t, + []byte{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}, + initChainRes.AppHash, + ) -func TestBaseAppAnteHandler(t *testing.T) { - anteKey := []byte("ante-key") - anteOpt := func(bapp *baseapp.BaseApp) { - bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) - } - suite := NewBaseAppSuite(t, anteOpt) + // assert that chainID is set correctly in InitChain + chainID := app.deliverState.ctx.ChainID() + require.Equal(t, "test-chain-id", chainID, "ChainID in deliverState not set correctly in InitChain") - deliverKey := []byte("deliver-key") - baseapptestutil.RegisterCounterServer(suite.baseApp.MsgServiceRouter(), CounterServerImpl{t, capKey1, deliverKey}) + chainID = app.checkState.ctx.ChainID() + require.Equal(t, "test-chain-id", chainID, "ChainID in checkState not set correctly in InitChain") - suite.baseApp.InitChain(abci.RequestInitChain{ - ConsensusParams: &tmproto.ConsensusParams{}, - }) + app.Commit() + res = app.Query(query) + require.Equal(t, int64(1), app.LastBlockHeight()) + require.Equal(t, value, res.Value) + + // reload app + app = NewBaseApp(name, logger, db, nil) + app.SetInitChainer(initChainer) + app.SetParamStore(&mock.ParamStore{Db: db}) + app.MountStores(capKey, capKey2) + err = app.LoadLatestVersion() // needed to make stores non-nil + require.Nil(t, err) + require.Equal(t, int64(1), app.LastBlockHeight()) - header := tmproto.Header{Height: suite.baseApp.LastBlockHeight() + 1} - suite.baseApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + // ensure we can still query after reloading + res = app.Query(query) + require.Equal(t, value, res.Value) - // execute a tx that will fail ante handler execution - // - // NOTE: State should not be mutated here. This will be implicitly checked by - // the next txs ante handler execution (anteHandlerTxTest). - tx := newTxCounter(t, suite.txConfig, 0, 0) - tx = setFailOnAnte(t, suite.txConfig, tx, true) + // commit and ensure we can still query + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + app.Commit() - txBytes, err := suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) + res = app.Query(query) + require.Equal(t, value, res.Value) +} - res := suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.Empty(t, res.Events) - require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) +func TestInitChain_AppVersionSetToZero(t *testing.T) { + const expectedAppVersion = uint64(0) - ctx := getDeliverStateCtx(suite.baseApp) - store := ctx.KVStore(capKey1) - require.Equal(t, int64(0), getIntFromStore(t, store, anteKey)) + name := t.Name() + db := dbm.NewMemDB() + logger := defaultLogger() + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) - // execute at tx that will pass the ante handler (the checkTx state should - // mutate) but will fail the message handler - tx = newTxCounter(t, suite.txConfig, 0, 0) - tx = setFailOnHandler(suite.txConfig, tx, true) + app.InitChain( + abci.RequestInitChain{ + InitialHeight: 3, + }, + ) - txBytes, err = suite.txConfig.TxEncoder()(tx) + protocolVersion, err := app.GetAppVersion() require.NoError(t, err) + require.Equal(t, expectedAppVersion, protocolVersion) - res = suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.NotEmpty(t, res.Events) - require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - - ctx = getDeliverStateCtx(suite.baseApp) - store = ctx.KVStore(capKey1) - require.Equal(t, int64(1), getIntFromStore(t, store, anteKey)) - require.Equal(t, int64(0), getIntFromStore(t, store, deliverKey)) + consensusParams := app.GetConsensusParams(app.checkState.ctx) - // Execute a successful ante handler and message execution where state is - // implicitly checked by previous tx executions. - tx = newTxCounter(t, suite.txConfig, 1, 0) + require.Equal(t, expectedAppVersion, consensusParams.Version.AppVersion) +} - txBytes, err = suite.txConfig.TxEncoder()(tx) - require.NoError(t, err) +func TestInitChain_NonZeroAppVersionInRequestPanic(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + logger := defaultLogger() + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) + + sut := func() { + app.InitChain( + abci.RequestInitChain{ + InitialHeight: 3, + ConsensusParams: &abci.ConsensusParams{ + Version: &tmproto.VersionParams{ + AppVersion: 10, + }, + }, + }, + ) + } + require.Panics(t, sut) +} - res = suite.baseApp.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - require.NotEmpty(t, res.Events) - require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) +func TestInitChain_WithInitialHeight(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + logger := defaultLogger() + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) - ctx = getDeliverStateCtx(suite.baseApp) - store = ctx.KVStore(capKey1) - require.Equal(t, int64(2), getIntFromStore(t, store, anteKey)) - require.Equal(t, int64(1), getIntFromStore(t, store, deliverKey)) + app.InitChain( + abci.RequestInitChain{ + InitialHeight: 3, + }, + ) + app.Commit() - suite.baseApp.EndBlock(abci.RequestEndBlock{}) - suite.baseApp.Commit() + require.Equal(t, int64(3), app.LastBlockHeight()) } -// Test and ensure that invalid block heights always cause errors. -// See issues: -// - https://github.com/cosmos/cosmos-sdk/issues/11220 -// - https://github.com/cosmos/cosmos-sdk/issues/7662 -func TestABCI_CreateQueryContext(t *testing.T) { - t.Parallel() - - app := getQueryBaseapp(t) +func TestBeginBlock_WithInitialHeight(t *testing.T) { + name := t.Name() + db := dbm.NewMemDB() + logger := defaultLogger() + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) - testCases := []struct { - name string - height int64 - prove bool - expErr bool - }{ - {"valid height", 2, true, false}, - {"future height", 10, true, true}, - {"negative height, prove=true", -1, true, true}, - {"negative height, prove=false", -1, false, true}, - } + app.InitChain( + abci.RequestInitChain{ + InitialHeight: 3, + }, + ) - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - _, err := app.CreateQueryContext(tc.height, tc.prove) - if tc.expErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } + require.PanicsWithError(t, "invalid height: 4; expected: 3", func() { + app.BeginBlock(abci.RequestBeginBlock{ + Header: tmproto.Header{ + Height: 4, + }, }) - } + }) + + app.BeginBlock(abci.RequestBeginBlock{ + Header: tmproto.Header{ + Height: 3, + }, + }) + app.Commit() + + require.Equal(t, int64(3), app.LastBlockHeight()) } -func TestSetMinGasPrices(t *testing.T) { - minGasPrices := sdk.DecCoins{sdk.NewInt64DecCoin("stake", 5000)} - suite := NewBaseAppSuite(t, baseapp.SetMinGasPrices(minGasPrices.String())) +// Simple tx with a list of Msgs. +type txTest struct { + Msgs []sdk.Msg + Counter int64 + FailOnAnte bool +} - ctx := getCheckStateCtx(suite.baseApp) - require.Equal(t, minGasPrices, ctx.MinGasPrices()) +func (tx *txTest) setFailOnAnte(fail bool) { + tx.FailOnAnte = fail } -type ctxType string +func (tx *txTest) setFailOnHandler(fail bool) { + for i, msg := range tx.Msgs { + tx.Msgs[i] = msgCounter{msg.(msgCounter).Counter, fail} + } +} + +// Implements Tx +func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs } +func (tx txTest) ValidateBasic() error { return nil } const ( - QueryCtx ctxType = "query" - CheckTxCtx ctxType = "checkTx" - DeliverTxCtx ctxType = "deliverTx" + routeMsgCounter = "msgCounter" + routeMsgCounter2 = "msgCounter2" + routeMsgKeyValue = "msgKeyValue" ) -var ctxTypes = []ctxType{QueryCtx, CheckTxCtx} +// ValidateBasic() fails on negative counters. +// Otherwise it's up to the handlers +type msgCounter struct { + Counter int64 + FailOnHandler bool +} -func (c ctxType) GetCtx(t *testing.T, bapp *baseapp.BaseApp) sdk.Context { - if c == QueryCtx { - ctx, err := bapp.CreateQueryContext(1, false) - require.NoError(t, err) - return ctx - } else if c == CheckTxCtx { - return getCheckStateCtx(bapp) +// dummy implementation of proto.Message +func (msg msgCounter) Reset() {} +func (msg msgCounter) String() string { return "TODO" } +func (msg msgCounter) ProtoMessage() {} + +// Implements Msg +func (msg msgCounter) Route() string { return routeMsgCounter } +func (msg msgCounter) Type() string { return "counter1" } +func (msg msgCounter) GetSignBytes() []byte { return nil } +func (msg msgCounter) GetSigners() []sdk.AccAddress { return nil } +func (msg msgCounter) ValidateBasic() error { + if msg.Counter >= 0 { + return nil } - // TODO: Not supported yet - return getDeliverStateCtx(bapp) + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "counter should be a non-negative integer") } -func TestQueryGasLimit(t *testing.T) { - testCases := []struct { - queryGasLimit uint64 - gasActuallyUsed uint64 - shouldQueryErr bool - }{ - {queryGasLimit: 100, gasActuallyUsed: 50, shouldQueryErr: false}, // Valid case - {queryGasLimit: 100, gasActuallyUsed: 150, shouldQueryErr: true}, // gasActuallyUsed > queryGasLimit - {queryGasLimit: 0, gasActuallyUsed: 50, shouldQueryErr: false}, // fuzzing with queryGasLimit = 0 - {queryGasLimit: 0, gasActuallyUsed: 0, shouldQueryErr: false}, // both queryGasLimit and gasActuallyUsed are 0 - {queryGasLimit: 200, gasActuallyUsed: 200, shouldQueryErr: true}, // gasActuallyUsed > queryGasLimit - {queryGasLimit: 100, gasActuallyUsed: 1000, shouldQueryErr: true}, // gasActuallyUsed > queryGasLimit +func newTxCounter(counter int64, msgCounters ...int64) *txTest { + msgs := make([]sdk.Msg, 0, len(msgCounters)) + for _, c := range msgCounters { + msgs = append(msgs, msgCounter{c, false}) } - for _, tc := range testCases { - for _, ctxType := range ctxTypes { - t.Run(fmt.Sprintf("%s: %d - %d", ctxType, tc.queryGasLimit, tc.gasActuallyUsed), func(t *testing.T) { - app := getQueryBaseapp(t) - baseapp.SetQueryGasLimit(tc.queryGasLimit)(app) - ctx := ctxType.GetCtx(t, app) - - // query gas limit should have no effect when CtxType != QueryCtx - f := func() { ctx.GasMeter().ConsumeGas(tc.gasActuallyUsed, "test") } - if tc.shouldQueryErr && ctxType == QueryCtx { - require.Panics(t, f) - } else { - require.NotPanics(t, f) - } - }) - } - } + return &txTest{msgs, counter, false} } -func TestGetMaximumBlockGas(t *testing.T) { - suite := NewBaseAppSuite(t) - suite.baseApp.InitChain(abci.RequestInitChain{}) - ctx := suite.baseApp.NewContext(true, tmproto.Header{}) +// a msg we dont know how to route +type msgNoRoute struct { + msgCounter +} + +func (tx msgNoRoute) Route() string { return "noroute" } + +// a msg we dont know how to decode +type msgNoDecode struct { + msgCounter +} - suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 0}}) - require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx)) +func (tx msgNoDecode) Route() string { return routeMsgCounter } - suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -1}}) - require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx)) +// Another counter msg. Duplicate of msgCounter +type msgCounter2 struct { + Counter int64 +} - suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 5000000}}) - require.Equal(t, uint64(5000000), suite.baseApp.GetMaximumBlockGas(ctx)) +// dummy implementation of proto.Message +func (msg msgCounter2) Reset() {} +func (msg msgCounter2) String() string { return "TODO" } +func (msg msgCounter2) ProtoMessage() {} + +// Implements Msg +func (msg msgCounter2) Route() string { return routeMsgCounter2 } +func (msg msgCounter2) Type() string { return "counter2" } +func (msg msgCounter2) GetSignBytes() []byte { return nil } +func (msg msgCounter2) GetSigners() []sdk.AccAddress { return nil } +func (msg msgCounter2) ValidateBasic() error { + if msg.Counter >= 0 { + return nil + } + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "counter should be a non-negative integer") +} - suite.baseApp.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -5000000}}) - require.Panics(t, func() { suite.baseApp.GetMaximumBlockGas(ctx) }) +// A msg that sets a key/value pair. +type msgKeyValue struct { + Key []byte + Value []byte +} + +func (msg msgKeyValue) Reset() {} +func (msg msgKeyValue) String() string { return "TODO" } +func (msg msgKeyValue) ProtoMessage() {} +func (msg msgKeyValue) Route() string { return routeMsgKeyValue } +func (msg msgKeyValue) Type() string { return "keyValue" } +func (msg msgKeyValue) GetSignBytes() []byte { return nil } +func (msg msgKeyValue) GetSigners() []sdk.AccAddress { return nil } +func (msg msgKeyValue) ValidateBasic() error { + if msg.Key == nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "key cannot be nil") + } + if msg.Value == nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "value cannot be nil") + } + return nil +} + +// amino decode +func testTxDecoder(cdc *codec.LegacyAmino) sdk.TxDecoder { + return func(txBytes []byte) (sdk.Tx, error) { + var tx txTest + if len(txBytes) == 0 { + return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx bytes are empty") + } + + err := cdc.Unmarshal(txBytes, &tx) + if err != nil { + return nil, sdkerrors.ErrTxDecode + } + + return tx, nil + } +} + +func anteHandlerTxTest(t *testing.T, capKey sdk.StoreKey, storeKey []byte) sdk.AnteHandler { + return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + store := ctx.KVStore(capKey) + txTest := tx.(txTest) + + if txTest.FailOnAnte { + return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") + } + + _, err := incrementingCounter(t, store, storeKey, txTest.Counter) + if err != nil { + return ctx, err + } + + ctx.EventManager().EmitEvents( + counterEvent("ante_handler", txTest.Counter), + ) + + return ctx, nil + } +} + +func counterEvent(evType string, msgCount int64) sdk.Events { + return sdk.Events{ + sdk.NewEvent( + evType, + sdk.NewAttribute("update_counter", fmt.Sprintf("%d", msgCount)), + ), + } +} + +func handlerMsgCounter(t *testing.T, capKey sdk.StoreKey, deliverKey []byte) sdk.Handler { + return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + ctx = ctx.WithEventManager(sdk.NewEventManager()) + store := ctx.KVStore(capKey) + var msgCount int64 + + switch m := msg.(type) { + case *msgCounter: + if m.FailOnHandler { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "message handler failure") + } + + msgCount = m.Counter + case *msgCounter2: + msgCount = m.Counter + } + + ctx.EventManager().EmitEvents( + counterEvent(sdk.EventTypeMessage, msgCount), + ) + + res, err := incrementingCounter(t, store, deliverKey, msgCount) + if err != nil { + return nil, err + } + + res.Events = ctx.EventManager().Events().ToABCIEvents() + return res, nil + } +} + +func getIntFromStore(store sdk.KVStore, key []byte) int64 { + bz := store.Get(key) + if len(bz) == 0 { + return 0 + } + i, err := binary.ReadVarint(bytes.NewBuffer(bz)) + if err != nil { + panic(err) + } + return i +} + +func setIntOnStore(store sdk.KVStore, key []byte, i int64) { + bz := make([]byte, 8) + n := binary.PutVarint(bz, i) + store.Set(key, bz[:n]) +} + +// check counter matches what's in store. +// increment and store +func incrementingCounter(t *testing.T, store sdk.KVStore, counterKey []byte, counter int64) (*sdk.Result, error) { + storedCounter := getIntFromStore(store, counterKey) + require.Equal(t, storedCounter, counter) + setIntOnStore(store, counterKey, counter+1) + return &sdk.Result{}, nil +} + +//--------------------------------------------------------------------- +// Tx processing - CheckTx, DeliverTx, SimulateTx. +// These tests use the serialized tx as input, while most others will use the +// Check(), Deliver(), Simulate() methods directly. +// Ensure that Check/Deliver/Simulate work as expected with the store. + +// Test that successive CheckTx can see each others' effects +// on the store within a block, and that the CheckTx state +// gets reset to the latest committed state during Commit +func TestCheckTx(t *testing.T) { + // This ante handler reads the key and checks that the value matches the current counter. + // This ensures changes to the kvstore persist across successive CheckTx. + counterKey := []byte("counter-key") + + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, counterKey)) } + routerOpt := func(bapp *BaseApp) { + // TODO: can remove this once CheckTx doesnt process msgs. + bapp.Router().AddRoute(sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + return &sdk.Result{}, nil + })) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + nTxs := int64(5) + app.InitChain(abci.RequestInitChain{}) + + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + for i := int64(0); i < nTxs; i++ { + tx := newTxCounter(i, 0) // no messages + txBytes, err := codec.Marshal(tx) + require.NoError(t, err) + r := app.CheckTx(abci.RequestCheckTx{Tx: txBytes}) + require.Empty(t, r.GetEvents()) + require.True(t, r.IsOK(), fmt.Sprintf("%v", r)) + } + + checkStateStore := app.checkState.ctx.KVStore(capKey1) + storedCounter := getIntFromStore(checkStateStore, counterKey) + + // Ensure AnteHandler ran + require.Equal(t, nTxs, storedCounter) + + // If a block is committed, CheckTx state should be reset. + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")}) + + require.NotNil(t, app.checkState.ctx.BlockGasMeter(), "block gas meter should have been set to checkState") + require.NotEmpty(t, app.checkState.ctx.HeaderHash()) + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + + checkStateStore = app.checkState.ctx.KVStore(capKey1) + storedBytes := checkStateStore.Get(counterKey) + require.Nil(t, storedBytes) +} + +// Test that successive DeliverTx can see each others' effects +// on the store, both within and across blocks. +func TestDeliverTx(t *testing.T) { + // test increments in the ante + anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + + // test increments in the handler + deliverKey := []byte("deliver-key") + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{}) + + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + nBlocks := 3 + txPerHeight := 5 + + for blockN := 0; blockN < nBlocks; blockN++ { + header := tmproto.Header{Height: int64(blockN) + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + for i := 0; i < txPerHeight; i++ { + counter := int64(blockN*txPerHeight + i) + tx := newTxCounter(counter, counter) + + txBytes, err := codec.Marshal(tx) + require.NoError(t, err) + + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) + events := res.GetEvents() + require.Len(t, events, 3, "should contain ante handler, message type and counter events respectively") + require.Equal(t, sdk.MarkEventsToIndex(counterEvent("ante_handler", counter).ToABCIEvents(), map[string]struct{}{})[0], events[0], "ante handler event") + require.Equal(t, sdk.MarkEventsToIndex(counterEvent(sdk.EventTypeMessage, counter).ToABCIEvents(), map[string]struct{}{})[0], events[2], "msg handler update counter event") + } + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + } +} + +// Number of messages doesn't matter to CheckTx. +func TestMultiMsgCheckTx(t *testing.T) { + // TODO: ensure we get the same results + // with one message or many +} + +// One call to DeliverTx should process all the messages, in order. +func TestMultiMsgDeliverTx(t *testing.T) { + // increment the tx counter + anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + + // increment the msg counter + deliverKey := []byte("deliver-key") + deliverKey2 := []byte("deliver-key2") + routerOpt := func(bapp *BaseApp) { + r1 := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) + r2 := sdk.NewRoute(routeMsgCounter2, handlerMsgCounter(t, capKey1, deliverKey2)) + bapp.Router().AddRoute(r1) + bapp.Router().AddRoute(r2) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + // run a multi-msg tx + // with all msgs the same route + + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + tx := newTxCounter(0, 0, 1, 2) + txBytes, err := codec.Marshal(tx) + require.NoError(t, err) + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) + + store := app.deliverState.ctx.KVStore(capKey1) + + // tx counter only incremented once + txCounter := getIntFromStore(store, anteKey) + require.Equal(t, int64(1), txCounter) + + // msg counter incremented three times + msgCounter := getIntFromStore(store, deliverKey) + require.Equal(t, int64(3), msgCounter) + + // replace the second message with a msgCounter2 + + tx = newTxCounter(1, 3) + tx.Msgs = append(tx.Msgs, msgCounter2{0}) + tx.Msgs = append(tx.Msgs, msgCounter2{1}) + txBytes, err = codec.Marshal(tx) + require.NoError(t, err) + res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) + + store = app.deliverState.ctx.KVStore(capKey1) + + // tx counter only incremented once + txCounter = getIntFromStore(store, anteKey) + require.Equal(t, int64(2), txCounter) + + // original counter increments by one + // new counter increments by two + msgCounter = getIntFromStore(store, deliverKey) + require.Equal(t, int64(4), msgCounter) + msgCounter2 := getIntFromStore(store, deliverKey2) + require.Equal(t, int64(2), msgCounter2) +} + +// Interleave calls to Check and Deliver and ensure +// that there is no cross-talk. Check sees results of the previous Check calls +// and Deliver sees that of the previous Deliver calls, but they don't see eachother. +func TestConcurrentCheckDeliver(t *testing.T) { + // TODO +} + +// Simulate a transaction that uses gas to compute the gas. +// Simulate() and Query("/app/simulate", txBytes) should give +// the same results. +func TestSimulateTx(t *testing.T) { + gasConsumed := uint64(5) + + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasConsumed)) + return + }) + } + + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + ctx.GasMeter().ConsumeGas(gasConsumed, "test") + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + app.InitChain(abci.RequestInitChain{}) + + // Create same codec used in txDecoder + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) + + nBlocks := 3 + for blockN := 0; blockN < nBlocks; blockN++ { + count := int64(blockN + 1) + header := tmproto.Header{Height: count} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + tx := newTxCounter(count, count) + txBytes, err := cdc.Marshal(tx) + require.Nil(t, err) + + // simulate a message, check gas reported + gInfo, result, err := app.Simulate(txBytes) + require.NoError(t, err) + require.NotNil(t, result) + require.Equal(t, gasConsumed, gInfo.GasUsed) + + // simulate again, same result + gInfo, result, err = app.Simulate(txBytes) + require.NoError(t, err) + require.NotNil(t, result) + require.Equal(t, gasConsumed, gInfo.GasUsed) + + // simulate by calling Query with encoded tx + query := abci.RequestQuery{ + Path: "/app/simulate", + Data: txBytes, + } + queryResult := app.Query(query) + require.True(t, queryResult.IsOK(), queryResult.Log) + + var simRes sdk.SimulationResponse + require.NoError(t, jsonpb.Unmarshal(strings.NewReader(string(queryResult.Value)), &simRes)) + + require.Equal(t, gInfo, simRes.GasInfo) + require.Equal(t, result.Log, simRes.Result.Log) + require.Equal(t, result.Events, simRes.Result.Events) + require.True(t, bytes.Equal(result.Data, simRes.Result.Data)) + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + } +} + +func TestRunInvalidTransaction(t *testing.T) { + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + return + }) + } + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + // transaction with no messages + { + emptyTx := &txTest{} + _, result, err := app.Deliver(aminoTxEncoder(), emptyTx) + require.Error(t, err) + require.Nil(t, result) + + space, code, _ := sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrInvalidRequest.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrInvalidRequest.ABCICode(), code, err) + } + + // transaction where ValidateBasic fails + { + testCases := []struct { + tx *txTest + fail bool + }{ + {newTxCounter(0, 0), false}, + {newTxCounter(-1, 0), false}, + {newTxCounter(100, 100), false}, + {newTxCounter(100, 5, 4, 3, 2, 1), false}, + + {newTxCounter(0, -1), true}, + {newTxCounter(0, 1, -2), true}, + {newTxCounter(0, 1, 2, -10, 5), true}, + } + + for _, testCase := range testCases { + tx := testCase.tx + _, result, err := app.Deliver(aminoTxEncoder(), tx) + + if testCase.fail { + require.Error(t, err) + + space, code, _ := sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrInvalidSequence.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrInvalidSequence.ABCICode(), code, err) + } else { + require.NotNil(t, result) + } + } + } + + // transaction with no known route + { + unknownRouteTx := txTest{[]sdk.Msg{msgNoRoute{}}, 0, false} + _, result, err := app.Deliver(aminoTxEncoder(), unknownRouteTx) + require.Error(t, err) + require.Nil(t, result) + + space, code, _ := sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrUnknownRequest.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrUnknownRequest.ABCICode(), code, err) + + unknownRouteTx = txTest{[]sdk.Msg{msgCounter{}, msgNoRoute{}}, 0, false} + _, result, err = app.Deliver(aminoTxEncoder(), unknownRouteTx) + require.Error(t, err) + require.Nil(t, result) + + space, code, _ = sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrUnknownRequest.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrUnknownRequest.ABCICode(), code, err) + } + + // Transaction with an unregistered message + { + tx := newTxCounter(0, 0) + tx.Msgs = append(tx.Msgs, msgNoDecode{}) + + // new codec so we can encode the tx, but we shouldn't be able to decode + newCdc := codec.NewLegacyAmino() + registerTestCodec(newCdc) + newCdc.RegisterConcrete(&msgNoDecode{}, "cosmos-sdk/baseapp/msgNoDecode", nil) + + txBytes, err := newCdc.Marshal(tx) + require.NoError(t, err) + + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.EqualValues(t, sdkerrors.ErrTxDecode.ABCICode(), res.Code) + require.EqualValues(t, sdkerrors.ErrTxDecode.Codespace(), res.Codespace) + } +} + +// Test that transactions exceeding gas limits fail +func TestTxGasLimits(t *testing.T) { + gasGranted := uint64(10) + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) + + // AnteHandlers must have their own defer/recover in order for the BaseApp + // to know how much gas was used! This is because the GasMeter is created in + // the AnteHandler, but if it panics the context won't be set properly in + // runTx's recover call. + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) + default: + panic(r) + } + } + }() + + count := tx.(txTest).Counter + newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") + + return newCtx, nil + }) + + } + + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + count := msg.(*msgCounter).Counter + ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + testCases := []struct { + tx *txTest + gasUsed uint64 + fail bool + }{ + {newTxCounter(0, 0), 0, false}, + {newTxCounter(1, 1), 2, false}, + {newTxCounter(9, 1), 10, false}, + {newTxCounter(1, 9), 10, false}, + {newTxCounter(10, 0), 10, false}, + {newTxCounter(0, 10), 10, false}, + {newTxCounter(0, 8, 2), 10, false}, + {newTxCounter(0, 5, 1, 1, 1, 1, 1), 10, false}, + {newTxCounter(0, 5, 1, 1, 1, 1), 9, false}, + + {newTxCounter(9, 2), 11, true}, + {newTxCounter(2, 9), 11, true}, + {newTxCounter(9, 1, 1), 11, true}, + {newTxCounter(1, 8, 1, 1), 11, true}, + {newTxCounter(11, 0), 11, true}, + {newTxCounter(0, 11), 11, true}, + {newTxCounter(0, 5, 11), 16, true}, + } + + for i, tc := range testCases { + tx := tc.tx + gInfo, result, err := app.Deliver(aminoTxEncoder(), tx) + + // check gas used and wanted + require.Equal(t, tc.gasUsed, gInfo.GasUsed, fmt.Sprintf("tc #%d; gas: %v, result: %v, err: %s", i, gInfo, result, err)) + + // check for out of gas + if !tc.fail { + require.NotNil(t, result, fmt.Sprintf("%d: %v, %v", i, tc, err)) + } else { + require.Error(t, err) + require.Nil(t, result) + + space, code, _ := sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrOutOfGas.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrOutOfGas.ABCICode(), code, err) + } + } +} + +// Test that transactions exceeding gas limits fail +func TestMaxBlockGasLimits(t *testing.T) { + gasGranted := uint64(10) + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasGranted)) + + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + err = sdkerrors.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", rType.Descriptor) + default: + panic(r) + } + } + }() + + count := tx.(txTest).Counter + newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") + + return + }) + } + + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + count := msg.(*msgCounter).Counter + ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{ + ConsensusParams: &abci.ConsensusParams{ + Block: &abci.BlockParams{ + MaxGas: 100, + }, + }, + }) + + testCases := []struct { + tx *txTest + numDelivers int + gasUsedPerDeliver uint64 + fail bool + failAfterDeliver int + }{ + {newTxCounter(0, 0), 0, 0, false, 0}, + {newTxCounter(9, 1), 2, 10, false, 0}, + {newTxCounter(10, 0), 3, 10, false, 0}, + {newTxCounter(10, 0), 10, 10, false, 0}, + {newTxCounter(2, 7), 11, 9, false, 0}, + {newTxCounter(10, 0), 10, 10, false, 0}, // hit the limit but pass + + {newTxCounter(10, 0), 11, 10, true, 10}, + {newTxCounter(10, 0), 15, 10, true, 10}, + {newTxCounter(9, 0), 12, 9, true, 11}, // fly past the limit + } + + for i, tc := range testCases { + tx := tc.tx + + // reset the block gas + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + // execute the transaction multiple times + for j := 0; j < tc.numDelivers; j++ { + _, result, err := app.Deliver(aminoTxEncoder(), tx) + + ctx := app.getState(runTxModeDeliver).ctx + + // check for failed transactions + if tc.fail && (j+1) > tc.failAfterDeliver { + require.Error(t, err, fmt.Sprintf("tc #%d; result: %v, err: %s", i, result, err)) + require.Nil(t, result, fmt.Sprintf("tc #%d; result: %v, err: %s", i, result, err)) + + space, code, _ := sdkerrors.ABCIInfo(err, false) + require.EqualValues(t, sdkerrors.ErrOutOfGas.Codespace(), space, err) + require.EqualValues(t, sdkerrors.ErrOutOfGas.ABCICode(), code, err) + require.True(t, ctx.BlockGasMeter().IsOutOfGas()) + } else { + // check gas used and wanted + blockGasUsed := ctx.BlockGasMeter().GasConsumed() + expBlockGasUsed := tc.gasUsedPerDeliver * uint64(j+1) + require.Equal( + t, expBlockGasUsed, blockGasUsed, + fmt.Sprintf("%d,%d: %v, %v, %v, %v", i, j, tc, expBlockGasUsed, blockGasUsed, result), + ) + + require.NotNil(t, result, fmt.Sprintf("tc #%d; currDeliver: %d, result: %v, err: %s", i, j, result, err)) + require.False(t, ctx.BlockGasMeter().IsPastLimit()) + } + } + } +} + +// Test custom panic handling within app.DeliverTx method +func TestCustomRunTxPanicHandler(t *testing.T) { + const customPanicMsg = "test panic" + anteErr := sdkerrors.Register("fakeModule", 100500, "fakeError") + + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + panic(sdkerrors.Wrap(anteErr, "anteHandler")) + }) + } + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + header := tmproto.Header{Height: 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + app.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { + err, ok := recoveryObj.(error) + if !ok { + return nil + } + + if anteErr.Is(err) { + panic(customPanicMsg) + } else { + return nil + } + }) + + // Transaction should panic with custom handler above + { + tx := newTxCounter(0, 0) + + require.PanicsWithValue(t, customPanicMsg, func() { app.Deliver(aminoTxEncoder(), tx) }) + } +} + +func TestBaseAppAnteHandler(t *testing.T) { + anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) + } + + deliverKey := []byte("deliver-key") + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) + bapp.Router().AddRoute(r) + } + + cdc := codec.NewLegacyAmino() + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + app.InitChain(abci.RequestInitChain{}) + registerTestCodec(cdc) + + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + // execute a tx that will fail ante handler execution + // + // NOTE: State should not be mutated here. This will be implicitly checked by + // the next txs ante handler execution (anteHandlerTxTest). + tx := newTxCounter(0, 0) + tx.setFailOnAnte(true) + txBytes, err := cdc.Marshal(tx) + require.NoError(t, err) + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.Empty(t, res.Events) + require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) + + ctx := app.getState(runTxModeDeliver).ctx + store := ctx.KVStore(capKey1) + require.Equal(t, int64(0), getIntFromStore(store, anteKey)) + + // execute at tx that will pass the ante handler (the checkTx state should + // mutate) but will fail the message handler + tx = newTxCounter(0, 0) + tx.setFailOnHandler(true) + + txBytes, err = cdc.Marshal(tx) + require.NoError(t, err) + + res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + // should emit ante event + require.NotEmpty(t, res.Events) + require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) + + ctx = app.getState(runTxModeDeliver).ctx + store = ctx.KVStore(capKey1) + require.Equal(t, int64(1), getIntFromStore(store, anteKey)) + require.Equal(t, int64(0), getIntFromStore(store, deliverKey)) + + // execute a successful ante handler and message execution where state is + // implicitly checked by previous tx executions + tx = newTxCounter(1, 0) + + txBytes, err = cdc.Marshal(tx) + require.NoError(t, err) + + res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.NotEmpty(t, res.Events) + require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) + + ctx = app.getState(runTxModeDeliver).ctx + store = ctx.KVStore(capKey1) + require.Equal(t, int64(2), getIntFromStore(store, anteKey)) + require.Equal(t, int64(1), getIntFromStore(store, deliverKey)) + + // commit + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() +} + +func TestGasConsumptionBadTx(t *testing.T) { + gasWanted := uint64(5) + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + newCtx = ctx.WithGasMeter(sdk.NewGasMeter(gasWanted)) + + defer func() { + if r := recover(); r != nil { + switch rType := r.(type) { + case sdk.ErrorOutOfGas: + log := fmt.Sprintf("out of gas in location: %v", rType.Descriptor) + err = sdkerrors.Wrap(sdkerrors.ErrOutOfGas, log) + default: + panic(r) + } + } + }() + + txTest := tx.(txTest) + newCtx.GasMeter().ConsumeGas(uint64(txTest.Counter), "counter-ante") + if txTest.FailOnAnte { + return newCtx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") + } + + return + }) + } + + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + count := msg.(*msgCounter).Counter + ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + cdc := codec.NewLegacyAmino() + registerTestCodec(cdc) + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{ + ConsensusParams: &abci.ConsensusParams{ + Block: &abci.BlockParams{ + MaxGas: 9, + }, + }, + }) + + app.InitChain(abci.RequestInitChain{}) + + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + tx := newTxCounter(5, 0) + tx.setFailOnAnte(true) + txBytes, err := cdc.Marshal(tx) + require.NoError(t, err) + + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) + + // require next tx to fail due to black gas limit + tx = newTxCounter(5, 0) + txBytes, err = cdc.Marshal(tx) + require.NoError(t, err) + + res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) +} + +// Test that we can only query from the latest committed state. +func TestQuery(t *testing.T) { + key, value := []byte("hello"), []byte("goodbye") + anteOpt := func(bapp *BaseApp) { + bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + store := ctx.KVStore(capKey1) + store.Set(key, value) + return + }) + } + + routerOpt := func(bapp *BaseApp) { + r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + store := ctx.KVStore(capKey1) + store.Set(key, value) + return &sdk.Result{}, nil + }) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + + app.InitChain(abci.RequestInitChain{}) + + // NOTE: "/store/key1" tells us KVStore + // and the final "/key" says to use the data as the + // key in the given KVStore ... + query := abci.RequestQuery{ + Path: "/store/key1/key", + Data: key, + } + tx := newTxCounter(0, 0) + + // query is empty before we do anything + res := app.Query(query) + require.Equal(t, 0, len(res.Value)) + + // query is still empty after a CheckTx + _, resTx, err := app.Check(aminoTxEncoder(), tx) + require.NoError(t, err) + require.NotNil(t, resTx) + res = app.Query(query) + require.Equal(t, 0, len(res.Value)) + + // query is still empty after a DeliverTx before we commit + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + _, resTx, err = app.Deliver(aminoTxEncoder(), tx) + require.NoError(t, err) + require.NotNil(t, resTx) + res = app.Query(query) + require.Equal(t, 0, len(res.Value)) + + // query returns correct value after Commit + app.Commit() + res = app.Query(query) + require.Equal(t, value, res.Value) +} + +func TestGRPCQuery(t *testing.T) { + grpcQueryOpt := func(bapp *BaseApp) { + testdata.RegisterQueryServer( + bapp.GRPCQueryRouter(), + testdata.QueryImpl{}, + ) + } + + app, err := setupBaseApp(t, grpcQueryOpt) + require.NoError(t, err) + + app.InitChain(abci.RequestInitChain{}) + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + app.Commit() + + req := testdata.SayHelloRequest{Name: "foo"} + reqBz, err := req.Marshal() + require.NoError(t, err) + + reqQuery := abci.RequestQuery{ + Data: reqBz, + Path: "/testdata.Query/SayHello", + } + + resQuery := app.Query(reqQuery) + + require.Equal(t, abci.CodeTypeOK, resQuery.Code, resQuery) + + var res testdata.SayHelloResponse + err = res.Unmarshal(resQuery.Value) + require.NoError(t, err) + require.Equal(t, "Hello foo!", res.Greeting) +} + +// Test p2p filter queries +func TestP2PQuery(t *testing.T) { + addrPeerFilterOpt := func(bapp *BaseApp) { + bapp.SetAddrPeerFilter(func(addrport string) abci.ResponseQuery { + require.Equal(t, "1.1.1.1:8000", addrport) + return abci.ResponseQuery{Code: uint32(3)} + }) + } + + idPeerFilterOpt := func(bapp *BaseApp) { + bapp.SetIDPeerFilter(func(id string) abci.ResponseQuery { + require.Equal(t, "testid", id) + return abci.ResponseQuery{Code: uint32(4)} + }) + } + + app, err := setupBaseApp(t, addrPeerFilterOpt, idPeerFilterOpt) + require.NoError(t, err) + + addrQuery := abci.RequestQuery{ + Path: "/p2p/filter/addr/1.1.1.1:8000", + } + res := app.Query(addrQuery) + require.Equal(t, uint32(3), res.Code) + + idQuery := abci.RequestQuery{ + Path: "/p2p/filter/id/testid", + } + res = app.Query(idQuery) + require.Equal(t, uint32(4), res.Code) +} + +func TestGetMaximumBlockGas(t *testing.T) { + app, err := setupBaseApp(t) + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{}) + ctx := app.NewContext(true, tmproto.Header{}) + + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 0}}) + require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx)) + + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -1}}) + require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx)) + + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 5000000}}) + require.Equal(t, uint64(5000000), app.getMaximumBlockGas(ctx)) + + app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -5000000}}) + require.Panics(t, func() { app.getMaximumBlockGas(ctx) }) +} + +func TestListSnapshots(t *testing.T) { + setupConfig := &setupConfig{ + blocks: 5, + blockTxs: 4, + snapshotInterval: 2, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + + app, teardown, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) + defer teardown() + + expected := abci.ResponseListSnapshots{Snapshots: []*abci.Snapshot{ + {Height: 4, Format: 2, Chunks: 2}, + {Height: 2, Format: 2, Chunks: 1}, + }} + + resp := app.ListSnapshots(abci.RequestListSnapshots{}) + queryResponse := app.Query(abci.RequestQuery{ + Path: "/app/snapshots", + }) + + queryListSnapshotsResp := abci.ResponseListSnapshots{} + err = json.Unmarshal(queryResponse.Value, &queryListSnapshotsResp) + require.NoError(t, err) + + for i, s := range resp.Snapshots { + querySnapshot := queryListSnapshotsResp.Snapshots[i] + // we check that the query snapshot and function snapshot are equal + // Then we check that the hash and metadata are not empty. We atm + // do not have a good way to generate the expected value for these. + assert.Equal(t, *s, *querySnapshot) + assert.NotEmpty(t, s.Hash) + assert.NotEmpty(t, s.Metadata) + // Set hash and metadata to nil, so we can check the other snapshot + // fields against expected + s.Hash = nil + s.Metadata = nil + } + assert.Equal(t, expected, resp) +} + +func TestSnapshotWithPruning(t *testing.T) { + testcases := map[string]struct { + config *setupConfig + expectedSnapshots []*abci.Snapshot + expectedErr error + }{ + "prune nothing with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepEvery: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "prune everything with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepEvery: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "default pruning with snapshot": { + config: &setupConfig{ + blocks: 20, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepEvery: 1, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "custom": { + config: &setupConfig{ + blocks: 25, + blockTxs: 2, + snapshotInterval: 5, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewCustomPruningOptions(12, 12), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 25, Format: 2, Chunks: 6}, + {Height: 20, Format: 2, Chunks: 5}, + }, + }, + "no snapshots": { + config: &setupConfig{ + blocks: 10, + blockTxs: 2, + snapshotInterval: 0, // 0 implies disable snapshots + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{}, + }, + "keep all snapshots": { + config: &setupConfig{ + blocks: 10, + blockTxs: 2, + snapshotInterval: 3, + snapshotKeepEvery: 0, // 0 implies keep all snapshots + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + }, + expectedSnapshots: []*abci.Snapshot{ + {Height: 9, Format: 2, Chunks: 2}, + {Height: 6, Format: 2, Chunks: 2}, + {Height: 3, Format: 2, Chunks: 1}, + }, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + app, teardown, err := setupBaseAppWithSnapshots(t, tc.config) + + if tc.expectedErr != nil { + require.Error(t, err) + require.Equal(t, tc.expectedErr.Error(), err.Error()) + return + } + require.NoError(t, err) + + defer teardown() + + resp := app.ListSnapshots(abci.RequestListSnapshots{}) + for _, s := range resp.Snapshots { + assert.NotEmpty(t, s.Hash) + assert.NotEmpty(t, s.Metadata) + s.Hash = nil + s.Metadata = nil + } + fmt.Println(resp) + assert.Equal(t, abci.ResponseListSnapshots{Snapshots: tc.expectedSnapshots}, resp) + + // Validate that heights were pruned correctly by querying the state at the last height that should be present relative to latest + // and the first height that should be pruned. + // + // Exceptions: + // * Prune nothing: should be able to query all heights (we only test first and latest) + // * Prune default: should be able to query all heights (we only test first and latest) + // * The reason for default behaving this way is that we only commit 20 heights but default has 100_000 keep-recent + var lastExistingHeight int64 + if tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { + lastExistingHeight = 1 + } else { + // Integer division rounds down so by multiplying back we get the last height at which we pruned + lastExistingHeight = int64((tc.config.blocks/tc.config.pruningOpts.Interval)*tc.config.pruningOpts.Interval - tc.config.pruningOpts.KeepRecent) + } + + // Query 1 + res := app.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight}) + require.NotNil(t, res, "height: %d", lastExistingHeight) + require.NotNil(t, res.Value, "height: %d", lastExistingHeight) + + // Query 2 + res = app.Query(abci.RequestQuery{Path: fmt.Sprintf("/store/%s/key", capKey2.Name()), Data: []byte("0"), Height: lastExistingHeight - 1}) + require.NotNil(t, res, "height: %d", lastExistingHeight-1) + if tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningNothing || tc.config.pruningOpts.GetPruningStrategy() == pruningtypes.PruningDefault { + // With prune nothing or default, we query height 0 which translates to the latest height. + require.NotNil(t, res.Value, "height: %d", lastExistingHeight-1) + } + }) + } +} + +func TestLoadSnapshotChunk(t *testing.T) { + setupConfig := &setupConfig{ + blocks: 2, + blockTxs: 5, + snapshotInterval: 2, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + app, teardown, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) + defer teardown() + + testcases := map[string]struct { + height uint64 + format uint32 + chunk uint32 + expectEmpty bool + }{ + "Existing snapshot": {2, 2, 1, false}, + "Missing height": {100, 2, 1, true}, + "Missing format": {2, 1, 1, true}, + "Missing chunk": {2, 2, 9, true}, + "Zero height": {0, 2, 1, true}, + "Zero format": {2, 0, 1, true}, + "Zero chunk": {2, 2, 0, false}, + } + for name, tc := range testcases { + tc := tc + t.Run(name, func(t *testing.T) { + resp := app.LoadSnapshotChunk(abci.RequestLoadSnapshotChunk{ + Height: tc.height, + Format: tc.format, + Chunk: tc.chunk, + }) + if tc.expectEmpty { + assert.Equal(t, abci.ResponseLoadSnapshotChunk{}, resp) + return + } + assert.NotEmpty(t, resp.Chunk) + }) + } +} + +func TestOfferSnapshot_Errors(t *testing.T) { + // Set up app before test cases, since it's fairly expensive. + setupConfig := &setupConfig{ + blocks: 0, + blockTxs: 0, + snapshotInterval: 2, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + app, teardown, err := setupBaseAppWithSnapshots(t, setupConfig) + require.NoError(t, err) + defer teardown() + + m := snapshottypes.Metadata{ChunkHashes: [][]byte{{1}, {2}, {3}}} + metadata, err := m.Marshal() + require.NoError(t, err) + hash := []byte{1, 2, 3} + + testcases := map[string]struct { + snapshot *abci.Snapshot + result abci.ResponseOfferSnapshot_Result + }{ + "nil snapshot": {nil, abci.ResponseOfferSnapshot_REJECT}, + "invalid format": {&abci.Snapshot{ + Height: 1, Format: 9, Chunks: 3, Hash: hash, Metadata: metadata, + }, abci.ResponseOfferSnapshot_REJECT_FORMAT}, + "incorrect chunk count": {&abci.Snapshot{ + Height: 1, Format: 2, Chunks: 2, Hash: hash, Metadata: metadata, + }, abci.ResponseOfferSnapshot_REJECT}, + "no chunks": {&abci.Snapshot{ + Height: 1, Format: 2, Chunks: 0, Hash: hash, Metadata: metadata, + }, abci.ResponseOfferSnapshot_REJECT}, + "invalid metadata serialization": {&abci.Snapshot{ + Height: 1, Format: 2, Chunks: 0, Hash: hash, Metadata: []byte{3, 1, 4}, + }, abci.ResponseOfferSnapshot_REJECT}, + } + for name, tc := range testcases { + tc := tc + t.Run(name, func(t *testing.T) { + resp := app.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: tc.snapshot}) + assert.Equal(t, tc.result, resp.Result) + }) + } + + // Offering a snapshot after one has been accepted should error + resp := app.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: &abci.Snapshot{ + Height: 1, + Format: snapshottypes.CurrentFormat, + Chunks: 3, + Hash: []byte{1, 2, 3}, + Metadata: metadata, + }}) + require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ACCEPT}, resp) + + resp = app.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: &abci.Snapshot{ + Height: 2, + Format: snapshottypes.CurrentFormat, + Chunks: 3, + Hash: []byte{1, 2, 3}, + Metadata: metadata, + }}) + require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ABORT}, resp) +} + +func TestApplySnapshotChunk(t *testing.T) { + setupConfig1 := &setupConfig{ + blocks: 4, + blockTxs: 10, + snapshotInterval: 2, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + source, teardown, err := setupBaseAppWithSnapshots(t, setupConfig1) + require.NoError(t, err) + defer teardown() + + setupConfig2 := &setupConfig{ + blocks: 0, + blockTxs: 0, + snapshotInterval: 2, + snapshotKeepEvery: 2, + pruningOpts: pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + } + target, teardown, err := setupBaseAppWithSnapshots(t, setupConfig2) + require.NoError(t, err) + defer teardown() + + // Fetch latest snapshot to restore + respList := source.ListSnapshots(abci.RequestListSnapshots{}) + require.NotEmpty(t, respList.Snapshots) + snapshot := respList.Snapshots[0] + + // Make sure the snapshot has at least 3 chunks + require.GreaterOrEqual(t, snapshot.Chunks, uint32(3), "Not enough snapshot chunks") + + // Begin a snapshot restoration in the target + respOffer := target.OfferSnapshot(abci.RequestOfferSnapshot{Snapshot: snapshot}) + require.Equal(t, abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ACCEPT}, respOffer) + + // We should be able to pass an invalid chunk and get a verify failure, before reapplying it. + respApply := target.ApplySnapshotChunk(abci.RequestApplySnapshotChunk{ + Index: 0, + Chunk: []byte{9}, + Sender: "sender", + }) + require.Equal(t, abci.ResponseApplySnapshotChunk{ + Result: abci.ResponseApplySnapshotChunk_RETRY, + RefetchChunks: []uint32{0}, + RejectSenders: []string{"sender"}, + }, respApply) + + // Fetch each chunk from the source and apply it to the target + for index := uint32(0); index < snapshot.Chunks; index++ { + respChunk := source.LoadSnapshotChunk(abci.RequestLoadSnapshotChunk{ + Height: snapshot.Height, + Format: snapshot.Format, + Chunk: index, + }) + require.NotNil(t, respChunk.Chunk) + respApply := target.ApplySnapshotChunk(abci.RequestApplySnapshotChunk{ + Index: index, + Chunk: respChunk.Chunk, + }) + require.Equal(t, abci.ResponseApplySnapshotChunk{ + Result: abci.ResponseApplySnapshotChunk_ACCEPT, + }, respApply) + } + + // The target should now have the same hash as the source + assert.Equal(t, source.LastCommitID(), target.LastCommitID()) +} + +// NOTE: represents a new custom router for testing purposes of WithRouter() +type testCustomRouter struct { + routes sync.Map +} + +func (rtr *testCustomRouter) AddRoute(route sdk.Route) sdk.Router { + rtr.routes.Store(route.Path(), route.Handler()) + return rtr +} + +func (rtr *testCustomRouter) Route(ctx sdk.Context, path string) sdk.Handler { + if v, ok := rtr.routes.Load(path); ok { + if h, ok := v.(sdk.Handler); ok { + return h + } + } + return nil +} + +func TestWithRouter(t *testing.T) { + // test increments in the ante + anteKey := []byte("ante-key") + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, anteKey)) } + + // test increments in the handler + deliverKey := []byte("deliver-key") + routerOpt := func(bapp *BaseApp) { + bapp.SetRouter(&testCustomRouter{routes: sync.Map{}}) + r := sdk.NewRoute(routeMsgCounter, handlerMsgCounter(t, capKey1, deliverKey)) + bapp.Router().AddRoute(r) + } + + app, err := setupBaseApp(t, anteOpt, routerOpt) + require.NoError(t, err) + app.InitChain(abci.RequestInitChain{}) + + // Create same codec used in txDecoder + codec := codec.NewLegacyAmino() + registerTestCodec(codec) + + nBlocks := 3 + txPerHeight := 5 + + for blockN := 0; blockN < nBlocks; blockN++ { + header := tmproto.Header{Height: int64(blockN) + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + for i := 0; i < txPerHeight; i++ { + counter := int64(blockN*txPerHeight + i) + tx := newTxCounter(counter, counter) + + txBytes, err := codec.Marshal(tx) + require.NoError(t, err) + + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) + } + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + } +} + +func TestBaseApp_EndBlock(t *testing.T) { + db := dbm.NewMemDB() + name := t.Name() + logger := defaultLogger() + + cp := &abci.ConsensusParams{ + Block: &abci.BlockParams{ + MaxGas: 5000000, + }, + } + + app := NewBaseApp(name, logger, db, nil) + app.SetParamStore(&mock.ParamStore{Db: dbm.NewMemDB()}) + app.InitChain(abci.RequestInitChain{ + ConsensusParams: cp, + }) + + app.SetEndBlocker(func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { + return abci.ResponseEndBlock{ + ValidatorUpdates: []abci.ValidatorUpdate{ + {Power: 100}, + }, + } + }) + app.Seal() + + res := app.EndBlock(abci.RequestEndBlock{}) + require.Len(t, res.GetValidatorUpdates(), 1) + require.Equal(t, int64(100), res.GetValidatorUpdates()[0].Power) + require.Equal(t, cp.Block.MaxGas, res.ConsensusParamUpdates.Block.MaxGas) +} + +func TestBaseApp_Init_PruningAndSnapshot(t *testing.T) { + db := dbm.NewMemDB() + name := t.Name() + logger := defaultLogger() + + snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), snaphotstestutil.GetTempDir(t)) + require.NoError(t, err) + + testCases := map[string]struct { + bapp *BaseApp + expectedPruning pruningtypes.PruningOptions + expectedSnapshot snapshottypes.SnapshotOptions + expectedErr error + isSnapshotManagerNil bool + }{ + "snapshot but no pruning": { + NewBaseApp(name, logger, db, nil, + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + snapshottypes.NewSnapshotOptions(1500, 2), + // if no pruning is set, the default is PruneNothing + nil, + false, + }, + "nil snapshot store": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), + SetSnapshot(nil, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + snapshottypes.SnapshotOptions{}, + nil, + true, + }, + "pruning everything only": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningEverything)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), + snapshottypes.SnapshotOptions{}, + nil, + true, + }, + "pruning nothing only": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + snapshottypes.NewSnapshotOptions(snapshottypes.SnapshotIntervalOff, 0), + nil, + true, + }, + "pruning default only": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), + snapshottypes.NewSnapshotOptions(snapshottypes.SnapshotIntervalOff, 0), + nil, + true, + }, + "pruning custom only": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 10)), + ), + pruningtypes.NewCustomPruningOptions(10, 10), + snapshottypes.NewSnapshotOptions(snapshottypes.SnapshotIntervalOff, 0), + nil, + true, + }, + "pruning everything and snapshots": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningEverything)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningEverything), + snapshottypes.NewSnapshotOptions(1500, 2), + nil, + false, + }, + "pruning nothing and snapshots": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningNothing), + snapshottypes.NewSnapshotOptions(1500, 2), + nil, + false, + }, + "pruning default and snapshots": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewPruningOptions(pruningtypes.PruningDefault), + snapshottypes.NewSnapshotOptions(1500, 2), + nil, + false, + }, + "pruning custom and snapshots": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 10)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewCustomPruningOptions(10, 10), + snapshottypes.NewSnapshotOptions(1500, 2), + nil, + false, + }, + "error custom pruning 0 interval": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 0)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewCustomPruningOptions(10, 0), + snapshottypes.NewSnapshotOptions(1500, 2), + pruningtypes.ErrPruningIntervalZero, + false, + }, + "error custom pruning too small interval": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 9)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewCustomPruningOptions(10, 9), + snapshottypes.NewSnapshotOptions(1500, 2), + pruningtypes.ErrPruningIntervalTooSmall, + false, + }, + "error custom pruning too small keep recent": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(9, 10)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 2)), + ), + pruningtypes.NewCustomPruningOptions(9, 10), + snapshottypes.NewSnapshotOptions(1500, 2), + pruningtypes.ErrPruningKeepRecentTooSmall, + false, + }, + "snapshot zero interval - manager is set": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 10)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(0, 2)), + ), + pruningtypes.NewCustomPruningOptions(10, 10), + snapshottypes.NewSnapshotOptions(snapshottypes.SnapshotIntervalOff, 2), + nil, + false, + }, + "snapshot zero keep recent - allowed": { + NewBaseApp(name, logger, db, nil, + SetPruning(pruningtypes.NewCustomPruningOptions(10, 10)), + SetSnapshot(snapshotStore, snapshottypes.NewSnapshotOptions(1500, 0)), + ), + pruningtypes.NewCustomPruningOptions(10, 10), + snapshottypes.NewSnapshotOptions(1500, 0), // 0 snapshot-keep-recent means keep all + nil, + false, + }, + } + + for _, tc := range testCases { + tc.bapp.SetParamStore(&mock.ParamStore{db}) + + // Init and validate + require.Equal(t, tc.expectedErr, tc.bapp.init()) + if tc.expectedErr != nil { + continue + } + + // Check that settings were set correctly + actualPruning := tc.bapp.cms.GetPruning() + require.Equal(t, tc.expectedPruning, actualPruning) + + if tc.isSnapshotManagerNil { + require.Nil(t, tc.bapp.snapshotManager) + continue + } + + require.Equal(t, tc.expectedSnapshot.Interval, tc.bapp.snapshotManager.GetInterval()) + require.Equal(t, tc.expectedSnapshot.KeepRecent, tc.bapp.snapshotManager.GetKeepRecent()) + } +} + +func TestBaseApp_Init_AppVersion(t *testing.T) { + const versionNotSet = 0 + + testcases := []struct { + name string + protocolVersion uint64 + }{ + { + name: "no app version was set - set to 0", + protocolVersion: versionNotSet, + }, + { + name: "app version was set to 10 - 10 kept", + protocolVersion: 10, + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + db := dbm.NewMemDB() + app := newBaseAppWithDB(t.Name(), db) + + if tc.protocolVersion != versionNotSet { + err := app.cms.SetAppVersion(tc.protocolVersion) + require.NoError(t, err) + } + + // recreate app + app = newBaseAppWithDB(t.Name(), db) + + require.NoError(t, app.init()) + + actualProtocolVersion, err := app.GetAppVersion() + require.NoError(t, err) + + require.Equal(t, tc.protocolVersion, actualProtocolVersion) + }) + } } diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index d311f085c0e4..9c15b695176c 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -3,22 +3,25 @@ package baseapp import ( "fmt" - gogogrpc "github.com/cosmos/gogoproto/grpc" + "github.com/cosmos/cosmos-sdk/client/grpc/reflection" + + gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" - "github.com/cosmos/cosmos-sdk/client/grpc/reflection" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) +var protoCodec = encoding.GetCodec(proto.Name) + // GRPCQueryRouter routes ABCI Query requests to GRPC handlers type GRPCQueryRouter struct { - routes map[string]GRPCQueryHandler - cdc encoding.Codec - serviceData []serviceData + routes map[string]GRPCQueryHandler + interfaceRegistry codectypes.InterfaceRegistry + serviceData []serviceData } // serviceData represents a gRPC service, along with its handler. @@ -80,15 +83,21 @@ func (qrt *GRPCQueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interf // call the method handler from the service description with the handler object, // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data res, err := methodHandler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { - return qrt.cdc.Unmarshal(req.Data, i) + err := protoCodec.Unmarshal(req.Data, i) + if err != nil { + return err + } + if qrt.interfaceRegistry != nil { + return codectypes.UnpackInterfaces(i, qrt.interfaceRegistry) + } + return nil }, nil) if err != nil { return abci.ResponseQuery{}, err } // proto marshal the result bytes - var resBytes []byte - resBytes, err = qrt.cdc.Marshal(res) + resBytes, err := protoCodec.Marshal(res) if err != nil { return abci.ResponseQuery{}, err } @@ -110,9 +119,11 @@ func (qrt *GRPCQueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interf // SetInterfaceRegistry sets the interface registry for the router. This will // also register the interface reflection gRPC service. func (qrt *GRPCQueryRouter) SetInterfaceRegistry(interfaceRegistry codectypes.InterfaceRegistry) { - // instantiate the codec - qrt.cdc = codec.NewProtoCodec(interfaceRegistry).GRPCCodec() + qrt.interfaceRegistry = interfaceRegistry // Once we have an interface registry, we can register the interface // registry reflection gRPC service. - reflection.RegisterReflectionServiceServer(qrt, reflection.NewReflectionServiceServer(interfaceRegistry)) + reflection.RegisterReflectionServiceServer( + qrt, + reflection.NewReflectionServiceServer(interfaceRegistry), + ) } diff --git a/baseapp/grpcrouter_helpers.go b/baseapp/grpcrouter_helpers.go index 9efe019517cc..2ea74b55fc65 100644 --- a/baseapp/grpcrouter_helpers.go +++ b/baseapp/grpcrouter_helpers.go @@ -4,7 +4,7 @@ import ( gocontext "context" "fmt" - gogogrpc "github.com/cosmos/gogoproto/grpc" + gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" @@ -40,7 +40,7 @@ func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args if querier == nil { return fmt.Errorf("handler not found for %s", method) } - reqBz, err := q.cdc.Marshal(args) + reqBz, err := protoCodec.Marshal(args) if err != nil { return err } @@ -50,11 +50,15 @@ func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args return err } - err = q.cdc.Unmarshal(res.Value, reply) + err = protoCodec.Unmarshal(res.Value, reply) if err != nil { return err } + if q.interfaceRegistry != nil { + return types.UnpackInterfaces(reply, q.interfaceRegistry) + } + return nil } diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 486d966351b3..64b2a97b9b00 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -16,7 +16,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -func TestGRPCQueryRouter(t *testing.T) { +func TestGRPCGatewayRouter(t *testing.T) { qr := baseapp.NewGRPCQueryRouter() interfaceRegistry := testdata.NewTestInterfaceRegistry() qr.SetInterfaceRegistry(interfaceRegistry) @@ -32,9 +32,9 @@ func TestGRPCQueryRouter(t *testing.T) { require.NotNil(t, res) require.Equal(t, "hello", res.Message) - res, err = client.Echo(context.Background(), nil) - require.Nil(t, err) - require.Empty(t, res.Message) + require.Panics(t, func() { + _, _ = client.Echo(context.Background(), nil) + }) res2, err := client.SayHello(context.Background(), &testdata.SayHelloRequest{Name: "Foo"}) require.Nil(t, err) diff --git a/baseapp/grpcserver.go b/baseapp/grpcserver.go index e3a09106abe1..68cc14e66545 100644 --- a/baseapp/grpcserver.go +++ b/baseapp/grpcserver.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - gogogrpc "github.com/cosmos/gogoproto/grpc" + gogogrpc "github.com/gogo/protobuf/grpc" grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware" grpcrecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" "google.golang.org/grpc" @@ -47,7 +47,7 @@ func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) { // Create the sdk.Context. Passing false as 2nd arg, as we can't // actually support proofs with gRPC right now. - sdkCtx, err := app.CreateQueryContext(height, false) + sdkCtx, err := app.createQueryContext(height, false) if err != nil { return nil, err } diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index 269424e5fdb7..1b76bf49a211 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - gogogrpc "github.com/cosmos/gogoproto/grpc" - "github.com/cosmos/gogoproto/proto" + gogogrpc "github.com/gogo/protobuf/grpc" + "github.com/gogo/protobuf/proto" "google.golang.org/grpc" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -46,9 +46,9 @@ func (msr *MsgServiceRouter) HandlerByTypeURL(typeURL string) MsgServiceHandler // service description, handler is an object which implements that gRPC service. // // This function PANICs: -// - if it is called before the service `Msg`s have been registered using -// RegisterInterfaces, -// - or if a service is being registered twice. +// - if it is called before the service `Msg`s have been registered using +// RegisterInterfaces, +// - or if a service is being registered twice. func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // Adds a top-level query handler based on the gRPC service name. for _, method := range sd.Methods { diff --git a/baseapp/options.go b/baseapp/options.go index abf1600d4ae1..c880f49558e4 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -13,7 +13,6 @@ import ( snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" ) // File for storing in-package BaseApp optional functions, @@ -86,21 +85,6 @@ func SetSnapshot(snapshotStore *snapshots.Store, opts snapshottypes.SnapshotOpti return func(app *BaseApp) { app.SetSnapshot(snapshotStore, opts) } } -// SetPrepareProposal sets the PrepareProposal handler on the BaseApp. -func SetPrepareProposal(handler sdk.PrepareProposalHandler) func(*BaseApp) { - return func(app *BaseApp) { app.SetPrepareProposal(handler) } -} - -// SetProcessProposal sets the ProcessProposal handler on the BaseApp. -func SetProcessProposal(handler sdk.ProcessProposalHandler) func(*BaseApp) { - return func(app *BaseApp) { app.SetProcessProposal(handler) } -} - -// SetMempool sets the mempool on BaseApp. -func SetMempool(mempool mempool.Mempool) func(*BaseApp) { - return func(app *BaseApp) { app.SetMempool(mempool) } -} - func (app *BaseApp) SetName(name string) { if app.sealed { panic("SetName() on sealed BaseApp") @@ -151,7 +135,7 @@ func (app *BaseApp) SetDB(db dbm.DB) { func (app *BaseApp) SetCMS(cms store.CommitMultiStore) { if app.sealed { - panic("SetCMS() on sealed BaseApp") + panic("SetEndBlocker() on sealed BaseApp") } app.cms = cms @@ -263,49 +247,3 @@ func (app *BaseApp) SetInterfaceRegistry(registry types.InterfaceRegistry) { app.grpcQueryRouter.SetInterfaceRegistry(registry) app.msgServiceRouter.SetInterfaceRegistry(registry) } - -// SetMempool sets the application's mempool. -func (app *BaseApp) SetMempool(m mempool.Mempool) { - if app.sealed { - panic("SetMempool() called on sealed BaseApp") - } - - app.mempool = m -} - -// SetTxDecoder sets the TxDecoder if it wasn't provided in the BaseApp constructor. -func (app *BaseApp) SetTxDecoder(txDecoder sdk.TxDecoder) { - if app.sealed { - panic("SetTxDecoder() on sealed BaseApp") - } - - app.txDecoder = txDecoder -} - -// SetTxEncoder sets the TxEncoder if it wasn't provided in the BaseApp -// constructor. -func (app *BaseApp) SetTxEncoder(txEncoder sdk.TxEncoder) { - if app.sealed { - panic("SetTxEncoder() on sealed BaseApp") - } - - app.txEncoder = txEncoder -} - -// SetPrepareProposal sets the prepare proposal function for the BaseApp. -func (app *BaseApp) SetPrepareProposal(handler sdk.PrepareProposalHandler) { - if app.sealed { - panic("SetPrepareProposal() on sealed BaseApp") - } - - app.prepareProposal = handler -} - -// SetProcessProposal sets the process proposal function for the BaseApp. -func (app *BaseApp) SetProcessProposal(handler sdk.ProcessProposalHandler) { - if app.sealed { - panic("SetProcessProposal() on sealed BaseApp") - } - - app.processProposal = handler -} diff --git a/baseapp/params.go b/baseapp/params.go index ca243bf61bad..b19c155d21ee 100644 --- a/baseapp/params.go +++ b/baseapp/params.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,7 +31,7 @@ type ParamStore interface { // ValidateBlockParams defines a stateless validation on BlockParams. This function // is called whenever the parameters are updated or stored. func ValidateBlockParams(i interface{}) error { - v, ok := i.(tmproto.BlockParams) + v, ok := i.(abci.BlockParams) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } diff --git a/baseapp/params_test.go b/baseapp/params_test.go index 3f9d26a56f2f..6507e17a8aea 100644 --- a/baseapp/params_test.go +++ b/baseapp/params_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -15,11 +16,11 @@ func TestValidateBlockParams(t *testing.T) { expectErr bool }{ {nil, true}, - {&tmproto.BlockParams{}, true}, - {tmproto.BlockParams{}, true}, - {tmproto.BlockParams{MaxBytes: -1, MaxGas: -1}, true}, - {tmproto.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true}, - {tmproto.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false}, + {&abci.BlockParams{}, true}, + {abci.BlockParams{}, true}, + {abci.BlockParams{MaxBytes: -1, MaxGas: -1}, true}, + {abci.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true}, + {abci.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false}, } for _, tc := range testCases { diff --git a/baseapp/testutil/buf.gen.yaml b/baseapp/testutil/buf.gen.yaml deleted file mode 100644 index d7d17bbb26f8..000000000000 --- a/baseapp/testutil/buf.gen.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: v1 -plugins: - - name: gocosmos - out: ../.. - opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types diff --git a/baseapp/testutil/buf.lock b/baseapp/testutil/buf.lock deleted file mode 100644 index 259bd9ce82b1..000000000000 --- a/baseapp/testutil/buf.lock +++ /dev/null @@ -1,11 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 6652e3443c3b4504bb3bf82e73a7e409 diff --git a/baseapp/testutil/buf.yaml b/baseapp/testutil/buf.yaml deleted file mode 100644 index e6f82c0cdcd7..000000000000 --- a/baseapp/testutil/buf.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version: v1 -deps: - - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-proto diff --git a/baseapp/testutil/messages.go b/baseapp/testutil/messages.go deleted file mode 100644 index b98c192a7e00..000000000000 --- a/baseapp/testutil/messages.go +++ /dev/null @@ -1,63 +0,0 @@ -package testutil - -import ( - "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -func RegisterInterfaces(registry types.InterfaceRegistry) { - registry.RegisterImplementations( - (*sdk.Msg)(nil), - &MsgCounter{}, - &MsgCounter2{}, - &MsgKeyValue{}, - ) - msgservice.RegisterMsgServiceDesc(registry, &_Counter_serviceDesc) - msgservice.RegisterMsgServiceDesc(registry, &_Counter2_serviceDesc) - msgservice.RegisterMsgServiceDesc(registry, &_KeyValue_serviceDesc) - - codec.RegisterInterfaces(registry) -} - -var _ sdk.Msg = &MsgCounter{} - -func (msg *MsgCounter) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } -func (msg *MsgCounter) ValidateBasic() error { - if msg.Counter >= 0 { - return nil - } - return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "counter should be a non-negative integer") -} - -var _ sdk.Msg = &MsgCounter2{} - -func (msg *MsgCounter2) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } -func (msg *MsgCounter2) ValidateBasic() error { - if msg.Counter >= 0 { - return nil - } - return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "counter should be a non-negative integer") -} - -var _ sdk.Msg = &MsgKeyValue{} - -func (msg *MsgKeyValue) GetSigners() []sdk.AccAddress { - if len(msg.Signer) == 0 { - return []sdk.AccAddress{} - } - - return []sdk.AccAddress{sdk.MustAccAddressFromBech32(msg.Signer)} -} - -func (msg *MsgKeyValue) ValidateBasic() error { - if msg.Key == nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "key cannot be nil") - } - if msg.Value == nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "value cannot be nil") - } - return nil -} diff --git a/baseapp/testutil/messages.pb.go b/baseapp/testutil/messages.pb.go deleted file mode 100644 index 55aa0b2daaae..000000000000 --- a/baseapp/testutil/messages.pb.go +++ /dev/null @@ -1,1293 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: messages.proto - -package testutil - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type MsgCounter struct { - Counter int64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` - FailOnHandler bool `protobuf:"varint,2,opt,name=fail_on_handler,json=failOnHandler,proto3" json:"fail_on_handler,omitempty"` -} - -func (m *MsgCounter) Reset() { *m = MsgCounter{} } -func (m *MsgCounter) String() string { return proto.CompactTextString(m) } -func (*MsgCounter) ProtoMessage() {} -func (*MsgCounter) Descriptor() ([]byte, []int) { - return fileDescriptor_4dc296cbfe5ffcd5, []int{0} -} -func (m *MsgCounter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCounter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCounter) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCounter.Merge(m, src) -} -func (m *MsgCounter) XXX_Size() int { - return m.Size() -} -func (m *MsgCounter) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCounter.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCounter proto.InternalMessageInfo - -func (m *MsgCounter) GetCounter() int64 { - if m != nil { - return m.Counter - } - return 0 -} - -func (m *MsgCounter) GetFailOnHandler() bool { - if m != nil { - return m.FailOnHandler - } - return false -} - -type MsgCounter2 struct { - Counter int64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` - FailOnHandler bool `protobuf:"varint,2,opt,name=fail_on_handler,json=failOnHandler,proto3" json:"fail_on_handler,omitempty"` -} - -func (m *MsgCounter2) Reset() { *m = MsgCounter2{} } -func (m *MsgCounter2) String() string { return proto.CompactTextString(m) } -func (*MsgCounter2) ProtoMessage() {} -func (*MsgCounter2) Descriptor() ([]byte, []int) { - return fileDescriptor_4dc296cbfe5ffcd5, []int{1} -} -func (m *MsgCounter2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCounter2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCounter2.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCounter2) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCounter2.Merge(m, src) -} -func (m *MsgCounter2) XXX_Size() int { - return m.Size() -} -func (m *MsgCounter2) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCounter2.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCounter2 proto.InternalMessageInfo - -func (m *MsgCounter2) GetCounter() int64 { - if m != nil { - return m.Counter - } - return 0 -} - -func (m *MsgCounter2) GetFailOnHandler() bool { - if m != nil { - return m.FailOnHandler - } - return false -} - -type MsgCreateCounterResponse struct { -} - -func (m *MsgCreateCounterResponse) Reset() { *m = MsgCreateCounterResponse{} } -func (m *MsgCreateCounterResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateCounterResponse) ProtoMessage() {} -func (*MsgCreateCounterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dc296cbfe5ffcd5, []int{2} -} -func (m *MsgCreateCounterResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateCounterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateCounterResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateCounterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateCounterResponse.Merge(m, src) -} -func (m *MsgCreateCounterResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateCounterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateCounterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateCounterResponse proto.InternalMessageInfo - -type MsgKeyValue struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgKeyValue) Reset() { *m = MsgKeyValue{} } -func (m *MsgKeyValue) String() string { return proto.CompactTextString(m) } -func (*MsgKeyValue) ProtoMessage() {} -func (*MsgKeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_4dc296cbfe5ffcd5, []int{3} -} -func (m *MsgKeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgKeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgKeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgKeyValue.Merge(m, src) -} -func (m *MsgKeyValue) XXX_Size() int { - return m.Size() -} -func (m *MsgKeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_MsgKeyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgKeyValue proto.InternalMessageInfo - -func (m *MsgKeyValue) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *MsgKeyValue) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *MsgKeyValue) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -type MsgCreateKeyValueResponse struct { -} - -func (m *MsgCreateKeyValueResponse) Reset() { *m = MsgCreateKeyValueResponse{} } -func (m *MsgCreateKeyValueResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateKeyValueResponse) ProtoMessage() {} -func (*MsgCreateKeyValueResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dc296cbfe5ffcd5, []int{4} -} -func (m *MsgCreateKeyValueResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateKeyValueResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateKeyValueResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateKeyValueResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateKeyValueResponse.Merge(m, src) -} -func (m *MsgCreateKeyValueResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateKeyValueResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateKeyValueResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateKeyValueResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgCounter)(nil), "testdata.MsgCounter") - proto.RegisterType((*MsgCounter2)(nil), "testdata.MsgCounter2") - proto.RegisterType((*MsgCreateCounterResponse)(nil), "testdata.MsgCreateCounterResponse") - proto.RegisterType((*MsgKeyValue)(nil), "testdata.MsgKeyValue") - proto.RegisterType((*MsgCreateKeyValueResponse)(nil), "testdata.MsgCreateKeyValueResponse") -} - -func init() { proto.RegisterFile("messages.proto", fileDescriptor_4dc296cbfe5ffcd5) } - -var fileDescriptor_4dc296cbfe5ffcd5 = []byte{ - // 378 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xc1, 0x8a, 0x9b, 0x50, - 0x14, 0x86, 0x63, 0xa5, 0x89, 0x3d, 0x4d, 0xdb, 0x20, 0x69, 0x31, 0x16, 0x24, 0x58, 0x28, 0xd9, - 0x44, 0xc1, 0x3e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ad, 0x0a, 0xdd, 0x0f, 0xea, 0x45, - 0xff, 0x00, 0x5d, 0x11, 0x53, 0x86, 0xb9, 0xa1, 0x8e, 0x95, 0xc9, 0xab, 0xe0, 0xb0, 0xd9, 0x1f, - 0x61, 0x74, 0x8c, 0x6a, 0xa0, 0x4d, 0x96, 0x77, 0x01, 0xbd, 0xa6, 0xa5, 0x3f, 0x30, 0xf8, 0xc5, - 0xa2, 0x1c, 0x53, 0x64, 0xb2, 0xd1, 0x86, 0x4e, 0xf3, 0x0f, 0x9c, 0xd3, 0xfd, 0xa6, 0xfd, 0x58, - 0x6d, 0x3b, 0xc2, 0xbb, 0x04, 0xed, 0x58, 0x97, 0xdf, 0x42, 0x7e, 0xdf, 0x46, 0xf6, 0x9e, 0x84, - 0xf6, 0x41, 0x3b, 0x96, 0xf3, 0x15, 0xd4, 0x7f, 0x28, 0xcf, 0x68, 0x8d, 0x6b, 0x7e, 0x6a, 0xa1, - 0x9d, 0x57, 0xf0, 0xed, 0xc7, 0xed, 0xce, 0x52, 0xb6, 0x3b, 0x4b, 0xb9, 0xdf, 0x59, 0xca, 0xcd, - 0xde, 0xea, 0x6c, 0xf7, 0x56, 0xe7, 0x6e, 0x6f, 0x75, 0xae, 0xa6, 0x34, 0x96, 0xab, 0x22, 0x74, - 0x22, 0x9e, 0xba, 0x11, 0x17, 0x29, 0x17, 0x87, 0xcf, 0x54, 0x2c, 0xd6, 0x6e, 0x48, 0x04, 0x92, - 0x2c, 0x73, 0xcb, 0x88, 0x42, 0xc6, 0x49, 0xd8, 0xad, 0xde, 0xde, 0x97, 0x87, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x63, 0x31, 0xab, 0xcc, 0xc8, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// CounterClient is the client API for Counter service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CounterClient interface { - IncrementCounter(ctx context.Context, in *MsgCounter, opts ...grpc.CallOption) (*MsgCreateCounterResponse, error) -} - -type counterClient struct { - cc grpc1.ClientConn -} - -func NewCounterClient(cc grpc1.ClientConn) CounterClient { - return &counterClient{cc} -} - -func (c *counterClient) IncrementCounter(ctx context.Context, in *MsgCounter, opts ...grpc.CallOption) (*MsgCreateCounterResponse, error) { - out := new(MsgCreateCounterResponse) - err := c.cc.Invoke(ctx, "/testdata.Counter/IncrementCounter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CounterServer is the server API for Counter service. -type CounterServer interface { - IncrementCounter(context.Context, *MsgCounter) (*MsgCreateCounterResponse, error) -} - -// UnimplementedCounterServer can be embedded to have forward compatible implementations. -type UnimplementedCounterServer struct { -} - -func (*UnimplementedCounterServer) IncrementCounter(ctx context.Context, req *MsgCounter) (*MsgCreateCounterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IncrementCounter not implemented") -} - -func RegisterCounterServer(s grpc1.Server, srv CounterServer) { - s.RegisterService(&_Counter_serviceDesc, srv) -} - -func _Counter_IncrementCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCounter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CounterServer).IncrementCounter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Counter/IncrementCounter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CounterServer).IncrementCounter(ctx, req.(*MsgCounter)) - } - return interceptor(ctx, in, info, handler) -} - -var _Counter_serviceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.Counter", - HandlerType: (*CounterServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IncrementCounter", - Handler: _Counter_IncrementCounter_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "messages.proto", -} - -// Counter2Client is the client API for Counter2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type Counter2Client interface { - IncrementCounter(ctx context.Context, in *MsgCounter2, opts ...grpc.CallOption) (*MsgCreateCounterResponse, error) -} - -type counter2Client struct { - cc grpc1.ClientConn -} - -func NewCounter2Client(cc grpc1.ClientConn) Counter2Client { - return &counter2Client{cc} -} - -func (c *counter2Client) IncrementCounter(ctx context.Context, in *MsgCounter2, opts ...grpc.CallOption) (*MsgCreateCounterResponse, error) { - out := new(MsgCreateCounterResponse) - err := c.cc.Invoke(ctx, "/testdata.Counter2/IncrementCounter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Counter2Server is the server API for Counter2 service. -type Counter2Server interface { - IncrementCounter(context.Context, *MsgCounter2) (*MsgCreateCounterResponse, error) -} - -// UnimplementedCounter2Server can be embedded to have forward compatible implementations. -type UnimplementedCounter2Server struct { -} - -func (*UnimplementedCounter2Server) IncrementCounter(ctx context.Context, req *MsgCounter2) (*MsgCreateCounterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IncrementCounter not implemented") -} - -func RegisterCounter2Server(s grpc1.Server, srv Counter2Server) { - s.RegisterService(&_Counter2_serviceDesc, srv) -} - -func _Counter2_IncrementCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCounter2) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Counter2Server).IncrementCounter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.Counter2/IncrementCounter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Counter2Server).IncrementCounter(ctx, req.(*MsgCounter2)) - } - return interceptor(ctx, in, info, handler) -} - -var _Counter2_serviceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.Counter2", - HandlerType: (*Counter2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IncrementCounter", - Handler: _Counter2_IncrementCounter_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "messages.proto", -} - -// KeyValueClient is the client API for KeyValue service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KeyValueClient interface { - Set(ctx context.Context, in *MsgKeyValue, opts ...grpc.CallOption) (*MsgCreateKeyValueResponse, error) -} - -type keyValueClient struct { - cc grpc1.ClientConn -} - -func NewKeyValueClient(cc grpc1.ClientConn) KeyValueClient { - return &keyValueClient{cc} -} - -func (c *keyValueClient) Set(ctx context.Context, in *MsgKeyValue, opts ...grpc.CallOption) (*MsgCreateKeyValueResponse, error) { - out := new(MsgCreateKeyValueResponse) - err := c.cc.Invoke(ctx, "/testdata.KeyValue/Set", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KeyValueServer is the server API for KeyValue service. -type KeyValueServer interface { - Set(context.Context, *MsgKeyValue) (*MsgCreateKeyValueResponse, error) -} - -// UnimplementedKeyValueServer can be embedded to have forward compatible implementations. -type UnimplementedKeyValueServer struct { -} - -func (*UnimplementedKeyValueServer) Set(ctx context.Context, req *MsgKeyValue) (*MsgCreateKeyValueResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") -} - -func RegisterKeyValueServer(s grpc1.Server, srv KeyValueServer) { - s.RegisterService(&_KeyValue_serviceDesc, srv) -} - -func _KeyValue_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgKeyValue) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyValueServer).Set(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.KeyValue/Set", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyValueServer).Set(ctx, req.(*MsgKeyValue)) - } - return interceptor(ctx, in, info, handler) -} - -var _KeyValue_serviceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.KeyValue", - HandlerType: (*KeyValueServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Set", - Handler: _KeyValue_Set_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "messages.proto", -} - -func (m *MsgCounter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCounter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FailOnHandler { - i-- - if m.FailOnHandler { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Counter != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.Counter)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgCounter2) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCounter2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCounter2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FailOnHandler { - i-- - if m.FailOnHandler { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Counter != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.Counter)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateCounterResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateCounterResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateCounterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgKeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgKeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintMessages(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintMessages(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintMessages(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateKeyValueResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateKeyValueResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateKeyValueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintMessages(dAtA []byte, offset int, v uint64) int { - offset -= sovMessages(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCounter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Counter != 0 { - n += 1 + sovMessages(uint64(m.Counter)) - } - if m.FailOnHandler { - n += 2 - } - return n -} - -func (m *MsgCounter2) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Counter != 0 { - n += 1 + sovMessages(uint64(m.Counter)) - } - if m.FailOnHandler { - n += 2 - } - return n -} - -func (m *MsgCreateCounterResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgKeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - return n -} - -func (m *MsgCreateKeyValueResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovMessages(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMessages(x uint64) (n int) { - return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCounter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCounter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCounter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) - } - m.Counter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Counter |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FailOnHandler", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FailOnHandler = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCounter2) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCounter2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCounter2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) - } - m.Counter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Counter |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FailOnHandler", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FailOnHandler = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateCounterResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateCounterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgKeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgKeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgKeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateKeyValueResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateKeyValueResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateKeyValueResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMessages(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMessages - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMessages - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMessages - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group") -) diff --git a/baseapp/testutil/messages.proto b/baseapp/testutil/messages.proto deleted file mode 100644 index 866e33666983..000000000000 --- a/baseapp/testutil/messages.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package testdata; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/baseapp/testutil"; - -message MsgCounter { - int64 counter = 1; - bool fail_on_handler = 2; -} - -message MsgCounter2 { - int64 counter = 1; - bool fail_on_handler = 2; -} - -message MsgCreateCounterResponse {} - -message MsgKeyValue { - bytes key = 1; - bytes value = 2; - string signer = 3; -} - -message MsgCreateKeyValueResponse {} - -service Counter { - rpc IncrementCounter(MsgCounter) returns (MsgCreateCounterResponse); -} - -service Counter2 { - rpc IncrementCounter(MsgCounter2) returns (MsgCreateCounterResponse); -} - -service KeyValue { - rpc Set(MsgKeyValue) returns (MsgCreateKeyValueResponse); -} \ No newline at end of file diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go deleted file mode 100644 index 1cd7edc05e60..000000000000 --- a/baseapp/utils_test.go +++ /dev/null @@ -1,322 +0,0 @@ -package baseapp_test - -import ( - "bytes" - "context" - "encoding/binary" - "encoding/json" - "fmt" - "net/url" - "os" - "reflect" - "strconv" - "testing" - "unsafe" - - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" - - "github.com/cosmos/cosmos-sdk/baseapp" - baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -var ( - ParamStoreKey = []byte("paramstore") -) - -func defaultLogger() log.Logger { - if testing.Verbose() { - return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "baseapp/test") - } - - return log.NewNopLogger() -} - -type MsgKeyValueImpl struct{} - -func (m MsgKeyValueImpl) Set(ctx context.Context, msg *baseapptestutil.MsgKeyValue) (*baseapptestutil.MsgCreateKeyValueResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - sdkCtx.KVStore(capKey2).Set(msg.Key, msg.Value) - return &baseapptestutil.MsgCreateKeyValueResponse{}, nil -} - -type CounterServerImplGasMeterOnly struct { - gas uint64 -} - -func (m CounterServerImplGasMeterOnly) IncrementCounter(ctx context.Context, msg *baseapptestutil.MsgCounter) (*baseapptestutil.MsgCreateCounterResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - gas := m.gas - - // if no gas is provided, use the counter as gas. This is useful for testing - if gas == 0 { - gas = uint64(msg.Counter) - } - - sdkCtx.GasMeter().ConsumeGas(gas, "test") - return &baseapptestutil.MsgCreateCounterResponse{}, nil -} - -type NoopCounterServerImpl struct{} - -func (m NoopCounterServerImpl) IncrementCounter( - _ context.Context, - _ *baseapptestutil.MsgCounter, -) (*baseapptestutil.MsgCreateCounterResponse, error) { - return &baseapptestutil.MsgCreateCounterResponse{}, nil -} - -type CounterServerImpl struct { - t *testing.T - capKey storetypes.StoreKey - deliverKey []byte -} - -func (m CounterServerImpl) IncrementCounter(ctx context.Context, msg *baseapptestutil.MsgCounter) (*baseapptestutil.MsgCreateCounterResponse, error) { - return incrementCounter(ctx, m.t, m.capKey, m.deliverKey, msg) -} - -type Counter2ServerImpl struct { - t *testing.T - capKey storetypes.StoreKey - deliverKey []byte -} - -func (m Counter2ServerImpl) IncrementCounter(ctx context.Context, msg *baseapptestutil.MsgCounter2) (*baseapptestutil.MsgCreateCounterResponse, error) { - return incrementCounter(ctx, m.t, m.capKey, m.deliverKey, msg) -} - -func incrementCounter(ctx context.Context, - t *testing.T, - capKey storetypes.StoreKey, - deliverKey []byte, - msg sdk.Msg, -) (*baseapptestutil.MsgCreateCounterResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - store := sdkCtx.KVStore(capKey) - - sdkCtx.GasMeter().ConsumeGas(5, "test") - - var msgCount int64 - - switch m := msg.(type) { - case *baseapptestutil.MsgCounter: - if m.FailOnHandler { - return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "message handler failure") - } - msgCount = m.Counter - case *baseapptestutil.MsgCounter2: - if m.FailOnHandler { - return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "message handler failure") - } - msgCount = m.Counter - } - - sdkCtx.EventManager().EmitEvents( - counterEvent(sdk.EventTypeMessage, msgCount), - ) - - _, err := incrementingCounter(t, store, deliverKey, msgCount) - if err != nil { - return nil, err - } - - return &baseapptestutil.MsgCreateCounterResponse{}, nil -} - -func counterEvent(evType string, msgCount int64) sdk.Events { - return sdk.Events{ - sdk.NewEvent( - evType, - sdk.NewAttribute("update_counter", fmt.Sprintf("%d", msgCount)), - ), - } -} - -func anteHandlerTxTest(t *testing.T, capKey storetypes.StoreKey, storeKey []byte) sdk.AnteHandler { - return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { - store := ctx.KVStore(capKey) - counter, failOnAnte := parseTxMemo(t, tx) - - if failOnAnte { - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") - } - - _, err := incrementingCounter(t, store, storeKey, counter) - if err != nil { - return ctx, err - } - - ctx.EventManager().EmitEvents( - counterEvent("ante_handler", counter), - ) - - return ctx, nil - } -} - -func incrementingCounter(t *testing.T, store sdk.KVStore, counterKey []byte, counter int64) (*sdk.Result, error) { - storedCounter := getIntFromStore(t, store, counterKey) - require.Equal(t, storedCounter, counter) - setIntOnStore(store, counterKey, counter+1) - return &sdk.Result{}, nil -} - -func setIntOnStore(store sdk.KVStore, key []byte, i int64) { - bz := make([]byte, 8) - n := binary.PutVarint(bz, i) - store.Set(key, bz[:n]) -} - -type paramStore struct { - db *dbm.MemDB -} - -func (ps *paramStore) Set(_ sdk.Context, key []byte, value interface{}) { - bz, err := json.Marshal(value) - if err != nil { - panic(err) - } - - ps.db.Set(key, bz) -} - -func (ps *paramStore) Has(_ sdk.Context, key []byte) bool { - ok, err := ps.db.Has(key) - if err != nil { - panic(err) - } - - return ok -} - -func (ps *paramStore) Get(_ sdk.Context, key []byte, ptr interface{}) { - bz, err := ps.db.Get(key) - if err != nil { - panic(err) - } - - if len(bz) == 0 { - return - } - - if err := json.Unmarshal(bz, ptr); err != nil { - panic(err) - } -} - -func setTxSignature(t *testing.T, builder client.TxBuilder, nonce uint64) { - privKey := secp256k1.GenPrivKeyFromSecret([]byte("test")) - pubKey := privKey.PubKey() - err := builder.SetSignatures( - signingtypes.SignatureV2{ - PubKey: pubKey, - Sequence: nonce, - Data: &signingtypes.SingleSignatureData{}, - }, - ) - require.NoError(t, err) -} - -func testLoadVersionHelper(t *testing.T, app *baseapp.BaseApp, expectedHeight int64, expectedID storetypes.CommitID) { - lastHeight := app.LastBlockHeight() - lastID := app.LastCommitID() - require.Equal(t, expectedHeight, lastHeight) - require.Equal(t, expectedID, lastID) -} - -func getCheckStateCtx(app *baseapp.BaseApp) sdk.Context { - v := reflect.ValueOf(app).Elem() - f := v.FieldByName("checkState") - rf := reflect.NewAt(f.Type(), unsafe.Pointer(f.UnsafeAddr())).Elem() - return rf.MethodByName("Context").Call(nil)[0].Interface().(sdk.Context) -} - -func getDeliverStateCtx(app *baseapp.BaseApp) sdk.Context { - v := reflect.ValueOf(app).Elem() - f := v.FieldByName("deliverState") - rf := reflect.NewAt(f.Type(), unsafe.Pointer(f.UnsafeAddr())).Elem() - return rf.MethodByName("Context").Call(nil)[0].Interface().(sdk.Context) -} - -func parseTxMemo(t *testing.T, tx sdk.Tx) (counter int64, failOnAnte bool) { - txWithMemo, ok := tx.(sdk.TxWithMemo) - require.True(t, ok) - - memo := txWithMemo.GetMemo() - vals, err := url.ParseQuery(memo) - require.NoError(t, err) - - counter, err = strconv.ParseInt(vals.Get("counter"), 10, 64) - require.NoError(t, err) - - failOnAnte = vals.Get("failOnAnte") == "true" - return counter, failOnAnte -} - -func newTxCounter(t *testing.T, cfg client.TxConfig, counter int64, msgCounters ...int64) signing.Tx { - msgs := make([]sdk.Msg, 0, len(msgCounters)) - for _, c := range msgCounters { - msg := &baseapptestutil.MsgCounter{Counter: c, FailOnHandler: false} - msgs = append(msgs, msg) - } - - builder := cfg.NewTxBuilder() - builder.SetMsgs(msgs...) - builder.SetMemo("counter=" + strconv.FormatInt(counter, 10) + "&failOnAnte=false") - setTxSignature(t, builder, uint64(counter)) - - return builder.GetTx() -} - -func getIntFromStore(t *testing.T, store sdk.KVStore, key []byte) int64 { - bz := store.Get(key) - if len(bz) == 0 { - return 0 - } - - i, err := binary.ReadVarint(bytes.NewBuffer(bz)) - require.NoError(t, err) - - return i -} - -func setFailOnAnte(t *testing.T, cfg client.TxConfig, tx signing.Tx, failOnAnte bool) signing.Tx { - builder := cfg.NewTxBuilder() - builder.SetMsgs(tx.GetMsgs()...) - - memo := tx.GetMemo() - vals, err := url.ParseQuery(memo) - require.NoError(t, err) - - vals.Set("failOnAnte", strconv.FormatBool(failOnAnte)) - memo = vals.Encode() - builder.SetMemo(memo) - setTxSignature(t, builder, 1) - - return builder.GetTx() -} - -func setFailOnHandler(cfg client.TxConfig, tx signing.Tx, fail bool) signing.Tx { - builder := cfg.NewTxBuilder() - builder.SetMemo(tx.GetMemo()) - - msgs := tx.GetMsgs() - for i, msg := range msgs { - msgs[i] = &baseapptestutil.MsgCounter{ - Counter: msg.(*baseapptestutil.MsgCounter).Counter, - FailOnHandler: fail, - } - } - - builder.SetMsgs(msgs...) - return builder.GetTx() -} diff --git a/buf.lock b/buf.lock deleted file mode 100644 index c91b5810c297..000000000000 --- a/buf.lock +++ /dev/null @@ -1,2 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 diff --git a/buf.work.yaml b/buf.work.yaml deleted file mode 100644 index dd13169eeed2..000000000000 --- a/buf.work.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# This workspace file points to the roots found in your -# previous "buf.yaml" configuration. -version: v1 -directories: - - proto - # - orm/internal diff --git a/client/config/config_test.go b/client/config/config_test.go index 4d727714941c..c058edf8301a 100644 --- a/client/config/config_test.go +++ b/client/config/config_test.go @@ -12,8 +12,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/x/staking/client/cli" ) @@ -29,8 +27,7 @@ func initClientContext(t *testing.T, envVar string) (client.Context, func()) { home := t.TempDir() clientCtx := client.Context{}. WithHomeDir(home). - WithViper(""). - WithCodec(codec.NewProtoCodec(codectypes.NewInterfaceRegistry())) + WithViper("") clientCtx.Viper.BindEnv(nodeEnv) if envVar != "" { diff --git a/client/context.go b/client/context.go index d87ad2a102fd..d58d46a0287f 100644 --- a/client/context.go +++ b/client/context.go @@ -12,7 +12,7 @@ import ( "google.golang.org/grpc" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/pkg/errors" rpcclient "github.com/tendermint/tendermint/rpc/client" diff --git a/client/grpc/node/query.pb.go b/client/grpc/node/query.pb.go index e0c097fd8ef6..8433554b278d 100644 --- a/client/grpc/node/query.pb.go +++ b/client/grpc/node/query.pb.go @@ -6,8 +6,8 @@ package node import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/client/grpc/node/query.pb.gw.go b/client/grpc/node/query.pb.gw.go index c579f6e54575..73bd92214710 100644 --- a/client/grpc/node/query.pb.gw.go +++ b/client/grpc/node/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Service_Config_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ConfigRequest @@ -54,14 +52,12 @@ func local_request_Service_Config_0(ctx context.Context, marshaler runtime.Marsh // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { mux.Handle("GET", pattern_Service_Config_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -69,7 +65,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_Config_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/client/grpc/reflection/reflection.pb.go b/client/grpc/reflection/reflection.pb.go index 3c207e94fefc..66dbef0c7105 100644 --- a/client/grpc/reflection/reflection.pb.go +++ b/client/grpc/reflection/reflection.pb.go @@ -6,8 +6,8 @@ package reflection import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/client/grpc/reflection/reflection.pb.gw.go b/client/grpc/reflection/reflection.pb.gw.go index 5f4cad169cf0..7bb8a5e12836 100644 --- a/client/grpc/reflection/reflection.pb.gw.go +++ b/client/grpc/reflection/reflection.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_ReflectionService_ListAllInterfaces_0(ctx context.Context, marshaler runtime.Marshaler, client ReflectionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAllInterfacesRequest @@ -108,14 +106,12 @@ func local_request_ReflectionService_ListImplementations_0(ctx context.Context, // RegisterReflectionServiceHandlerServer registers the http handlers for service ReflectionService to "mux". // UnaryRPC :call ReflectionServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReflectionServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterReflectionServiceHandlerFromEndpoint instead. func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReflectionServiceServer) error { mux.Handle("GET", pattern_ReflectionService_ListAllInterfaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -123,7 +119,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_ListAllInterfaces_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -137,8 +132,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_ListImplementations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -146,7 +139,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_ListImplementations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/client/grpc/tmservice/query.pb.go b/client/grpc/tmservice/query.pb.go index 02716626beb8..3db3c949895b 100644 --- a/client/grpc/tmservice/query.pb.go +++ b/client/grpc/tmservice/query.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" p2p "github.com/tendermint/tendermint/proto/tendermint/p2p" types1 "github.com/tendermint/tendermint/proto/tendermint/types" _ "google.golang.org/genproto/googleapis/api/annotations" diff --git a/client/grpc/tmservice/query.pb.gw.go b/client/grpc/tmservice/query.pb.gw.go index e7c294221045..a53a31fccfc0 100644 --- a/client/grpc/tmservice/query.pb.gw.go +++ b/client/grpc/tmservice/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Service_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetNodeInfoRequest @@ -252,14 +250,12 @@ func local_request_Service_GetValidatorSetByHeight_0(ctx context.Context, marsha // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { mux.Handle("GET", pattern_Service_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -267,7 +263,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetNodeInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -281,8 +276,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetSyncing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -290,7 +283,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetSyncing_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -304,8 +296,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetLatestBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -313,7 +303,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetLatestBlock_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -327,8 +316,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetBlockByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -336,7 +323,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetBlockByHeight_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -350,8 +336,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetLatestValidatorSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -359,7 +343,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetLatestValidatorSet_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -373,8 +356,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetValidatorSetByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -382,7 +363,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetValidatorSetByHeight_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/client/grpc/tmservice/service.go b/client/grpc/tmservice/service.go index 9e2fde9f90ef..cd6e7e5313ef 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -3,7 +3,7 @@ package tmservice import ( "context" - gogogrpc "github.com/cosmos/gogoproto/grpc" + gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/client/grpc_query.go b/client/grpc_query.go index 0a808cd5b202..f3c878657488 100644 --- a/client/grpc_query.go +++ b/client/grpc_query.go @@ -2,20 +2,18 @@ package client import ( gocontext "context" - "errors" "fmt" "reflect" "strconv" "strings" - gogogrpc "github.com/cosmos/gogoproto/grpc" - "github.com/cosmos/gogoproto/proto" + gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" "google.golang.org/grpc/metadata" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" @@ -24,10 +22,7 @@ import ( var _ gogogrpc.ClientConn = Context{} -// fallBackCodec is used by Context in case Codec is not set. -// it can process every gRPC type, except the ones which contain -// interfaces in their types. -var fallBackCodec = codec.NewProtoCodec(failingInterfaceRegistry{}) +var protoCodec = encoding.GetCodec(proto.Name) // Invoke implements the grpc ClientConn.Invoke method func (ctx Context) Invoke(grpcCtx gocontext.Context, method string, req, reply interface{}, opts ...grpc.CallOption) (err error) { @@ -77,7 +72,7 @@ func (ctx Context) Invoke(grpcCtx gocontext.Context, method string, req, reply i } // Case 2-2. Querying state via abci query. - reqBz, err := ctx.gRPCCodec().Marshal(req) + reqBz, err := protoCodec.Marshal(req) if err != nil { return err } @@ -93,7 +88,8 @@ func (ctx Context) Invoke(grpcCtx gocontext.Context, method string, req, reply i return err } - if err := ctx.gRPCCodec().Unmarshal(res.Value, reply); err != nil { + err = protoCodec.Unmarshal(res.Value, reply) + if err != nil { return err } @@ -142,56 +138,3 @@ func selectHeight(clientContext Context, grpcCtx gocontext.Context) (int64, erro } return height, nil } - -// gRPCCodec checks if Context's Codec is codec.GRPCCodecProvider -// otherwise it returns fallBackCodec. -func (ctx Context) gRPCCodec() encoding.Codec { - if ctx.Codec == nil { - return fallBackCodec.GRPCCodec() - } - - pc, ok := ctx.Codec.(codec.GRPCCodecProvider) - if !ok { - return fallBackCodec.GRPCCodec() - } - - return pc.GRPCCodec() -} - -var _ types.InterfaceRegistry = failingInterfaceRegistry{} - -// failingInterfaceRegistry is used by the fallback codec -// in case Context's Codec is not set. -type failingInterfaceRegistry struct{} - -// errCodecNotSet is return by failingInterfaceRegistry in case there are attempt to decode -// or encode a type which contains an interface field. -var errCodecNotSet = errors.New("client: cannot encode or decode type which requires the application specific codec") - -func (f failingInterfaceRegistry) UnpackAny(any *types.Any, iface interface{}) error { - return errCodecNotSet -} - -func (f failingInterfaceRegistry) Resolve(typeUrl string) (proto.Message, error) { - return nil, errCodecNotSet -} - -func (f failingInterfaceRegistry) RegisterInterface(protoName string, iface interface{}, impls ...proto.Message) { - panic("cannot be called") -} - -func (f failingInterfaceRegistry) RegisterImplementations(iface interface{}, impls ...proto.Message) { - panic("cannot be called") -} - -func (f failingInterfaceRegistry) ListAllInterfaces() []string { - panic("cannot be called") -} - -func (f failingInterfaceRegistry) ListImplementations(ifaceTypeURL string) []string { - panic("cannot be called") -} - -func (f failingInterfaceRegistry) EnsureRegistered(iface interface{}) error { - panic("cannot be called") -} diff --git a/client/tx/tx.go b/client/tx/tx.go index 44660693fa77..8e20be369bfd 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -8,7 +8,7 @@ import ( "net/http" "os" - gogogrpc "github.com/cosmos/gogoproto/grpc" + gogogrpc "github.com/gogo/protobuf/grpc" "github.com/spf13/pflag" "github.com/cosmos/cosmos-sdk/client" diff --git a/codec/amino_codec.go b/codec/amino_codec.go index 8c1eb9f85c45..69f4dc133d29 100644 --- a/codec/amino_codec.go +++ b/codec/amino_codec.go @@ -1,7 +1,7 @@ package codec import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" ) // AminoCodec defines a codec that utilizes Codec for both binary and JSON @@ -96,9 +96,8 @@ func (ac *AminoCodec) MarshalInterface(i proto.Message) ([]byte, error) { // NOTE: to unmarshal a concrete type, you should use Unmarshal instead // // Example: -// -// var x MyInterface -// err := cdc.UnmarshalInterface(bz, &x) +// var x MyInterface +// err := cdc.UnmarshalInterface(bz, &x) func (ac *AminoCodec) UnmarshalInterface(bz []byte, ptr interface{}) error { return ac.LegacyAmino.Unmarshal(bz, ptr) } @@ -118,9 +117,8 @@ func (ac *AminoCodec) MarshalInterfaceJSON(i proto.Message) ([]byte, error) { // NOTE: to unmarshal a concrete type, you should use UnmarshalJSON instead // // Example: -// -// var x MyInterface -// err := cdc.UnmarshalInterfaceJSON(bz, &x) +// var x MyInterface +// err := cdc.UnmarshalInterfaceJSON(bz, &x) func (ac *AminoCodec) UnmarshalInterfaceJSON(bz []byte, ptr interface{}) error { return ac.LegacyAmino.UnmarshalJSON(bz, ptr) } diff --git a/codec/any_test.go b/codec/any_test.go index 1d5b17642aa2..8b5ecaca3c07 100644 --- a/codec/any_test.go +++ b/codec/any_test.go @@ -26,46 +26,35 @@ func NewTestInterfaceRegistry() types.InterfaceRegistry { } func TestMarshalAny(t *testing.T) { - catRegistry := types.NewInterfaceRegistry() - catRegistry.RegisterImplementations((*testdata.Animal)(nil), &testdata.Cat{}) - registry := types.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(registry) kitty := &testdata.Cat{Moniker: "Kitty"} - emptyBz, err := cdc.MarshalInterface(kitty) - require.ErrorContains(t, err, "does not have a registered interface") - - catBz, err := codec.NewProtoCodec(catRegistry).MarshalInterface(kitty) + bz, err := cdc.MarshalInterface(kitty) require.NoError(t, err) - require.NotEmpty(t, catBz) var animal testdata.Animal - // deserializing cat bytes should error in an empty registry - err = cdc.UnmarshalInterface(catBz, &animal) - require.ErrorContains(t, err, "no registered implementations of type testdata.Animal") - - // deserializing an empty byte array will return nil, but no error - err = cdc.UnmarshalInterface(emptyBz, &animal) - require.Nil(t, animal) - require.NoError(t, err) + // empty registry should fail + err = cdc.UnmarshalInterface(bz, &animal) + require.Error(t, err) // wrong type registration should fail registry.RegisterImplementations((*testdata.Animal)(nil), &testdata.Dog{}) - err = cdc.UnmarshalInterface(catBz, &animal) + err = cdc.UnmarshalInterface(bz, &animal) require.Error(t, err) // should pass registry = NewTestInterfaceRegistry() cdc = codec.NewProtoCodec(registry) - err = cdc.UnmarshalInterface(catBz, &animal) + err = cdc.UnmarshalInterface(bz, &animal) require.NoError(t, err) require.Equal(t, kitty, animal) // nil should fail registry = NewTestInterfaceRegistry() - err = cdc.UnmarshalInterface(catBz, nil) + err = cdc.UnmarshalInterface(bz, nil) require.Error(t, err) } diff --git a/codec/codec.go b/codec/codec.go index 3088ffeb09bc..6da2f453f0c3 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -1,8 +1,7 @@ package codec import ( - "github.com/cosmos/gogoproto/proto" - "google.golang.org/grpc/encoding" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -96,12 +95,4 @@ type ( MarshalAminoJSON() ([]byte, error) UnmarshalAminoJSON([]byte) error } - - // GRPCCodecProvider is implemented by the Codec implementations which return - // a gRPC encoding.Codec. - // - // And it is used to decode requests and encode responses passed through gRPC. - GRPCCodecProvider interface { - GRPCCodec() encoding.Codec - } ) diff --git a/codec/codec_common_test.go b/codec/codec_common_test.go index fc107b9928b5..59af923d7920 100644 --- a/codec/codec_common_test.go +++ b/codec/codec_common_test.go @@ -3,7 +3,7 @@ package codec_test import ( "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" diff --git a/codec/json.go b/codec/json.go index 2e913bfd11d8..e01caa259936 100644 --- a/codec/json.go +++ b/codec/json.go @@ -3,8 +3,8 @@ package codec import ( "bytes" - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/codec/proto_codec.go b/codec/proto_codec.go index b1d4eb45183e..b75f1d8355c0 100644 --- a/codec/proto_codec.go +++ b/codec/proto_codec.go @@ -6,12 +6,8 @@ import ( "fmt" "strings" - legacyproto "github.com/golang/protobuf/proto" //nolint:staticcheck - "google.golang.org/grpc/encoding" - "google.golang.org/protobuf/proto" - - "github.com/cosmos/gogoproto/jsonpb" - gogoproto "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" ) @@ -29,10 +25,8 @@ type ProtoCodec struct { interfaceRegistry types.InterfaceRegistry } -var ( - _ Codec = &ProtoCodec{} - _ ProtoCodecMarshaler = &ProtoCodec{} -) +var _ Codec = &ProtoCodec{} +var _ ProtoCodecMarshaler = &ProtoCodec{} // NewProtoCodec returns a reference to a new ProtoCodec func NewProtoCodec(interfaceRegistry types.InterfaceRegistry) *ProtoCodec { @@ -43,11 +37,6 @@ func NewProtoCodec(interfaceRegistry types.InterfaceRegistry) *ProtoCodec { // NOTE: this function must be used with a concrete type which // implements proto.Message. For interface please use the codec.MarshalInterface func (pc *ProtoCodec) Marshal(o ProtoMarshaler) ([]byte, error) { - // Size() check can catch the typed nil value. - if o == nil || o.Size() == 0 { - // return empty bytes instead of nil, because nil has special meaning in places like store.Set - return []byte{}, nil - } return o.Marshal() } @@ -137,7 +126,7 @@ func (pc *ProtoCodec) MustUnmarshalLengthPrefixed(bz []byte, ptr ProtoMarshaler) // it marshals to JSON using proto codec. // NOTE: this function must be used with a concrete type which // implements proto.Message. For interface please use the codec.MarshalInterfaceJSON -func (pc *ProtoCodec) MarshalJSON(o gogoproto.Message) ([]byte, error) { +func (pc *ProtoCodec) MarshalJSON(o proto.Message) ([]byte, error) { m, ok := o.(ProtoMarshaler) if !ok { return nil, fmt.Errorf("cannot protobuf JSON encode unsupported type: %T", o) @@ -150,7 +139,7 @@ func (pc *ProtoCodec) MarshalJSON(o gogoproto.Message) ([]byte, error) { // it executes MarshalJSON except it panics upon failure. // NOTE: this function must be used with a concrete type which // implements proto.Message. For interface please use the codec.MarshalInterfaceJSON -func (pc *ProtoCodec) MustMarshalJSON(o gogoproto.Message) []byte { +func (pc *ProtoCodec) MustMarshalJSON(o proto.Message) []byte { bz, err := pc.MarshalJSON(o) if err != nil { panic(err) @@ -163,7 +152,7 @@ func (pc *ProtoCodec) MustMarshalJSON(o gogoproto.Message) []byte { // it unmarshals from JSON using proto codec. // NOTE: this function must be used with a concrete type which // implements proto.Message. For interface please use the codec.UnmarshalInterfaceJSON -func (pc *ProtoCodec) UnmarshalJSON(bz []byte, ptr gogoproto.Message) error { +func (pc *ProtoCodec) UnmarshalJSON(bz []byte, ptr proto.Message) error { m, ok := ptr.(ProtoMarshaler) if !ok { return fmt.Errorf("cannot protobuf JSON decode unsupported type: %T", ptr) @@ -182,7 +171,7 @@ func (pc *ProtoCodec) UnmarshalJSON(bz []byte, ptr gogoproto.Message) error { // it executes UnmarshalJSON except it panics upon failure. // NOTE: this function must be used with a concrete type which // implements proto.Message. For interface please use the codec.UnmarshalInterfaceJSON -func (pc *ProtoCodec) MustUnmarshalJSON(bz []byte, ptr gogoproto.Message) { +func (pc *ProtoCodec) MustUnmarshalJSON(bz []byte, ptr proto.Message) { if err := pc.UnmarshalJSON(bz, ptr); err != nil { panic(err) } @@ -191,7 +180,7 @@ func (pc *ProtoCodec) MustUnmarshalJSON(bz []byte, ptr gogoproto.Message) { // MarshalInterface is a convenience function for proto marshalling interfaces. It packs // the provided value, which must be an interface, in an Any and then marshals it to bytes. // NOTE: to marshal a concrete type, you should use Marshal instead -func (pc *ProtoCodec) MarshalInterface(i gogoproto.Message) ([]byte, error) { +func (pc *ProtoCodec) MarshalInterface(i proto.Message) ([]byte, error) { if err := assertNotNil(i); err != nil { return nil, err } @@ -199,10 +188,6 @@ func (pc *ProtoCodec) MarshalInterface(i gogoproto.Message) ([]byte, error) { if err != nil { return nil, err } - err = pc.interfaceRegistry.EnsureRegistered(i) - if err != nil { - return nil, err - } return pc.Marshal(any) } @@ -213,9 +198,8 @@ func (pc *ProtoCodec) MarshalInterface(i gogoproto.Message) ([]byte, error) { // NOTE: to unmarshal a concrete type, you should use Unmarshal instead // // Example: -// -// var x MyInterface -// err := cdc.UnmarshalInterface(bz, &x) +// var x MyInterface +// err := cdc.UnmarshalInterface(bz, &x) func (pc *ProtoCodec) UnmarshalInterface(bz []byte, ptr interface{}) error { any := &types.Any{} err := pc.Unmarshal(bz, any) @@ -229,7 +213,7 @@ func (pc *ProtoCodec) UnmarshalInterface(bz []byte, ptr interface{}) error { // MarshalInterfaceJSON is a convenience function for proto marshalling interfaces. It // packs the provided value in an Any and then marshals it to bytes. // NOTE: to marshal a concrete type, you should use MarshalJSON instead -func (pc *ProtoCodec) MarshalInterfaceJSON(x gogoproto.Message) ([]byte, error) { +func (pc *ProtoCodec) MarshalInterfaceJSON(x proto.Message) ([]byte, error) { any, err := types.NewAnyWithValue(x) if err != nil { return nil, err @@ -243,9 +227,8 @@ func (pc *ProtoCodec) MarshalInterfaceJSON(x gogoproto.Message) ([]byte, error) // NOTE: to unmarshal a concrete type, you should use UnmarshalJSON instead // // Example: -// -// var x MyInterface // must implement proto.Message -// err := cdc.UnmarshalInterfaceJSON(&x, bz) +// var x MyInterface // must implement proto.Message +// err := cdc.UnmarshalInterfaceJSON(&x, bz) func (pc *ProtoCodec) UnmarshalInterfaceJSON(bz []byte, iface interface{}) error { any := &types.Any{} err := pc.UnmarshalJSON(bz, any) @@ -267,48 +250,6 @@ func (pc *ProtoCodec) InterfaceRegistry() types.InterfaceRegistry { return pc.interfaceRegistry } -// GRPCCodec returns the gRPC Codec for this specific ProtoCodec -func (pc *ProtoCodec) GRPCCodec() encoding.Codec { - return &grpcProtoCodec{cdc: pc} -} - -var errUnknownProtoType = errors.New("codec: unknown proto type") // sentinel error - -// grpcProtoCodec is the implementation of the gRPC proto codec. -type grpcProtoCodec struct { - cdc *ProtoCodec -} - -func (g grpcProtoCodec) Marshal(v interface{}) ([]byte, error) { - switch m := v.(type) { - case proto.Message: - return proto.Marshal(m) - case ProtoMarshaler: - return g.cdc.Marshal(m) - case legacyproto.Message: - return legacyproto.Marshal(m) - default: - return nil, fmt.Errorf("%w: cannot marshal type %T", errUnknownProtoType, v) - } -} - -func (g grpcProtoCodec) Unmarshal(data []byte, v interface{}) error { - switch m := v.(type) { - case proto.Message: - return proto.Unmarshal(data, m) - case ProtoMarshaler: - return g.cdc.Unmarshal(data, m) - case legacyproto.Message: - return legacyproto.Unmarshal(data, m) - default: - return fmt.Errorf("%w: cannot unmarshal type %T", errUnknownProtoType, v) - } -} - -func (g grpcProtoCodec) Name() string { - return "cosmos-sdk-grpc-codec" -} - func assertNotNil(i interface{}) error { if i == nil { return errors.New("can't marshal value") diff --git a/codec/proto_codec_test.go b/codec/proto_codec_test.go index 2f3930d85c21..40d810deefc1 100644 --- a/codec/proto_codec_test.go +++ b/codec/proto_codec_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" diff --git a/codec/types/any.go b/codec/types/any.go index bd4887337119..07c8de98c81e 100644 --- a/codec/types/any.go +++ b/codec/types/any.go @@ -3,7 +3,7 @@ package types import ( fmt "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -37,14 +37,19 @@ type Any struct { // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. + // nolint TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // nolint XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + + // nolint + XXX_unrecognized []byte `json:"-"` + + // nolint + XXX_sizecache int32 `json:"-"` cachedValue interface{} diff --git a/codec/types/any.pb.go b/codec/types/any.pb.go index 8dc80f395291..cb904a5af43c 100644 --- a/codec/types/any.pb.go +++ b/codec/types/any.pb.go @@ -6,8 +6,8 @@ package types import ( bytes "bytes" fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/codec/types/any_internal_test.go b/codec/types/any_internal_test.go index 9adab2946653..b3e847965d59 100644 --- a/codec/types/any_internal_test.go +++ b/codec/types/any_internal_test.go @@ -3,7 +3,7 @@ package types import ( "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" ) @@ -23,10 +23,8 @@ type Animal interface { Greet() string } -var ( - _ Animal = (*Dog)(nil) - _ proto.Message = (*Dog)(nil) -) +var _ Animal = (*Dog)(nil) +var _ proto.Message = (*Dog)(nil) func TestAnyPackUnpack(t *testing.T) { registry := NewInterfaceRegistry() diff --git a/codec/types/any_test.go b/codec/types/any_test.go index 5e2b29fcca22..b9ddbe72ec39 100644 --- a/codec/types/any_test.go +++ b/codec/types/any_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -28,15 +28,6 @@ var eom = &errOnMarshal{} // Ensure that returning an error doesn't suddenly allocate and waste bytes. // See https://github.com/cosmos/cosmos-sdk/issues/8537 func TestNewAnyWithCustomTypeURLWithErrorNoAllocation(t *testing.T) { - // This tests continues to fail inconsistently. - // - // Example: https://github.com/cosmos/cosmos-sdk/pull/9246/checks?check_run_id=2643313958#step:6:118 - // Ref: https://github.com/cosmos/cosmos-sdk/issues/9010 - t.SkipNow() - - // make sure we're not in the middle of a GC. - runtime.GC() - var ms1, ms2 runtime.MemStats runtime.ReadMemStats(&ms1) any, err := types.NewAnyWithValue(eom) diff --git a/codec/types/compat.go b/codec/types/compat.go index 3b669385624f..1de782849132 100644 --- a/codec/types/compat.go +++ b/codec/types/compat.go @@ -5,8 +5,8 @@ import ( "reflect" "runtime/debug" - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" amino "github.com/tendermint/go-amino" ) diff --git a/codec/types/interface_registry.go b/codec/types/interface_registry.go index b911cb6bf6e9..5d7e72e890c0 100644 --- a/codec/types/interface_registry.go +++ b/codec/types/interface_registry.go @@ -4,8 +4,9 @@ import ( "fmt" "reflect" - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + + "github.com/gogo/protobuf/proto" ) // AnyUnpacker is an interface which allows safely unpacking types packed @@ -51,9 +52,6 @@ type InterfaceRegistry interface { // ListImplementations lists the valid type URLs for the given interface name that can be used // for the provided interface type URL. ListImplementations(ifaceTypeURL string) []string - - // EnsureRegistered ensures there is a registered interface for the given concrete type. - EnsureRegistered(iface interface{}) error } // UnpackInterfacesMessage is meant to extend protobuf types (which implement @@ -83,7 +81,6 @@ type UnpackInterfacesMessage interface { type interfaceRegistry struct { interfaceNames map[string]reflect.Type interfaceImpls map[reflect.Type]interfaceMap - implInterfaces map[reflect.Type]reflect.Type typeURLMap map[string]reflect.Type } @@ -94,7 +91,6 @@ func NewInterfaceRegistry() InterfaceRegistry { return &interfaceRegistry{ interfaceNames: map[string]reflect.Type{}, interfaceImpls: map[reflect.Type]interfaceMap{}, - implInterfaces: map[reflect.Type]reflect.Type{}, typeURLMap: map[string]reflect.Type{}, } } @@ -104,26 +100,10 @@ func (registry *interfaceRegistry) RegisterInterface(protoName string, iface int if typ.Elem().Kind() != reflect.Interface { panic(fmt.Errorf("%T is not an interface type", iface)) } - registry.interfaceNames[protoName] = typ registry.RegisterImplementations(iface, impls...) } -// EnsureRegistered ensures there is a registered interface for the given concrete type. -// -// Returns an error if not, and nil if so. -func (registry *interfaceRegistry) EnsureRegistered(impl interface{}) error { - if reflect.ValueOf(impl).Kind() != reflect.Ptr { - return fmt.Errorf("%T is not a pointer", impl) - } - - if _, found := registry.implInterfaces[reflect.TypeOf(impl)]; !found { - return fmt.Errorf("%T does not have a registered interface", impl) - } - - return nil -} - // RegisterImplementations registers a concrete proto Message which implements // the given interface. // @@ -182,7 +162,7 @@ func (registry *interfaceRegistry) registerImpl(iface interface{}, typeURL strin imap[typeURL] = implType registry.typeURLMap[typeURL] = implType - registry.implInterfaces[implType] = ityp + registry.interfaceImpls[ityp] = imap } diff --git a/codec/types/types_test.go b/codec/types/types_test.go index 3ae4a951a5c5..24c83b4eb5f9 100644 --- a/codec/types/types_test.go +++ b/codec/types/types_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/codec/unknownproto/benchmarks_test.go b/codec/unknownproto/benchmarks_test.go index 4fc01a5f9f16..373dda7acfd5 100644 --- a/codec/unknownproto/benchmarks_test.go +++ b/codec/unknownproto/benchmarks_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/unknownproto" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/codec/unknownproto/unknown_fields.go b/codec/unknownproto/unknown_fields.go index e6b63bd6234d..b9db6429628b 100644 --- a/codec/unknownproto/unknown_fields.go +++ b/codec/unknownproto/unknown_fields.go @@ -10,9 +10,9 @@ import ( "strings" "sync" - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" - "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "google.golang.org/protobuf/encoding/protowire" "github.com/cosmos/cosmos-sdk/codec/types" @@ -111,7 +111,7 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals case descriptor.FieldDescriptorProto_TYPE_STRING, descriptor.FieldDescriptorProto_TYPE_BYTES: // At this point only TYPE_STRING is expected to be unregistered, since FieldDescriptorProto.IsScalar() returns false for // TYPE_BYTES and TYPE_STRING as per - // https://github.com/cosmos/gogoproto/blob/5628607bb4c51c3157aacc3a50f0ab707582b805/protoc-gen-gogo/descriptor/descriptor.go#L95-L118 + // https://github.com/gogo/protobuf/blob/5628607bb4c51c3157aacc3a50f0ab707582b805/protoc-gen-gogo/descriptor/descriptor.go#L95-L118 default: return hasUnknownNonCriticals, fmt.Errorf("failed to get typename for message of type %v, can only be TYPE_STRING or TYPE_BYTES", typ) } diff --git a/codec/unknownproto/unknown_fields_test.go b/codec/unknownproto/unknown_fields_test.go index 5a93c311b9bc..ad3926cedb55 100644 --- a/codec/unknownproto/unknown_fields_test.go +++ b/codec/unknownproto/unknown_fields_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/codec/yaml.go b/codec/yaml.go index 6861154634b6..fc8b7d3f601e 100644 --- a/codec/yaml.go +++ b/codec/yaml.go @@ -3,7 +3,7 @@ package codec import ( "encoding/json" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "gopkg.in/yaml.v2" ) diff --git a/contrib/devtools/dockerfile b/contrib/devtools/dockerfile index 3df9c7e0037e..10be41345386 100644 --- a/contrib/devtools/dockerfile +++ b/contrib/devtools/dockerfile @@ -1,36 +1,27 @@ -## To test locally: -# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" -# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh +FROM bufbuild/buf:latest as BUILDER -FROM bufbuild/buf:1.9.0 as BUILDER -FROM golang:1.19-alpine +FROM golang:alpine -RUN apk add --no-cache \ - nodejs \ - npm \ - git \ - make \ - clang-extra-tools +ENV GOLANG_PROTOBUF_VERSION=1.3.5 \ + GOGO_PROTOBUF_VERSION=1.3.2 \ + GRPC_GATEWAY_VERSION=1.14.7 -RUN npm install -g swagger-combine -ARG UNAME=protobuild -ARG UID=1000 -RUN adduser -u $UID -s /bin/sh $UNAME -D -USER $UNAME +RUN GO111MODULE=on go get \ + github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \ + github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \ + github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} \ + github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} \ + github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest -ENV GOLANG_PROTOBUF_VERSION=1.28.1 \ - GRPC_GATEWAY_VERSION=1.16.0 +RUN GO111MODULE=on go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc -RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} -RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} +RUN apk add --no-cache \ + nodejs \ + npm -# install all gogo protobuf binaries -RUN git clone https://github.com/cosmos/gogoproto.git; \ - cd gogoproto; \ - go mod download; \ - make install +RUN npm install -g swagger-combine COPY --from=BUILDER /usr/local/bin /usr/local/bin diff --git a/contrib/rosetta/README.md b/contrib/rosetta/README.md index 60c5059c1e28..f408729581da 100644 --- a/contrib/rosetta/README.md +++ b/contrib/rosetta/README.md @@ -6,16 +6,16 @@ This directory contains the files required to run the rosetta CI. It builds `sim Builds: -* cosmos-sdk simapp node, with prefixed data directory, keys etc. This is required to test historical balances. -* faucet is required so we can test construction API, it was literally impossible to put there a deterministic address to request funds for -* rosetta is the rosetta node used by rosetta-cli to interact with the cosmos-sdk app -* test_rosetta runs the rosetta-cli test against construction API and data API +- cosmos-sdk simapp node, with prefixed data directory, keys etc. This is required to test historical balances. +- faucet is required so we can test construction API, it was literally impossible to put there a deterministic address to request funds for +- rosetta is the rosetta node used by rosetta-cli to interact with the cosmos-sdk app +- test_rosetta runs the rosetta-cli test against construction API and data API ## configuration Contains the required files to set up rosetta cli and make it work against its workflows -## Rosetta-ci +## node Contains the files for a deterministic network, with fixed keys and some actions on there, to test parsing of msgs and historical balances. This image is used to run a simapp node and to run the rosetta server. @@ -25,5 +25,5 @@ The docker image for ./rosetta-cli/Dockerfile is on [docker hub](https://hub.doc ## Notes -* Keyring password is 12345678 -* data.sh creates node data, it's required in case consensus breaking changes are made to quickly recreate replicable node data for rosetta +- Keyring password is 12345678 +- data.sh creates node data, it's required in case consensus breaking changes are made to quickly recreate replicable node data for rosetta diff --git a/contrib/rosetta/configuration/bootstrap.json b/contrib/rosetta/configuration/bootstrap.json index ddf504179711..e014a1043261 100644 --- a/contrib/rosetta/configuration/bootstrap.json +++ b/contrib/rosetta/configuration/bootstrap.json @@ -1,7 +1,7 @@ [ { "account_identifier": { - "address":"cosmos1f3d3s7jjy5zune554w7fnhrhyuxhll7s7rps0h" + "address":"cosmos1kezmr2chzy7w00nhh7qxhpqphdwum3j0mgdaw0" }, "currency":{ "symbol":"stake", diff --git a/contrib/rosetta/docker-compose.yaml b/contrib/rosetta/docker-compose.yaml index ba593f0f3f7c..fabb36b0aa6c 100644 --- a/contrib/rosetta/docker-compose.yaml +++ b/contrib/rosetta/docker-compose.yaml @@ -3,17 +3,7 @@ version: "3" services: cosmos: image: rosetta-ci:latest - command: - [ - "simd", - "start", - "--pruning", - "nothing", - "--grpc-web.enable", - "true", - "--grpc-web.address", - "0.0.0.0:9091" - ] + command: ["simd", "start", "--pruning", "nothing", "--grpc-web.enable", "true", "--grpc-web.address", "0.0.0.0:9091"] ports: - 9090:9090 - 26657:26657 @@ -22,21 +12,15 @@ services: rosetta: image: rosetta-ci:latest - command: - [ - "simd", - "rosetta", - "--blockchain", - "app", - "--network", - "network", - "--tendermint", - "cosmos:26657", - "--grpc", - "cosmos:9090", - "--addr", - ":8080" - ] + command: [ + "simd", + "rosetta", + "--blockchain", "app", + "--network", "network", + "--tendermint", "cosmos:26657", + "--grpc", "cosmos:9090", + "--addr", ":8080", + ] ports: - 8080:8080 diff --git a/contrib/rosetta/node/Dockerfile b/contrib/rosetta/node/Dockerfile index 31458884ce01..0887f522f656 100644 --- a/contrib/rosetta/node/Dockerfile +++ b/contrib/rosetta/node/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18-alpine as build +FROM golang:1.15-alpine as build RUN apk add --no-cache tar @@ -29,3 +29,4 @@ COPY --from=build /node/root /root/ WORKDIR /root/.simapp RUN chmod -R 0777 ./ + diff --git a/contrib/rosetta/node/data.tar.gz b/contrib/rosetta/node/data.tar.gz index 851620836dc7..6ee2f76f449b 100644 Binary files a/contrib/rosetta/node/data.tar.gz and b/contrib/rosetta/node/data.tar.gz differ diff --git a/contrib/rosetta/rosetta-ci/Dockerfile b/contrib/rosetta/rosetta-ci/Dockerfile deleted file mode 100644 index d4cfc58528e9..000000000000 --- a/contrib/rosetta/rosetta-ci/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM golang:1.18-alpine as build - -RUN apk add --no-cache tar git - -# prepare node data -WORKDIR /node -COPY ./contrib/rosetta/rosetta-ci/data.tar.gz data.tar.gz -RUN tar -zxvf data.tar.gz -C . - -# build simd -WORKDIR /simd -COPY . ./ -RUN go build -o simd ./simapp/simd/ - -FROM alpine -RUN apk add gcc git libc-dev python3 --no-cache - -ENV PATH=$PATH:/bin - -COPY --from=build /simd/simd /bin/simd - -WORKDIR /rosetta -COPY ./contrib/rosetta/configuration ./ -RUN chmod +x run_tests.sh -RUN chmod +x send_funds.sh -RUN chmod +x faucet.py - -COPY --from=build /node/root /root/ -WORKDIR /root/.simapp - -RUN chmod -R 0777 ./ diff --git a/contrib/rosetta/rosetta-ci/data.tar.gz b/contrib/rosetta/rosetta-ci/data.tar.gz deleted file mode 100644 index 7ed311434592..000000000000 Binary files a/contrib/rosetta/rosetta-ci/data.tar.gz and /dev/null differ diff --git a/contrib/rosetta/rosetta-cli/Dockerfile b/contrib/rosetta/rosetta-cli/Dockerfile index da6ef2879239..f67070f6c42d 100644 --- a/contrib/rosetta/rosetta-cli/Dockerfile +++ b/contrib/rosetta/rosetta-cli/Dockerfile @@ -1,8 +1,8 @@ -FROM golang:1.18-alpine as build +FROM golang:1.15-alpine as build RUN apk add git gcc libc-dev --no-cache -ARG ROSETTA_VERSION="v0.7.3" +ARG ROSETTA_VERSION="v0.6.7" # build rosetta CLI WORKDIR /rosetta diff --git a/crypto/keys/ed25519/keys.pb.go b/crypto/keys/ed25519/keys.pb.go index 1280647df3ec..efa5997de6be 100644 --- a/crypto/keys/ed25519/keys.pb.go +++ b/crypto/keys/ed25519/keys.pb.go @@ -7,8 +7,8 @@ import ( crypto_ed25519 "crypto/ed25519" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/crypto/keys/multisig/keys.pb.go b/crypto/keys/multisig/keys.pb.go index bdb18effb4c9..529691f7526e 100644 --- a/crypto/keys/multisig/keys.pb.go +++ b/crypto/keys/multisig/keys.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index 2d4f99a07260..8fb93d3524c4 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -345,14 +345,15 @@ func reorderPubKey(pk *kmultisig.LegacyAminoPubKey) (other *kmultisig.LegacyAmin func TestDisplay(t *testing.T) { require := require.New(t) pubKeys := generatePubKeys(3) - msig := kmultisig.NewLegacyAminoPubKey(2, pubKeys) - require.NotEmpty(msig.String()) + // LegacyAminoPubKey wraps PubKeys into Amino (for serialization) and Any String method doesn't work. + require.PanicsWithValue("reflect.Value.Interface: cannot return value obtained from unexported field or method", + func() { require.Empty(msig.String()) }, + ) ccfg := simapp.MakeTestEncodingConfig() bz, err := ccfg.Marshaler.MarshalInterfaceJSON(msig) require.NoError(err) - expectedPrefix := `{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey"` require.True(strings.HasPrefix(string(bz), expectedPrefix)) // Example output: diff --git a/crypto/keys/secp256k1/keys.pb.go b/crypto/keys/secp256k1/keys.pb.go index 24ab774e36d4..a00ae7d2f35a 100644 --- a/crypto/keys/secp256k1/keys.pb.go +++ b/crypto/keys/secp256k1/keys.pb.go @@ -6,8 +6,8 @@ package secp256k1 import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/crypto/keys/secp256r1/keys.pb.go b/crypto/keys/secp256r1/keys.pb.go index 7bfb79ff77d4..898f19a123cf 100644 --- a/crypto/keys/secp256r1/keys.pb.go +++ b/crypto/keys/secp256r1/keys.pb.go @@ -5,8 +5,8 @@ package secp256r1 import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/crypto/keys/secp256r1/privkey_internal_test.go b/crypto/keys/secp256r1/privkey_internal_test.go index a44c484e4bfe..74ad9ec1ac75 100644 --- a/crypto/keys/secp256r1/privkey_internal_test.go +++ b/crypto/keys/secp256r1/privkey_internal_test.go @@ -3,7 +3,7 @@ package secp256r1 import ( "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/tendermint/tendermint/crypto" diff --git a/crypto/keys/secp256r1/pubkey.go b/crypto/keys/secp256r1/pubkey.go index 86d4fa685381..d462deff89c2 100644 --- a/crypto/keys/secp256r1/pubkey.go +++ b/crypto/keys/secp256r1/pubkey.go @@ -1,7 +1,7 @@ package secp256r1 import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" tmcrypto "github.com/tendermint/tendermint/crypto" ecdsa "github.com/cosmos/cosmos-sdk/crypto/keys/internal/ecdsa" diff --git a/crypto/keys/secp256r1/pubkey_internal_test.go b/crypto/keys/secp256r1/pubkey_internal_test.go index eecbbb24d7da..3df25ebedf0e 100644 --- a/crypto/keys/secp256r1/pubkey_internal_test.go +++ b/crypto/keys/secp256r1/pubkey_internal_test.go @@ -3,7 +3,7 @@ package secp256r1 import ( "testing" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" @@ -79,15 +79,11 @@ func (suite *PKSuite) TestMarshalProto() { /**** test structure marshalling with codec ****/ pk = PubKey{} - emptyRegistry := types.NewInterfaceRegistry() - emptyCodec := codec.NewProtoCodec(emptyRegistry) registry := types.NewInterfaceRegistry() - RegisterInterfaces(registry) - pubkeyCodec := codec.NewProtoCodec(registry) - - bz, err = emptyCodec.Marshal(suite.pk) + cdc := codec.NewProtoCodec(registry) + bz, err = cdc.Marshal(suite.pk) require.NoError(err) - require.NoError(emptyCodec.Unmarshal(bz, &pk)) + require.NoError(cdc.Unmarshal(bz, &pk)) require.True(pk.Equals(suite.pk)) const bufSize = 100 @@ -105,17 +101,18 @@ func (suite *PKSuite) TestMarshalProto() { require.Equal(bz, bz2[(bufSize-pk.Size()):]) /**** test interface marshalling ****/ - bz, err = pubkeyCodec.MarshalInterface(suite.pk) + bz, err = cdc.MarshalInterface(suite.pk) require.NoError(err) var pkI cryptotypes.PubKey - err = emptyCodec.UnmarshalInterface(bz, &pkI) + err = cdc.UnmarshalInterface(bz, &pkI) require.EqualError(err, "no registered implementations of type types.PubKey") - RegisterInterfaces(emptyRegistry) - require.NoError(emptyCodec.UnmarshalInterface(bz, &pkI)) + RegisterInterfaces(registry) + require.NoError(cdc.UnmarshalInterface(bz, &pkI)) require.True(pkI.Equals(suite.pk)) - require.Error(emptyCodec.UnmarshalInterface(bz, nil), "nil should fail") + cdc.UnmarshalInterface(bz, nil) + require.Error(err, "nil should fail") } func (suite *PKSuite) TestSize() { diff --git a/crypto/types/multisig.pb.go b/crypto/types/multisig.pb.go index a5b750a17fbc..b9c907ade0a4 100644 --- a/crypto/types/multisig.pb.go +++ b/crypto/types/multisig.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/crypto/types/types.go b/crypto/types/types.go index 0f86a592082a..eccdba73813d 100644 --- a/crypto/types/types.go +++ b/crypto/types/types.go @@ -1,7 +1,7 @@ package types import ( - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" tmcrypto "github.com/tendermint/tendermint/crypto" ) diff --git a/docs/architecture/adr-019-protobuf-state-encoding.md b/docs/architecture/adr-019-protobuf-state-encoding.md index 8f8410be0010..cddf7092fb98 100644 --- a/docs/architecture/adr-019-protobuf-state-encoding.md +++ b/docs/architecture/adr-019-protobuf-state-encoding.md @@ -82,7 +82,7 @@ are encoded and persisted via their concrete Amino codec to Protobuf and have th `Marshaler` that will be a `ProtoCodec`. This migration is simple as things will just work as-is. Note, any business logic that needs to encode primitive types like `bool` or `int64` should use -[gogoprotobuf](https://github.com/cosmos/gogoproto) Value types. +[gogoprotobuf](https://github.com/gogo/protobuf) Value types. Example: @@ -149,8 +149,8 @@ and client developer UX. ### Safe usage of `Any` -By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/cosmos/gogoproto/types) -uses [global type registration]( https://github.com/cosmos/gogoproto/blob/master/proto/properties.go#L540) +By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/gogo/protobuf/types) +uses [global type registration]( https://github.com/gogo/protobuf/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete go types. This introduces a vulnerability where any malicious module in the dependency tree could registry a type with the global protobuf registry diff --git a/docs/architecture/adr-021-protobuf-query-encoding.md b/docs/architecture/adr-021-protobuf-query-encoding.md index e0c368de1f56..60830de3ce16 100644 --- a/docs/architecture/adr-021-protobuf-query-encoding.md +++ b/docs/architecture/adr-021-protobuf-query-encoding.md @@ -71,7 +71,7 @@ message AnyProposal { ### Custom Query Implementation -In order to implement the query service, we can reuse the existing [gogo protobuf](https://github.com/cosmos/gogoproto) +In order to implement the query service, we can reuse the existing [gogo protobuf](https://github.com/gogo/protobuf) grpc plugin, which for a service named `Query` generates an interface named `QueryServer` as below: @@ -204,7 +204,7 @@ type QueryClient interface { } ``` -Via a small patch to gogo protobuf ([gogo/protobuf#675](https://github.com/cosmos/gogoproto/pull/675)) +Via a small patch to gogo protobuf ([gogo/protobuf#675](https://github.com/gogo/protobuf/pull/675)) we have tweaked the grpc codegen to use an interface rather than concrete type for the generated client struct. This allows us to also reuse the GRPC infrastructure for ABCI client queries. diff --git a/docs/architecture/adr-027-deterministic-protobuf-serialization.md b/docs/architecture/adr-027-deterministic-protobuf-serialization.md index c1fecede9bcb..ab303e8d007a 100644 --- a/docs/architecture/adr-027-deterministic-protobuf-serialization.md +++ b/docs/architecture/adr-027-deterministic-protobuf-serialization.md @@ -127,7 +127,7 @@ There are three main implementation strategies, ordered from the least to the most custom development: - **Use a protobuf serializer that follows the above rules by default.** E.g. - [gogoproto](https://pkg.go.dev/github.com/cosmos/gogoproto/gogoproto) is known to + [gogoproto](https://pkg.go.dev/github.com/gogo/protobuf/gogoproto) is known to be compliant by in most cases, but not when certain annotations such as `nullable = false` are used. It might also be an option to configure an existing serializer accordingly. diff --git a/docs/basics/app-anatomy.md b/docs/basics/app-anatomy.md index 838c7d4f8286..0373d24aafa5 100644 --- a/docs/basics/app-anatomy.md +++ b/docs/basics/app-anatomy.md @@ -115,7 +115,7 @@ Here are descriptions of what each of the four fields means: - `InterfaceRegistry`: The `InterfaceRegistry` is used by the Protobuf codec to handle interfaces that are encoded and decoded (we also say "unpacked") using [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). `Any` could be thought as a struct that contains a `type_url` (name of a concrete type implementing the interface) and a `value` (its encoded bytes). `InterfaceRegistry` provides a mechanism for registering interfaces and implementations that can be safely unpacked from `Any`. Each of the application's modules implements the `RegisterInterfaces` method that can be used to register the module's own interfaces and implementations. - You can read more about Any in [ADR-19](../architecture/adr-019-protobuf-state-encoding.md#usage-of-any-to-encode-interfaces). - - To go more into details, the SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/cosmos/gogoproto). By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/cosmos/gogoproto/types) uses [global type registration](https://github.com/cosmos/gogoproto/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could registry a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). + - To go more into details, the SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/gogo/protobuf). By default, the [gogo protobuf implementation of `Any`](https://godoc.org/github.com/gogo/protobuf/types) uses [global type registration](https://github.com/gogo/protobuf/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could registry a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../architecture/adr-019-protobuf-state-encoding.md). - `Marshaler`: the default codec used throughout the SDK. It is composed of a `BinaryCodec` used to encode and decode state, and a `JSONCodec` used to output data to the users (for example in the [CLI](#cli)). By default, the SDK uses Protobuf as `Marshaler`. - `TxConfig`: `TxConfig` defines an interface a client can utilize to generate an application-defined concrete transaction type. Currently, the SDK handles two transaction types: `SIGN_MODE_DIRECT` (which uses Protobuf binary as over-the-wire encoding) and `SIGN_MODE_LEGACY_AMINO_JSON` (which depends on Amino). Read more about transactions [here](../core/transactions.md). - `Amino`: Some legacy parts of the SDK still use Amino for backwards-compatibility. Each module exposes a `RegisterLegacyAmino` method to register the module's specific types within Amino. This `Amino` codec should not be used by app developers anymore, and will be removed in future releases. diff --git a/docs/core/encoding.md b/docs/core/encoding.md index d817fee3fc79..2565e579ebd0 100644 --- a/docs/core/encoding.md +++ b/docs/core/encoding.md @@ -18,7 +18,7 @@ for more information on Proto3, which Amino is largely compatible with (but not Due to Amino having significant performance drawbacks, being reflection-based, and not having any meaningful cross-language/client support, Protocol Buffers, specifically -[gogoprotobuf](https://github.com/cosmos/gogoproto/), is being used in place of Amino. +[gogoprotobuf](https://github.com/gogo/protobuf/), is being used in place of Amino. Note, this process of using Protocol Buffers over Amino is still an ongoing process. Binary wire encoding of types in the Cosmos SDK can be broken down into two main @@ -87,7 +87,7 @@ which is required when signing this kind of messages using a Ledger. ### Gogoproto -Modules are encouraged to utilize Protobuf encoding for their respective types. In the SDK, we use the [Gogoproto](https://github.com/cosmos/gogoproto) specific implementation of the Protobuf spec that offers speed and DX improvements compared to the official [Google protobuf implementation](https://github.com/protocolbuffers/protobuf). +Modules are encouraged to utilize Protobuf encoding for their respective types. In the SDK, we use the [Gogoproto](https://github.com/gogo/protobuf) specific implementation of the Protobuf spec that offers speed and DX improvements compared to the official [Google protobuf implementation](https://github.com/protocolbuffers/protobuf). ### Guidelines for protobuf message definitions diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 3ed638c9796c..29fe0d64e4e0 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -4,6 +4,13 @@ ## Table of Contents +- [amino/amino.proto](#amino/amino.proto) + - [File-level Extensions](#amino/amino.proto-extensions) + - [File-level Extensions](#amino/amino.proto-extensions) + - [File-level Extensions](#amino/amino.proto-extensions) + - [File-level Extensions](#amino/amino.proto-extensions) + - [File-level Extensions](#amino/amino.proto-extensions) + - [cosmos/auth/v1beta1/auth.proto](#cosmos/auth/v1beta1/auth.proto) - [BaseAccount](#cosmos.auth.v1beta1.BaseAccount) - [ModuleAccount](#cosmos.auth.v1beta1.ModuleAccount) @@ -31,6 +38,7 @@ - [cosmos/authz/v1beta1/authz.proto](#cosmos/authz/v1beta1/authz.proto) - [GenericAuthorization](#cosmos.authz.v1beta1.GenericAuthorization) - [Grant](#cosmos.authz.v1beta1.Grant) + - [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) - [cosmos/authz/v1beta1/event.proto](#cosmos/authz/v1beta1/event.proto) - [EventGrant](#cosmos.authz.v1beta1.EventGrant) @@ -38,26 +46,17 @@ - [cosmos/authz/v1beta1/genesis.proto](#cosmos/authz/v1beta1/genesis.proto) - [GenesisState](#cosmos.authz.v1beta1.GenesisState) - - [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) - [cosmos/authz/v1beta1/query.proto](#cosmos/authz/v1beta1/query.proto) + - [QueryGranteeGrantsRequest](#cosmos.authz.v1beta1.QueryGranteeGrantsRequest) + - [QueryGranteeGrantsResponse](#cosmos.authz.v1beta1.QueryGranteeGrantsResponse) + - [QueryGranterGrantsRequest](#cosmos.authz.v1beta1.QueryGranterGrantsRequest) + - [QueryGranterGrantsResponse](#cosmos.authz.v1beta1.QueryGranterGrantsResponse) - [QueryGrantsRequest](#cosmos.authz.v1beta1.QueryGrantsRequest) - [QueryGrantsResponse](#cosmos.authz.v1beta1.QueryGrantsResponse) - [Query](#cosmos.authz.v1beta1.Query) -- [cosmos/base/abci/v1beta1/abci.proto](#cosmos/base/abci/v1beta1/abci.proto) - - [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) - - [Attribute](#cosmos.base.abci.v1beta1.Attribute) - - [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) - - [MsgData](#cosmos.base.abci.v1beta1.MsgData) - - [Result](#cosmos.base.abci.v1beta1.Result) - - [SearchTxsResult](#cosmos.base.abci.v1beta1.SearchTxsResult) - - [SimulationResponse](#cosmos.base.abci.v1beta1.SimulationResponse) - - [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) - - [TxMsgData](#cosmos.base.abci.v1beta1.TxMsgData) - - [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) - - [cosmos/authz/v1beta1/tx.proto](#cosmos/authz/v1beta1/tx.proto) - [MsgExec](#cosmos.authz.v1beta1.MsgExec) - [MsgExecResponse](#cosmos.authz.v1beta1.MsgExecResponse) @@ -123,10 +122,28 @@ - [Msg](#cosmos.bank.v1beta1.Msg) +- [cosmos/base/abci/v1beta1/abci.proto](#cosmos/base/abci/v1beta1/abci.proto) + - [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) + - [Attribute](#cosmos.base.abci.v1beta1.Attribute) + - [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) + - [MsgData](#cosmos.base.abci.v1beta1.MsgData) + - [Result](#cosmos.base.abci.v1beta1.Result) + - [SearchTxsResult](#cosmos.base.abci.v1beta1.SearchTxsResult) + - [SimulationResponse](#cosmos.base.abci.v1beta1.SimulationResponse) + - [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) + - [TxMsgData](#cosmos.base.abci.v1beta1.TxMsgData) + - [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) + - [cosmos/base/kv/v1beta1/kv.proto](#cosmos/base/kv/v1beta1/kv.proto) - [Pair](#cosmos.base.kv.v1beta1.Pair) - [Pairs](#cosmos.base.kv.v1beta1.Pairs) +- [cosmos/base/node/v1beta1/query.proto](#cosmos/base/node/v1beta1/query.proto) + - [ConfigRequest](#cosmos.base.node.v1beta1.ConfigRequest) + - [ConfigResponse](#cosmos.base.node.v1beta1.ConfigResponse) + + - [Service](#cosmos.base.node.v1beta1.Service) + - [cosmos/base/reflection/v1beta1/reflection.proto](#cosmos/base/reflection/v1beta1/reflection.proto) - [ListAllInterfacesRequest](#cosmos.base.reflection.v1beta1.ListAllInterfacesRequest) - [ListAllInterfacesResponse](#cosmos.base.reflection.v1beta1.ListAllInterfacesResponse) @@ -605,6 +622,56 @@ + +

Top

+ +## amino/amino.proto + + + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| `dont_omitempty` | bool | .google.protobuf.FieldOptions | 11110005 | dont_omitempty sets the field in the JSON object even if its value is empty, i.e. equal to the Golang zero value. To learn what the zero values are, see https://go.dev/ref/spec#The_zero_value. + +Fields default to `omitempty`, which is the default behavior when this annotation is unset. When set to true, then the field value in the JSON object will be set, i.e. not `undefined`. + +Example: + +message Foo { string bar = 1; string baz = 2 [(amino.dont_omitempty) = true]; } + +f := Foo{}; out := AminoJSONEncoder(&f); out == {"baz":""} | +| `encoding` | string | .google.protobuf.FieldOptions | 11110003 | encoding describes the encoding format used by Amino for the given field. The field type is chosen to be a string for flexibility, but it should ideally be short and expected to be machine-readable, for example "base64" or "utf8_json". We highly recommend to use underscores for word separation instead of spaces. + +If left empty, then the Amino encoding is expected to be the same as the Protobuf one. + +This annotation should not be confused with the `message_encoding` one which operates on the message level. | +| `field_name` | string | .google.protobuf.FieldOptions | 11110004 | field_name sets a different field name (i.e. key name) in the amino JSON object for the given field. + +Example: + +message Foo { string bar = 1 [(amino.field_name) = "baz"]; } + +Then the Amino encoding of Foo will be: `{"baz":"some value"}` | +| `message_encoding` | string | .google.protobuf.MessageOptions | 11110002 | encoding describes the encoding format used by Amino for the given message. The field type is chosen to be a string for flexibility, but it should ideally be short and expected to be machine-readable, for example "base64" or "utf8_json". We highly recommend to use underscores for word separation instead of spaces. + +If left empty, then the Amino encoding is expected to be the same as the Protobuf one. + +This annotation should not be confused with the `encoding` one which operates on the field level. | +| `name` | string | .google.protobuf.MessageOptions | 11110001 | name is the string used when registering a concrete type into the Amino type registry, via the Amino codec's `RegisterConcrete()` method. This string MUST be at most 39 characters long, or else the message will be rejected by the Ledger hardware device. | + + + + + + +

Top

@@ -959,6 +1026,25 @@ the provide method with expiration time. + + + +### GrantAuthorization +GrantAuthorization extends a grant with both the addresses of the grantee and granter. +It is used in genesis.proto and query.proto + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + @@ -1040,39 +1126,85 @@ GenesisState defines the authz module's genesis state. + - + -### GrantAuthorization -GrantAuthorization defines the GenesisState/GrantAuthorization type. + + + + + + + +

Top

+ +## cosmos/authz/v1beta1/query.proto +Since: cosmos-sdk 0.43 + + + + +### QueryGranteeGrantsRequest +QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | | `grantee` | [string](#string) | | | -| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - - + - +### QueryGranteeGrantsResponse +QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. - + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `grants` | [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) | repeated | grants is a list of grants granted to the grantee. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | + + + + + + + + +### QueryGranterGrantsRequest +QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | + + + + + + + + +### QueryGranterGrantsResponse +QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `grants` | [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) | repeated | grants is a list of grants granted by the granter. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - -

Top

-## cosmos/authz/v1beta1/query.proto -Since: cosmos-sdk 0.43 @@ -1123,355 +1255,157 @@ Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `Grants` | [QueryGrantsRequest](#cosmos.authz.v1beta1.QueryGrantsRequest) | [QueryGrantsResponse](#cosmos.authz.v1beta1.QueryGrantsResponse) | Returns list of `Authorization`, granted to the grantee by the granter. | GET|/cosmos/authz/v1beta1/grants| +| `GranterGrants` | [QueryGranterGrantsRequest](#cosmos.authz.v1beta1.QueryGranterGrantsRequest) | [QueryGranterGrantsResponse](#cosmos.authz.v1beta1.QueryGranterGrantsResponse) | GranterGrants returns list of `Authorization`, granted by granter. | GET|/cosmos/authz/v1beta1/grants/granter/{granter}| +| `GranteeGrants` | [QueryGranteeGrantsRequest](#cosmos.authz.v1beta1.QueryGranteeGrantsRequest) | [QueryGranteeGrantsResponse](#cosmos.authz.v1beta1.QueryGranteeGrantsResponse) | GranteeGrants returns a list of `GrantAuthorization` by grantee. | GET|/cosmos/authz/v1beta1/grants/grantee/{grantee}| - +

Top

-## cosmos/base/abci/v1beta1/abci.proto - +## cosmos/authz/v1beta1/tx.proto +Since: cosmos-sdk 0.43 - + -### ABCIMessageLog -ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +### MsgExec +MsgExec attempts to execute the provided messages using +authorizations granted to the grantee. Each message should have only +one signer corresponding to the granter of the authorization. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_index` | [uint32](#uint32) | | | -| `log` | [string](#string) | | | -| `events` | [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) | repeated | Events contains a slice of Event objects that were emitted during some execution. | +| `grantee` | [string](#string) | | | +| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | Authorization Msg requests to execute. Each msg must implement Authorization interface The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. | - + -### Attribute -Attribute defines an attribute wrapper where the key and value are -strings instead of raw bytes. +### MsgExecResponse +MsgExecResponse defines the Msg/MsgExecResponse response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [string](#string) | | | -| `value` | [string](#string) | | | +| `results` | [bytes](#bytes) | repeated | | - + -### GasInfo -GasInfo defines tx execution gas context. +### MsgGrant +MsgGrant is a request type for Grant method. It declares authorization to the grantee +on behalf of the granter with the provided expiration time. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `gas_wanted` | [uint64](#uint64) | | GasWanted is the maximum units of work we allow this tx to perform. | -| `gas_used` | [uint64](#uint64) | | GasUsed is the amount of gas actually consumed. | - - +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `grant` | [Grant](#cosmos.authz.v1beta1.Grant) | | | - -### MsgData -MsgData defines the data returned in a Result object during message -execution. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `msg_type` | [string](#string) | | | -| `data` | [bytes](#bytes) | | | +### MsgGrantResponse +MsgGrantResponse defines the Msg/MsgGrant response type. - + -### Result -Result is the union of ResponseFormat and ResponseCheckTx. +### MsgRevoke +MsgRevoke revokes any authorization with the provided sdk.Msg type on the +granter's account with that has been granted to the grantee. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `data` | [bytes](#bytes) | | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. | -| `log` | [string](#string) | | Log contains the log information from message or handler execution. | -| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events contains a slice of Event objects that were emitted during message or handler execution. | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `msg_type_url` | [string](#string) | | | - + -### SearchTxsResult -SearchTxsResult defines a structure for querying txs pageable +### MsgRevokeResponse +MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `total_count` | [uint64](#uint64) | | Count of all txs | -| `count` | [uint64](#uint64) | | Count of txs in current page | -| `page_number` | [uint64](#uint64) | | Index of current page, start from 1 | -| `page_total` | [uint64](#uint64) | | Count of total pages | -| `limit` | [uint64](#uint64) | | Max count txs per page | -| `txs` | [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | List of txs in current page | + + + + - + -### SimulationResponse -SimulationResponse defines the response generated when a transaction is -successfully simulated. +### Msg +Msg defines the authz Msg service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Grant` | [MsgGrant](#cosmos.authz.v1beta1.MsgGrant) | [MsgGrantResponse](#cosmos.authz.v1beta1.MsgGrantResponse) | Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. | | +| `Exec` | [MsgExec](#cosmos.authz.v1beta1.MsgExec) | [MsgExecResponse](#cosmos.authz.v1beta1.MsgExecResponse) | Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. | | +| `Revoke` | [MsgRevoke](#cosmos.authz.v1beta1.MsgRevoke) | [MsgRevokeResponse](#cosmos.authz.v1beta1.MsgRevokeResponse) | Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `gas_info` | [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | | -| `result` | [Result](#cosmos.base.abci.v1beta1.Result) | | | + + +

Top

+## cosmos/base/v1beta1/coin.proto - -### StringEvent -StringEvent defines en Event object wrapper where all the attributes -contain key/value pairs that are strings instead of raw bytes. + + +### Coin +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `type` | [string](#string) | | | -| `attributes` | [Attribute](#cosmos.base.abci.v1beta1.Attribute) | repeated | | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | - - -### TxMsgData -TxMsgData defines a list of MsgData. A transaction will have a MsgData object -for each message. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `data` | [MsgData](#cosmos.base.abci.v1beta1.MsgData) | repeated | | - - - - - - - - -### TxResponse -TxResponse defines a structure containing relevant tx data and metadata. The -tags are stringified and the log is JSON decoded. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | The block height | -| `txhash` | [string](#string) | | The transaction hash. | -| `codespace` | [string](#string) | | Namespace for the Code | -| `code` | [uint32](#uint32) | | Response code. | -| `data` | [string](#string) | | Result bytes, if any. | -| `raw_log` | [string](#string) | | The output of the application's logger (raw string). May be non-deterministic. | -| `logs` | [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) | repeated | The output of the application's logger (typed). May be non-deterministic. | -| `info` | [string](#string) | | Additional information. May be non-deterministic. | -| `gas_wanted` | [int64](#int64) | | Amount of gas requested for transaction. | -| `gas_used` | [int64](#int64) | | Amount of gas consumed by transaction. | -| `tx` | [google.protobuf.Any](#google.protobuf.Any) | | The request transaction bytes. | -| `timestamp` | [string](#string) | | Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. | -| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante handler. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. - -Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 | - - - - - - - - - - - - - - - - -

Top

- -## cosmos/authz/v1beta1/tx.proto -Since: cosmos-sdk 0.43 - - - - -### MsgExec -MsgExec attempts to execute the provided messages using -authorizations granted to the grantee. Each message should have only -one signer corresponding to the granter of the authorization. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `grantee` | [string](#string) | | | -| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | Authorization Msg requests to execute. Each msg must implement Authorization interface The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. | - - - - - - - - -### MsgExecResponse -MsgExecResponse defines the Msg/MsgExecResponse response type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `results` | [bytes](#bytes) | repeated | | - - - - - - - - -### MsgGrant -MsgGrant is a request type for Grant method. It declares authorization to the grantee -on behalf of the granter with the provided expiration time. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | -| `grant` | [Grant](#cosmos.authz.v1beta1.Grant) | | | - - - - - - - - -### MsgGrantResponse -MsgGrantResponse defines the Msg/MsgGrant response type. - - - - - - - - -### MsgRevoke -MsgRevoke revokes any authorization with the provided sdk.Msg type on the -granter's account with that has been granted to the grantee. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | -| `msg_type_url` | [string](#string) | | | - - - - - - - - -### MsgRevokeResponse -MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. - - - - - - - - - - - - - - -### Msg -Msg defines the authz Msg service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Grant` | [MsgGrant](#cosmos.authz.v1beta1.MsgGrant) | [MsgGrantResponse](#cosmos.authz.v1beta1.MsgGrantResponse) | Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. | | -| `Exec` | [MsgExec](#cosmos.authz.v1beta1.MsgExec) | [MsgExecResponse](#cosmos.authz.v1beta1.MsgExecResponse) | Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. | | -| `Revoke` | [MsgRevoke](#cosmos.authz.v1beta1.MsgRevoke) | [MsgRevokeResponse](#cosmos.authz.v1beta1.MsgRevokeResponse) | Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. | | - - - - - - -

Top

- -## cosmos/base/v1beta1/coin.proto - - - - - -### Coin -Coin defines a token with a denomination and an amount. - -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - + ### DecCoin DecCoin defines a token with a denomination and a decimal amount. @@ -2204,6 +2138,206 @@ Msg defines the bank Msg service. + +

Top

+ +## cosmos/base/abci/v1beta1/abci.proto + + + + + +### ABCIMessageLog +ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_index` | [uint32](#uint32) | | | +| `log` | [string](#string) | | | +| `events` | [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) | repeated | Events contains a slice of Event objects that were emitted during some execution. | + + + + + + + + +### Attribute +Attribute defines an attribute wrapper where the key and value are +strings instead of raw bytes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [string](#string) | | | +| `value` | [string](#string) | | | + + + + + + + + +### GasInfo +GasInfo defines tx execution gas context. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `gas_wanted` | [uint64](#uint64) | | GasWanted is the maximum units of work we allow this tx to perform. | +| `gas_used` | [uint64](#uint64) | | GasUsed is the amount of gas actually consumed. | + + + + + + + + +### MsgData +MsgData defines the data returned in a Result object during message +execution. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_type` | [string](#string) | | | +| `data` | [bytes](#bytes) | | | + + + + + + + + +### Result +Result is the union of ResponseFormat and ResponseCheckTx. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. | +| `log` | [string](#string) | | Log contains the log information from message or handler execution. | +| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events contains a slice of Event objects that were emitted during message or handler execution. | + + + + + + + + +### SearchTxsResult +SearchTxsResult defines a structure for querying txs pageable + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `total_count` | [uint64](#uint64) | | Count of all txs | +| `count` | [uint64](#uint64) | | Count of txs in current page | +| `page_number` | [uint64](#uint64) | | Index of current page, start from 1 | +| `page_total` | [uint64](#uint64) | | Count of total pages | +| `limit` | [uint64](#uint64) | | Max count txs per page | +| `txs` | [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | List of txs in current page | + + + + + + + + +### SimulationResponse +SimulationResponse defines the response generated when a transaction is +successfully simulated. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `gas_info` | [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | | +| `result` | [Result](#cosmos.base.abci.v1beta1.Result) | | | + + + + + + + + +### StringEvent +StringEvent defines en Event object wrapper where all the attributes +contain key/value pairs that are strings instead of raw bytes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `type` | [string](#string) | | | +| `attributes` | [Attribute](#cosmos.base.abci.v1beta1.Attribute) | repeated | | + + + + + + + + +### TxMsgData +TxMsgData defines a list of MsgData. A transaction will have a MsgData object +for each message. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [MsgData](#cosmos.base.abci.v1beta1.MsgData) | repeated | | + + + + + + + + +### TxResponse +TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `height` | [int64](#int64) | | The block height | +| `txhash` | [string](#string) | | The transaction hash. | +| `codespace` | [string](#string) | | Namespace for the Code | +| `code` | [uint32](#uint32) | | Response code. | +| `data` | [string](#string) | | Result bytes, if any. | +| `raw_log` | [string](#string) | | The output of the application's logger (raw string). May be non-deterministic. | +| `logs` | [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) | repeated | The output of the application's logger (typed). May be non-deterministic. | +| `info` | [string](#string) | | Additional information. May be non-deterministic. | +| `gas_wanted` | [int64](#int64) | | Amount of gas requested for transaction. | +| `gas_used` | [int64](#int64) | | Amount of gas consumed by transaction. | +| `tx` | [google.protobuf.Any](#google.protobuf.Any) | | The request transaction bytes. | +| `timestamp` | [string](#string) | | Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. | +| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante handler. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. + +Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 | + + + + + + + + + + + + + + +

Top

@@ -2251,6 +2385,57 @@ Pairs defines a repeated slice of Pair objects. + +

Top

+ +## cosmos/base/node/v1beta1/query.proto + + + + + +### ConfigRequest +ConfigRequest defines the request structure for the Config gRPC query. + + + + + + + + +### ConfigResponse +ConfigResponse defines the response structure for the Config gRPC query. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `minimum_gas_price` | [string](#string) | | | + + + + + + + + + + + + + + +### Service +Service defines the gRPC querier service for node related queries. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Config` | [ConfigRequest](#cosmos.base.node.v1beta1.ConfigRequest) | [ConfigResponse](#cosmos.base.node.v1beta1.ConfigResponse) | Config queries for the operator configuration. | GET|/cosmos/base/node/v1beta1/config| + + + + +

Top

@@ -2931,6 +3116,7 @@ a version/height. | ----- | ---- | ----- | ----------- | | `version` | [int64](#int64) | | | | `store_infos` | [StoreInfo](#cosmos.base.store.v1beta1.StoreInfo) | repeated | | +| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | @@ -5171,8 +5357,8 @@ TallyParams defines the params for tallying votes on governance proposals. | `quorum` | [bytes](#bytes) | | Minimum percentage of total stake needed to vote for a result to be considered valid. | | `threshold` | [bytes](#bytes) | | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | | `veto_threshold` | [bytes](#bytes) | | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. | -| `expedited_quorum` | [bytes](#bytes) | | Minimum proportion of Yes votes for an expedited quorum proposal to pass. Default value: 0.67. | | `expedited_threshold` | [bytes](#bytes) | | Minimum proportion of Yes votes for an expedited proposal to pass. Default value: 0.67. | +| `expedited_quorum` | [bytes](#bytes) | | Minimum proportion of Yes votes for an expedited proposal to reach quorum. Default value: 0.67. | diff --git a/docs/run-node/interact-node.md b/docs/run-node/interact-node.md index 3e0bf7925c43..7c29170ec644 100644 --- a/docs/run-node/interact-node.md +++ b/docs/run-node/interact-node.md @@ -128,16 +128,9 @@ func queryState() error { // Create a connection to the gRPC server. grpcConn := grpc.Dial( - // your gRPC server address - "127.0.0.1:9090", - // the Cosmos SDK doesn't support any transport security mechanism. - grpc.WithInsecure(), - // This instantiates a general gRPC codec which handles proto bytes. We - // pass in a nil interface registry if the request/response types contain - // interface instead of 'nil' you should pass the application specific - // codec. - grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(nil).GRPCCodec())), - ) + "127.0.0.1:9090", // your gRPC server address. + grpc.WithInsecure(), // The SDK doesn't support any transport security mechanism. + ) defer grpcConn.Close() // This creates a gRPC client to query the x/bank service. diff --git a/go.mod b/go.mod index 453ee93e94a5..928400517c1b 100644 --- a/go.mod +++ b/go.mod @@ -11,30 +11,30 @@ require ( github.com/coinbase/rosetta-sdk-go v0.7.0 github.com/confio/ics23/go v0.7.0 github.com/cosmos/btcutil v1.0.4 - github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogogateway v1.2.0 - github.com/cosmos/gogoproto v1.4.3 + github.com/cosmos/gogoproto v1.4.11 github.com/cosmos/iavl v0.19.4 github.com/cosmos/ledger-cosmos-go v0.11.1 + github.com/gogo/gateway v1.1.0 + github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/golang-lru v0.5.4 github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 - github.com/huandu/skiplist v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b github.com/magiconair/properties v1.8.6 - github.com/mattn/go-isatty v0.0.16 + github.com/mattn/go-isatty v0.0.17 github.com/otiai10/copy v1.7.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.13.0 - github.com/prometheus/common v0.37.0 + github.com/prometheus/client_golang v1.12.2 + github.com/prometheus/common v0.34.0 github.com/rakyll/statik v0.1.7 + github.com/regen-network/cosmos-proto v0.3.1 github.com/rs/zerolog v1.27.0 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.5.0 @@ -44,42 +44,37 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tendermint/tendermint v0.37.0-rc1 + github.com/tendermint/tendermint v0.34.21 github.com/tendermint/tm-db v0.6.6 - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa - google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b - google.golang.org/grpc v1.50.1 - google.golang.org/protobuf v1.28.1 + golang.org/x/crypto v0.12.0 + google.golang.org/grpc v1.57.0 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 - pgregory.net/rapid v0.5.3 ) require ( filippo.io/edwards25519 v1.0.0-beta.2 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.5 // indirect + github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.0.3 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/btree v1.0.0 // indirect github.com/google/orderedcode v0.0.1 // indirect @@ -93,11 +88,11 @@ require ( github.com/jmhodges/levigo v1.0.0 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/klauspost/compress v1.15.9 // indirect - github.com/lib/pq v1.10.7 // indirect + github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -106,10 +101,10 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/rs/cors v1.8.2 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/spf13/afero v1.8.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect @@ -117,23 +112,35 @@ require ( github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect - golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) +require ( + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e +) + replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 - // dgrijalva/jwt-go is deprecated and doesn't receive security updates. - // TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 - github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 + // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1 + github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + github.com/jhump/protoreflect => github.com/jhump/protoreflect v1.9.0 github.com/tendermint/tm-db => github.com/osmosis-labs/tm-db v0.6.5-0.20210911033928-ba9154613417 + + // latest grpc doesn't work with with our modified proto compiler, so we need to enforce + // the following version across all dependencies. + google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 41b9c21c26a2..16cca7097f58 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -73,6 +72,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -143,16 +144,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= @@ -168,16 +161,11 @@ github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= -github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.3 h1:RP3yyVREh9snv/lsOvmsAPQt8f44LgL281X0IOIhhcI= -github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= @@ -209,6 +197,7 @@ github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDm github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -230,15 +219,7 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= @@ -306,22 +287,13 @@ github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGF github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869 h1:kRpU4zq+Pzh4feET49aEWPOzwQy3U2SsbZEQ7QEcif0= -github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= +github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -346,8 +318,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -366,7 +339,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -395,6 +367,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -413,6 +386,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -456,10 +430,6 @@ github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUj github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= -github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= -github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -475,12 +445,8 @@ github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -504,8 +470,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -529,23 +493,21 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -553,8 +515,8 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -562,9 +524,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -602,6 +563,7 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -658,6 +620,7 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -678,8 +641,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -696,8 +659,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -705,15 +668,18 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= +github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -734,8 +700,8 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -805,13 +771,15 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.37.0-rc1 h1:+m+u7s10QD+7vPh5MORrnYjulCdYtGuzjaqKumDKofY= -github.com/tendermint/tendermint v0.37.0-rc1/go.mod h1:z0MZllXL+s0PgIMMpf2P0PrMttQufQio3kUjY2zebeo= +github.com/tendermint/tendermint v0.34.21 h1:UiGGnBFHVrZhoQVQ7EfwSOLuCtarqCSsRf8VrklqB7s= +github.com/tendermint/tendermint v0.34.21/go.mod h1:XDvfg6U7grcFTDx7VkzxnhazQ/bspGJAn4DZ6DcLLjQ= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -848,7 +816,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -877,8 +844,8 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -891,11 +858,10 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20221205204356-47842c84f3db h1:D/cFflL63o2KSLJIwjlcIt8PR064j/xsmdEJL/YvY/o= -golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -921,7 +887,6 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -969,8 +934,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg= -golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -994,7 +959,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1067,34 +1031,29 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1134,12 +1093,15 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1173,7 +1135,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1203,6 +1164,7 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1222,38 +1184,14 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1264,12 +1202,12 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1296,7 +1234,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1305,7 +1242,6 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1315,8 +1251,6 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= -pgregory.net/rapid v0.5.3/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml deleted file mode 100644 index 9c8ba0a4b1fd..000000000000 --- a/proto/buf.gen.gogo.yaml +++ /dev/null @@ -1,8 +0,0 @@ -version: v1 -plugins: - - name: gocosmos - out: .. - opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types - - name: grpc-gateway - out: .. - opt: logtostderr=true,allow_colon_final_segments=true diff --git a/proto/buf.gen.swagger.yaml b/proto/buf.gen.swagger.yaml deleted file mode 100644 index d0f7535b1a45..000000000000 --- a/proto/buf.gen.swagger.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: v1 -plugins: - - name: swagger - out: ../tmp-swagger-gen - opt: logtostderr=true,fqn_for_swagger_name=true,simple_operation_ids=true diff --git a/proto/buf.lock b/proto/buf.lock deleted file mode 100644 index 0513e364af15..000000000000 --- a/proto/buf.lock +++ /dev/null @@ -1,15 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 783e4b5374fa488ab068d08af9658438 diff --git a/proto/buf.md b/proto/buf.md deleted file mode 100644 index a44cb1bbfeec..000000000000 --- a/proto/buf.md +++ /dev/null @@ -1,3 +0,0 @@ -# Protobufs - -This is the public protocol buffers API for the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk). diff --git a/proto/buf.yaml b/proto/buf.yaml deleted file mode 100644 index 082a8587f9d8..000000000000 --- a/proto/buf.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# This module represents buf.build/cosmos/cosmos-sdk -version: v1 -name: buf.build/cosmos/cosmos-sdk -deps: - - buf.build/cosmos/cosmos-proto - - buf.build/cosmos/gogo-proto - - buf.build/googleapis/googleapis -breaking: - use: - - FILE -lint: - use: - - DEFAULT - - COMMENTS - - FILE_LOWER_SNAKE_CASE - except: - - UNARY_RPC - - COMMENT_FIELD - - SERVICE_SUFFIX - - PACKAGE_VERSION_SUFFIX - - RPC_REQUEST_STANDARD_NAME - ignore: - - tendermint diff --git a/proto/cosmos/authz/v1beta1/authz.proto b/proto/cosmos/authz/v1beta1/authz.proto index 152c54c534bb..9407434d65d8 100644 --- a/proto/cosmos/authz/v1beta1/authz.proto +++ b/proto/cosmos/authz/v1beta1/authz.proto @@ -31,8 +31,8 @@ message Grant { // GrantAuthorization extends a grant with both the addresses of the grantee and granter. // It is used in genesis.proto and query.proto message GrantAuthorization { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string granter = 1; + string grantee = 2; google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; diff --git a/scripts/protocgen-any.sh b/scripts/protocgen-any.sh index d604c1a6511f..2a094265d3f9 100755 --- a/scripts/protocgen-any.sh +++ b/scripts/protocgen-any.sh @@ -6,7 +6,7 @@ set -eo pipefail -go install github.com/cosmos/gogoproto/protoc-gen-gogotypes +go install github.com/gogo/protobuf/protoc-gen-gogotypes buf protoc -I "third_party/proto" --gogotypes_out=./codec/types third_party/proto/google/protobuf/any.proto mv codec/types/google/protobuf/any.pb.go codec/types diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index d63c1b627075..20b8d7020069 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,35 +1,43 @@ #!/usr/bin/env bash -# How to run manually: -# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" -# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh +set -eo pipefail -set -e +protoc_gen_gocosmos() { + if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then + echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." + return 1 + fi -echo "Generating gogo proto code" -cd proto -proto_dirs=$(find ./cosmos ./amino -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) + go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2>/dev/null +} + +protoc_gen_gocosmos + +proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do - # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... - # gogo proto files SHOULD ONLY be generated if this is false - # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf - if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then - buf generate --template buf.gen.gogo.yaml $file - fi - done + buf protoc \ + -I "proto" \ + -I "third_party/proto" \ + --gocosmos_out=plugins=interfacetype+grpc,\ +Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ + --grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \ + $(find "${dir}" -maxdepth 1 -name '*.proto') + done -cd .. +# command to generate docs using protoc-gen-doc +buf protoc \ + -I "proto" \ + -I "third_party/proto" \ + --doc_out=./docs/core \ + --doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \ + $(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') +go mod tidy # generate codec/testdata proto code -(cd testutil/testdata; buf generate) - -# # generate baseapp test messages -# (cd baseapp/testutil; buf generate) +buf protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\ +Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/*.proto # move proto files to the right places cp -r github.com/cosmos/cosmos-sdk/* ./ rm -rf github.com - -go mod tidy diff --git a/server/api/server.go b/server/api/server.go index 3b58e1c24cb3..c2987f860d1a 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -7,7 +7,7 @@ import ( "strings" "time" - gateway "github.com/cosmos/gogogateway" + "github.com/gogo/gateway" "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" diff --git a/server/export.go b/server/export.go index 47f2e89d6c33..2d5e83a8e20a 100644 --- a/server/export.go +++ b/server/export.go @@ -9,6 +9,7 @@ import ( "github.com/spf13/cobra" tmjson "github.com/tendermint/tendermint/libs/json" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/client/flags" @@ -82,17 +83,18 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com doc.AppState = exported.AppState doc.Validators = exported.Validators doc.InitialHeight = exported.Height - doc.ConsensusParams = &tmtypes.ConsensusParams{ - Block: tmtypes.BlockParams{ - MaxBytes: exported.ConsensusParams.Block.MaxBytes, - MaxGas: exported.ConsensusParams.Block.MaxGas, + doc.ConsensusParams = &tmproto.ConsensusParams{ + Block: tmproto.BlockParams{ + MaxBytes: exported.ConsensusParams.Block.MaxBytes, + MaxGas: exported.ConsensusParams.Block.MaxGas, + TimeIotaMs: doc.ConsensusParams.Block.TimeIotaMs, }, - Evidence: tmtypes.EvidenceParams{ + Evidence: tmproto.EvidenceParams{ MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks, MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration, MaxBytes: exported.ConsensusParams.Evidence.MaxBytes, }, - Validator: tmtypes.ValidatorParams{ + Validator: tmproto.ValidatorParams{ PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes, }, } diff --git a/server/export_test.go b/server/export_test.go index 3ef3745560ad..fa59b9b72c37 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -12,6 +12,7 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" @@ -32,7 +33,7 @@ import ( func TestExportCmd_ConsensusParams(t *testing.T) { tempDir := t.TempDir() - _, ctx, _, cmd := setupApp(t, tempDir) + _, ctx, genDoc, cmd := setupApp(t, tempDir) output := &bytes.Buffer{} cmd.SetOut(output) @@ -45,10 +46,13 @@ func TestExportCmd_ConsensusParams(t *testing.T) { t.Fatalf("error unmarshaling exported genesis doc: %s", err) } + require.Equal(t, genDoc.ConsensusParams.Block.TimeIotaMs, exportedGenDoc.ConsensusParams.Block.TimeIotaMs) require.Equal(t, simapp.DefaultConsensusParams.Block.MaxBytes, exportedGenDoc.ConsensusParams.Block.MaxBytes) require.Equal(t, simapp.DefaultConsensusParams.Block.MaxGas, exportedGenDoc.ConsensusParams.Block.MaxGas) + require.Equal(t, simapp.DefaultConsensusParams.Evidence.MaxAgeDuration, exportedGenDoc.ConsensusParams.Evidence.MaxAgeDuration) require.Equal(t, simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks, exportedGenDoc.ConsensusParams.Evidence.MaxAgeNumBlocks) + require.Equal(t, simapp.DefaultConsensusParams.Validator.PubKeyTypes, exportedGenDoc.ConsensusParams.Validator.PubKeyTypes) } diff --git a/server/grpc/gogoreflection/fix_registration.go b/server/grpc/gogoreflection/fix_registration.go index 48678203b948..ab7750574845 100644 --- a/server/grpc/gogoreflection/fix_registration.go +++ b/server/grpc/gogoreflection/fix_registration.go @@ -6,17 +6,18 @@ import ( "fmt" "reflect" - _ "github.com/cosmos/gogoproto/gogoproto" // required so it does register the gogoproto file descriptor - gogoproto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" // required so it does register the gogoproto file descriptor + gogoproto "github.com/gogo/protobuf/proto" - _ "github.com/cosmos/cosmos-proto" // look above - "github.com/golang/protobuf/proto" //nolint:staticcheck + // nolint: staticcheck + "github.com/golang/protobuf/proto" dpb "github.com/golang/protobuf/protoc-gen-go/descriptor" + _ "github.com/regen-network/cosmos-proto" // look above ) -// importsToFix lets us now that we're only fixing gogoproto/gogoproto.proto imports, we're not fixing cosmos protos. var importsToFix = map[string]string{ - "gogo.proto": "gogoproto/gogo.proto", + "gogo.proto": "gogoproto/gogo.proto", + "cosmos.proto": "cosmos_proto/cosmos.proto", } // fixRegistration is required because certain files register themselves in a way @@ -59,8 +60,7 @@ func init() { } // compress compresses the given file descriptor -// -//nolint:interfacer +// nolint: interfacer func compress(fd *dpb.FileDescriptorProto) ([]byte, error) { fdBytes, err := proto.Marshal(fd) if err != nil { @@ -70,7 +70,6 @@ func compress(fd *dpb.FileDescriptorProto) ([]byte, error) { cw := gzip.NewWriter(buf) _, err = cw.Write(fdBytes) if err != nil { - cw.Close() return nil, err } err = cw.Close() @@ -87,8 +86,8 @@ func getFileDescriptor(filePath string) []byte { if len(fd) != 0 { return fd } - - return proto.FileDescriptor(filePath) //nolint:staticcheck + // nolint: staticcheck + return proto.FileDescriptor(filePath) } func getMessageType(name string) reflect.Type { @@ -96,8 +95,8 @@ func getMessageType(name string) reflect.Type { if typ != nil { return typ } - - return proto.MessageType(name) //nolint:staticcheck + // nolint: staticcheck + return proto.MessageType(name) } func getExtension(extID int32, m proto.Message) *gogoproto.ExtensionDesc { @@ -107,9 +106,8 @@ func getExtension(extID int32, m proto.Message) *gogoproto.ExtensionDesc { return desc } } - // check into proto registry - //nolint:staticcheck // Seems likely that we should refactor this file. + // nolint: staticcheck for id, desc := range proto.RegisteredExtensions(m) { if id == extID { return &gogoproto.ExtensionDesc{ @@ -135,8 +133,8 @@ func getExtensionsNumbers(m proto.Message) []int32 { if len(out) != 0 { return out } - - protoExts := proto.RegisteredExtensions(m) //nolint:staticcheck + // nolint: staticcheck + protoExts := proto.RegisteredExtensions(m) out = make([]int32, 0, len(protoExts)) for id := range protoExts { out = append(out, id) diff --git a/server/grpc/gogoreflection/serverreflection.go b/server/grpc/gogoreflection/serverreflection.go index ac1e3c2d0526..c2a0828e3bc2 100644 --- a/server/grpc/gogoreflection/serverreflection.go +++ b/server/grpc/gogoreflection/serverreflection.go @@ -23,7 +23,6 @@ The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. To register server reflection on a gRPC server: - import "google.golang.org/grpc/reflection" s := grpc.NewServer() @@ -33,6 +32,7 @@ To register server reflection on a gRPC server: reflection.Register(s) s.Serve(lis) + */ package gogoreflection // import "google.golang.org/grpc/reflection" @@ -41,12 +41,13 @@ import ( "compress/gzip" "fmt" "io" + "io/ioutil" "log" "reflect" "sort" "sync" - //nolint: staticcheck + // nolint: staticcheck "github.com/golang/protobuf/proto" dpb "github.com/golang/protobuf/protoc-gen-go/descriptor" "google.golang.org/grpc" @@ -218,7 +219,7 @@ func decompress(b []byte) ([]byte, error) { if err != nil { return nil, fmt.Errorf("bad gzipped descriptor: %v", err) } - out, err := io.ReadAll(r) + out, err := ioutil.ReadAll(r) if err != nil { return nil, fmt.Errorf("bad gzipped descriptor: %v", err) } diff --git a/server/grpc/reflection/v2alpha1/reflection.go b/server/grpc/reflection/v2alpha1/reflection.go index 73290c2961f8..789f9e35ff86 100644 --- a/server/grpc/reflection/v2alpha1/reflection.go +++ b/server/grpc/reflection/v2alpha1/reflection.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "google.golang.org/grpc" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/server/grpc/reflection/v2alpha1/reflection.pb.go b/server/grpc/reflection/v2alpha1/reflection.pb.go index 360e4440e8f6..c75e6958ce32 100644 --- a/server/grpc/reflection/v2alpha1/reflection.pb.go +++ b/server/grpc/reflection/v2alpha1/reflection.pb.go @@ -6,8 +6,8 @@ package v2alpha1 import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/server/grpc/reflection/v2alpha1/reflection.pb.gw.go b/server/grpc/reflection/v2alpha1/reflection.pb.gw.go index d53b4fdaeb8c..02cd59b35dbc 100644 --- a/server/grpc/reflection/v2alpha1/reflection.pb.gw.go +++ b/server/grpc/reflection/v2alpha1/reflection.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_ReflectionService_GetAuthnDescriptor_0(ctx context.Context, marshaler runtime.Marshaler, client ReflectionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetAuthnDescriptorRequest @@ -144,14 +142,12 @@ func local_request_ReflectionService_GetTxDescriptor_0(ctx context.Context, mars // RegisterReflectionServiceHandlerServer registers the http handlers for service ReflectionService to "mux". // UnaryRPC :call ReflectionServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReflectionServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterReflectionServiceHandlerFromEndpoint instead. func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReflectionServiceServer) error { mux.Handle("GET", pattern_ReflectionService_GetAuthnDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -159,7 +155,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetAuthnDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -173,8 +168,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_GetChainDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -182,7 +175,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetChainDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -196,8 +188,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_GetCodecDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -205,7 +195,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetCodecDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -219,8 +208,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_GetConfigurationDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -228,7 +215,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetConfigurationDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -242,8 +228,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_GetQueryServicesDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -251,7 +235,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetQueryServicesDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -265,8 +248,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se mux.Handle("GET", pattern_ReflectionService_GetTxDescriptor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -274,7 +255,6 @@ func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.Se return } resp, md, err := local_request_ReflectionService_GetTxDescriptor_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/server/grpc/server.go b/server/grpc/server.go index d7cd6002bee3..1e44b0d6099a 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -8,7 +8,6 @@ import ( "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/server/grpc/gogoreflection" reflection "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1" @@ -31,7 +30,6 @@ func StartGRPCServer(clientCtx client.Context, app types.Application, cfg config grpcSrv := grpc.NewServer( grpc.MaxSendMsgSize(maxSendMsgSize), grpc.MaxRecvMsgSize(maxRecvMsgSize), - grpc.ForceServerCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), ) app.RegisterGRPCServer(grpcSrv) diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 197f7eeeea41..d384ff093827 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" reflectionv1 "github.com/cosmos/cosmos-sdk/client/grpc/reflection" clienttx "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/codec" reflectionv2 "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" @@ -58,7 +57,6 @@ func (s *IntegrationTestSuite) SetupSuite() { s.conn, err = grpc.Dial( val0.AppConfig.GRPC.Address, grpc.WithInsecure(), // Or else we get "no transport security set" - grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.app.InterfaceRegistry()).GRPCCodec())), ) s.Require().NoError(err) } diff --git a/server/mock/app.go b/server/mock/app.go index f32c42f1a60e..e73329e107fc 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -1,59 +1,48 @@ package mock import ( - "context" "encoding/json" "errors" "fmt" "path/filepath" + "github.com/tendermint/tendermint/types" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/types" - db "github.com/tendermint/tm-db" - "google.golang.org/grpc" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" ) // NewApp creates a simple mock kvstore app for testing. It should work // similar to a real app. Make sure rootDir is empty before running the test, -// in order to guarantee consistent results. +// in order to guarantee consistent results func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { - db, err := db.NewGoLevelDB("mock", filepath.Join(rootDir, "data")) + db, err := sdk.NewLevelDB("mock", filepath.Join(rootDir, "data")) if err != nil { return nil, err } + // Capabilities key to access the main KVStore. capKeyMainStore := sdk.NewKVStoreKey("main") - baseApp := bam.NewBaseApp("kvstore", logger, db, decodeTx) - baseApp.MountStores(capKeyMainStore) - baseApp.SetInitChainer(InitChainer(capKeyMainStore)) + // Create BaseApp. + baseApp := bam.NewBaseApp("kvstore", logger, db, decodeTx) - interfaceRegistry := codectypes.NewInterfaceRegistry() - interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), &kvstoreTx{}) + baseApp.SetParamStore(&mock.ParamStore{Db: db}) - router := bam.NewMsgServiceRouter() - router.SetInterfaceRegistry(interfaceRegistry) + // Set mounts for BaseApp's MultiStore. + baseApp.MountStores(capKeyMainStore) - newDesc := &grpc.ServiceDesc{ - ServiceName: "test", - Methods: []grpc.MethodDesc{ - { - MethodName: "Test", - Handler: _Msg_Test_Handler, - }, - }, - } + baseApp.SetInitChainer(InitChainer(capKeyMainStore)) - router.RegisterService(newDesc, &MsgServerImpl{capKeyMainStore}) - baseApp.SetMsgServiceRouter(router) + // Set a Route. + baseApp.Router().AddRoute(sdk.NewRoute("kvstore", KVStoreHandler(capKeyMainStore))) + // Load latest version. if err := baseApp.LoadLatestVersion(); err != nil { return nil, err } @@ -62,10 +51,10 @@ func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { } // KVStoreHandler is a simple handler that takes kvstoreTx and writes -// them to the db. -func KVStoreHandler(storeKey storetypes.StoreKey) sdk.Handler { +// them to the db +func KVStoreHandler(storeKey sdk.StoreKey) sdk.Handler { return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - dTx, ok := msg.(*kvstoreTx) + dTx, ok := msg.(kvstoreTx) if !ok { return nil, errors.New("KVStoreHandler should only receive kvstoreTx") } @@ -96,7 +85,7 @@ type GenesisJSON struct { // InitChainer returns a function that can initialize the chain // with key/value pairs -func InitChainer(key storetypes.StoreKey) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain { +func InitChainer(key sdk.StoreKey) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain { return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { stateJSON := req.AppStateBytes @@ -117,7 +106,8 @@ func InitChainer(key storetypes.StoreKey) func(sdk.Context, abci.RequestInitChai // AppGenState can be passed into InitCmd, returns a static string of a few // key-values that can be parsed by InitChainer -func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json.RawMessage, err error) { +func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json. + RawMessage, err error) { appState = json.RawMessage(`{ "values": [ { @@ -134,38 +124,8 @@ func AppGenState(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) } // AppGenStateEmpty returns an empty transaction state for mocking. -func AppGenStateEmpty(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) (appState json.RawMessage, err error) { +func AppGenStateEmpty(_ *codec.LegacyAmino, _ types.GenesisDoc, _ []json.RawMessage) ( + appState json.RawMessage, err error) { appState = json.RawMessage(``) return } - -// Manually write the handlers for this custom message -type MsgServer interface { - Test(ctx context.Context, msg *kvstoreTx) (*sdk.Result, error) -} - -type MsgServerImpl struct { - capKeyMainStore *storetypes.KVStoreKey -} - -func _Msg_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(kvstoreTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Test(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kvstoreTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Test(ctx, req.(*kvstoreTx)) - } - return interceptor(ctx, in, info, handler) -} - -func (m MsgServerImpl) Test(ctx context.Context, msg *kvstoreTx) (*sdk.Result, error) { - return KVStoreHandler(m.capKeyMainStore)(sdk.UnwrapSDKContext(ctx), msg) -} diff --git a/server/mock/app_test.go b/server/mock/app_test.go index 2c9cc29d6e8c..2741925df026 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -1,16 +1,12 @@ package mock import ( - "math/rand" "testing" - "time" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) // TestInitApp makes sure we can initialize this thing without an error @@ -28,7 +24,7 @@ func TestInitApp(t *testing.T) { appState, err := AppGenState(nil, types.GenesisDoc{}, nil) require.NoError(t, err) - // TODO test validators in the init chain? + //TODO test validators in the init chain? req := abci.RequestInitChain{ AppStateBytes: appState, } @@ -53,16 +49,11 @@ func TestDeliverTx(t *testing.T) { if closer != nil { defer closer() } - require.NoError(t, err) key := "my-special-key" value := "top-secret-data!!" - - r := rand.New(rand.NewSource(time.Now().UnixNano())) - randomAccounts := simtypes.RandomAccounts(r, 1) - - tx := NewTx(key, value, randomAccounts[0].Address) + tx := NewTx(key, value) txBytes := tx.GetSignBytes() header := tmproto.Header{ @@ -70,12 +61,9 @@ func TestDeliverTx(t *testing.T) { Height: 1, } app.BeginBlock(abci.RequestBeginBlock{Header: header}) - dres := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.Equal(t, uint32(0), dres.Code, dres.Log) - app.EndBlock(abci.RequestEndBlock{}) - cres := app.Commit() require.NotEmpty(t, cres.Data) @@ -84,7 +72,6 @@ func TestDeliverTx(t *testing.T) { Path: "/store/main/key", Data: []byte(key), } - qres := app.Query(query) require.Equal(t, uint32(0), qres.Code, qres.Log) require.Equal(t, []byte(value), qres.Value) diff --git a/server/mock/helpers.go b/server/mock/helpers.go index aab1be7cff29..88aacb4d8e41 100644 --- a/server/mock/helpers.go +++ b/server/mock/helpers.go @@ -2,18 +2,19 @@ package mock import ( "fmt" + "io/ioutil" "os" abci "github.com/tendermint/tendermint/abci/types" - tmlog "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/libs/log" ) // SetupApp returns an application as well as a clean-up function // to be used to quickly setup a test case with an app func SetupApp() (abci.Application, func(), error) { - logger := tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout)).With("module", "mock") - - rootDir, err := os.MkdirTemp("", "mock-sdk") + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)). + With("module", "mock") + rootDir, err := ioutil.TempDir("", "mock-sdk") if err != nil { return nil, nil, err } diff --git a/server/mock/store.go b/server/mock/store.go index 8d040e90d1d8..948903c94bfa 100644 --- a/server/mock/store.go +++ b/server/mock/store.go @@ -3,19 +3,19 @@ package mock import ( "io" - protoio "github.com/cosmos/gogoproto/io" + protoio "github.com/gogo/protobuf/io" dbm "github.com/tendermint/tm-db" pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.MultiStore = multiStore{} type multiStore struct { - kv map[storetypes.StoreKey]kvStore + kv map[sdk.StoreKey]kvStore } func (ms multiStore) CacheMultiStore() sdk.CacheMultiStore { @@ -26,15 +26,15 @@ func (ms multiStore) CacheMultiStoreWithVersion(_ int64) (sdk.CacheMultiStore, e panic("not implemented") } -func (ms multiStore) CacheWrap() storetypes.CacheWrap { +func (ms multiStore) CacheWrap() sdk.CacheWrap { panic("not implemented") } -func (ms multiStore) CacheWrapWithTrace(_ io.Writer, _ sdk.TraceContext) storetypes.CacheWrap { +func (ms multiStore) CacheWrapWithTrace(_ io.Writer, _ sdk.TraceContext) sdk.CacheWrap { panic("not implemented") } -func (ms multiStore) CacheWrapWithListeners(_ storetypes.StoreKey, _ []storetypes.WriteListener) storetypes.CacheWrap { +func (ms multiStore) CacheWrapWithListeners(_ store.StoreKey, _ []store.WriteListener) store.CacheWrap { panic("not implemented") } @@ -50,19 +50,19 @@ func (ms multiStore) SetTracer(w io.Writer) sdk.MultiStore { panic("not implemented") } -func (ms multiStore) AddListeners(key storetypes.StoreKey, listeners []storetypes.WriteListener) { +func (ms multiStore) AddListeners(key store.StoreKey, listeners []store.WriteListener) { panic("not implemented") } -func (ms multiStore) ListeningEnabled(key storetypes.StoreKey) bool { +func (ms multiStore) ListeningEnabled(key store.StoreKey) bool { panic("not implemented") } -func (ms multiStore) Commit() storetypes.CommitID { +func (ms multiStore) Commit() sdk.CommitID { panic("not implemented") } -func (ms multiStore) LastCommitID() storetypes.CommitID { +func (ms multiStore) LastCommitID() sdk.CommitID { panic("not implemented") } @@ -74,11 +74,11 @@ func (ms multiStore) GetPruning() pruningtypes.PruningOptions { panic("not implemented") } -func (ms multiStore) GetCommitKVStore(key storetypes.StoreKey) storetypes.CommitKVStore { +func (ms multiStore) GetCommitKVStore(key sdk.StoreKey) sdk.CommitKVStore { panic("not implemented") } -func (ms multiStore) GetCommitInfoFromDB(ver int64) (*storetypes.CommitInfo, error) { +func (ms multiStore) GetCommitInfoFromDB(ver int64) (*store.CommitInfo, error) { panic("not implemented") } @@ -86,15 +86,7 @@ func (ms multiStore) GetCommitStore(key sdk.StoreKey) sdk.CommitStore { panic("not implemented") } -func (ms multiStore) GetAppVersion() (uint64, error) { - panic("not implemented") -} - -func (ms multiStore) SetAppVersion(version uint64) error { - panic("not implemented") -} - -func (ms multiStore) MountStoreWithDB(key storetypes.StoreKey, typ storetypes.StoreType, db dbm.DB) { +func (ms multiStore) MountStoreWithDB(key store.StoreKey, typ store.StoreType, db dbm.DB) { ms.kv[key] = kvStore{store: make(map[string][]byte)} } @@ -102,11 +94,11 @@ func (ms multiStore) LoadLatestVersion() error { return nil } -func (ms multiStore) LoadLatestVersionAndUpgrade(upgrades *storetypes.StoreUpgrades) error { +func (ms multiStore) LoadLatestVersionAndUpgrade(upgrades *store.StoreUpgrades) error { return nil } -func (ms multiStore) LoadVersionAndUpgrade(ver int64, upgrades *storetypes.StoreUpgrades) error { +func (ms multiStore) LoadVersionAndUpgrade(ver int64, upgrades *store.StoreUpgrades) error { panic("not implemented") } @@ -114,15 +106,15 @@ func (ms multiStore) LoadVersion(ver int64) error { panic("not implemented") } -func (ms multiStore) GetKVStore(key storetypes.StoreKey) sdk.KVStore { +func (ms multiStore) GetKVStore(key sdk.StoreKey) sdk.KVStore { return ms.kv[key] } -func (ms multiStore) GetStore(key storetypes.StoreKey) sdk.Store { +func (ms multiStore) GetStore(key sdk.StoreKey) sdk.Store { panic("not implemented") } -func (ms multiStore) GetStoreType() storetypes.StoreType { +func (ms multiStore) GetStoreType() sdk.StoreType { panic("not implemented") } @@ -130,23 +122,18 @@ func (ms multiStore) PruneSnapshotHeight(height int64) { panic("not implemented") } -func (ms multiStore) SetSnapshotInterval(snapshotInterval uint64) { - panic("not implemented") -} - func (ms multiStore) SetInterBlockCache(_ sdk.MultiStorePersistentCache) { panic("not implemented") } - func (ms multiStore) SetIAVLCacheSize(size int) { panic("not implemented") } -func (ms multiStore) SetIAVLDisableFastNode(disable bool) { +func (ms multiStore) SetInitialVersion(version int64) error { panic("not implemented") } -func (ms multiStore) SetInitialVersion(version int64) error { +func (ms multiStore) SetSnapshotInterval(snapshotInterval uint64) { panic("not implemented") } @@ -160,11 +147,11 @@ func (ms multiStore) Restore( panic("not implemented") } -func (ms multiStore) RollbackToVersion(version int64) error { +func (ms multiStore) SetAppVersion(_ uint64) error { panic("not implemented") } -func (ms multiStore) LatestVersion() int64 { +func (ms multiStore) GetAppVersion() (uint64, error) { panic("not implemented") } @@ -174,19 +161,19 @@ type kvStore struct { store map[string][]byte } -func (kv kvStore) CacheWrap() storetypes.CacheWrap { +func (kv kvStore) CacheWrap() sdk.CacheWrap { panic("not implemented") } -func (kv kvStore) CacheWrapWithTrace(w io.Writer, tc sdk.TraceContext) storetypes.CacheWrap { +func (kv kvStore) CacheWrapWithTrace(w io.Writer, tc sdk.TraceContext) sdk.CacheWrap { panic("not implemented") } -func (kv kvStore) CacheWrapWithListeners(_ storetypes.StoreKey, _ []storetypes.WriteListener) storetypes.CacheWrap { +func (kv kvStore) CacheWrapWithListeners(_ store.StoreKey, _ []store.WriteListener) store.CacheWrap { panic("not implemented") } -func (kv kvStore) GetStoreType() storetypes.StoreType { +func (kv kvStore) GetStoreType() sdk.StoreType { panic("not implemented") } @@ -204,7 +191,7 @@ func (kv kvStore) Has(key []byte) bool { } func (kv kvStore) Set(key, value []byte) { - storetypes.AssertValidKey(key) + store.AssertValidKey(key) kv.store[string(key)] = value } @@ -237,5 +224,5 @@ func (kv kvStore) ReverseSubspaceIterator(prefix []byte) sdk.Iterator { } func NewCommitMultiStore() sdk.CommitMultiStore { - return multiStore{kv: make(map[storetypes.StoreKey]kvStore)} + return multiStore{kv: make(map[sdk.StoreKey]kvStore)} } diff --git a/server/mock/store_test.go b/server/mock/store_test.go index fc5cd12e097e..b945cd30599f 100644 --- a/server/mock/store_test.go +++ b/server/mock/store_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -15,7 +15,7 @@ func TestStore(t *testing.T) { cms := NewCommitMultiStore() key := sdk.NewKVStoreKey("test") - cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db) + cms.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) err := cms.LoadLatestVersion() require.Nil(t, err) diff --git a/server/mock/tx.go b/server/mock/tx.go index c4c8a778d6b7..0cb79c28986f 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -1,130 +1,79 @@ +//nolint package mock import ( "bytes" "fmt" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" ) // An sdk.Tx which is its own sdk.Msg. type kvstoreTx struct { - key []byte - value []byte - bytes []byte - address sdk.AccAddress -} - -// testPubKey is a dummy implementation of PubKey used for testing. -type testPubKey struct { - address sdk.AccAddress -} - -func (t testPubKey) Reset() { panic("not implemented") } - -func (t testPubKey) String() string { panic("not implemented") } - -func (t testPubKey) ProtoMessage() { panic("not implemented") } - -func (t testPubKey) Address() cryptotypes.Address { return t.address.Bytes() } - -func (t testPubKey) Bytes() []byte { panic("not implemented") } - -func (t testPubKey) VerifySignature(msg []byte, sig []byte) bool { panic("not implemented") } - -func (t testPubKey) Equals(key cryptotypes.PubKey) bool { panic("not implemented") } - -func (t testPubKey) Type() string { panic("not implemented") } - -func (msg *kvstoreTx) GetSignaturesV2() (res []txsigning.SignatureV2, err error) { - res = append(res, txsigning.SignatureV2{ - PubKey: testPubKey{address: msg.address}, - Data: nil, - Sequence: 1, - }) - - return res, nil -} - -func (msg *kvstoreTx) VerifySignature(msgByte []byte, sig []byte) bool { - panic("implement me") -} - -func (msg *kvstoreTx) Address() cryptotypes.Address { - panic("implement me") -} - -func (msg *kvstoreTx) Bytes() []byte { - panic("implement me") -} - -func (msg *kvstoreTx) Equals(key cryptotypes.PubKey) bool { - panic("implement me") + key []byte + value []byte + bytes []byte } // dummy implementation of proto.Message -func (msg *kvstoreTx) Reset() {} -func (msg *kvstoreTx) String() string { return "TODO" } -func (msg *kvstoreTx) ProtoMessage() {} - -var ( - _ sdk.Tx = &kvstoreTx{} - _ sdk.Msg = &kvstoreTx{} - _ signing.SigVerifiableTx = &kvstoreTx{} - _ cryptotypes.PubKey = &kvstoreTx{} - _ cryptotypes.PubKey = &testPubKey{} -) +func (msg kvstoreTx) Reset() {} +func (msg kvstoreTx) String() string { return "TODO" } +func (msg kvstoreTx) ProtoMessage() {} + +var _ sdk.Tx = kvstoreTx{} +var _ sdk.Msg = kvstoreTx{} -func NewTx(key, value string, accAddress sdk.AccAddress) *kvstoreTx { +func NewTx(key, value string) kvstoreTx { bytes := fmt.Sprintf("%s=%s", key, value) - return &kvstoreTx{ - key: []byte(key), - value: []byte(value), - bytes: []byte(bytes), - address: accAddress, + return kvstoreTx{ + key: []byte(key), + value: []byte(value), + bytes: []byte(bytes), } } -func (tx *kvstoreTx) Type() string { +func (tx kvstoreTx) Route() string { + return "kvstore" +} + +func (tx kvstoreTx) Type() string { return "kvstore_tx" } -func (tx *kvstoreTx) GetMsgs() []sdk.Msg { +func (tx kvstoreTx) GetMsgs() []sdk.Msg { return []sdk.Msg{tx} } -func (tx *kvstoreTx) GetSignBytes() []byte { +func (tx kvstoreTx) GetMemo() string { + return "" +} + +func (tx kvstoreTx) GetSignBytes() []byte { return tx.bytes } // Should the app be calling this? Or only handlers? -func (tx *kvstoreTx) ValidateBasic() error { +func (tx kvstoreTx) ValidateBasic() error { return nil } -func (tx *kvstoreTx) GetSigners() []sdk.AccAddress { +func (tx kvstoreTx) GetSigners() []sdk.AccAddress { return nil } -func (tx *kvstoreTx) GetPubKeys() ([]cryptotypes.PubKey, error) { panic("GetPubKeys not implemented") } - // takes raw transaction bytes and decodes them into an sdk.Tx. An sdk.Tx has // all the signatures and can be used to authenticate. func decodeTx(txBytes []byte) (sdk.Tx, error) { var tx sdk.Tx split := bytes.Split(txBytes, []byte("=")) - if len(split) == 1 { //nolint:gocritic + if len(split) == 1 { k := split[0] - tx = &kvstoreTx{k, k, txBytes, nil} + tx = kvstoreTx{k, k, txBytes} } else if len(split) == 2 { k, v := split[0], split[1] - tx = &kvstoreTx{k, v, txBytes, nil} + tx = kvstoreTx{k, v, txBytes} } else { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "too many '='") } diff --git a/server/rosetta/converter.go b/server/rosetta/converter.go index 42ebeb7a2ef7..b057a32a6e27 100644 --- a/server/rosetta/converter.go +++ b/server/rosetta/converter.go @@ -6,24 +6,30 @@ import ( "fmt" "reflect" + auth "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/tendermint/tendermint/crypto" + "github.com/btcsuite/btcd/btcec" + tmcoretypes "github.com/tendermint/tendermint/rpc/core/types" + + crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + rosettatypes "github.com/coinbase/rosetta-sdk-go/types" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" - tmcoretypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" + crgerrs "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors" + sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - crgerrs "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors" - crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - auth "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -361,7 +367,7 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations [] // rosetta does not have the concept of burning coins, so we need to mock // the burn as a send to an address that cannot be resolved to anything case banktypes.EventTypeCoinBurn: - coins, err := sdk.ParseCoinsNormalized((event.Attributes[1].Value)) + coins, err := sdk.ParseCoinsNormalized((string)(event.Attributes[1].Value)) if err != nil { panic(err) } diff --git a/server/types/app.go b/server/types/app.go index 7253a619729e..430fb807a8c0 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -5,11 +5,10 @@ import ( "io" "time" - "github.com/cosmos/gogoproto/grpc" + "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" @@ -81,7 +80,7 @@ type ( // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. - ConsensusParams *tmproto.ConsensusParams + ConsensusParams *abci.ConsensusParams } // AppExporter is a function that dumps all app state to diff --git a/simapp/abci.go b/simapp/abci.go deleted file mode 100644 index 3e1b2880db1b..000000000000 --- a/simapp/abci.go +++ /dev/null @@ -1,35 +0,0 @@ -package simapp - -import ( - abci "github.com/tendermint/tendermint/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" -) - -var _ mempool.Mempool = (*NoOpMempool)(nil) - -// NoOpMempool defines a no-op mempool. Transactions are completely discarded and -// ignored when BaseApp interacts with the mempool. -type NoOpMempool struct{} - -func (m NoOpMempool) Insert(sdk.Context, sdk.Tx) error { return nil } -func (m NoOpMempool) Select(sdk.Context, [][]byte) mempool.Iterator { return nil } -func (m NoOpMempool) CountTx() int { return 0 } -func (m NoOpMempool) Remove(sdk.Tx) error { return nil } - -// NoOpPrepareProposal defines a no-op PrepareProposal handler. It will always -// return the transactions sent by the client's request -func NoOpPrepareProposal() sdk.PrepareProposalHandler { - return func(_ sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - return abci.ResponsePrepareProposal{Txs: req.Txs} - } -} - -// NoOpProcessProposal defines a no-op ProcessProposal Handler. It will always -// return ACCEPT. -func NoOpProcessProposal() sdk.ProcessProposalHandler { - return func(_ sdk.Context, _ abci.RequestProcessProposal) abci.ResponseProcessProposal { - return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} - } -} diff --git a/simapp/app.go b/simapp/app.go index 7a371cd08f20..0d9775a108b5 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -196,23 +196,10 @@ func NewSimApp( legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - // A default nonce-based mempool is set automatically in BaseApp along with a - // default implementation of PrepareProposal and ProcessProposal. To override - // them, perform the following: - // - // baseAppOptions = append(baseAppOptions, baseapp.SetMempool(mp)) - // baseAppOptions = append(baseAppOptions, baseapp.SetPrepareProposal(prepareProposalHandler)) - // baseAppOptions = append(baseAppOptions, baseapp.SetProcessProposal(processProposalHandler)) - - baseAppOptions = append(baseAppOptions, baseapp.SetMempool(NoOpMempool{})) - baseAppOptions = append(baseAppOptions, baseapp.SetPrepareProposal(NoOpPrepareProposal())) - baseAppOptions = append(baseAppOptions, baseapp.SetProcessProposal(NoOpProcessProposal())) - bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) - bApp.SetTxEncoder(encodingConfig.TxConfig.TxEncoder()) keys := sdk.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index 379016d12169..36755ff8ae8e 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -2,6 +2,7 @@ package helpers import ( "math/rand" + "time" "github.com/cosmos/cosmos-sdk/client" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -20,10 +21,12 @@ const ( ) // GenTx generates a signed mock transaction. -func GenTx(r *rand.Rand, gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { +func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo + r := rand.New(rand.NewSource(time.Now().UnixNano())) + memo := simulation.RandStringOfLength(r, simulation.RandIntBetween(r, 0, 100)) signMode := gen.SignModeHandler().DefaultMode() diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index a75b97a7d0e3..bdcd24fc4501 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -5,7 +5,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "math/rand" "strconv" "testing" "time" @@ -35,8 +34,8 @@ import ( // DefaultConsensusParams defines the default Tendermint consensus params used in // SimApp testing. -var DefaultConsensusParams = &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ +var DefaultConsensusParams = &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, @@ -51,7 +50,7 @@ var DefaultConsensusParams = &tmproto.ConsensusParams{ }, }, Version: &tmproto.VersionParams{ - App: 0, // must be 0 during chain initialization. + AppVersion: 0, // must be 0 during chain initialization. }, } @@ -331,7 +330,6 @@ func SignCheckDeliver( ) (sdk.GasInfo, *sdk.Result, error) { tx, err := helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -382,7 +380,6 @@ func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, i var err error for i := 0; i < numToGenerate; i++ { txs[i], err = helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), txGen, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, diff --git a/snapshots/helpers_test.go b/snapshots/helpers_test.go index 207f842d2e9a..3204471ab1d1 100644 --- a/snapshots/helpers_test.go +++ b/snapshots/helpers_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - protoio "github.com/cosmos/gogoproto/io" + protoio "github.com/gogo/protobuf/io" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" diff --git a/snapshots/store.go b/snapshots/store.go index 6a13b0406de7..c2d6dcd81a71 100644 --- a/snapshots/store.go +++ b/snapshots/store.go @@ -10,7 +10,7 @@ import ( "strconv" "sync" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" db "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/snapshots/types" diff --git a/snapshots/stream.go b/snapshots/stream.go index c39815c72578..80cd5c3dfdcb 100644 --- a/snapshots/stream.go +++ b/snapshots/stream.go @@ -5,8 +5,8 @@ import ( "compress/zlib" "io" - protoio "github.com/cosmos/gogoproto/io" - "github.com/cosmos/gogoproto/proto" + protoio "github.com/gogo/protobuf/io" + "github.com/gogo/protobuf/proto" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/snapshots/types/convert.go b/snapshots/types/convert.go index b9ea9503c5c1..d0db6e3dc170 100644 --- a/snapshots/types/convert.go +++ b/snapshots/types/convert.go @@ -1,7 +1,7 @@ package types import ( - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/snapshots/types/snapshot.pb.go b/snapshots/types/snapshot.pb.go index b1681a53ad01..bc37d780d84e 100644 --- a/snapshots/types/snapshot.pb.go +++ b/snapshots/types/snapshot.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -150,7 +150,6 @@ type SnapshotItem struct { // item is the specific type of snapshot item. // // Types that are valid to be assigned to Item: - // // *SnapshotItem_Store // *SnapshotItem_IAVL // *SnapshotItem_Extension diff --git a/snapshots/types/snapshotter.go b/snapshots/types/snapshotter.go index 0f8a88af727c..76f800484a49 100644 --- a/snapshots/types/snapshotter.go +++ b/snapshots/types/snapshotter.go @@ -1,7 +1,7 @@ package types import ( - protoio "github.com/cosmos/gogoproto/io" + protoio "github.com/gogo/protobuf/io" ) // Snapshotter is something that can create and restore snapshots, consisting of streamed binary diff --git a/snapshots/types/util.go b/snapshots/types/util.go index bd0f5057ad05..125ea6fb4610 100644 --- a/snapshots/types/util.go +++ b/snapshots/types/util.go @@ -1,7 +1,7 @@ package types import ( - protoio "github.com/cosmos/gogoproto/io" + protoio "github.com/gogo/protobuf/io" ) // WriteExtensionItem writes an item payload for current extention snapshotter. diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 054b98a00072..86a80f2346c2 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -9,18 +9,17 @@ import ( "strings" "sync" - protoio "github.com/cosmos/gogoproto/io" - gogotypes "github.com/cosmos/gogoproto/types" + "github.com/cosmos/cosmos-sdk/pruning" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" iavltree "github.com/cosmos/iavl" + protoio "github.com/gogo/protobuf/io" + gogotypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/pruning" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/cachemulti" "github.com/cosmos/cosmos-sdk/store/dbadapter" diff --git a/store/types/commit_info.pb.go b/store/types/commit_info.pb.go index 5e2be6e5fa3d..86e10e64db0a 100644 --- a/store/types/commit_info.pb.go +++ b/store/types/commit_info.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -253,7 +253,7 @@ func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err1 != nil { return 0, err1 } @@ -384,7 +384,7 @@ func (m *CommitInfo) Size() (n int) { n += 1 + l + sovCommitInfo(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovCommitInfo(uint64(l)) return n } @@ -537,7 +537,7 @@ func (m *CommitInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/store/types/listening.pb.go b/store/types/listening.pb.go index 7d144f0d674d..47d5a23a8367 100644 --- a/store/types/listening.pb.go +++ b/store/types/listening.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/tests/mocks/grpc_server.go b/tests/mocks/grpc_server.go index 15ac3d877448..df4372c4bc9a 100644 --- a/tests/mocks/grpc_server.go +++ b/tests/mocks/grpc_server.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/gogoproto/grpc (interfaces: Server) +// Source: github.com/gogo/protobuf/grpc (interfaces: Server) // Package mocks is a generated GoMock package. package mocks diff --git a/testutil/context.go b/testutil/context.go index 3d70a36fc5bb..bf1ef78a5471 100644 --- a/testutil/context.go +++ b/testutil/context.go @@ -1,15 +1,11 @@ package testutil import ( - "testing" - - "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -17,38 +13,13 @@ import ( func DefaultContext(key sdk.StoreKey, tkey sdk.StoreKey) sdk.Context { db := dbm.NewMemDB() cms := store.NewCommitMultiStore(db, log.NewNopLogger()) - cms.MountStoreWithDB(key, sdk.StoreTypeIAVL, db) cms.MountStoreWithDB(tkey, sdk.StoreTypeTransient, db) - - if err := cms.LoadLatestVersion(); err != nil { + err := cms.LoadLatestVersion() + if err != nil { panic(err) } - - ctx := sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger()) - return ctx -} - -type TestContext struct { - Ctx sdk.Context - DB *dbm.MemDB - CMS store.CommitMultiStore -} - -func DefaultContextWithDB(t *testing.T, keys, tKeys []storetypes.StoreKey) TestContext { - db := dbm.NewMemDB() - cms := store.NewCommitMultiStore(db, log.NewNopLogger()) - - for _, key := range keys { - cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db) - } - - for _, tKey := range tKeys { - cms.MountStoreWithDB(tKey, storetypes.StoreTypeTransient, db) - } - - require.NoError(t, cms.LoadLatestVersion()) ctx := sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger()) - return TestContext{ctx, db, cms} + return ctx } diff --git a/testutil/testdata/animal.go b/testutil/testdata/animal.go index a291ac333f86..96981a40b9b4 100644 --- a/testutil/testdata/animal.go +++ b/testutil/testdata/animal.go @@ -6,7 +6,7 @@ package testdata import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/testutil/testdata/buf.gen.yaml b/testutil/testdata/buf.gen.yaml deleted file mode 100644 index d7d17bbb26f8..000000000000 --- a/testutil/testdata/buf.gen.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: v1 -plugins: - - name: gocosmos - out: ../.. - opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types diff --git a/testutil/testdata/buf.lock b/testutil/testdata/buf.lock deleted file mode 100644 index 88709c98ef99..000000000000 --- a/testutil/testdata/buf.lock +++ /dev/null @@ -1,11 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 diff --git a/testutil/testdata/buf.yaml b/testutil/testdata/buf.yaml deleted file mode 100644 index e6f82c0cdcd7..000000000000 --- a/testutil/testdata/buf.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version: v1 -deps: - - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-proto diff --git a/testutil/testdata/grpc_query.go b/testutil/testdata/grpc_query.go index d4f34319d3c5..6e2b64152995 100644 --- a/testutil/testdata/grpc_query.go +++ b/testutil/testdata/grpc_query.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/testutil/testdata/query.pb.go b/testutil/testdata/query.pb.go index 2127724e24fa..e7d38dc7ceb8 100644 --- a/testutil/testdata/query.pb.go +++ b/testutil/testdata/query.pb.go @@ -7,8 +7,8 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/testutil/testdata/testdata.pb.go b/testutil/testdata/testdata.pb.go index 51db80c5515f..400e64936810 100644 --- a/testutil/testdata/testdata.pb.go +++ b/testutil/testdata/testdata.pb.go @@ -6,8 +6,8 @@ package testdata import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/testutil/testdata/tx.pb.go b/testutil/testdata/tx.pb.go index d291b1ee1563..694a045fffae 100644 --- a/testutil/testdata/tx.pb.go +++ b/testutil/testdata/tx.pb.go @@ -6,9 +6,9 @@ package testdata import ( context "context" fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/testutil/testdata/unknonwnproto.pb.go b/testutil/testdata/unknonwnproto.pb.go index 7e9f2b13039a..eb4abf1fff10 100644 --- a/testutil/testdata/unknonwnproto.pb.go +++ b/testutil/testdata/unknonwnproto.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" tx "github.com/cosmos/cosmos-sdk/types/tx" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -715,7 +715,6 @@ type Customer3 struct { Surcharge float32 `protobuf:"fixed32,4,opt,name=surcharge,proto3" json:"surcharge,omitempty"` Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"` // Types that are valid to be assigned to Payment: - // // *Customer3_CreditCardNo // *Customer3_ChequeNo Payment isCustomer3_Payment `protobuf_oneof:"payment"` @@ -849,7 +848,6 @@ type TestVersion1 struct { C []*TestVersion1 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []TestVersion1 `protobuf:"bytes,5,rep,name=d,proto3" json:"d"` // Types that are valid to be assigned to Sum: - // // *TestVersion1_E // *TestVersion1_F Sum isTestVersion1_Sum `protobuf_oneof:"sum"` @@ -994,7 +992,6 @@ type TestVersion2 struct { C []*TestVersion2 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion2 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersion2_E // *TestVersion2_F Sum isTestVersion2_Sum `protobuf_oneof:"sum"` @@ -1147,7 +1144,6 @@ type TestVersion3 struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersion3_E // *TestVersion3_F Sum isTestVersion3_Sum `protobuf_oneof:"sum"` @@ -1300,7 +1296,6 @@ type TestVersion3LoneOneOfValue struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersion3LoneOneOfValue_E Sum isTestVersion3LoneOneOfValue_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -1440,7 +1435,6 @@ type TestVersion3LoneNesting struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersion3LoneNesting_F Sum isTestVersion3LoneNesting_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -1828,7 +1822,6 @@ type TestVersion4LoneNesting struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersion4LoneNesting_F Sum isTestVersion4LoneNesting_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -2213,7 +2206,6 @@ type TestVersionFD1 struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersionFD1_E // *TestVersionFD1_F Sum isTestVersionFD1_Sum `protobuf_oneof:"sum"` @@ -2331,7 +2323,6 @@ type TestVersionFD1WithExtraAny struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` // Types that are valid to be assigned to Sum: - // // *TestVersionFD1WithExtraAny_E // *TestVersionFD1WithExtraAny_F Sum isTestVersionFD1WithExtraAny_Sum `protobuf_oneof:"sum"` diff --git a/third_party/proto/confio/proofs.proto b/third_party/proto/confio/proofs.proto new file mode 100644 index 000000000000..da43503ecbd6 --- /dev/null +++ b/third_party/proto/confio/proofs.proto @@ -0,0 +1,234 @@ +syntax = "proto3"; + +package ics23; +option go_package = "github.com/confio/ics23/go"; + +enum HashOp { + // NO_HASH is the default if no data passed. Note this is an illegal argument some places. + NO_HASH = 0; + SHA256 = 1; + SHA512 = 2; + KECCAK = 3; + RIPEMD160 = 4; + BITCOIN = 5; // ripemd160(sha256(x)) +} + +/** +LengthOp defines how to process the key and value of the LeafOp +to include length information. After encoding the length with the given +algorithm, the length will be prepended to the key and value bytes. +(Each one with it's own encoded length) +*/ +enum LengthOp { + // NO_PREFIX don't include any length info + NO_PREFIX = 0; + // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length + VAR_PROTO = 1; + // VAR_RLP uses rlp int encoding of the length + VAR_RLP = 2; + // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer + FIXED32_BIG = 3; + // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer + FIXED32_LITTLE = 4; + // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer + FIXED64_BIG = 5; + // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer + FIXED64_LITTLE = 6; + // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) + REQUIRE_32_BYTES = 7; + // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) + REQUIRE_64_BYTES = 8; +} + +/** +ExistenceProof takes a key and a value and a set of steps to perform on it. +The result of peforming all these steps will provide a "root hash", which can +be compared to the value in a header. + +Since it is computationally infeasible to produce a hash collission for any of the used +cryptographic hash functions, if someone can provide a series of operations to transform +a given key and value into a root hash that matches some trusted root, these key and values +must be in the referenced merkle tree. + +The only possible issue is maliablity in LeafOp, such as providing extra prefix data, +which should be controlled by a spec. Eg. with lengthOp as NONE, + prefix = FOO, key = BAR, value = CHOICE +and + prefix = F, key = OOBAR, value = CHOICE +would produce the same value. + +With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field +in the ProofSpec is valuable to prevent this mutability. And why all trees should +length-prefix the data before hashing it. +*/ +message ExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + repeated InnerOp path = 4; +} + +/* +NonExistenceProof takes a proof of two neighbors, one left of the desired key, +one right of the desired key. If both proofs are valid AND they are neighbors, +then there is no valid proof for the given key. +*/ +message NonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + ExistenceProof left = 2; + ExistenceProof right = 3; +} + +/* +CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages +*/ +message CommitmentProof { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + BatchProof batch = 3; + CompressedBatchProof compressed = 4; + } +} + +/** +LeafOp represents the raw key-value data we wish to prove, and +must be flexible to represent the internal transformation from +the original key-value pairs into the basis hash, for many existing +merkle trees. + +key and value are passed in. So that the signature of this operation is: + leafOp(key, value) -> output + +To process this, first prehash the keys and values if needed (ANY means no hash in this case): + hkey = prehashKey(key) + hvalue = prehashValue(value) + +Then combine the bytes, and hash it + output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) +*/ +message LeafOp { + HashOp hash = 1; + HashOp prehash_key = 2; + HashOp prehash_value = 3; + LengthOp length = 4; + // prefix is a fixed bytes that may optionally be included at the beginning to differentiate + // a leaf node from an inner node. + bytes prefix = 5; +} + +/** +InnerOp represents a merkle-proof step that is not a leaf. +It represents concatenating two children and hashing them to provide the next result. + +The result of the previous step is passed in, so the signature of this op is: + innerOp(child) -> output + +The result of applying InnerOp should be: + output = op.hash(op.prefix || child || op.suffix) + + where the || operator is concatenation of binary data, +and child is the result of hashing all the tree below this step. + +Any special data, like prepending child with the length, or prepending the entire operation with +some value to differentiate from leaf nodes, should be included in prefix and suffix. +If either of prefix or suffix is empty, we just treat it as an empty string +*/ +message InnerOp { + HashOp hash = 1; + bytes prefix = 2; + bytes suffix = 3; +} + + +/** +ProofSpec defines what the expected parameters are for a given proof type. +This can be stored in the client and used to validate any incoming proofs. + + verify(ProofSpec, Proof) -> Proof | Error + +As demonstrated in tests, if we don't fix the algorithm used to calculate the +LeafHash for a given tree, there are many possible key-value pairs that can +generate a given hash (by interpretting the preimage differently). +We need this for proper security, requires client knows a priori what +tree format server uses. But not in code, rather a configuration object. +*/ +message ProofSpec { + // any field in the ExistenceProof must be the same as in this spec. + // except Prefix, which is just the first bytes of prefix (spec can be longer) + LeafOp leaf_spec = 1; + InnerSpec inner_spec = 2; + // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) + int32 max_depth = 3; + // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) + int32 min_depth = 4; +} + +/* +InnerSpec contains all store-specific structure info to determine if two proofs from a +given store are neighbors. + +This enables: + + isLeftMost(spec: InnerSpec, op: InnerOp) + isRightMost(spec: InnerSpec, op: InnerOp) + isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) +*/ +message InnerSpec { + // Child order is the ordering of the children node, must count from 0 + // iavl tree is [0, 1] (left then right) + // merk is [0, 2, 1] (left, right, here) + repeated int32 child_order = 1; + int32 child_size = 2; + int32 min_prefix_length = 3; + int32 max_prefix_length = 4; + // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) + bytes empty_child = 5; + // hash is the algorithm that must be used for each InnerOp + HashOp hash = 6; +} + +/* +BatchProof is a group of multiple proof types than can be compressed +*/ +message BatchProof { + repeated BatchEntry entries = 1; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message BatchEntry { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + } +} + + +/****** all items here are compressed forms *******/ + +message CompressedBatchProof { + repeated CompressedBatchEntry entries = 1; + repeated InnerOp lookup_inners = 2; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message CompressedBatchEntry { + oneof proof { + CompressedExistenceProof exist = 1; + CompressedNonExistenceProof nonexist = 2; + } +} + +message CompressedExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + // these are indexes into the lookup_inners table in CompressedBatchProof + repeated int32 path = 4; +} + +message CompressedNonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + CompressedExistenceProof left = 2; + CompressedExistenceProof right = 3; +} diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto new file mode 100644 index 000000000000..167b170757bc --- /dev/null +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos_proto; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/regen-network/cosmos-proto"; + +extend google.protobuf.MessageOptions { + string interface_type = 93001; + + string implements_interface = 93002; +} + +extend google.protobuf.FieldOptions { + string accepts_interface = 93001; +} diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto new file mode 100644 index 000000000000..49e78f99fe57 --- /dev/null +++ b/third_party/proto/gogoproto/gogo.proto @@ -0,0 +1,145 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; +} diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto new file mode 100644 index 000000000000..85c361b47fed --- /dev/null +++ b/third_party/proto/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto new file mode 100644 index 000000000000..2bd3a19bfa54 --- /dev/null +++ b/third_party/proto/google/api/http.proto @@ -0,0 +1,318 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parmeters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// `HttpRule` defines the mapping of an RPC method to one or more HTTP +// REST API methods. The mapping specifies how different portions of the RPC +// request message are mapped to URL path, URL query parameters, and +// HTTP request body. The mapping is typically specified as an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. +// +// The mapping consists of a field specifying the path template and +// method kind. The path template can refer to fields in the request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped +// } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be referenced +// from a path pattern. Fields mapped to the path pattern cannot be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to HTTP parameters must have a +// primitive type or a repeated primitive type. Message types are not +// allowed. In the case of a repeated type, the parameter can be +// repeated in the URL, as in `...?param=A¶m=B`. +// +// For HTTP method kinds which allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice of +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// +// This enables the following two alternative HTTP JSON to RPC +// mappings: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: +// +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) fields. +// 4. Any body sent with an HTTP request can contain only (b) fields. +// +// The syntax of the path template is as follows: +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single path segment. The syntax `**` matches zero +// or more path segments, which must be the last part of the path except the +// `Verb`. The syntax `LITERAL` matches literal text in the path. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path, all characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the +// Discovery Document as `{var}`. +// +// If a variable contains one or more path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path, all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables +// show up in the Discovery Document as `{+var}`. +// +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** match +// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. +// +// NOTE: the field paths in variables and in the `body` must not refer to +// repeated fields or map fields. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP body, or + // `*` for mapping all fields not captured by the path pattern to the HTTP + // body. NOTE: the referred field must not be a repeated field and must be + // present at the top-level of request message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/third_party/proto/google/api/httpbody.proto b/third_party/proto/google/api/httpbody.proto new file mode 100644 index 000000000000..4428515c1209 --- /dev/null +++ b/third_party/proto/google/api/httpbody.proto @@ -0,0 +1,78 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} \ No newline at end of file diff --git a/third_party/proto/google/protobuf/any.proto b/third_party/proto/google/protobuf/any.proto new file mode 100644 index 000000000000..58b511583a8b --- /dev/null +++ b/third_party/proto/google/protobuf/any.proto @@ -0,0 +1,164 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "gogoproto/gogo.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; + + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.gostring) = false; + option (gogoproto.stringer) = false; +} + +option (gogoproto.goproto_registration) = false; diff --git a/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto similarity index 69% rename from proto/tendermint/abci/types.proto rename to third_party/proto/tendermint/abci/types.proto index 0c9a11b57daa..f2ec15afd09f 100644 --- a/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -4,7 +4,7 @@ package tendermint.abci; option go_package = "github.com/tendermint/tendermint/abci/types"; // For more information on gogo.proto, see: -// https://github.com/cosmos/gogoproto/blob/master/extensions.md +// https://github.com/gogo/protobuf/blob/master/extensions.md import "tendermint/crypto/proof.proto"; import "tendermint/types/types.proto"; import "tendermint/crypto/keys.proto"; @@ -14,7 +14,7 @@ import "gogoproto/gogo.proto"; // This file is copied from http://github.com/tendermint/abci // NOTE: When using custom types, mind the warnings. -// https://github.com/cosmos/gogoproto/blob/master/custom_types.md#warnings-and-issues +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues //---------------------------------------- // Request types @@ -24,6 +24,7 @@ message Request { RequestEcho echo = 1; RequestFlush flush = 2; RequestInfo info = 3; + RequestSetOption set_option = 4; RequestInitChain init_chain = 5; RequestQuery query = 6; RequestBeginBlock begin_block = 7; @@ -35,10 +36,7 @@ message Request { RequestOfferSnapshot offer_snapshot = 13; RequestLoadSnapshotChunk load_snapshot_chunk = 14; RequestApplySnapshotChunk apply_snapshot_chunk = 15; - RequestPrepareProposal prepare_proposal = 16; - RequestProcessProposal process_proposal = 17; } - reserved 4; } message RequestEcho { @@ -51,16 +49,22 @@ message RequestInfo { string version = 1; uint64 block_version = 2; uint64 p2p_version = 3; - string abci_version = 4; +} + +// nondeterministic +message RequestSetOption { + string key = 1; + string value = 2; } message RequestInitChain { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - tendermint.types.ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; + google.protobuf.Timestamp time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; } message RequestQuery { @@ -73,8 +77,8 @@ message RequestQuery { message RequestBeginBlock { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -98,7 +102,8 @@ message RequestEndBlock { message RequestCommit {} // lists available snapshots -message RequestListSnapshots {} +message RequestListSnapshots { +} // offers a snapshot to the application message RequestOfferSnapshot { @@ -120,34 +125,6 @@ message RequestApplySnapshotChunk { string sender = 3; } -message RequestPrepareProposal { - // the modified transactions cannot exceed this size. - int64 max_tx_bytes = 1; - // txs is an array of transactions that will be included in a block, - // sent to the app for possible modifications. - repeated bytes txs = 2; - ExtendedCommitInfo local_last_commit = 3 [(gogoproto.nullable) = false]; - repeated Misbehavior misbehavior = 4 [(gogoproto.nullable) = false]; - int64 height = 5; - google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes next_validators_hash = 7; - // address of the public key of the validator proposing the block. - bytes proposer_address = 8; -} - -message RequestProcessProposal { - repeated bytes txs = 1; - CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; - repeated Misbehavior misbehavior = 3 [(gogoproto.nullable) = false]; - // hash is the merkle root hash of the fields of the proposed block. - bytes hash = 4; - int64 height = 5; - google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes next_validators_hash = 7; - // address of the public key of the original proposer of the block. - bytes proposer_address = 8; -} - //---------------------------------------- // Response types @@ -157,6 +134,7 @@ message Response { ResponseEcho echo = 2; ResponseFlush flush = 3; ResponseInfo info = 4; + ResponseSetOption set_option = 5; ResponseInitChain init_chain = 6; ResponseQuery query = 7; ResponseBeginBlock begin_block = 8; @@ -168,10 +146,7 @@ message Response { ResponseOfferSnapshot offer_snapshot = 14; ResponseLoadSnapshotChunk load_snapshot_chunk = 15; ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - ResponsePrepareProposal prepare_proposal = 17; - ResponseProcessProposal process_proposal = 18; } - reserved 5; } // nondeterministic @@ -195,10 +170,18 @@ message ResponseInfo { bytes last_block_app_hash = 5; } +// nondeterministic +message ResponseSetOption { + uint32 code = 1; + // bytes data = 2; + string log = 3; + string info = 4; +} + message ResponseInitChain { - tendermint.types.ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; + ConsensusParams consensus_params = 1; + repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; + bytes app_hash = 3; } message ResponseQuery { @@ -225,14 +208,9 @@ message ResponseCheckTx { string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; - string sender = 9; - int64 priority = 10; - - // mempool_error is set by Tendermint. - // ABCI applictions creating a ResponseCheckTX should not set mempool_error. - string mempool_error = 11; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; } message ResponseDeliverTx { @@ -243,15 +221,16 @@ message ResponseDeliverTx { int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; repeated Event events = 7 - [(gogoproto.nullable) = false, - (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; } message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; - tendermint.types.ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated ValidatorUpdate validator_updates = 1 + [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCommit { @@ -296,36 +275,31 @@ message ResponseApplySnapshotChunk { } } -message ResponsePrepareProposal { - repeated bytes txs = 1; -} - -message ResponseProcessProposal { - ProposalStatus status = 1; +//---------------------------------------- +// Misc. - enum ProposalStatus { - UNKNOWN = 0; - ACCEPT = 1; - REJECT = 2; - } +// ConsensusParams contains all consensus-relevant parameters +// that can be adjusted by the abci app +message ConsensusParams { + BlockParams block = 1; + tendermint.types.EvidenceParams evidence = 2; + tendermint.types.ValidatorParams validator = 3; + tendermint.types.VersionParams version = 4; } -//---------------------------------------- -// Misc. +// BlockParams contains limits on the block size. +message BlockParams { + // Note: must be greater than 0 + int64 max_bytes = 1; + // Note: must be greater or equal to -1 + int64 max_gas = 2; +} -message CommitInfo { +message LastCommitInfo { int32 round = 1; repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; } -message ExtendedCommitInfo { - // The round at which the block proposer decided in the previous height. - int32 round = 1; - // List of validators' addresses in the last validator set with their voting - // information, including vote extensions. - repeated ExtendedVoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - // Event allows application developers to attach additional information to // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. // Later, transactions may be queried using these events. @@ -336,9 +310,9 @@ message Event { // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { - string key = 1; - string value = 2; - bool index = 3; // nondeterministic + bytes key = 1; + bytes value = 2; + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. @@ -373,26 +347,23 @@ message VoteInfo { bool signed_last_block = 2; } -message ExtendedVoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; - bytes vote_extension = 3; // Reserved for future use -} - -enum MisbehaviorType { +enum EvidenceType { UNKNOWN = 0; DUPLICATE_VOTE = 1; LIGHT_CLIENT_ATTACK = 2; } -message Misbehavior { - MisbehaviorType type = 1; +message Evidence { + EvidenceType type = 1; // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. // https://github.com/tendermint/tendermint/issues/4581 @@ -417,6 +388,7 @@ service ABCIApplication { rpc Echo(RequestEcho) returns (ResponseEcho); rpc Flush(RequestFlush) returns (ResponseFlush); rpc Info(RequestInfo) returns (ResponseInfo); + rpc SetOption(RequestSetOption) returns (ResponseSetOption); rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); rpc Query(RequestQuery) returns (ResponseQuery); @@ -428,6 +400,4 @@ service ABCIApplication { rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); - rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal); - rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal); } diff --git a/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto similarity index 100% rename from proto/tendermint/crypto/keys.proto rename to third_party/proto/tendermint/crypto/keys.proto diff --git a/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto similarity index 100% rename from proto/tendermint/crypto/proof.proto rename to third_party/proto/tendermint/crypto/proof.proto diff --git a/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto similarity index 100% rename from proto/tendermint/libs/bits/types.proto rename to third_party/proto/tendermint/libs/bits/types.proto diff --git a/proto/tendermint/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto similarity index 100% rename from proto/tendermint/p2p/types.proto rename to third_party/proto/tendermint/p2p/types.proto diff --git a/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto similarity index 100% rename from proto/tendermint/types/block.proto rename to third_party/proto/tendermint/types/block.proto diff --git a/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto similarity index 65% rename from proto/tendermint/types/evidence.proto rename to third_party/proto/tendermint/types/evidence.proto index d9548a430296..3b234571ba67 100644 --- a/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -17,19 +17,19 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; + int64 total_voting_power = 4; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto similarity index 80% rename from proto/tendermint/types/params.proto rename to third_party/proto/tendermint/types/params.proto index 792e8f6cbb5f..70789222a5d3 100644 --- a/proto/tendermint/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -11,10 +11,10 @@ option (gogoproto.equal_all) = true; // ConsensusParams contains consensus critical parameters that determine the // validity of blocks. message ConsensusParams { - BlockParams block = 1; - EvidenceParams evidence = 2; - ValidatorParams validator = 3; - VersionParams version = 4; + BlockParams block = 1 [(gogoproto.nullable) = false]; + EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; + ValidatorParams validator = 3 [(gogoproto.nullable) = false]; + VersionParams version = 4 [(gogoproto.nullable) = false]; } // BlockParams contains limits on the block size. @@ -25,8 +25,11 @@ message BlockParams { // Max gas per block. // Note: must be greater or equal to -1 int64 max_gas = 2; - - reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792 + // Minimum time increment between consecutive blocks (in milliseconds) If the + // block header timestamp is ahead of the system clock, decrease this value. + // + // Not exposed to the application. + int64 time_iota_ms = 3; } // EvidenceParams determine how we handle evidence of malfeasance. @@ -64,7 +67,7 @@ message VersionParams { option (gogoproto.populate) = true; option (gogoproto.equal) = true; - uint64 app = 1; + uint64 app_version = 1; } // HashedParams is a subset of ConsensusParams. diff --git a/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto similarity index 94% rename from proto/tendermint/types/types.proto rename to third_party/proto/tendermint/types/types.proto index 57efc33c5b7e..85e3e2d376f5 100644 --- a/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -104,10 +104,10 @@ message Vote { // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; } // CommitSig is a part of the Vote included in a Commit. diff --git a/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto similarity index 100% rename from proto/tendermint/types/validator.proto rename to third_party/proto/tendermint/types/validator.proto diff --git a/proto/tendermint/version/types.proto b/third_party/proto/tendermint/version/types.proto similarity index 100% rename from proto/tendermint/version/types.proto rename to third_party/proto/tendermint/version/types.proto diff --git a/types/abci.go b/types/abci.go index 5061032a3f80..8f71362eda6d 100644 --- a/types/abci.go +++ b/types/abci.go @@ -19,9 +19,3 @@ type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBloc // PeerFilter responds to p2p filtering queries from Tendermint type PeerFilter func(info string) abci.ResponseQuery - -// ProcessProposalHandler defines a function type alias for processing a proposer -type ProcessProposalHandler func(Context, abci.RequestProcessProposal) abci.ResponseProcessProposal - -// PrepareProposalHandler defines a function type alias for preparing a proposal -type PrepareProposalHandler func(Context, abci.RequestPrepareProposal) abci.ResponsePrepareProposal diff --git a/types/abci.pb.go b/types/abci.pb.go index e07b56d5f243..2e5a4604a7a4 100644 --- a/types/abci.pb.go +++ b/types/abci.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" types1 "github.com/tendermint/tendermint/abci/types" io "io" math "math" diff --git a/types/coin.pb.go b/types/coin.pb.go index d8bc1676192b..9916b8451e46 100644 --- a/types/coin.pb.go +++ b/types/coin.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/types/context.go b/types/context.go index bc1f2dd8aa09..642f371a99f7 100644 --- a/types/context.go +++ b/types/context.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" @@ -37,7 +37,7 @@ type Context struct { checkTx bool recheckTx bool // if recheckTx == true, then checkTx must also be true minGasPrice DecCoins - consParams *tmproto.ConsensusParams + consParams *abci.ConsensusParams eventManager *EventManager } @@ -74,13 +74,13 @@ func (c Context) HeaderHash() tmbytes.HexBytes { return hash } -func (c Context) ConsensusParams() *tmproto.ConsensusParams { - return proto.Clone(c.consParams).(*tmproto.ConsensusParams) +func (c Context) ConsensusParams() *abci.ConsensusParams { + return proto.Clone(c.consParams).(*abci.ConsensusParams) } // create a new context func NewContext(ms MultiStore, header tmproto.Header, isCheckTx bool, logger log.Logger) Context { - // https://github.com/cosmos/gogoproto/issues/519 + // https://github.com/gogo/protobuf/issues/519 header.Time = header.Time.UTC() return Context{ ctx: context.Background(), @@ -109,7 +109,7 @@ func (c Context) WithMultiStore(ms MultiStore) Context { // WithBlockHeader returns a Context with an updated tendermint block header in UTC time. func (c Context) WithBlockHeader(header tmproto.Header) Context { - // https://github.com/cosmos/gogoproto/issues/519 + // https://github.com/gogo/protobuf/issues/519 header.Time = header.Time.UTC() c.header = header return c @@ -127,7 +127,7 @@ func (c Context) WithHeaderHash(hash []byte) Context { // WithBlockTime returns a Context with an updated tendermint block header time in UTC time func (c Context) WithBlockTime(newTime time.Time) Context { newHeader := c.BlockHeader() - // https://github.com/cosmos/gogoproto/issues/519 + // https://github.com/gogo/protobuf/issues/519 newHeader.Time = newTime.UTC() return c.WithBlockHeader(newHeader) } @@ -211,7 +211,7 @@ func (c Context) WithMinGasPrices(gasPrices DecCoins) Context { } // WithConsensusParams returns a Context with an updated consensus params -func (c Context) WithConsensusParams(params *tmproto.ConsensusParams) Context { +func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context { c.consParams = params return c } @@ -229,12 +229,9 @@ func (c Context) IsZero() bool { // WithValue is deprecated, provided for backwards compatibility // Please use -// -// ctx = ctx.WithContext(context.WithValue(ctx.Context(), key, false)) -// +// ctx = ctx.WithContext(context.WithValue(ctx.Context(), key, false)) // instead of -// -// ctx = ctx.WithValue(key, false) +// ctx = ctx.WithValue(key, false) func (c Context) WithValue(key, value interface{}) Context { c.ctx = context.WithValue(c.ctx, key, value) return c @@ -242,12 +239,9 @@ func (c Context) WithValue(key, value interface{}) Context { // Value is deprecated, provided for backwards compatibility // Please use -// -// ctx.Context().Value(key) -// +// ctx.Context().Value(key) // instead of -// -// ctx.Value(key) +// ctx.Value(key) func (c Context) Value(key interface{}) interface{} { return c.ctx.Value(key) } diff --git a/types/context_test.go b/types/context_test.go index 3052890a3f0c..9533a52ee2e3 100644 --- a/types/context_test.go +++ b/types/context_test.go @@ -127,7 +127,7 @@ func (s *contextTestSuite) TestContextWithCustom() { // test consensus param s.Require().Nil(ctx.ConsensusParams()) - cp := &tmproto.ConsensusParams{} + cp := &abci.ConsensusParams{} s.Require().Equal(cp, ctx.WithConsensusParams(cp).ConsensusParams()) // test inner context diff --git a/types/events.go b/types/events.go index bd96f2177855..2239bab86c28 100644 --- a/types/events.go +++ b/types/events.go @@ -7,8 +7,8 @@ import ( "sort" "strings" - "github.com/cosmos/gogoproto/jsonpb" - proto "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/jsonpb" + proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" "github.com/cosmos/cosmos-sdk/codec" @@ -100,8 +100,8 @@ func TypedEventToEvent(tev proto.Message) (Event, error) { attrs := make([]abci.EventAttribute, 0, len(attrMap)) for k, v := range attrMap { attrs = append(attrs, abci.EventAttribute{ - Key: k, - Value: string(v), + Key: []byte(k), + Value: v, }) } @@ -132,7 +132,7 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) { attrMap := make(map[string]json.RawMessage) for _, attr := range event.Attributes { - attrMap[attr.Key] = json.RawMessage(attr.Value) + attrMap[string(attr.Key)] = attr.Value } attrBytes, err := json.Marshal(attrMap) @@ -191,7 +191,7 @@ func (a Attribute) String() string { // ToKVPair converts an Attribute object into a Tendermint key/value pair. func (a Attribute) ToKVPair() abci.EventAttribute { - return abci.EventAttribute{Key: a.Key, Value: a.Value} + return abci.EventAttribute{Key: []byte(a.Key), Value: []byte(a.Value)} } // AppendAttributes adds one or more attributes to an Event. diff --git a/types/events_test.go b/types/events_test.go index 55ee07f62468..2f2bacce8816 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -141,15 +141,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo"}, - {Key: "recipient", Value: "bar"}, + {Key: []byte("sender"), Value: []byte("foo")}, + {Key: []byte("recipient"), Value: []byte("bar")}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5"}, - {Key: "unbond", Value: "10"}, + {Key: []byte("deposit"), Value: []byte("5")}, + {Key: []byte("unbond"), Value: []byte("10")}, }, }, } @@ -165,15 +165,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar", Index: true}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar"), Index: true}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10", Index: true}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10"), Index: true}, }, }, }, @@ -185,15 +185,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar"}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar")}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10"}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10")}, }, }, }, @@ -208,15 +208,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() { { Type: "message", Attributes: []abci.EventAttribute{ - {Key: "sender", Value: "foo", Index: true}, - {Key: "recipient", Value: "bar", Index: true}, + {Key: []byte("sender"), Value: []byte("foo"), Index: true}, + {Key: []byte("recipient"), Value: []byte("bar"), Index: true}, }, }, { Type: "staking", Attributes: []abci.EventAttribute{ - {Key: "deposit", Value: "5", Index: true}, - {Key: "unbond", Value: "10", Index: true}, + {Key: []byte("deposit"), Value: []byte("5"), Index: true}, + {Key: []byte("unbond"), Value: []byte("10"), Index: true}, }, }, }, diff --git a/types/kv/kv.pb.go b/types/kv/kv.pb.go index f03111ef6f9f..eedb948bf5ae 100644 --- a/types/kv/kv.pb.go +++ b/types/kv/kv.pb.go @@ -5,8 +5,8 @@ package kv import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/types/mempool/mempool.go b/types/mempool/mempool.go deleted file mode 100644 index 3413d7cc9f8f..000000000000 --- a/types/mempool/mempool.go +++ /dev/null @@ -1,42 +0,0 @@ -package mempool - -import ( - "errors" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type Mempool interface { - // Insert attempts to insert a Tx into the app-side mempool returning - // an error upon failure. - Insert(sdk.Context, sdk.Tx) error - - // Select returns an Iterator over the app-side mempool. If txs are specified, - // then they shall be incorporated into the Iterator. The Iterator must - // closed by the caller. - Select(sdk.Context, [][]byte) Iterator - - // CountTx returns the number of transactions currently in the mempool. - CountTx() int - - // Remove attempts to remove a transaction from the mempool, returning an error - // upon failure. - Remove(sdk.Tx) error -} - -// Iterator defines an app-side mempool iterator interface that is as minimal as -// possible. The order of iteration is determined by the app-side mempool -// implementation. -type Iterator interface { - // Next returns the next transaction from the mempool. If there are no more - // transactions, it returns nil. - Next() Iterator - - // Tx returns the transaction at the current position of the iterator. - Tx() sdk.Tx -} - -var ( - ErrTxNotFound = errors.New("tx not found in mempool") - ErrMempoolTxMaxCapacity = errors.New("pool reached max tx capacity") -) diff --git a/types/mempool/mempool_test.go b/types/mempool/mempool_test.go deleted file mode 100644 index c8d97dd6c00c..000000000000 --- a/types/mempool/mempool_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package mempool_test - -import ( - "fmt" - "math/rand" - "testing" - - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -var ( - msgWithdrawDelegatorReward = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1lzhlnpahvznwfv4jmay2tgaha5kmz5qxerarrl\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1k2d9ed9vgfuk2m58a2d80q9u6qljkh4vfaqjfq\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1vygmh344ldv9qefss9ek7ggsnxparljlmj56q5\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1ej2es5fjztqjcd4pwa0zyvaevtjd2y5wxxp9gd\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}") - msgMultiSigMsgSubmitProposal = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.gov.v1beta1.MsgSubmitProposal\",\"content\":{\"@type\":\"\\/cosmos.distribution.v1beta1.CommunityPoolSpendProposal\",\"title\":\"ATOM \\ud83e\\udd1d Osmosis: Allocate Community Pool to ATOM Liquidity Incentives\",\"description\":\"ATOMs should be the base money of Cosmos, just like ETH is the base money of the entire Ethereum DeFi ecosystem. ATOM is currently well positioned to play this role among Cosmos assets because it has the highest market cap, most liquidity, largest brand, and many integrations with fiat onramps. ATOM is the gateway to Cosmos.\\n\\nIn the Cosmos Hub Port City vision, ATOMs are pitched as equity in the Cosmos Hub. However, this alone is insufficient to establish ATOM as the base currency of the Cosmos ecosystem as a whole. Instead, the ATOM community must work to actively promote the use of ATOMs throughout the Cosmos ecosystem, rather than passively relying on the Hub's reputation to create ATOM's value.\\n\\nIn order to cement the role of ATOMs in Cosmos DeFi, the Cosmos Hub should leverage its community pool to help align incentives with other protocols within the Cosmos ecosystem. We propose beginning this initiative by using the community pool ATOMs to incentivize deep ATOM base pair liquidity pools on the Osmosis Network.\\n\\nOsmosis is the first IBC-enabled DeFi application. Within its 3 weeks of existence, it has already 100x\\u2019d the number of IBC transactions ever created, demonstrating the power of IBC and the ability of the Cosmos SDK to bootstrap DeFi protocols with $100M+ TVL in a short period of time. Since its announcement Osmosis has helped bring renewed attention and interest to Cosmos from the crypto community at large and kickstarted the era of Cosmos DeFi.\\n\\nOsmosis has already helped in establishing ATOM as the Schelling Point of the Cosmos ecosystem. The genesis distribution of OSMO was primarily based on an airdrop to ATOM holders specifically, acknowledging the importance of ATOM to all future projects within the Cosmos. Furthermore, the Osmosis LP rewards currently incentivize ATOMs to be one of the main base pairs of the platform.\\n\\nOsmosis has the ability to incentivize AMM liquidity, a feature not available on any other IBC-enabled DEX. Osmosis already uses its own native OSMO liquidity rewards to incentivize ATOMs to be one of the main base pairs, leading to ~2.2 million ATOMs already providing liquidity on the platform.\\n\\nIn addition to these native OSMO LP Rewards, the platform also includes a feature called \\u201cexternal incentives\\u201d that allows anyone to permissionlessly add additional incentives in any token to the LPs of any AMM pools they wish. You can read more about this mechanism here: https:\\/\\/medium.com\\/osmosis\\/osmosis-liquidity-mining-101-2fa58d0e9d4d#f413 . Pools containing Cosmos assets such as AKT and XPRT are already planned to receive incentives from their respective community pools and\\/or foundations.\\n\\nWe propose the Cosmos Hub dedicate 100,000 ATOMs from its Community Pool to be allocated towards liquidity incentives on Osmosis over the next 3 months. This community fund proposal will transfer 100,000 ATOMs to a multisig group who will then allocate the ATOMs to bonded liquidity gauges on Osmosis on a biweekly basis, according to direction given by Cosmos Hub governance. For simplicity, we propose setting the liquidity incentives to initially point to Osmosis Pool #1, the ATOM\\/OSMO pool, which is the pool with by far the highest TVL and Volume. Cosmos Hub governance can then use Text Proposals to further direct the multisig members to reallocate incentives to new pools.\\n\\nThe multisig will consist of a 2\\/3 key holder set consisting of the following individuals whom have all agreed to participate in this process shall this proposal pass:\\n\\n- Zaki Manian\\n- Federico Kunze\\n- Marko Baricevic\\n\\nThis is one small step for the Hub, but one giant leap for ATOM-aligned.\\n\",\"recipient\":\"cosmos157n0d38vwn5dvh64rc39q3lyqez0a689g45rkc\",\"amount\":[{\"denom\":\"uatom\",\"amount\":\"100000000000\"}]},\"initial_deposit\":[{\"denom\":\"uatom\",\"amount\":\"64000000\"}],\"proposer\":\"cosmos1ey69r37gfxvxg62sh4r0ktpuc46pzjrmz29g45\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":2,\"public_keys\":[{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AldOvgv8dU9ZZzuhGydQD5FYreLhfhoBgrDKi8ZSTbCQ\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AxUMR\\/GKoycWplR+2otzaQZ9zhHRQWJFt3h1bPg1ltha\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AlI9yVj2Aejow6bYl2nTRylfU+9LjQLEl3keq0sERx9+\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"A0UvHPcvCCaIoFY9Ygh0Pxq9SZTAWtduOyinit\\/8uo+Q\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"As7R9fDUnwsUVLDr1cxspp+cY9UfXfUf7i9\\/w+N0EzKA\"}]},\"mode_info\":{\"multi\":{\"bitarray\":{\"extra_bits_stored\":5,\"elems\":\"SA==\"},\"mode_infos\":[{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}}]}},\"sequence\":\"102\"}],\"fee\":{\"amount\":[],\"gas_limit\":\"10000000\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"CkB\\/KKWTFntEWbg1A0vu7DCHffJ4x4db\\/EI8dIVzRFFW7iuZBzvq+jYBtrcTlVpEVfmCY3ggIMnWfbMbb1egIlYbCkAmDf6Eaj1NbyXY8JZZtYAX3Qj81ZuKZUBeLW1ZvH1XqAg9sl\\/sqpLMnsJzKfmqEXvhoMwu1YxcSzrY6CJfuYL6\"]}") -) - -// testPubKey is a dummy implementation of PubKey used for testing. -type testPubKey struct { - address sdk.AccAddress -} - -func (t testPubKey) Reset() { panic("not implemented") } -func (t testPubKey) String() string { panic("not implemented") } -func (t testPubKey) ProtoMessage() { panic("not implemented") } -func (t testPubKey) Address() cryptotypes.Address { return t.address.Bytes() } -func (t testPubKey) Bytes() []byte { panic("not implemented") } -func (t testPubKey) VerifySignature(msg []byte, sig []byte) bool { panic("not implemented") } -func (t testPubKey) Equals(key cryptotypes.PubKey) bool { panic("not implemented") } -func (t testPubKey) Type() string { panic("not implemented") } - -// testTx is a dummy implementation of Tx used for testing. -type testTx struct { - id int - priority int64 - nonce uint64 - address sdk.AccAddress -} - -func (tx testTx) GetSigners() []sdk.AccAddress { panic("not implemented") } - -func (tx testTx) GetPubKeys() ([]cryptotypes.PubKey, error) { panic("not implemented") } - -func (tx testTx) GetSignaturesV2() (res []txsigning.SignatureV2, err error) { - res = append(res, txsigning.SignatureV2{ - PubKey: testPubKey{address: tx.address}, - Data: nil, - Sequence: tx.nonce, - }) - - return res, nil -} - -var ( - _ sdk.Tx = (*testTx)(nil) - _ signing.SigVerifiableTx = (*testTx)(nil) - _ cryptotypes.PubKey = (*testPubKey)(nil) -) - -func (tx testTx) GetMsgs() []sdk.Msg { return nil } - -func (tx testTx) ValidateBasic() error { return nil } - -func (tx testTx) String() string { - return fmt.Sprintf("tx a: %s, p: %d, n: %d", tx.address, tx.priority, tx.nonce) -} - -type sigErrTx struct { - getSigs func() ([]txsigning.SignatureV2, error) -} - -func (_ sigErrTx) Size() int64 { return 0 } -func (_ sigErrTx) GetMsgs() []sdk.Msg { return nil } -func (_ sigErrTx) ValidateBasic() error { return nil } -func (_ sigErrTx) GetSigners() []sdk.AccAddress { return nil } -func (_ sigErrTx) GetPubKeys() ([]cryptotypes.PubKey, error) { return nil, nil } -func (t sigErrTx) GetSignaturesV2() ([]txsigning.SignatureV2, error) { return t.getSigs() } - -type txSpec struct { - i int - p int - n int - a sdk.AccAddress -} - -func (tx txSpec) String() string { - return fmt.Sprintf("[tx i: %d, a: %s, p: %d, n: %d]", tx.i, tx.a, tx.p, tx.n) -} - -func fetchTxs(iterator mempool.Iterator, maxBytes int64) []sdk.Tx { - const txSize = 1 - var ( - txs []sdk.Tx - numBytes int64 - ) - for iterator != nil { - if numBytes += txSize; numBytes > maxBytes { - break - } - txs = append(txs, iterator.Tx()) - i := iterator.Next() - iterator = i - } - return txs -} - -func (s *MempoolTestSuite) TestDefaultMempool() { - t := s.T() - ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) - txCount := 1000 - var txs []testTx - - for i := 0; i < txCount; i++ { - acc := accounts[i%len(accounts)] - tx := testTx{ - nonce: 0, - address: acc.Address, - priority: rand.Int63(), - } - txs = append(txs, tx) - } - - // empty mempool behavior - require.Equal(t, 0, s.mempool.CountTx()) - itr := s.mempool.Select(ctx, nil) - require.Nil(t, itr) - - // same sender-nonce just overwrites a tx - for _, tx := range txs { - err := s.mempool.Insert(ctx, tx) - require.NoError(t, err) - } - require.Equal(t, len(accounts), s.mempool.CountTx()) - - // distinct sender-nonce should not overwrite a tx - s.resetMempool() - for i, tx := range txs { - tx.nonce = uint64(i) - err := s.mempool.Insert(ctx, tx) - require.NoError(t, err) - } - require.Equal(t, txCount, s.mempool.CountTx()) - - itr = s.mempool.Select(ctx, nil) - sel := fetchTxs(itr, 13) - require.Equal(t, 13, len(sel)) - - // a tx which does not implement SigVerifiableTx should not be inserted - tx := &sigErrTx{getSigs: func() ([]txsigning.SignatureV2, error) { - return nil, fmt.Errorf("error") - }} - require.Error(t, s.mempool.Insert(ctx, tx)) - require.Error(t, s.mempool.Remove(tx)) - tx.getSigs = func() ([]txsigning.SignatureV2, error) { - return nil, nil - } - require.Error(t, s.mempool.Insert(ctx, tx)) - require.Error(t, s.mempool.Remove(tx)) - - // removing a tx not in the mempool should error - s.resetMempool() - require.NoError(t, s.mempool.Insert(ctx, txs[0])) - require.ErrorIs(t, s.mempool.Remove(txs[1]), mempool.ErrTxNotFound) - - // inserting a tx with a different priority should overwrite the old tx - newPriorityTx := testTx{ - address: txs[0].address, - priority: txs[0].priority + 1, - nonce: txs[0].nonce, - } - require.NoError(t, s.mempool.Insert(ctx, newPriorityTx)) - require.Equal(t, 1, s.mempool.CountTx()) -} - -type MempoolTestSuite struct { - suite.Suite - numTxs int - numAccounts int - iterations int - mempool mempool.Mempool -} - -func (s *MempoolTestSuite) resetMempool() { - s.iterations = 0 - s.mempool = mempool.NewSenderNonceMempool() -} - -func (s *MempoolTestSuite) SetupTest() { - s.numTxs = 1000 - s.numAccounts = 100 - s.resetMempool() -} - -func TestMempoolTestSuite(t *testing.T) { - suite.Run(t, new(MempoolTestSuite)) -} - -func (s *MempoolTestSuite) TestSampleTxs() { - ctxt := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - t := s.T() - s.resetMempool() - mp := s.mempool - delegatorTx, err := unmarshalTx(msgWithdrawDelegatorReward) - - require.NoError(t, err) - require.NoError(t, mp.Insert(ctxt, delegatorTx)) - require.Equal(t, 1, mp.CountTx()) - - proposalTx, err := unmarshalTx(msgMultiSigMsgSubmitProposal) - require.NoError(t, err) - require.NoError(t, mp.Insert(ctxt, proposalTx)) - require.Equal(t, 2, mp.CountTx()) -} - -func unmarshalTx(txBytes []byte) (sdk.Tx, error) { - cfg := simapp.MakeTestEncodingConfig() - return cfg.TxConfig.TxJSONDecoder()(txBytes) -} diff --git a/types/mempool/sender_nonce.go b/types/mempool/sender_nonce.go deleted file mode 100644 index 82f5bbfc56f1..000000000000 --- a/types/mempool/sender_nonce.go +++ /dev/null @@ -1,233 +0,0 @@ -package mempool - -import ( - crand "crypto/rand" // #nosec // crypto/rand is used for seed generation - "encoding/binary" - "fmt" - "math/rand" // #nosec // math/rand is used for random selection and seeded from crypto/rand - - "github.com/huandu/skiplist" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -var ( - _ Mempool = (*senderNonceMempool)(nil) - _ Iterator = (*senderNonceMepoolIterator)(nil) -) - -var DefaultMaxTx = 0 - -// senderNonceMempool is a mempool that prioritizes transactions within a sender by nonce, the lowest first, -// but selects a random sender on each iteration. The mempool is iterated by: -// -// 1) Maintaining a separate list of nonce ordered txs per sender -// 2) For each select iteration, randomly choose a sender and pick the next nonce ordered tx from their list -// 3) Repeat 1,2 until the mempool is exhausted -// -// Note that PrepareProposal could choose to stop iteration before reaching the end if maxBytes is reached. -type senderNonceMempool struct { - senders map[string]*skiplist.SkipList - rnd *rand.Rand - maxTx int - existingTx map[txKey]bool -} - -type SenderNonceOptions func(mp *senderNonceMempool) - -type txKey struct { - address string - nonce uint64 -} - -// NewSenderNonceMempool creates a new mempool that prioritizes transactions by nonce, the lowest first. -func NewSenderNonceMempool(opts ...SenderNonceOptions) Mempool { - senderMap := make(map[string]*skiplist.SkipList) - existingTx := make(map[txKey]bool) - snp := &senderNonceMempool{ - senders: senderMap, - maxTx: DefaultMaxTx, - existingTx: existingTx, - } - - var seed int64 - if err := binary.Read(crand.Reader, binary.BigEndian, &seed); err != nil { - panic(err) - } - - snp.setSeed(seed) - - for _, opt := range opts { - opt(snp) - } - - return snp -} - -// SenderNonceSeedOpt Option To add a Seed for random type when calling the constructor NewSenderNonceMempool -// Example: -// > random_seed := int64(1000) -// > NewSenderNonceMempool(SenderNonceSeedTxOpt(random_seed)) -func SenderNonceSeedOpt(seed int64) SenderNonceOptions { - return func(snp *senderNonceMempool) { - snp.setSeed(seed) - } -} - -// SenderNonceMaxTxOpt Option To set limit of max tx when calling the constructor NewSenderNonceMempool -// Example: -// > NewSenderNonceMempool(SenderNonceMaxTxOpt(100)) -func SenderNonceMaxTxOpt(maxTx int) SenderNonceOptions { - return func(snp *senderNonceMempool) { - snp.maxTx = maxTx - } -} - -func (snm *senderNonceMempool) setSeed(seed int64) { - s1 := rand.NewSource(seed) - snm.rnd = rand.New(s1) //#nosec // math/rand is seeded from crypto/rand by default -} - -// Insert adds a tx to the mempool. It returns an error if the tx does not have at least one signer. -// priority is ignored. -func (snm *senderNonceMempool) Insert(_ sdk.Context, tx sdk.Tx) error { - if snm.maxTx > 0 && snm.CountTx() >= snm.maxTx { - return ErrMempoolTxMaxCapacity - } - if snm.maxTx < 0 { - return nil - } - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() - if err != nil { - return err - } - if len(sigs) == 0 { - return fmt.Errorf("tx must have at least one signer") - } - - sig := sigs[0] - sender := sig.PubKey.Address().String() - nonce := sig.Sequence - senderTxs, found := snm.senders[sender] - if !found { - senderTxs = skiplist.New(skiplist.Uint64) - snm.senders[sender] = senderTxs - } - senderTxs.Set(nonce, tx) - key := txKey{nonce: nonce, address: sender} - snm.existingTx[key] = true - return nil -} - -// Select returns an iterator ordering transactions the mempool with the lowest nonce of a random selected sender first. -func (snm *senderNonceMempool) Select(_ sdk.Context, _ [][]byte) Iterator { - var senders []string - senderCursors := make(map[string]*skiplist.Element) - - orderedSenders := skiplist.New(skiplist.String) - - // #nosec - for s := range snm.senders { - orderedSenders.Set(s, s) - } - - s := orderedSenders.Front() - for s != nil { - sender := s.Value.(string) - senders = append(senders, sender) - senderCursors[sender] = snm.senders[sender].Front() - s = s.Next() - } - - iter := &senderNonceMepoolIterator{ - senders: senders, - rnd: snm.rnd, - senderCursors: senderCursors, - } - - return iter.Next() -} - -// CountTx returns the total count of txs in the mempool. -func (snm *senderNonceMempool) CountTx() int { - return len(snm.existingTx) -} - -// Remove removes a tx from the mempool. It returns an error if the tx does not have at least one signer or the tx -// was not found in the pool. -func (snm *senderNonceMempool) Remove(tx sdk.Tx) error { - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() - if err != nil { - return err - } - if len(sigs) == 0 { - return fmt.Errorf("tx must have at least one signer") - } - - sig := sigs[0] - sender := sig.PubKey.Address().String() - nonce := sig.Sequence - senderTxs, found := snm.senders[sender] - if !found { - return ErrTxNotFound - } - - res := senderTxs.Remove(nonce) - if res == nil { - return ErrTxNotFound - } - - if senderTxs.Len() == 0 { - delete(snm.senders, sender) - } - - key := txKey{nonce: nonce, address: sender} - delete(snm.existingTx, key) - - return nil -} - -type senderNonceMepoolIterator struct { - rnd *rand.Rand - currentTx *skiplist.Element - senders []string - senderCursors map[string]*skiplist.Element -} - -// Next returns the next iterator state which will contain a tx with the next smallest nonce of a randomly -// selected sender. -func (i *senderNonceMepoolIterator) Next() Iterator { - for len(i.senders) > 0 { - senderIndex := i.rnd.Intn(len(i.senders)) - sender := i.senders[senderIndex] - senderCursor, found := i.senderCursors[sender] - if !found { - i.senders = removeAtIndex(i.senders, senderIndex) - continue - } - - if nextCursor := senderCursor.Next(); nextCursor != nil { - i.senderCursors[sender] = nextCursor - } else { - i.senders = removeAtIndex(i.senders, senderIndex) - } - - return &senderNonceMepoolIterator{ - senders: i.senders, - currentTx: senderCursor, - rnd: i.rnd, - senderCursors: i.senderCursors, - } - } - - return nil -} - -func (i *senderNonceMepoolIterator) Tx() sdk.Tx { - return i.currentTx.Value.(sdk.Tx) -} - -func removeAtIndex[T any](slice []T, index int) []T { - return append(slice[:index], slice[index+1:]...) -} diff --git a/types/mempool/sender_nonce_property_test.go b/types/mempool/sender_nonce_property_test.go deleted file mode 100644 index bcb7279c8dac..000000000000 --- a/types/mempool/sender_nonce_property_test.go +++ /dev/null @@ -1,124 +0,0 @@ -package mempool_test - -import ( - "sort" - - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "pgregory.net/rapid" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - mempool "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -var ( - _ sdk.Tx = (*testTx)(nil) - _ signing.SigVerifiableTx = (*testTx)(nil) - _ cryptotypes.PubKey = (*testPubKey)(nil) -) - -// Property Based Testing -// Split the senders tx in independent slices and then test the following properties in each slice -// same elements input on the mempool should be in the output except for sender nonce duplicates, which are overwritten by the later duplicate entries. -// for every sender transaction tx_n, tx_0.nonce < tx_1.nonce ... < tx_n.nonce - -func AddressGenerator(t *rapid.T) *rapid.Generator[sdk.AccAddress] { - return rapid.Custom(func(t *rapid.T) sdk.AccAddress { - pkBz := rapid.SliceOfN(rapid.Byte(), 20, 20).Draw(t, "hex") - return sdk.AccAddress(pkBz) - }) -} - -func testMempoolProperties(t *rapid.T) { - ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - mp := mempool.NewSenderNonceMempool() - - genMultipleAddress := rapid.SliceOfNDistinct(AddressGenerator(t), 1, 10, func(acc sdk.AccAddress) string { - return acc.String() - }) - - accounts := genMultipleAddress.Draw(t, "address") - genTx := rapid.Custom(func(t *rapid.T) testTx { - return testTx{ - priority: rapid.Int64Range(0, 1000).Draw(t, "priority"), - nonce: rapid.Uint64().Draw(t, "nonce"), - address: rapid.SampledFrom(accounts).Draw(t, "acc"), - } - }) - genMultipleTX := rapid.SliceOfN(genTx, 1, 5000) - - txs := genMultipleTX.Draw(t, "txs") - senderTxRaw := getSenderTxMap(txs) - - for _, tx := range txs { - err := mp.Insert(ctx, tx) - require.NoError(t, err) - } - - iter := mp.Select(ctx, nil) - orderTx := fetchAllTxs(iter) - require.Equal(t, len(orderTx), mp.CountTx()) - - senderTxOrdered := getSenderTxMap(orderTx) - - for key := range senderTxOrdered { - ordered, found := senderTxOrdered[key] - require.True(t, found) - - raw, found := senderTxRaw[key] - require.True(t, found) - - rawSet := mergeByNonce(raw) - sort.Slice(rawSet, func(i, j int) bool { return rawSet[i].nonce < rawSet[j].nonce }) - require.Equal(t, rawSet, ordered) - } -} - -func (s *MempoolTestSuite) TestProperties() { - t := s.T() - rapid.Check(t, testMempoolProperties) -} - -func getSenderTxMap(txs []testTx) map[string][]testTx { - senderTxs := make(map[string][]testTx) - for _, tx := range txs { - stx, found := senderTxs[tx.address.String()] - if !found { - stx = make([]testTx, 0) - } - - stx = append(stx, tx) - senderTxs[tx.address.String()] = stx - } - - return senderTxs -} - -func fetchAllTxs(iterator mempool.Iterator) []testTx { - var txs []testTx - for iterator != nil { - tx := iterator.Tx() - txs = append(txs, tx.(testTx)) - i := iterator.Next() - iterator = i - } - - return txs -} - -func mergeByNonce(raw []testTx) []testTx { - rawMap := make(map[uint64]testTx) - for _, v := range raw { - rawMap[v.nonce] = v - } - - result := make([]testTx, 0) - for _, v := range rawMap { - result = append(result, v) - } - - return result -} diff --git a/types/mempool/sender_nonce_test.go b/types/mempool/sender_nonce_test.go deleted file mode 100644 index 7e37e1cb06a7..000000000000 --- a/types/mempool/sender_nonce_test.go +++ /dev/null @@ -1,193 +0,0 @@ -package mempool_test - -import ( - "fmt" - "math/rand" - "testing" - - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -func (s *MempoolTestSuite) TestTxOrder() { - t := s.T() - ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) - sa := accounts[0].Address - sb := accounts[1].Address - - tests := []struct { - txs []txSpec - order []int - fail bool - seed int64 - }{ - { - txs: []txSpec{ - {p: 21, n: 4, a: sa}, - {p: 8, n: 3, a: sa}, - {p: 6, n: 2, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 20, n: 1, a: sa}, - }, - order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 3, n: 0, a: sa}, - {p: 5, n: 1, a: sa}, - {p: 9, n: 2, a: sa}, - {p: 6, n: 0, a: sb}, - {p: 5, n: 1, a: sb}, - {p: 8, n: 2, a: sb}, - }, - order: []int{3, 4, 0, 5, 1, 2}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 21, n: 4, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 20, n: 1, a: sa}, - }, - order: []int{1, 2, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 50, n: 3, a: sa}, - {p: 30, n: 2, a: sa}, - {p: 10, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 21, n: 2, a: sb}, - }, - order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 50, n: 3, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 99, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 8, n: 2, a: sb}, - }, - order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 30, a: sa, n: 2}, - {p: 20, a: sb, n: 1}, - {p: 15, a: sa, n: 1}, - {p: 10, a: sa, n: 0}, - {p: 8, a: sb, n: 0}, - {p: 6, a: sa, n: 3}, - {p: 4, a: sb, n: 3}, - }, - order: []int{4, 1, 3, 6, 2, 0, 5}, - // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 - seed: 0, - }, - { - txs: []txSpec{ - {p: 6, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sb}, - }, - order: []int{2, 3, 0, 1}, - // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 - seed: 0, - }, - } - for i, tt := range tests { - t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := mempool.NewSenderNonceMempool(mempool.SenderNonceSeedOpt(tt.seed)) - // create test txs and insert into mempool - for i, ts := range tt.txs { - tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} - err := pool.Insert(ctx, tx) - require.NoError(t, err) - } - - itr := pool.Select(ctx, nil) - orderedTxs := fetchTxs(itr, 1000) - var txOrder []int - for _, tx := range orderedTxs { - txOrder = append(txOrder, tx.(testTx).id) - } - for _, tx := range orderedTxs { - require.NoError(t, pool.Remove(tx)) - } - require.Equal(t, tt.order, txOrder) - require.Equal(t, 0, pool.CountTx()) - }) - } -} - -func (s *MempoolTestSuite) TestMaxTx() { - t := s.T() - ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - mp := mempool.NewSenderNonceMempool(mempool.SenderNonceMaxTxOpt(1)) - - tx := testTx{ - nonce: 0, - address: accounts[0].Address, - priority: rand.Int63(), - } - tx2 := testTx{ - nonce: 1, - address: accounts[0].Address, - priority: rand.Int63(), - } - - // empty mempool behavior - require.Equal(t, 0, s.mempool.CountTx()) - itr := mp.Select(ctx, nil) - require.Nil(t, itr) - - err := mp.Insert(ctx, tx) - require.NoError(t, err) - - err = mp.Insert(ctx, tx2) - require.Equal(t, mempool.ErrMempoolTxMaxCapacity, err) - -} - -func (s *MempoolTestSuite) TestTxNotFoundOnSender() { - t := s.T() - ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - mp := mempool.NewSenderNonceMempool() - - txSender := testTx{ - nonce: 0, - address: accounts[0].Address, - priority: rand.Int63(), - } - - tx := testTx{ - nonce: 1, - address: accounts[0].Address, - priority: rand.Int63(), - } - - err := mp.Insert(ctx, txSender) - require.NoError(t, err) - - err = mp.Remove(tx) - require.Equal(t, mempool.ErrTxNotFound, err) -} diff --git a/types/mempool/skip_list_test.go b/types/mempool/skip_list_test.go deleted file mode 100644 index f13f297f12e2..000000000000 --- a/types/mempool/skip_list_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package mempool_test - -import ( - "testing" - - huandu "github.com/huandu/skiplist" - "github.com/stretchr/testify/require" -) - -type collisionKey struct { - a int - b int -} - -func TestSkipListCollisions(t *testing.T) { - integerList := huandu.New(huandu.Int) - - integerList.Set(1, 1) - integerList.Set(2, 2) - integerList.Set(3, 3) - - k := integerList.Front() - i := 1 - for k != nil { - require.Equal(t, i, k.Key()) - require.Equal(t, i, k.Value) - i++ - k = k.Next() - } - - // a duplicate key will overwrite the previous value - integerList.Set(1, 4) - require.Equal(t, 3, integerList.Len()) - require.Equal(t, 4, integerList.Get(1).Value) - - // prove this again with a compound key - compoundList := huandu.New(huandu.LessThanFunc(func(x, y any) int { - kx := x.(collisionKey) - ky := y.(collisionKey) - if kx.a == ky.a { - return huandu.Int.Compare(kx.b, ky.b) - } - return huandu.Int.Compare(kx.a, ky.a) - })) - - compoundList.Set(collisionKey{a: 1, b: 1}, 1) - compoundList.Set(collisionKey{a: 1, b: 2}, 2) - compoundList.Set(collisionKey{a: 1, b: 3}, 3) - - require.Equal(t, 3, compoundList.Len()) - compoundList.Set(collisionKey{a: 1, b: 2}, 4) - require.Equal(t, 4, compoundList.Get(collisionKey{a: 1, b: 2}).Value) - compoundList.Set(collisionKey{a: 2, b: 2}, 5) - require.Equal(t, 4, compoundList.Len()) -} diff --git a/types/module/configurator.go b/types/module/configurator.go index 77311b6ab6ce..f118bcb19043 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -3,7 +3,7 @@ package module import ( "fmt" - "github.com/cosmos/gogoproto/grpc" + "github.com/gogo/protobuf/grpc" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/proto.go b/types/proto.go index a7bc8451b846..5f2df428d27d 100644 --- a/types/proto.go +++ b/types/proto.go @@ -3,7 +3,7 @@ package types // CustomProtobufType defines the interface custom gogo proto types must implement // in order to be used as a "customtype" extension. // -// ref: https://github.com/cosmos/gogoproto/blob/master/custom_types.md +// ref: https://github.com/gogo/protobuf/blob/master/custom_types.md type CustomProtobufType interface { Marshal() ([]byte, error) MarshalTo(data []byte) (n int, err error) diff --git a/types/query/pagination.pb.go b/types/query/pagination.pb.go index 665a672a7f4d..c631ecfb1eaf 100644 --- a/types/query/pagination.pb.go +++ b/types/query/pagination.pb.go @@ -5,7 +5,7 @@ package query import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -25,10 +25,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // PageRequest is to be embedded in gRPC request messages for efficient // pagination. Ex: // -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest pagination = 2; +// } type PageRequest struct { // key is a value returned in PageResponse.next_key to begin // querying the next page most efficiently. Only one of offset or key @@ -123,10 +123,10 @@ func (m *PageRequest) GetReverse() bool { // PageResponse is to be embedded in gRPC response messages where the // corresponding request message has used PageRequest. // -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } type PageResponse struct { // next_key is the key to be passed to PageRequest.key to // query the next page most efficiently diff --git a/types/result.go b/types/result.go index b10152668fda..88aa24e34cbd 100644 --- a/types/result.go +++ b/types/result.go @@ -6,7 +6,7 @@ import ( "math" "strings" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" ctypes "github.com/tendermint/tendermint/rpc/core/types" diff --git a/types/result_test.go b/types/result_test.go index 7bf66e32a559..ab47b544a279 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -159,8 +159,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, @@ -184,8 +184,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, @@ -209,8 +209,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { Type: "message", Attributes: []abci.EventAttribute{ { - Key: "action", - Value: "foo", + Key: []byte("action"), + Value: []byte("foo"), Index: true, }, }, diff --git a/types/tx/amino/amino.pb.go b/types/tx/amino/amino.pb.go index 1d784a86e5fb..5edce23a180f 100644 --- a/types/tx/amino/amino.pb.go +++ b/types/tx/amino/amino.pb.go @@ -5,7 +5,7 @@ package amino import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" descriptorpb "google.golang.org/protobuf/types/descriptorpb" math "math" ) diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index ff1f220916fe..13c068cae088 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" @@ -624,17 +624,17 @@ var fileDescriptor_e0b00a618705eca7 = []byte{ 0x56, 0x0d, 0xf6, 0xd6, 0xf6, 0xed, 0xaf, 0x3a, 0xcd, 0x2f, 0x8b, 0x0a, 0x7a, 0x1b, 0x76, 0xd7, 0x76, 0xba, 0xcf, 0x9e, 0x34, 0x8b, 0x6a, 0x4a, 0x4a, 0x43, 0xec, 0x64, 0xea, 0xff, 0x64, 0x20, 0xdb, 0x8d, 0x1f, 0x57, 0xf4, 0x02, 0x72, 0xf3, 0x11, 0x40, 0x46, 0x8a, 0x83, 0x6b, 0x93, 0x57, - 0xba, 0xff, 0x5a, 0x8c, 0x9c, 0xd8, 0x83, 0x1f, 0xff, 0xf8, 0xfb, 0x17, 0xb5, 0xfc, 0x99, 0x52, - 0x33, 0xee, 0x5a, 0x29, 0x0f, 0xfb, 0xbc, 0xe0, 0x19, 0xbc, 0x21, 0xce, 0x13, 0xed, 0xa7, 0xb0, - 0x26, 0xa7, 0xa1, 0x54, 0xde, 0x0c, 0x90, 0x35, 0x2b, 0xa2, 0xe6, 0x3e, 0x7a, 0xcf, 0x4a, 0x7b, - 0xd2, 0x99, 0xf5, 0x22, 0x9a, 0xa0, 0x57, 0xe8, 0x07, 0xc8, 0x27, 0xae, 0x2a, 0xaa, 0xbc, 0xee, - 0x86, 0x2f, 0xcb, 0x1f, 0x5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ee, 0x1a, 0x77, 0xd2, 0x45, + 0x44, 0x3d, 0xbf, 0x84, 0x7c, 0xe2, 0x91, 0x4d, 0x15, 0x70, 0xf5, 0x93, 0x91, 0x2a, 0x20, 0xe5, + 0xad, 0x36, 0x74, 0x21, 0x40, 0x43, 0x1b, 0x04, 0xd8, 0xcd, 0xdf, 0x2f, 0x75, 0xe5, 0xe2, 0x52, + 0x57, 0xfe, 0xba, 0xd4, 0x95, 0x9f, 0x67, 0xfa, 0xd6, 0x6f, 0x33, 0x5d, 0xb9, 0x98, 0xe9, 0x5b, + 0x7f, 0xce, 0xf4, 0xad, 0x6f, 0x2b, 0xae, 0xc7, 0x4f, 0x26, 0x7d, 0x73, 0x40, 0x47, 0xf3, 0xfc, + 0xf8, 0xe7, 0x43, 0x36, 0xfc, 0xde, 0xe2, 0xd3, 0x31, 0x89, 0x08, 0xfb, 0xdb, 0xe2, 0xeb, 0xf6, + 0xd1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x86, 0xcd, 0x5c, 0xb4, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/types/tx/service.pb.gw.go b/types/tx/service.pb.gw.go index 2c942429ecd3..25560e1cdfb2 100644 --- a/types/tx/service.pb.gw.go +++ b/types/tx/service.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Service_Simulate_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SimulateRequest @@ -194,14 +192,12 @@ func local_request_Service_GetTxsEvent_0(ctx context.Context, marshaler runtime. // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { mux.Handle("POST", pattern_Service_Simulate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -209,7 +205,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_Simulate_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -223,8 +218,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -232,7 +225,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetTx_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -246,8 +238,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("POST", pattern_Service_BroadcastTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -255,7 +245,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_BroadcastTx_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -269,8 +258,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_GetTxsEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -278,7 +265,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_GetTxsEvent_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index 89b262c82ef9..346198195edc 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" types1 "github.com/cosmos/cosmos-sdk/crypto/types" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -197,7 +197,6 @@ type SignatureDescriptor_Data struct { // sum is the oneof that specifies whether this represents single or multi-signature data // // Types that are valid to be assigned to Sum: - // // *SignatureDescriptor_Data_Single_ // *SignatureDescriptor_Data_Multi_ Sum isSignatureDescriptor_Data_Sum `protobuf_oneof:"sum"` diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index 1d82d469cc68..174248a9812f 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -10,8 +10,8 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types2 "github.com/cosmos/cosmos-sdk/types" signing "github.com/cosmos/cosmos-sdk/types/tx/signing" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -477,7 +477,6 @@ type ModeInfo struct { // multisig signer // // Types that are valid to be assigned to Sum: - // // *ModeInfo_Single_ // *ModeInfo_Multi_ Sum isModeInfo_Sum `protobuf_oneof:"sum"` diff --git a/types/tx_msg.go b/types/tx_msg.go index f702e03736ea..42d01fdc55ee 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -1,7 +1,7 @@ package types import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) @@ -37,7 +37,7 @@ type ( // Tx defines the interface a transaction must fulfill. Tx interface { - // GetMsgs returns the all the transaction's messages. + // Gets the all the transaction's messages. GetMsgs() []Msg // ValidateBasic does a simple and lightweight validation check that doesn't @@ -54,7 +54,7 @@ type ( FeeGranter() AccAddress } - // TxWithMemo must have GetMemo() method to use ValidateMemoDecorator + // Tx must have GetMemo() method to use ValidateMemoDecorator TxWithMemo interface { Tx GetMemo() string diff --git a/x/auth/client/tx.go b/x/auth/client/tx.go index 4dd140d5eab8..80debcc1dedf 100644 --- a/x/auth/client/tx.go +++ b/x/auth/client/tx.go @@ -9,7 +9,7 @@ import ( "os" "strings" - "github.com/cosmos/gogoproto/jsonpb" + "github.com/gogo/protobuf/jsonpb" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 2ca10e4ebf4a..a73f97dc3446 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index edbc468e0c32..d3ad7a2f8c5a 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cosmos/gogoproto/grpc" + "github.com/gogo/protobuf/grpc" v043 "github.com/cosmos/cosmos-sdk/x/auth/legacy/v043" "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/x/auth/legacy/v043/store.go b/x/auth/legacy/v043/store.go index 896f35ff6b08..f95f1b3a1bb7 100644 --- a/x/auth/legacy/v043/store.go +++ b/x/auth/legacy/v043/store.go @@ -21,8 +21,8 @@ import ( "errors" "fmt" - "github.com/cosmos/gogoproto/grpc" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/grpc" + "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/auth/simulation/decoder.go b/x/auth/simulation/decoder.go index eb90285046b0..61a551ba5208 100644 --- a/x/auth/simulation/decoder.go +++ b/x/auth/simulation/decoder.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" diff --git a/x/auth/simulation/decoder_test.go b/x/auth/simulation/decoder_test.go index f149c2bb8176..9e21df6e5791 100644 --- a/x/auth/simulation/decoder_test.go +++ b/x/auth/simulation/decoder_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 3fa9d6009ab9..28bc39c8b9ab 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -1,7 +1,7 @@ package tx import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -64,14 +64,6 @@ func (w *wrapper) ValidateBasic() error { return w.tx.ValidateBasic() } -func (w *wrapper) Size() int { - panic("not implemented") -} - -func (w *wrapper) Hash() [32]byte { - panic("not implemented") -} - func (w *wrapper) getBodyBytes() []byte { if len(w.bodyBz) == 0 { // if bodyBz is empty, then marshal the body. bodyBz will generally @@ -168,12 +160,10 @@ func (w *wrapper) GetTimeoutHeight() uint64 { func (w *wrapper) GetSignaturesV2() ([]signing.SignatureV2, error) { signerInfos := w.tx.AuthInfo.SignerInfos sigs := w.tx.Signatures - pubKeys, err := w.GetPubKeys() if err != nil { return nil, err } - n := len(signerInfos) res := make([]signing.SignatureV2, n) @@ -185,17 +175,16 @@ func (w *wrapper) GetSignaturesV2() ([]signing.SignatureV2, error) { } } else { var err error - sigData, err := ModeInfoAndSigToSignatureData(si.ModeInfo, sigs[i]) if err != nil { return nil, err } - res[i] = signing.SignatureV2{ PubKey: pubKeys[i], Data: sigData, Sequence: si.GetSequence(), } + } } diff --git a/x/auth/tx/encoder.go b/x/auth/tx/encoder.go index f1c9e988d977..35cecac556eb 100644 --- a/x/auth/tx/encoder.go +++ b/x/auth/tx/encoder.go @@ -3,7 +3,7 @@ package tx import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 45a460e3b8e0..a0deedae6aa2 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - gogogrpc "github.com/cosmos/gogoproto/grpc" + gogogrpc "github.com/gogo/protobuf/grpc" "github.com/golang/protobuf/proto" // nolint: staticcheck "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc/codes" diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index bd7938669430..e827a4b8bf7d 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -90,10 +90,10 @@ func (s *IntegrationTestSuite) TearDownSuite() { func (s IntegrationTestSuite) TestSimulateTx_GRPC() { val := s.network.Validators[0] txBuilder := s.mkTxBuilder() - + // Convert the txBuilder to a tx.Tx. protoTx, err := txBuilderToProtoTx(txBuilder) s.Require().NoError(err) - + // Encode the txBuilder to txBytes. txBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) s.Require().NoError(err) @@ -122,16 +122,9 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPC() { s.Require().Contains(err.Error(), tc.expErrMsg) } else { s.Require().NoError(err) - // Check the result and gas used are correct. - // - // The 13 events are: - // - Sending Fee to the pool: coin_spent, coin_received, transfer and message.sender= - // - tx.* events: tx.fee, tx.acc_seq, tx.signature - // - Sending Amount to recipient: coin_spent, coin_received, transfer and message.sender= - // - Msg events: message.module=bank and message.action=/cosmos.bank.v1beta1.MsgSend (in one message) - s.Require().Equal(13, len(res.GetResult().GetEvents())) - s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. + s.Require().Equal(len(res.GetResult().GetEvents()), 6) // 1 coin recv 1 coin spent, 1 transfer, 3 messages. + s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. } } }) @@ -141,10 +134,10 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPC() { func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() { val := s.network.Validators[0] txBuilder := s.mkTxBuilder() - + // Convert the txBuilder to a tx.Tx. protoTx, err := txBuilderToProtoTx(txBuilder) s.Require().NoError(err) - + // Encode the txBuilder to txBytes. txBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) s.Require().NoError(err) @@ -163,26 +156,17 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() { s.Run(tc.name, func() { req, err := val.ClientCtx.Codec.MarshalJSON(tc.req) s.Require().NoError(err) - res, err := rest.PostRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/simulate", val.APIAddress), "application/json", req) s.Require().NoError(err) - if tc.expErr { s.Require().Contains(string(res), tc.expErrMsg) } else { var result tx.SimulateResponse err = val.ClientCtx.Codec.UnmarshalJSON(res, &result) s.Require().NoError(err) - // Check the result and gas used are correct. - // - // The 13 events are: - // - Sending Fee to the pool: coin_spent, coin_received, transfer and message.sender= - // - tx.* events: tx.fee, tx.acc_seq, tx.signature - // - Sending Amount to recipient: coin_spent, coin_received, transfer and message.sender= - // - Msg events: message.module=bank and message.action=/cosmos.bank.v1beta1.MsgSend (in one message) - s.Require().Equal(len(result.GetResult().GetEvents()), 13) - s.Require().True(result.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. + s.Require().Equal(len(result.GetResult().GetEvents()), 6) // 1 coin recv, 1 coin spent,1 transfer, 3 messages. + s.Require().True(result.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. } }) } diff --git a/x/auth/types/account.go b/x/auth/types/account.go index a9fb7c454a7e..c0ef8e5da64b 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -7,7 +7,7 @@ import ( "fmt" "strings" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/tendermint/tendermint/crypto" "gopkg.in/yaml.v2" @@ -26,7 +26,6 @@ var ( ) // NewBaseAccount creates a new BaseAccount object -// //nolint:interfacer func NewBaseAccount(address sdk.AccAddress, pubKey cryptotypes.PubKey, accountNumber, sequence uint64) *BaseAccount { acc := &BaseAccount{ diff --git a/x/auth/types/auth.pb.go b/x/auth/types/auth.pb.go index 77e2cb2db634..93fc1e03d8ad 100644 --- a/x/auth/types/auth.pb.go +++ b/x/auth/types/auth.pb.go @@ -5,11 +5,11 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -197,7 +197,7 @@ var fileDescriptor_7e1f7e915d020d2d = []byte{ 0x14, 0x8e, 0x37, 0xa1, 0xbb, 0x9d, 0xec, 0xae, 0x14, 0x37, 0xdb, 0xba, 0x01, 0xd9, 0x96, 0x25, 0xa4, 0x50, 0x51, 0x5b, 0x49, 0x55, 0x50, 0x23, 0x84, 0xa8, 0x0b, 0x07, 0x04, 0xad, 0x2a, 0x57, 0xe2, 0xc0, 0xc5, 0x8c, 0x9d, 0xa9, 0x6b, 0x25, 0xe3, 0x71, 0x3d, 0xe3, 0x2a, 0xee, 0x2f, 0x40, - 0x9c, 0x38, 0x72, 0xac, 0xb8, 0x70, 0xed, 0xa1, 0x3f, 0x02, 0xf5, 0xd4, 0x23, 0x27, 0xab, 0x4a, + 0x9c, 0x38, 0x72, 0xac, 0xb8, 0x70, 0xed, 0xa1, 0x3f, 0x82, 0x63, 0xd5, 0x13, 0x27, 0xab, 0x4a, 0x0f, 0x45, 0x1c, 0x73, 0xe6, 0x80, 0x32, 0xe3, 0xa4, 0x4e, 0xc9, 0x5e, 0x2c, 0x7f, 0xef, 0xfb, 0xde, 0xf7, 0xe6, 0xbd, 0x79, 0x1a, 0xa0, 0xfa, 0x84, 0x62, 0x42, 0x2d, 0x98, 0xb2, 0x33, 0xeb, 0xa2, 0xe3, 0x21, 0x06, 0x3b, 0x1c, 0x98, 0x71, 0x42, 0x18, 0x91, 0xd7, 0x04, 0x6f, 0xf2, 0x50, @@ -213,13 +213,13 @@ var fileDescriptor_7e1f7e915d020d2d = []byte{ 0xb1, 0x87, 0x12, 0xa5, 0xaa, 0x4b, 0xed, 0x9a, 0xbd, 0x39, 0xc9, 0xb5, 0x77, 0xc2, 0x65, 0x91, 0x37, 0x9c, 0x37, 0x45, 0xe0, 0x88, 0x63, 0xb9, 0x05, 0x5e, 0x51, 0x74, 0x9e, 0xa2, 0xc8, 0x47, 0x4a, 0x6d, 0x9a, 0xeb, 0xcc, 0x71, 0x6f, 0xe7, 0xe7, 0x2b, 0xad, 0xf2, 0xdb, 0x95, 0x56, 0xf9, - 0xfb, 0x4a, 0xab, 0xdc, 0xde, 0x6c, 0xbf, 0x2a, 0xba, 0xff, 0xf6, 0x97, 0xc7, 0xeb, 0xad, 0x75, + 0xfb, 0x4a, 0xab, 0xdc, 0xdd, 0x6c, 0x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e, 0x11, @@ -234,10 +234,10 @@ var fileDescriptor_7e1f7e915d020d2d = []byte{ 0x06, 0x45, 0x7e, 0xdc, 0xdd, 0xfd, 0x6c, 0xd0, 0x51, 0x3e, 0xe0, 0x45, 0xbf, 0x1c, 0xe7, 0xda, 0xfa, 0x42, 0xd1, 0x93, 0x99, 0x62, 0x92, 0x6b, 0xfa, 0xf2, 0xb2, 0x73, 0x13, 0xc3, 0x59, 0xa7, 0x4b, 0x73, 0x7b, 0x1f, 0x17, 0xbb, 0x2e, 0x3d, 0xbf, 0xfe, 0x91, 0x78, 0x8b, 0xc4, 0x9d, 0xdb, - 0x07, 0x7f, 0x8e, 0x55, 0xe9, 0x6e, 0xac, 0x4a, 0xf7, 0x63, 0x55, 0xfa, 0xf5, 0x41, 0xad, 0xdc, - 0x3d, 0xa8, 0x95, 0xbf, 0x1e, 0xd4, 0xca, 0x8f, 0x9f, 0x04, 0x21, 0x3b, 0x4b, 0x3d, 0xd3, 0x27, + 0x07, 0x7f, 0x8e, 0x55, 0xe9, 0x76, 0xac, 0x4a, 0xf7, 0x63, 0x55, 0xfa, 0xf5, 0x41, 0xad, 0xdc, + 0x3e, 0xa8, 0x95, 0xbf, 0x1e, 0xd4, 0xca, 0x8f, 0x9f, 0x04, 0x21, 0x3b, 0x4b, 0x3d, 0xd3, 0x27, 0xb8, 0x78, 0x6f, 0xac, 0xff, 0xbb, 0xb0, 0x2c, 0x46, 0xd4, 0x5b, 0xe1, 0xaf, 0xc1, 0xce, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x79, 0xdb, 0xbc, 0xee, 0xed, 0x04, 0x00, 0x00, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0x6c, 0x44, 0x3d, 0xed, 0x04, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/auth/types/genesis.go b/x/auth/types/genesis.go index d9f3274d9ba5..380d85fc6b81 100644 --- a/x/auth/types/genesis.go +++ b/x/auth/types/genesis.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/auth/types/genesis.pb.go b/x/auth/types/genesis.pb.go index 10f75a31f827..7bd98d181b7d 100644 --- a/x/auth/types/genesis.pb.go +++ b/x/auth/types/genesis.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auth/types/genesis_test.go b/x/auth/types/genesis_test.go index 288aa367ae4c..1030885e799e 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 42c768544ab6..9f2f5a88ec8d 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -6,12 +6,12 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index ee83c6d39a61..73ff335f0bda 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join var ( filter_Query_Accounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -162,14 +160,12 @@ func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -177,7 +173,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -191,8 +186,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -200,7 +193,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -214,8 +206,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -223,7 +213,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -237,8 +226,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -246,7 +233,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ModuleAccounts_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/auth/vesting/client/cli/cli_test.go b/x/auth/vesting/client/cli/cli_test.go index 3330b333e499..d38a5f2ce56e 100644 --- a/x/auth/vesting/client/cli/cli_test.go +++ b/x/auth/vesting/client/cli/cli_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" diff --git a/x/auth/vesting/client/testutil/suite.go b/x/auth/vesting/client/testutil/suite.go index 2f649f5d4568..bf54d0a32e31 100644 --- a/x/auth/vesting/client/testutil/suite.go +++ b/x/auth/vesting/client/testutil/suite.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/auth/vesting/types/tx.pb.go b/x/auth/vesting/types/tx.pb.go index be86fdac6eed..1102aefbf2e1 100644 --- a/x/auth/vesting/types/tx.pb.go +++ b/x/auth/vesting/types/tx.pb.go @@ -9,9 +9,9 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/auth/vesting/types/vesting.pb.go b/x/auth/vesting/types/vesting.pb.go index 94dea77f7ba2..3aec3e31d587 100644 --- a/x/auth/vesting/types/vesting.pb.go +++ b/x/auth/vesting/types/vesting.pb.go @@ -9,8 +9,8 @@ import ( types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" types "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/authz/authorization_grant.go b/x/authz/authorization_grant.go index c042cbafafb3..30bc1eec467d 100644 --- a/x/authz/authorization_grant.go +++ b/x/authz/authorization_grant.go @@ -3,7 +3,7 @@ package authz import ( "time" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/authz/authorizations.go b/x/authz/authorizations.go index 2df63a7d3404..b0412ad4b34a 100644 --- a/x/authz/authorizations.go +++ b/x/authz/authorizations.go @@ -1,7 +1,7 @@ package authz import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/authz/authz.pb.go b/x/authz/authz.pb.go index c6d197587413..3944b947486a 100644 --- a/x/authz/authz.pb.go +++ b/x/authz/authz.pb.go @@ -5,12 +5,12 @@ package authz import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -161,7 +161,7 @@ func init() { func init() { proto.RegisterFile("cosmos/authz/v1beta1/authz.proto", fileDescriptor_544dc2e84b61c637) } var fileDescriptor_544dc2e84b61c637 = []byte{ - // 387 bytes of a gzipped FileDescriptorProto + // 365 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x84, 0xf0, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x20, 0x2a, 0xf4, 0x20, 0x62, 0x50, @@ -171,22 +171,20 @@ var fileDescriptor_544dc2e84b61c637 = []byte{ 0x05, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x10, 0x8d, 0x20, 0x16, 0xcc, 0x44, 0x74, 0x6d, 0x89, 0x79, 0x95, 0x10, 0x29, 0xa5, 0x78, 0x2e, 0x11, 0xf7, 0xd4, 0xbc, 0xd4, 0xa2, 0xcc, 0x64, 0xc7, 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, 0xaa, 0xc4, 0x92, 0xcc, 0xfc, 0x3c, 0x21, 0x01, 0x2e, 0xe6, 0xdc, - 0xe2, 0x74, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0xd3, 0xca, 0xf4, 0xd4, 0x16, 0x5d, + 0xe2, 0x74, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0xd3, 0xca, 0xf4, 0xd2, 0x16, 0x5d, 0x5e, 0x14, 0x45, 0x5d, 0xcf, 0x37, 0x68, 0xc9, 0x43, 0xdc, 0xa7, 0x5b, 0x9c, 0x92, 0xad, 0x8f, 0xcd, 0x20, 0xa5, 0x39, 0x8c, 0x5c, 0xac, 0xee, 0x45, 0x89, 0x79, 0x25, 0x42, 0xbe, 0x5c, 0xbc, 0x89, 0xc8, 0x52, 0x60, 0xc3, 0xb9, 0x8d, 0x44, 0xf4, 0x20, 0xae, 0xd3, 0x83, 0xb9, 0x4e, 0xcf, - 0x31, 0xaf, 0xd2, 0x49, 0x10, 0xc3, 0xb6, 0x20, 0x54, 0xdd, 0x42, 0x2e, 0x5c, 0x5c, 0xa9, 0x15, - 0x05, 0x99, 0x45, 0x10, 0xb3, 0x98, 0xc0, 0x66, 0x49, 0x61, 0x98, 0x15, 0x02, 0x0b, 0x20, 0x27, - 0x8e, 0x13, 0xf7, 0xe4, 0x19, 0x26, 0xdc, 0x97, 0x67, 0x0c, 0x42, 0xd2, 0xa7, 0x34, 0x91, 0x89, - 0x4b, 0x08, 0xec, 0x3c, 0x54, 0xef, 0x1b, 0x71, 0xb1, 0xa7, 0x83, 0x44, 0x53, 0x8b, 0x20, 0x41, - 0xe0, 0x24, 0x71, 0x69, 0x8b, 0x2e, 0x2c, 0x06, 0x1d, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x83, - 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x83, 0x60, 0x0a, 0x11, 0x7a, 0x52, 0xc1, 0xae, 0x21, 0x42, 0x4f, - 0x2a, 0x66, 0x98, 0x30, 0x53, 0x31, 0x4c, 0x58, 0xc8, 0x0b, 0x13, 0x27, 0xa7, 0x13, 0x0f, 0xe5, - 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, - 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x25, 0x3d, 0xb3, 0x24, - 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x17, 0x9a, 0x38, 0xf5, 0x91, 0xd2, 0x40, 0x05, 0x24, 0xcd, - 0x27, 0xb1, 0x81, 0x6d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x58, 0xdd, 0x2e, 0xb1, 0x18, - 0x03, 0x00, 0x00, + 0x31, 0xaf, 0xd2, 0x49, 0xf0, 0x14, 0xba, 0x6d, 0x41, 0xa8, 0xba, 0x85, 0x5c, 0xb8, 0xb8, 0x52, + 0x2b, 0x0a, 0x32, 0x8b, 0x20, 0x66, 0x31, 0x81, 0xcd, 0x92, 0xc2, 0x30, 0x2b, 0x04, 0x16, 0x40, + 0x4e, 0x1c, 0x27, 0xee, 0xc9, 0x33, 0x4c, 0xb8, 0x2f, 0xcf, 0x18, 0x84, 0xa4, 0x4f, 0xe9, 0x2e, + 0x23, 0x97, 0x10, 0xd8, 0x79, 0xa8, 0xde, 0x97, 0xe0, 0x62, 0x4f, 0x07, 0x89, 0xa6, 0x16, 0x41, + 0x83, 0x00, 0xc6, 0x45, 0xc8, 0xa4, 0x82, 0xed, 0x84, 0xcb, 0xa4, 0x62, 0xfa, 0x8f, 0x99, 0x8a, + 0xfe, 0x63, 0x21, 0xcf, 0x7f, 0x4e, 0x4e, 0x27, 0x1e, 0xca, 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, + 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, + 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, + 0x2e, 0x34, 0xa1, 0xe9, 0x23, 0xc5, 0x67, 0x05, 0x24, 0xfd, 0x26, 0xb1, 0x81, 0x6d, 0x33, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x98, 0x78, 0xb3, 0x29, 0xe4, 0x02, 0x00, 0x00, } func (m *GenericAuthorization) Marshal() (dAtA []byte, err error) { @@ -239,7 +237,7 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiration):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration):]) if err1 != nil { return 0, err1 } @@ -282,7 +280,7 @@ func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiration):]) + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration):]) if err3 != nil { return 0, err3 } @@ -353,7 +351,7 @@ func (m *Grant) Size() (n int) { l = m.Authorization.Size() n += 1 + l + sovAuthz(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiration) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration) n += 1 + l + sovAuthz(uint64(l)) return n } @@ -376,7 +374,7 @@ func (m *GrantAuthorization) Size() (n int) { l = m.Authorization.Size() n += 1 + l + sovAuthz(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiration) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration) n += 1 + l + sovAuthz(uint64(l)) return n } @@ -563,7 +561,7 @@ func (m *Grant) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -746,7 +744,7 @@ func (m *GrantAuthorization) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/authz/client/testutil/tx.go b/x/authz/client/testutil/tx.go index 5baa5dd76e6a..7659bb8ce78f 100644 --- a/x/authz/client/testutil/tx.go +++ b/x/authz/client/testutil/tx.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/authz/event.pb.go b/x/authz/event.pb.go index 289eb897564e..4737782814c8 100644 --- a/x/authz/event.pb.go +++ b/x/authz/event.pb.go @@ -5,7 +5,7 @@ package authz import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/authz/genesis.pb.go b/x/authz/genesis.pb.go index 527372163ea9..d5df603ea281 100644 --- a/x/authz/genesis.pb.go +++ b/x/authz/genesis.pb.go @@ -6,8 +6,8 @@ package authz import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/authz/keeper/grpc_query.go b/x/authz/keeper/grpc_query.go index 225bcb07ba06..085f6938f1c2 100644 --- a/x/authz/keeper/grpc_query.go +++ b/x/authz/keeper/grpc_query.go @@ -6,7 +6,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 6db32a3d1fa9..1b8ec0bf945b 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/tendermint/tendermint/libs/log" diff --git a/x/authz/msgs.go b/x/authz/msgs.go index c48c83646797..de47c2bc29f2 100644 --- a/x/authz/msgs.go +++ b/x/authz/msgs.go @@ -1,11 +1,10 @@ package authz import ( - "time" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" + "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,7 +27,6 @@ var ( ) // NewMsgGrant creates a new MsgGrant -// //nolint:interfacer func NewMsgGrant(granter sdk.AccAddress, grantee sdk.AccAddress, a Authorization, expiration time.Time) (*MsgGrant, error) { m := &MsgGrant{ @@ -122,7 +120,6 @@ func (msg MsgGrant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { } // NewMsgRevoke creates a new MsgRevoke -// //nolint:interfacer func NewMsgRevoke(granter sdk.AccAddress, grantee sdk.AccAddress, msgTypeURL string) MsgRevoke { return MsgRevoke{ @@ -179,7 +176,6 @@ func (msg MsgRevoke) GetSignBytes() []byte { } // NewMsgExec creates a new MsgExecAuthorized -// //nolint:interfacer func NewMsgExec(grantee sdk.AccAddress, msgs []sdk.Msg) MsgExec { msgsAny := make([]*cdctypes.Any, len(msgs)) diff --git a/x/authz/query.pb.go b/x/authz/query.pb.go index bf24532cafb4..9da024b43ece 100644 --- a/x/authz/query.pb.go +++ b/x/authz/query.pb.go @@ -7,8 +7,8 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/authz/query.pb.gw.go b/x/authz/query.pb.gw.go index 7259ffcf2dd7..500a9b4a62d2 100644 --- a/x/authz/query.pb.gw.go +++ b/x/authz/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join var ( filter_Query_Grants_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -216,14 +214,12 @@ func local_request_Query_GranteeGrants_0(ctx context.Context, marshaler runtime. // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Grants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -231,7 +227,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Grants_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -245,8 +240,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GranterGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -254,7 +247,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GranterGrants_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -268,8 +260,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GranteeGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -277,7 +267,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GranteeGrants_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/authz/simulation/operations.go b/x/authz/simulation/operations.go index 843cb7428a03..2d2f43681b49 100644 --- a/x/authz/simulation/operations.go +++ b/x/authz/simulation/operations.go @@ -116,7 +116,6 @@ func SimulateMsgGrant(ak authz.AccountKeeper, bk authz.BankKeeper, _ keeper.Keep } txCfg := simappparams.MakeTestEncodingConfig().TxConfig tx, err := helpers.GenTx( - r, txCfg, []sdk.Msg{msg}, fees, @@ -184,7 +183,6 @@ func SimulateMsgRevoke(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Kee txCfg := simappparams.MakeTestEncodingConfig().TxConfig account := ak.GetAccount(ctx, granterAddr) tx, err := helpers.GenTx( - r, txCfg, []sdk.Msg{&msg}, fees, @@ -239,10 +237,7 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe granterspendableCoins := bk.SpendableCoins(ctx, granterAddr) coins := simtypes.RandSubsetCoins(r, granterspendableCoins) - // if coins slice is empty, we can not create valid banktype.MsgSend - if len(coins) == 0 { - return simtypes.NoOpMsg(authz.ModuleName, TypeMsgExec, "empty coins slice"), nil, nil - } + // Check send_enabled status of each sent coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { return simtypes.NoOpMsg(authz.ModuleName, TypeMsgExec, err.Error()), nil, nil @@ -278,7 +273,6 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe granteeAcc := ak.GetAccount(ctx, granteeAddr) tx, err := helpers.GenTx( - r, txCfg, []sdk.Msg{&msgExec}, fees, diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index ea452d2531b7..086485be38a8 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -6,12 +6,12 @@ package authz import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/bank/client/rest/grpc_query_test.go b/x/bank/client/rest/grpc_query_test.go index b76967a872d5..857aa58e4b83 100644 --- a/x/bank/client/rest/grpc_query_test.go +++ b/x/bank/client/rest/grpc_query_test.go @@ -1,4 +1,3 @@ -//go:build norace // +build norace package rest_test @@ -6,7 +5,7 @@ package rest_test import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/bank/client/testutil/suite.go b/x/bank/client/testutil/suite.go index 3be1b06176f0..19be5401c672 100644 --- a/x/bank/client/testutil/suite.go +++ b/x/bank/client/testutil/suite.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 59b13ea0ede6..fe4fe3ec1688 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -614,15 +614,15 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() { } event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr2.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr2.String())}, ) event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}, + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())}, ) event2 := sdk.Event{ @@ -631,7 +631,7 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() { } event2.Attributes = append( event2.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) // events are shifted due to the funding account events @@ -684,7 +684,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event1.Attributes = append( event1.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) // Set addr's coins and addr2's coins @@ -705,7 +705,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event2.Attributes = append( event2.Attributes, - abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())}, ) event3 := sdk.Event{ Type: types.EventTypeTransfer, @@ -713,22 +713,22 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { } event3.Attributes = append( event3.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr3.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr3.String())}, ) event3.Attributes = append( event3.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()}) + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())}) event4 := sdk.Event{ Type: types.EventTypeTransfer, Attributes: []abci.EventAttribute{}, } event4.Attributes = append( event4.Attributes, - abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr4.String()}, + abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr4.String())}, ) event4.Attributes = append( event4.Attributes, - abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()}, + abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins2.String())}, ) for _, eventA := range []sdk.Event{event1, event2, event3, event4} { diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index bdae3929b7dd..6f053b637b7d 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -60,10 +60,6 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { from, to, coins, skip := randomSendFields(r, ctx, accs, bk, ak) - // if coins slice is empty, we can not create valid types.MsgSend - if len(coins) == 0 { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, "empty coins slice"), nil, nil - } // Check send_enabled status of each coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { @@ -98,10 +94,6 @@ func SimulateMsgSendToModuleAccount(ak types.AccountKeeper, bk keeper.Keeper, mo spendable := bk.SpendableCoins(ctx, from.Address) coins := simtypes.RandSubsetCoins(r, spendable) - // if coins slice is empty, we can not create valid types.MsgSend - if len(coins) == 0 { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, "empty coins slice"), nil, nil - } // Check send_enabled status of each coin denom if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { @@ -148,7 +140,6 @@ func sendMsgSend( } txGen := simappparams.MakeTestEncodingConfig().TxConfig tx, err := helpers.GenTx( - r, txGen, []sdk.Msg{msg}, fees, @@ -355,7 +346,6 @@ func sendMsgMultiSend( txGen := simappparams.MakeTestEncodingConfig().TxConfig tx, err := helpers.GenTx( - r, txGen, []sdk.Msg{msg}, fees, diff --git a/x/bank/types/authz.pb.go b/x/bank/types/authz.pb.go index b7b7a3c93bad..d45d583bacbd 100644 --- a/x/bank/types/authz.pb.go +++ b/x/bank/types/authz.pb.go @@ -5,12 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -96,11 +96,11 @@ var fileDescriptor_a4d2a37888ea779f = []byte{ 0x27, 0xee, 0xc9, 0x33, 0xac, 0xba, 0x2f, 0xaf, 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0x0b, 0x75, 0x06, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x06, 0x6b, 0x28, 0x5e, 0xf1, 0x7c, 0x83, 0x16, 0x63, 0x10, 0x17, 0xd8, 0x12, 0x1f, 0x90, 0x1d, - 0x56, 0x46, 0xa7, 0xb6, 0xe8, 0xf2, 0xa2, 0xb8, 0xa2, 0xeb, 0xf9, 0x06, 0x2d, 0x19, 0x24, 0xed, + 0x56, 0x46, 0x97, 0xb6, 0xe8, 0xf2, 0xa2, 0xb8, 0xa2, 0xeb, 0xf9, 0x06, 0x2d, 0x19, 0x24, 0xed, 0x18, 0xce, 0x74, 0x72, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x4d, 0xbc, 0x0e, 0xa9, 0x80, 0x44, 0x04, 0xd8, 0x3d, 0x49, 0x6c, 0xe0, 0x80, 0x30, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x0a, 0x51, 0xc0, 0x40, 0xa4, 0x01, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xa9, 0x36, 0x04, 0xa4, 0x01, 0x00, 0x00, } func (m *SendAuthorization) Marshal() (dAtA []byte, err error) { diff --git a/x/bank/types/bank.pb.go b/x/bank/types/bank.pb.go index 8ddc1f097e16..6d08d461bbdd 100644 --- a/x/bank/types/bank.pb.go +++ b/x/bank/types/bank.pb.go @@ -5,12 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -436,7 +436,7 @@ var fileDescriptor_dd052eee12edf988 = []byte{ 0x14, 0xbe, 0xc9, 0xe5, 0xce, 0xcb, 0x9c, 0x16, 0x8e, 0x41, 0x36, 0x01, 0xf7, 0x36, 0x0b, 0xc2, 0x25, 0x98, 0xdd, 0xc4, 0x1f, 0x20, 0xd7, 0x08, 0x17, 0x7f, 0x90, 0x42, 0x94, 0x0d, 0x22, 0x68, 0x71, 0xcc, 0xde, 0x4c, 0xce, 0x25, 0xbb, 0x33, 0xcb, 0xcd, 0x6c, 0xc8, 0xfe, 0x07, 0x62, 0x25, - 0x68, 0x61, 0x99, 0x52, 0xac, 0x52, 0x58, 0xf8, 0x1f, 0x18, 0xac, 0x52, 0x5a, 0x45, 0x49, 0x8a, + 0x68, 0x61, 0x99, 0x52, 0xac, 0x52, 0x58, 0xf8, 0x1f, 0x98, 0x32, 0x58, 0x59, 0x45, 0x49, 0x8a, 0x58, 0x4a, 0xfe, 0x02, 0xd9, 0x99, 0xb9, 0xcb, 0x06, 0xa2, 0xd8, 0x08, 0x36, 0xc7, 0x7c, 0xf3, 0xbe, 0xf7, 0xbd, 0x6f, 0xde, 0x7b, 0xb7, 0xd0, 0xee, 0x73, 0x91, 0x70, 0xe1, 0x87, 0x98, 0x6d, 0xf8, 0x9b, 0xcb, 0x21, 0x95, 0x78, 0x59, 0x01, 0x2f, 0x1d, 0x72, 0xc9, 0xd1, 0x25, 0x1d, 0xf7, @@ -470,7 +470,7 @@ var fileDescriptor_dd052eee12edf988 = []byte{ 0x56, 0x4d, 0xb3, 0x8b, 0x33, 0xba, 0x0c, 0xeb, 0x22, 0x4f, 0x42, 0x1e, 0x5b, 0x75, 0x75, 0x6b, 0x50, 0x77, 0x65, 0xf7, 0xc0, 0x06, 0x7b, 0x07, 0x36, 0xf8, 0x7e, 0x60, 0x83, 0xd7, 0x87, 0x76, 0x65, 0xef, 0xd0, 0xae, 0x7c, 0x3d, 0xb4, 0x2b, 0xcf, 0xe6, 0xff, 0xa6, 0xef, 0x6a, 0x82, 0x61, - 0x5d, 0x7d, 0x92, 0x6e, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x3f, 0xc5, 0x6e, 0x2d, 0x05, + 0x5d, 0x7d, 0x92, 0x6e, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x85, 0x17, 0xd1, 0x2d, 0x05, 0x00, 0x00, } diff --git a/x/bank/types/genesis.pb.go b/x/bank/types/genesis.pb.go index 02cd7e40a3fd..90186373d5e1 100644 --- a/x/bank/types/genesis.pb.go +++ b/x/bank/types/genesis.pb.go @@ -8,8 +8,8 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 8bc1ef2c3898..8d7072eea1ab 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -10,9 +10,9 @@ import ( types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index c6abc3a8b3ec..3e04ab0c3387 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join var ( filter_Query_Balance_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} @@ -504,14 +502,12 @@ func local_request_Query_BaseDenom_0(ctx context.Context, marshaler runtime.Mars // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -519,7 +515,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -533,8 +528,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AllBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -542,7 +535,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AllBalances_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -556,8 +548,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TotalSupply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -565,7 +555,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TotalSupply_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -579,8 +568,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SupplyOf_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -588,7 +575,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SupplyOf_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -602,8 +588,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TotalSupplyWithoutOffset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -611,7 +595,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TotalSupplyWithoutOffset_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -625,8 +608,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SupplyOfWithoutOffset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -634,7 +615,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SupplyOfWithoutOffset_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -648,8 +628,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -657,7 +635,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -671,8 +648,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DenomMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -680,7 +655,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DenomMetadata_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -694,8 +668,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DenomsMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -703,7 +675,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DenomsMetadata_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -717,8 +688,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BaseDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -726,7 +695,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BaseDenom_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/bank/types/tx.pb.go b/x/bank/types/tx.pb.go index 3eab788df342..9280593bc210 100644 --- a/x/bank/types/tx.pb.go +++ b/x/bank/types/tx.pb.go @@ -9,9 +9,9 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/capability/types/capability.pb.go b/x/capability/types/capability.pb.go index 78e87995c2da..3b33dc62b295 100644 --- a/x/capability/types/capability.pb.go +++ b/x/capability/types/capability.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/capability/types/genesis.pb.go b/x/capability/types/genesis.pb.go index 7ff3e2b79150..0cc4bfac4b66 100644 --- a/x/capability/types/genesis.pb.go +++ b/x/capability/types/genesis.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/crisis/client/testsuite/suite.go b/x/crisis/client/testsuite/suite.go index dd611b45e289..d0d82f62120b 100644 --- a/x/crisis/client/testsuite/suite.go +++ b/x/crisis/client/testsuite/suite.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/crisis/types/genesis.pb.go b/x/crisis/types/genesis.pb.go index f520d043e34d..f1fcd945a9b1 100644 --- a/x/crisis/types/genesis.pb.go +++ b/x/crisis/types/genesis.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/crisis/types/tx.pb.go b/x/crisis/types/tx.pb.go index 62025be49dad..0622ef01d89c 100644 --- a/x/crisis/types/tx.pb.go +++ b/x/crisis/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/distribution/client/rest/grpc_query_test.go b/x/distribution/client/rest/grpc_query_test.go index 8eaab7eca622..ec8e2a7666dd 100644 --- a/x/distribution/client/rest/grpc_query_test.go +++ b/x/distribution/client/rest/grpc_query_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/x/distribution/client/testutil/suite.go b/x/distribution/client/testutil/suite.go index 997a006ed4c5..3dcfca70aa68 100644 --- a/x/distribution/client/testutil/suite.go +++ b/x/distribution/client/testutil/suite.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go index c5a692cb105d..0203ee13f672 100644 --- a/x/distribution/keeper/store.go +++ b/x/distribution/keeper/store.go @@ -1,7 +1,7 @@ package keeper import ( - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/types" diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index 6288d4b092a4..6bf82ef832ad 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -234,7 +234,6 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address) txCtx := simulation.OperationInput{ - R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index eb5a1187b461..7d2172dc4593 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -8,8 +8,8 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -80,12 +80,11 @@ func (m *Params) GetWithdrawAddrEnabled() bool { // The reference count indicates the number of objects // which might need to reference this historical entry at any point. // ReferenceCount = -// -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization type ValidatorHistoricalRewards struct { CumulativeRewardRatio github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"cumulative_reward_ratio" yaml:"cumulative_reward_ratio"` ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty" yaml:"reference_count"` diff --git a/x/distribution/types/genesis.pb.go b/x/distribution/types/genesis.pb.go index d28b74bc3b46..07d0600fe3d4 100644 --- a/x/distribution/types/genesis.pb.go +++ b/x/distribution/types/genesis.pb.go @@ -8,8 +8,8 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/distribution/types/query.pb.go b/x/distribution/types/query.pb.go index ebb25e439443..73c8e91d89d5 100644 --- a/x/distribution/types/query.pb.go +++ b/x/distribution/types/query.pb.go @@ -10,9 +10,9 @@ import ( types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/distribution/types/query.pb.gw.go b/x/distribution/types/query.pb.gw.go index 2b4ce81b8b81..2e8f1cde3ff1 100644 --- a/x/distribution/types/query.pb.gw.go +++ b/x/distribution/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -490,14 +488,12 @@ func local_request_Query_CommunityPool_0(ctx context.Context, marshaler runtime. // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -505,7 +501,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -519,8 +514,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorOutstandingRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -528,7 +521,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorOutstandingRewards_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -542,8 +534,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorCommission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -551,7 +541,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorCommission_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -565,8 +554,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorSlashes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -574,7 +561,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorSlashes_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -588,8 +574,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegationRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -597,7 +581,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegationRewards_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -611,8 +594,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegationTotalRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -620,7 +601,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegationTotalRewards_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -634,8 +614,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -643,7 +621,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorValidators_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -657,8 +634,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorWithdrawAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -666,7 +641,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorWithdrawAddress_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -680,8 +654,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CommunityPool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -689,7 +661,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CommunityPool_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/distribution/types/tx.pb.go b/x/distribution/types/tx.pb.go index c8b0ea2dcc8a..30c04549df37 100644 --- a/x/distribution/types/tx.pb.go +++ b/x/distribution/types/tx.pb.go @@ -9,9 +9,9 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/evidence/abci.go b/x/evidence/abci.go index 6812de29c187..63866fd2bc68 100644 --- a/x/evidence/abci.go +++ b/x/evidence/abci.go @@ -21,7 +21,7 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) switch tmEvidence.Type { // It's still ongoing discussion how should we treat and slash attacks with // premeditation. So for now we agree to treat them in the same way. - case abci.MisbehaviorType_DUPLICATE_VOTE, abci.MisbehaviorType_LIGHT_CLIENT_ATTACK: + case abci.EvidenceType_DUPLICATE_VOTE, abci.EvidenceType_LIGHT_CLIENT_ATTACK: evidence := types.FromABCIEvidence(tmEvidence) k.HandleEquivocationEvidence(ctx, evidence.(*types.Equivocation)) diff --git a/x/evidence/exported/evidence.go b/x/evidence/exported/evidence.go index 6cad9a9d7093..8cf00fa6a93c 100644 --- a/x/evidence/exported/evidence.go +++ b/x/evidence/exported/evidence.go @@ -1,7 +1,7 @@ package exported import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" tmbytes "github.com/tendermint/tendermint/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/evidence/genesis.go b/x/evidence/genesis.go index abff812fc7c8..2be3fee88276 100644 --- a/x/evidence/genesis.go +++ b/x/evidence/genesis.go @@ -3,7 +3,7 @@ package evidence import ( "fmt" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/evidence/keeper/grpc_query.go b/x/evidence/keeper/grpc_query.go index 4f511644f696..f084c16717a0 100644 --- a/x/evidence/keeper/grpc_query.go +++ b/x/evidence/keeper/grpc_query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" "github.com/cosmos/cosmos-sdk/types/query" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index 0d957a140770..fca6126ec36f 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -87,7 +87,7 @@ func (e Equivocation) GetTotalPower() int64 { return 0 } // FromABCIEvidence converts a Tendermint concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. -func FromABCIEvidence(e abci.Misbehavior) exported.Evidence { +func FromABCIEvidence(e abci.Evidence) exported.Evidence { bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() consAddr, err := sdk.Bech32ifyAddressBytes(bech32PrefixConsAddr, e.Validator.Address) if err != nil { diff --git a/x/evidence/types/evidence.pb.go b/x/evidence/types/evidence.pb.go index 70416bfbe820..9f68b6fce236 100644 --- a/x/evidence/types/evidence.pb.go +++ b/x/evidence/types/evidence.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -135,7 +135,7 @@ func (m *Equivocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err1 != nil { return 0, err1 } @@ -171,7 +171,7 @@ func (m *Equivocation) Size() (n int) { if m.Height != 0 { n += 1 + sovEvidence(uint64(m.Height)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovEvidence(uint64(l)) if m.Power != 0 { n += 1 + sovEvidence(uint64(m.Power)) @@ -266,7 +266,7 @@ func (m *Equivocation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/evidence/types/evidence_test.go b/x/evidence/types/evidence_test.go index 1d7ebe99352b..c78f0b059cc9 100644 --- a/x/evidence/types/evidence_test.go +++ b/x/evidence/types/evidence_test.go @@ -61,8 +61,8 @@ func TestEquivocationValidateBasic(t *testing.T) { func TestEvidenceAddressConversion(t *testing.T) { sdk.GetConfig().SetBech32PrefixForConsensusNode("testcnclcons", "testcnclconspub") - tmEvidence := abci.Misbehavior{ - Type: abci.MisbehaviorType_DUPLICATE_VOTE, + tmEvidence := abci.Evidence{ + Type: abci.EvidenceType_DUPLICATE_VOTE, Validator: abci.Validator{ Address: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, Power: 100, diff --git a/x/evidence/types/genesis.go b/x/evidence/types/genesis.go index 102ede073322..b274ea20714f 100644 --- a/x/evidence/types/genesis.go +++ b/x/evidence/types/genesis.go @@ -3,7 +3,7 @@ package types import ( "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/x/evidence/exported" diff --git a/x/evidence/types/genesis.pb.go b/x/evidence/types/genesis.pb.go index fdf89c8118dd..672a0ce8cf2e 100644 --- a/x/evidence/types/genesis.pb.go +++ b/x/evidence/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/evidence/types/msgs.go b/x/evidence/types/msgs.go index 8e7c3109115b..f1a57ca76f16 100644 --- a/x/evidence/types/msgs.go +++ b/x/evidence/types/msgs.go @@ -2,8 +2,7 @@ package types import ( "fmt" - - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,7 +22,6 @@ var ( ) // NewMsgSubmitEvidence returns a new MsgSubmitEvidence with a signer/submitter. -// //nolint:interfacer func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEvidence, error) { msg, ok := evi.(proto.Message) diff --git a/x/evidence/types/query.pb.go b/x/evidence/types/query.pb.go index aababa92cbd8..e084ea29c899 100644 --- a/x/evidence/types/query.pb.go +++ b/x/evidence/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" diff --git a/x/evidence/types/query.pb.gw.go b/x/evidence/types/query.pb.gw.go index 77a7be86d1d7..6f85fd6f1e10 100644 --- a/x/evidence/types/query.pb.gw.go +++ b/x/evidence/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Evidence_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryEvidenceRequest @@ -126,14 +124,12 @@ func local_request_Query_AllEvidence_0(ctx context.Context, marshaler runtime.Ma // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Evidence_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -141,7 +137,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Evidence_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -155,8 +150,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AllEvidence_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -164,7 +157,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AllEvidence_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/evidence/types/tx.pb.go b/x/evidence/types/tx.pb.go index bb1e269c9f2d..d781cb39fd5a 100644 --- a/x/evidence/types/tx.pb.go +++ b/x/evidence/types/tx.pb.go @@ -7,12 +7,12 @@ import ( bytes "bytes" context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/feegrant/client/testutil/suite.go b/x/feegrant/client/testutil/suite.go index b4ab46caee0f..47724a38cae5 100644 --- a/x/feegrant/client/testutil/suite.go +++ b/x/feegrant/client/testutil/suite.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/feegrant/feegrant.pb.go b/x/feegrant/feegrant.pb.go index 89feab901900..a361d21e283e 100644 --- a/x/feegrant/feegrant.pb.go +++ b/x/feegrant/feegrant.pb.go @@ -5,14 +5,14 @@ package feegrant import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" @@ -295,46 +295,46 @@ func init() { } var fileDescriptor_7279582900c30aea = []byte{ - // 615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x3f, 0x6f, 0xd3, 0x40, - 0x1c, 0xcd, 0x35, 0x6d, 0x51, 0x2e, 0xb4, 0x34, 0xa6, 0x12, 0x4e, 0x84, 0xec, 0x28, 0x03, 0x0d, - 0x95, 0x6a, 0xab, 0x41, 0x48, 0x28, 0x53, 0xe3, 0xf2, 0x57, 0x6a, 0x25, 0x64, 0x98, 0x58, 0xa2, - 0xb3, 0x73, 0x35, 0x16, 0xb1, 0xcf, 0xf8, 0x1c, 0x68, 0x18, 0x18, 0x98, 0x10, 0x53, 0x46, 0x16, - 0x24, 0x46, 0xc4, 0xd4, 0x81, 0x2f, 0xc0, 0x56, 0x31, 0x75, 0x64, 0x22, 0x28, 0x19, 0xfa, 0x0d, - 0x98, 0x91, 0xef, 0xce, 0x8e, 0x9b, 0x04, 0x90, 0x90, 0xba, 0x24, 0x77, 0xbf, 0x7f, 0xef, 0xbd, - 0xfb, 0x3d, 0x19, 0x5e, 0xb3, 0x09, 0xf5, 0x08, 0xd5, 0x0f, 0x30, 0x76, 0x42, 0xe4, 0x47, 0xfa, - 0x8b, 0x6d, 0x0b, 0x47, 0x68, 0x3b, 0x0d, 0x68, 0x41, 0x48, 0x22, 0x22, 0x5d, 0xe1, 0x75, 0x5a, - 0x1a, 0x16, 0x75, 0x95, 0x75, 0x87, 0x38, 0x84, 0xd5, 0xe8, 0xf1, 0x89, 0x97, 0x57, 0xca, 0x0e, - 0x21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, 0xc3, 0x94, 0x22, 0x07, 0x53, 0x79, - 0xa1, 0x9a, 0xaf, 0x17, 0xcc, 0x4b, 0x22, 0xbe, 0x2f, 0xc2, 0xcd, 0x5b, 0x6f, 0x3f, 0xaa, 0xb9, - 0xb9, 0x0a, 0x94, 0x8c, 0x82, 0x39, 0x5c, 0x6b, 0x6f, 0x00, 0x5c, 0xba, 0x17, 0xdb, 0x56, 0x92, - 0xe1, 0x05, 0xe6, 0x5f, 0x1c, 0x32, 0xce, 0x05, 0x33, 0xb9, 0x4e, 0x32, 0x98, 0x19, 0x35, 0xcd, - 0x4c, 0x29, 0xcd, 0xff, 0xaf, 0x52, 0xa3, 0x75, 0x3c, 0x52, 0xc0, 0xc9, 0x48, 0x01, 0x3f, 0x47, - 0x0a, 0x18, 0x8c, 0x95, 0xdc, 0xc9, 0x58, 0xc9, 0x7d, 0x1f, 0x2b, 0xb9, 0x27, 0x1b, 0x7f, 0xf5, - 0xc8, 0x61, 0xfa, 0x0d, 0xb6, 0x96, 0x19, 0xdc, 0x8d, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9f, - 0x55, 0xbe, 0x92, 0xae, 0x05, 0x00, 0x00, + // 618 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, + 0x1c, 0xcd, 0x35, 0x6d, 0xbf, 0xca, 0xe5, 0xdb, 0xd2, 0x98, 0x4a, 0x38, 0x11, 0xb2, 0xa3, 0x0c, + 0x34, 0x54, 0xaa, 0xad, 0x06, 0x21, 0xa1, 0x4c, 0x8d, 0xcb, 0x4f, 0xa9, 0x95, 0x90, 0x61, 0x62, + 0x89, 0xce, 0xce, 0xd5, 0x58, 0xc4, 0x3e, 0xe3, 0x73, 0xa0, 0x61, 0x60, 0x60, 0x42, 0x4c, 0x19, + 0x59, 0x90, 0x18, 0x11, 0x53, 0x07, 0xfe, 0x01, 0xb6, 0x8a, 0xa9, 0x62, 0x62, 0x22, 0x28, 0x19, + 0xfa, 0x1f, 0x30, 0x23, 0xdf, 0x9d, 0x1d, 0x37, 0x09, 0x20, 0x21, 0x75, 0x49, 0xee, 0x3e, 0xbf, + 0xde, 0x7b, 0xf7, 0x79, 0x32, 0xbc, 0x62, 0x13, 0xea, 0x11, 0xaa, 0x1f, 0x60, 0xec, 0x84, 0xc8, + 0x8f, 0xf4, 0x67, 0xdb, 0x16, 0x8e, 0xd0, 0x76, 0x1a, 0xd0, 0x82, 0x90, 0x44, 0x44, 0xba, 0xc4, + 0xeb, 0xb4, 0x34, 0x2c, 0xea, 0x2a, 0xeb, 0x0e, 0x71, 0x08, 0xab, 0xd1, 0xe3, 0x13, 0x2f, 0xaf, + 0x94, 0x1d, 0x42, 0x9c, 0x2e, 0xd6, 0xd9, 0xcd, 0xea, 0x1d, 0xe8, 0xc8, 0xef, 0x27, 0x29, 0x3e, + 0xa9, 0xcd, 0x7b, 0xc4, 0x58, 0x9e, 0x52, 0x04, 0x19, 0x0b, 0x51, 0x9c, 0x12, 0xb1, 0x89, 0xeb, + 0x8b, 0x7c, 0x09, 0x79, 0xae, 0x4f, 0x74, 0xf6, 0x2b, 0x42, 0xea, 0x34, 0x50, 0xe4, 0x7a, 0x98, + 0x46, 0xc8, 0x0b, 0x92, 0x99, 0xd3, 0x05, 0x9d, 0x5e, 0x88, 0x22, 0x97, 0x88, 0x99, 0xb5, 0x9f, + 0x00, 0xae, 0x1a, 0x88, 0xba, 0x76, 0xab, 0xdb, 0x25, 0xcf, 0x91, 0x6f, 0x63, 0xe9, 0x29, 0x2c, + 0xd2, 0x00, 0xfb, 0x9d, 0x76, 0xd7, 0xf5, 0xdc, 0x48, 0x06, 0xd5, 0x7c, 0xbd, 0xd8, 0x28, 0x6b, + 0x82, 0x6a, 0x4c, 0x2e, 0x51, 0xaf, 0xed, 0x12, 0xd7, 0x37, 0xae, 0x1f, 0x7f, 0x57, 0x73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func (m *BasicAllowance) Marshal() (dAtA []byte, err error) { @@ -358,7 +358,7 @@ func (m *BasicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Expiration != nil { - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration):]) if err1 != nil { return 0, err1 } @@ -404,7 +404,7 @@ func (m *PeriodicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.PeriodReset, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PeriodReset):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.PeriodReset, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.PeriodReset):]) if err2 != nil { return 0, err2 } @@ -440,7 +440,7 @@ func (m *PeriodicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Period, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Period):]) + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Period, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Period):]) if err3 != nil { return 0, err3 } @@ -578,7 +578,7 @@ func (m *BasicAllowance) Size() (n int) { } } if m.Expiration != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Expiration) n += 1 + l + sovFeegrant(uint64(l)) } return n @@ -592,7 +592,7 @@ func (m *PeriodicAllowance) Size() (n int) { _ = l l = m.Basic.Size() n += 1 + l + sovFeegrant(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Period) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Period) n += 1 + l + sovFeegrant(uint64(l)) if len(m.PeriodSpendLimit) > 0 { for _, e := range m.PeriodSpendLimit { @@ -606,7 +606,7 @@ func (m *PeriodicAllowance) Size() (n int) { n += 1 + l + sovFeegrant(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PeriodReset) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.PeriodReset) n += 1 + l + sovFeegrant(uint64(l)) return n } @@ -752,7 +752,7 @@ func (m *BasicAllowance) Unmarshal(dAtA []byte) error { if m.Expiration == nil { m.Expiration = new(time.Time) } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -868,7 +868,7 @@ func (m *PeriodicAllowance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Period, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Period, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -969,7 +969,7 @@ func (m *PeriodicAllowance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.PeriodReset, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.PeriodReset, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/feegrant/filtered_fee.go b/x/feegrant/filtered_fee.go index 92a11c8effcc..d842e40852af 100644 --- a/x/feegrant/filtered_fee.go +++ b/x/feegrant/filtered_fee.go @@ -1,7 +1,7 @@ package feegrant import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/feegrant/genesis.pb.go b/x/feegrant/genesis.pb.go index 2c00644c93f3..6ab13be7c289 100644 --- a/x/feegrant/genesis.pb.go +++ b/x/feegrant/genesis.pb.go @@ -6,8 +6,8 @@ package feegrant import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/feegrant/grant.go b/x/feegrant/grant.go index 09644dbac796..a51e65ab5e1d 100644 --- a/x/feegrant/grant.go +++ b/x/feegrant/grant.go @@ -1,7 +1,7 @@ package feegrant import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,7 +13,6 @@ var ( ) // NewGrant creates a new FeeAllowanceGrant. -// //nolint:interfacer func NewGrant(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI) (Grant, error) { msg, ok := feeAllowance.(proto.Message) diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go index 0f96a68e8692..d8c23d0313cf 100644 --- a/x/feegrant/keeper/grpc_query.go +++ b/x/feegrant/keeper/grpc_query.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/feegrant/msgs.go b/x/feegrant/msgs.go index 85161b9e551a..3be830664bc3 100644 --- a/x/feegrant/msgs.go +++ b/x/feegrant/msgs.go @@ -1,7 +1,7 @@ package feegrant import ( - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,7 +17,6 @@ var ( ) // NewMsgGrantAllowance creates a new MsgGrantAllowance. -// //nolint:interfacer func NewMsgGrantAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAddress) (*MsgGrantAllowance, error) { msg, ok := feeAllowance.(proto.Message) @@ -98,7 +97,6 @@ func (msg MsgGrantAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error // NewMsgRevokeAllowance returns a message to revoke a fee allowance for a given // granter and grantee -// //nolint:interfacer func NewMsgRevokeAllowance(granter sdk.AccAddress, grantee sdk.AccAddress) MsgRevokeAllowance { return MsgRevokeAllowance{Granter: granter.String(), Grantee: grantee.String()} diff --git a/x/feegrant/query.pb.go b/x/feegrant/query.pb.go index c018a29f0ed2..94368d66649b 100644 --- a/x/feegrant/query.pb.go +++ b/x/feegrant/query.pb.go @@ -7,8 +7,8 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/feegrant/query.pb.gw.go b/x/feegrant/query.pb.gw.go index 27e109984c44..06689435e071 100644 --- a/x/feegrant/query.pb.gw.go +++ b/x/feegrant/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Allowance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllowanceRequest @@ -184,14 +182,12 @@ func local_request_Query_Allowances_0(ctx context.Context, marshaler runtime.Mar // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Allowance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -199,7 +195,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Allowance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -213,8 +208,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Allowances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -222,7 +215,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Allowances_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/feegrant/tx.pb.go b/x/feegrant/tx.pb.go index 1746564f9b37..9f176a079049 100644 --- a/x/feegrant/tx.pb.go +++ b/x/feegrant/tx.pb.go @@ -6,11 +6,11 @@ package feegrant import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/genutil/client/cli/migrate.go b/x/genutil/client/cli/migrate.go index 13c1b8cf059d..37e42ac4f704 100644 --- a/x/genutil/client/cli/migrate.go +++ b/x/genutil/client/cli/migrate.go @@ -14,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" + v040 "github.com/cosmos/cosmos-sdk/x/genutil/legacy/v040" v043 "github.com/cosmos/cosmos-sdk/x/genutil/legacy/v043" "github.com/cosmos/cosmos-sdk/x/genutil/types" ) @@ -24,6 +25,7 @@ const flagGenesisTime = "genesis-time" // // Ref: https://github.com/cosmos/cosmos-sdk/issues/5041 var migrationMap = types.MigrationMap{ + "v0.42": v040.Migrate, // NOTE: v0.40, v0.41 and v0.42 are genesis compatible. "v0.43": v043.Migrate, } diff --git a/x/genutil/collect_test.go b/x/genutil/collect_test.go index cc8a89cda002..46e20f88f1b3 100644 --- a/x/genutil/collect_test.go +++ b/x/genutil/collect_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" tmtypes "github.com/tendermint/tendermint/types" diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index acf1530baf86..8de5bc4afe41 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -3,9 +3,7 @@ package genutil_test import ( "encoding/json" "fmt" - "math/rand" "testing" - "time" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -236,7 +234,6 @@ func (suite *GenTxTestSuite) TestDeliverGenTxs() { msg := banktypes.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)}) tx, err := helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), suite.encodingConfig.TxConfig, []sdk.Msg{msg}, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)}, diff --git a/x/genutil/legacy/v040/migrate.go b/x/genutil/legacy/v040/migrate.go new file mode 100644 index 000000000000..a022d9fcf985 --- /dev/null +++ b/x/genutil/legacy/v040/migrate.go @@ -0,0 +1,200 @@ +package v040 + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + v039auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v039" + v040auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" + v036supply "github.com/cosmos/cosmos-sdk/x/bank/legacy/v036" + v038bank "github.com/cosmos/cosmos-sdk/x/bank/legacy/v038" + v040bank "github.com/cosmos/cosmos-sdk/x/bank/legacy/v040" + v039crisis "github.com/cosmos/cosmos-sdk/x/crisis/legacy/v039" + v040crisis "github.com/cosmos/cosmos-sdk/x/crisis/legacy/v040" + v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" + v038distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v038" + v040distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v040" + v038evidence "github.com/cosmos/cosmos-sdk/x/evidence/legacy/v038" + v040evidence "github.com/cosmos/cosmos-sdk/x/evidence/legacy/v040" + v039genutil "github.com/cosmos/cosmos-sdk/x/genutil/legacy/v039" + "github.com/cosmos/cosmos-sdk/x/genutil/types" + v036gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v036" + v040gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v040" + v039mint "github.com/cosmos/cosmos-sdk/x/mint/legacy/v039" + v040mint "github.com/cosmos/cosmos-sdk/x/mint/legacy/v040" + v036params "github.com/cosmos/cosmos-sdk/x/params/legacy/v036" + v039slashing "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v039" + v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v040" + v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/legacy/v038" +) + +func migrateGenutil(oldGenState v039genutil.GenesisState) *types.GenesisState { + return &types.GenesisState{ + GenTxs: oldGenState.GenTxs, + } +} + +// Migrate migrates exported state from v0.39 to a v0.40 genesis state. +func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { + v039Codec := codec.NewLegacyAmino() + v039auth.RegisterLegacyAminoCodec(v039Codec) + v036gov.RegisterLegacyAminoCodec(v039Codec) + v036distr.RegisterLegacyAminoCodec(v039Codec) + v036params.RegisterLegacyAminoCodec(v039Codec) + v038upgrade.RegisterLegacyAminoCodec(v039Codec) + + v040Codec := clientCtx.Codec + + if appState[v038bank.ModuleName] != nil { + // unmarshal relative source genesis application state + var bankGenState v038bank.GenesisState + v039Codec.MustUnmarshalJSON(appState[v038bank.ModuleName], &bankGenState) + + // unmarshal x/auth genesis state to retrieve all account balances + var authGenState v039auth.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039auth.ModuleName], &authGenState) + + // unmarshal x/supply genesis state to retrieve total supply + var supplyGenState v036supply.GenesisState + v039Codec.MustUnmarshalJSON(appState[v036supply.ModuleName], &supplyGenState) + + // delete deprecated x/bank genesis state + delete(appState, v038bank.ModuleName) + + // delete deprecated x/supply genesis state + delete(appState, v036supply.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040bank.ModuleName] = v040Codec.MustMarshalJSON(v040bank.Migrate(bankGenState, authGenState, supplyGenState)) + } + + // remove balances from existing accounts + if appState[v039auth.ModuleName] != nil { + // unmarshal relative source genesis application state + var authGenState v039auth.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039auth.ModuleName], &authGenState) + + // delete deprecated x/auth genesis state + delete(appState, v039auth.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040auth.ModuleName] = v040Codec.MustMarshalJSON(v040auth.Migrate(authGenState)) + } + + // Migrate x/crisis. + if appState[v039crisis.ModuleName] != nil { + // unmarshal relative source genesis application state + var crisisGenState v039crisis.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039crisis.ModuleName], &crisisGenState) + + // delete deprecated x/crisis genesis state + delete(appState, v039crisis.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040crisis.ModuleName] = v040Codec.MustMarshalJSON(v040crisis.Migrate(crisisGenState)) + } + + // Migrate x/distribution. + if appState[v038distr.ModuleName] != nil { + // unmarshal relative source genesis application state + var distributionGenState v038distr.GenesisState + v039Codec.MustUnmarshalJSON(appState[v038distr.ModuleName], &distributionGenState) + + // delete deprecated x/distribution genesis state + delete(appState, v038distr.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040distr.ModuleName] = v040Codec.MustMarshalJSON(v040distr.Migrate(distributionGenState)) + } + + // Migrate x/evidence. + if appState[v038evidence.ModuleName] != nil { + // unmarshal relative source genesis application state + var evidenceGenState v038evidence.GenesisState + v039Codec.MustUnmarshalJSON(appState[v038bank.ModuleName], &evidenceGenState) + + // delete deprecated x/evidence genesis state + delete(appState, v038evidence.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040evidence.ModuleName] = v040Codec.MustMarshalJSON(v040evidence.Migrate(evidenceGenState)) + } + + // Migrate x/gov. + if appState[v036gov.ModuleName] != nil { + // unmarshal relative source genesis application state + var govGenState v036gov.GenesisState + v039Codec.MustUnmarshalJSON(appState[v036gov.ModuleName], &govGenState) + + // delete deprecated x/gov genesis state + delete(appState, v036gov.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040gov.ModuleName] = v040Codec.MustMarshalJSON(v040gov.Migrate(govGenState)) + } + + // Migrate x/mint. + if appState[v039mint.ModuleName] != nil { + // unmarshal relative source genesis application state + var mintGenState v039mint.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039mint.ModuleName], &mintGenState) + + // delete deprecated x/mint genesis state + delete(appState, v039mint.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040mint.ModuleName] = v040Codec.MustMarshalJSON(v040mint.Migrate(mintGenState)) + } + + // Migrate x/slashing. + if appState[v039slashing.ModuleName] != nil { + // unmarshal relative source genesis application state + var slashingGenState v039slashing.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039slashing.ModuleName], &slashingGenState) + + // delete deprecated x/slashing genesis state + delete(appState, v039slashing.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040slashing.ModuleName] = v040Codec.MustMarshalJSON(v040slashing.Migrate(slashingGenState)) + } + + // Migrate x/staking. + if appState[v038staking.ModuleName] != nil { + // unmarshal relative source genesis application state + var stakingGenState v038staking.GenesisState + v039Codec.MustUnmarshalJSON(appState[v038staking.ModuleName], &stakingGenState) + + // delete deprecated x/staking genesis state + delete(appState, v038staking.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[v040staking.ModuleName] = v040Codec.MustMarshalJSON(v040staking.Migrate(stakingGenState)) + } + + // Migrate x/genutil + if appState[v039genutil.ModuleName] != nil { + // unmarshal relative source genesis application state + var genutilGenState v039genutil.GenesisState + v039Codec.MustUnmarshalJSON(appState[v039genutil.ModuleName], &genutilGenState) + + // delete deprecated x/staking genesis state + delete(appState, v039genutil.ModuleName) + + // Migrate relative source genesis application state and marshal it into + // the respective key. + appState[ModuleName] = v040Codec.MustMarshalJSON(migrateGenutil(genutilGenState)) + } + + return appState +} diff --git a/x/genutil/legacy/v040/types.go b/x/genutil/legacy/v040/types.go new file mode 100644 index 000000000000..f641dbff51e1 --- /dev/null +++ b/x/genutil/legacy/v040/types.go @@ -0,0 +1,5 @@ +package v040 + +const ( + ModuleName = "genutil" +) diff --git a/x/genutil/types/genesis.pb.go b/x/genutil/types/genesis.pb.go index 0037e3d3ccfe..29afdd37c175 100644 --- a/x/genutil/types/genesis.pb.go +++ b/x/genutil/types/genesis.pb.go @@ -7,8 +7,8 @@ import ( encoding_json "encoding/json" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/gov/client/testutil/suite.go b/x/gov/client/testutil/suite.go index b3e5890e8b99..965ec4e89c0e 100644 --- a/x/gov/client/testutil/suite.go +++ b/x/gov/client/testutil/suite.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index e5a12895dd5f..9be690f8353c 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 09f48350cd06..d70ae1e3aa18 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -7,13 +7,12 @@ import ( "testing" "time" - "github.com/cosmos/gogoproto/proto" - - "github.com/stretchr/testify/require" + "github.com/gogo/protobuf/proto" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "github.com/stretchr/testify/require" ) func (suite *KeeperTestSuite) TestGetSetProposal() { diff --git a/x/gov/legacy/v040/migrate.go b/x/gov/legacy/v040/migrate.go index 701bfcef10c1..3adedde50932 100644 --- a/x/gov/legacy/v040/migrate.go +++ b/x/gov/legacy/v040/migrate.go @@ -3,7 +3,7 @@ package v040 import ( "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index b26f17337180..69e8f67d1352 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -159,7 +159,6 @@ func SimulateMsgSubmitProposal( txGen := simappparams.MakeTestEncodingConfig().TxConfig tx, err := helpers.GenTx( - r, txGen, []sdk.Msg{msg}, fees, @@ -247,7 +246,6 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke } txCtx := simulation.OperationInput{ - R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, diff --git a/x/gov/types/genesis.pb.go b/x/gov/types/genesis.pb.go index ed1b4c379aae..88ed03c365bd 100644 --- a/x/gov/types/genesis.pb.go +++ b/x/gov/types/genesis.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/gov/types/gov.pb.go b/x/gov/types/gov.pb.go index 4705d0f4d38c..4c1eb762296a 100644 --- a/x/gov/types/gov.pb.go +++ b/x/gov/types/gov.pb.go @@ -5,14 +5,14 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" @@ -564,117 +564,117 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xe7, 0x92, 0xd4, 0x07, 0x87, 0x94, 0xbc, 0x1e, 0xc9, 0x12, 0xc5, 0x38, 0x5c, 0x66, 0x0d, - 0xb8, 0xaa, 0xea, 0x50, 0x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df, 0xb1, 0x70, 0x1b, 0x35, 0x39, 0x9d, 0xda, 0xc1, - 0xd3, 0x4f, 0xf3, 0xb1, 0x4f, 0x3e, 0xcd, 0xc7, 0x3e, 0x78, 0x9e, 0x8f, 0x3d, 0x7d, 0x9e, 0x97, - 0x3e, 0x7e, 0x9e, 0x97, 0xfe, 0xf3, 0x3c, 0x2f, 0x3d, 0x7a, 0x91, 0x8f, 0x7d, 0xfc, 0x22, 0x1f, - 0xfb, 0xe4, 0x45, 0x3e, 0xf6, 0xee, 0x17, 0xdf, 0xef, 0xa7, 0xec, 0x2f, 0x53, 0x6c, 0xea, 0x8e, - 0x16, 0x59, 0x97, 0x7f, 0xe3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x3c, 0x66, 0x06, 0xb4, - 0x12, 0x00, 0x00, + // 1748 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x17, 0x25, 0xf9, 0x43, 0x23, 0xd9, 0x61, 0xc6, 0x8e, 0x2d, 0x6b, 0xb3, 0xa2, 0x96, 0x01, + 0x52, 0xd7, 0xcd, 0xca, 0xdd, 0xf4, 0x0b, 0x75, 0x8a, 0xb6, 0x66, 0xc4, 0x74, 0xd5, 0xa6, 0x96, + 0x4a, 0x29, 0x0e, 0x76, 0x2f, 0x2c, 0x2d, 0x4d, 0xe4, 0xe9, 0x8a, 0x1c, 0xad, 0x38, 0x72, 0x6c, + 0xf4, 0xb2, 0xc7, 0x85, 0x80, 0x16, 0x39, 0x15, 0x01, 0x0a, 0x01, 0x41, 0x8b, 0x02, 0x45, 0x4f, + 0x7b, 0x28, 0xd0, 0x9e, 0x7b, 0x0a, 0x8a, 0x1e, 0x16, 0x45, 0x81, 0x2e, 0x7a, 0x50, 0xba, 0x09, + 0xd0, 0x5d, 0x18, 0xe8, 0xc5, 0x7f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 0x2f, 0x00, 0x00, 0xff, 0xff, 0x61, 0xad, 0x8c, 0x4c, + 0xb4, 0x12, 0x00, 0x00, } func (this *TextProposal) Equal(that interface{}) bool { @@ -947,7 +947,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x50 } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingEndTime):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime):]) if err1 != nil { return 0, err1 } @@ -955,7 +955,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGov(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x4a - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.VotingStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingStartTime):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingStartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime):]) if err2 != nil { return 0, err2 } @@ -977,7 +977,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3a } } - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.DepositEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositEndTime):]) + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DepositEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime):]) if err3 != nil { return 0, err3 } @@ -985,7 +985,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGov(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x32 - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime):]) + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime):]) if err4 != nil { return 0, err4 } @@ -1189,7 +1189,7 @@ func (m *DepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - n7, err7 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxDepositPeriod):]) + n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxDepositPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod):]) if err7 != nil { return 0, err7 } @@ -1234,7 +1234,7 @@ func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n8, err8 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.ExpeditedVotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ExpeditedVotingPeriod):]) + n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.ExpeditedVotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.ExpeditedVotingPeriod):]) if err8 != nil { return 0, err8 } @@ -1256,7 +1256,7 @@ func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - n9, err9 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod):]) + n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod):]) if err9 != nil { return 0, err9 } @@ -1360,7 +1360,7 @@ func (m *ProposalVotingPeriod) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n10, err10 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod):]) + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod):]) if err10 != nil { return 0, err10 } @@ -1460,9 +1460,9 @@ func (m *Proposal) Size() (n int) { } l = m.FinalTallyResult.Size() n += 1 + l + sovGov(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime) n += 1 + l + sovGov(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositEndTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime) n += 1 + l + sovGov(uint64(l)) if len(m.TotalDeposit) > 0 { for _, e := range m.TotalDeposit { @@ -1470,9 +1470,9 @@ func (m *Proposal) Size() (n int) { n += 1 + l + sovGov(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingStartTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime) n += 1 + l + sovGov(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingEndTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime) n += 1 + l + sovGov(uint64(l)) if m.IsExpedited { n += 2 @@ -1534,7 +1534,7 @@ func (m *DepositParams) Size() (n int) { n += 1 + l + sovGov(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxDepositPeriod) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod) n += 1 + l + sovGov(uint64(l)) if len(m.MinExpeditedDeposit) > 0 { for _, e := range m.MinExpeditedDeposit { @@ -1553,7 +1553,7 @@ func (m *VotingParams) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod) n += 1 + l + sovGov(uint64(l)) if len(m.ProposalVotingPeriods) > 0 { for _, e := range m.ProposalVotingPeriods { @@ -1561,7 +1561,7 @@ func (m *VotingParams) Size() (n int) { n += 1 + l + sovGov(uint64(l)) } } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ExpeditedVotingPeriod) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.ExpeditedVotingPeriod) n += 1 + l + sovGov(uint64(l)) return n } @@ -1595,7 +1595,7 @@ func (m *ProposalVotingPeriod) Size() (n int) { if l > 0 { n += 1 + l + sovGov(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod) n += 1 + l + sovGov(uint64(l)) return n } @@ -2123,7 +2123,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2156,7 +2156,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.DepositEndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DepositEndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2223,7 +2223,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.VotingStartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingStartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2256,7 +2256,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.VotingEndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingEndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2733,7 +2733,7 @@ func (m *DepositParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2884,7 +2884,7 @@ func (m *VotingParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2951,7 +2951,7 @@ func (m *VotingParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.ExpeditedVotingPeriod, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.ExpeditedVotingPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3281,7 +3281,7 @@ func (m *ProposalVotingPeriod) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/gov/types/msgs.go b/x/gov/types/msgs.go index bfd7abbd3356..0f670d9fc7bb 100644 --- a/x/gov/types/msgs.go +++ b/x/gov/types/msgs.go @@ -5,7 +5,7 @@ import ( yaml "gopkg.in/yaml.v2" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -26,7 +26,6 @@ var ( ) // NewMsgSubmitProposal creates a new MsgSubmitProposal that is not expedited -// //nolint:interfacer func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ @@ -42,7 +41,6 @@ func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sd } // NewMsgSubmitProposalWithExpedited creates a new MsgSubmitProposal. It can optionally be used to create an expedited proposal -// //nolint:interfacer func NewMsgSubmitProposalWithExpedited(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress, IsExpedited bool) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ @@ -150,7 +148,6 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error { } // NewMsgDeposit creates a new MsgDeposit instance -// //nolint:interfacer func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) *MsgDeposit { return &MsgDeposit{proposalID, depositor.String(), amount} @@ -196,7 +193,6 @@ func (msg MsgDeposit) GetSigners() []sdk.AccAddress { } // NewMsgVote creates a message to cast a vote on an active proposal -// //nolint:interfacer func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption) *MsgVote { return &MsgVote{proposalID, voter.String(), option} @@ -240,7 +236,6 @@ func (msg MsgVote) GetSigners() []sdk.AccAddress { } // NewMsgVoteWeighted creates a message to cast a vote on an active proposal -// //nolint:interfacer func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions) *MsgVoteWeighted { return &MsgVoteWeighted{proposalID, voter.String(), options} diff --git a/x/gov/types/proposal.go b/x/gov/types/proposal.go index 291faf0ae1da..ab2b7e1c6025 100644 --- a/x/gov/types/proposal.go +++ b/x/gov/types/proposal.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" yaml "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/gov/types/query.pb.go b/x/gov/types/query.pb.go index 3a5d1a88f17f..b098b16c00e1 100644 --- a/x/gov/types/query.pb.go +++ b/x/gov/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/gov/types/query.pb.gw.go b/x/gov/types/query.pb.gw.go index 1638dc7971b9..4b6832d41e7b 100644 --- a/x/gov/types/query.pb.gw.go +++ b/x/gov/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryProposalRequest @@ -530,14 +528,12 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -545,7 +541,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Proposal_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -559,8 +554,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Proposals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -568,7 +561,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Proposals_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -582,8 +574,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -591,7 +581,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Vote_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -605,8 +594,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -614,7 +601,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Votes_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -628,8 +614,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -637,7 +621,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -651,8 +634,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -660,7 +641,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Deposit_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -674,8 +654,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -683,7 +661,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Deposits_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -697,8 +674,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -706,7 +681,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TallyResult_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/gov/types/tx.pb.go b/x/gov/types/tx.pb.go index ac6ca9a800fd..26eee57a4025 100644 --- a/x/gov/types/tx.pb.go +++ b/x/gov/types/tx.pb.go @@ -6,14 +6,14 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/mint/client/rest/grpc_query_test.go b/x/mint/client/rest/grpc_query_test.go index e10465561d95..fdbb4ff75998 100644 --- a/x/mint/client/rest/grpc_query_test.go +++ b/x/mint/client/rest/grpc_query_test.go @@ -1,4 +1,3 @@ -//go:build norace // +build norace package rest_test @@ -11,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/testutil/network" diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go index 9f50cfb54764..9ffdee75c1e6 100644 --- a/x/mint/types/genesis.pb.go +++ b/x/mint/types/genesis.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/mint/types/mint.pb.go b/x/mint/types/mint.pb.go index 58c227da2d91..2983b2fe59d7 100644 --- a/x/mint/types/mint.pb.go +++ b/x/mint/types/mint.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/mint/types/query.pb.go b/x/mint/types/query.pb.go index fd255a02d6fb..0ae0e2f652f8 100644 --- a/x/mint/types/query.pb.go +++ b/x/mint/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/mint/types/query.pb.gw.go b/x/mint/types/query.pb.gw.go index 7ed551a69f5e..576b206d4a4e 100644 --- a/x/mint/types/query.pb.gw.go +++ b/x/mint/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -90,14 +88,12 @@ func local_request_Query_AnnualProvisions_0(ctx context.Context, marshaler runti // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -105,7 +101,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -119,8 +114,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Inflation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -128,7 +121,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Inflation_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -142,8 +134,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AnnualProvisions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -151,7 +141,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AnnualProvisions_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/params/client/rest/grpc_query_test.go b/x/params/client/rest/grpc_query_test.go index 7a0a83f19347..f2c4440e29d5 100644 --- a/x/params/client/rest/grpc_query_test.go +++ b/x/params/client/rest/grpc_query_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/x/params/keeper/consensus_params.go b/x/params/keeper/consensus_params.go index 9481d5d91271..5ce8d340d0d9 100644 --- a/x/params/keeper/consensus_params.go +++ b/x/params/keeper/consensus_params.go @@ -1,6 +1,7 @@ package keeper import ( + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -15,7 +16,7 @@ import ( func ConsensusParamsKeyTable() types.KeyTable { return types.NewKeyTable( types.NewParamSetPair( - baseapp.ParamStoreKeyBlockParams, tmproto.BlockParams{}, baseapp.ValidateBlockParams, + baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams, ), types.NewParamSetPair( baseapp.ParamStoreKeyEvidenceParams, tmproto.EvidenceParams{}, baseapp.ValidateEvidenceParams, diff --git a/x/params/types/proposal/params.pb.go b/x/params/types/proposal/params.pb.go index 35a877433e3b..20087801d802 100644 --- a/x/params/types/proposal/params.pb.go +++ b/x/params/types/proposal/params.pb.go @@ -6,8 +6,8 @@ package proposal import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/params/types/proposal/query.pb.go b/x/params/types/proposal/query.pb.go index e07fc7bcc645..dd224a6bdb23 100644 --- a/x/params/types/proposal/query.pb.go +++ b/x/params/types/proposal/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/params/types/proposal/query.pb.gw.go b/x/params/types/proposal/query.pb.gw.go index 195df70a6055..f5b9f9d5b686 100644 --- a/x/params/types/proposal/query.pb.gw.go +++ b/x/params/types/proposal/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join var ( filter_Query_Params_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -72,14 +70,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -87,7 +83,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/simulation/mock_tendermint.go b/x/simulation/mock_tendermint.go index 8c8410b2572e..55c2ca544465 100644 --- a/x/simulation/mock_tendermint.go +++ b/x/simulation/mock_tendermint.go @@ -167,14 +167,14 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, if len(pastTimes) == 0 { return abci.RequestBeginBlock{ Header: header, - LastCommitInfo: abci.CommitInfo{ + LastCommitInfo: abci.LastCommitInfo{ Votes: voteInfos, }, } } // TODO: Determine capacity before allocation - evidence := make([]abci.Misbehavior, 0) + evidence := make([]abci.Evidence, 0) for r.Float64() < params.EvidenceFraction() { height := header.Height @@ -196,8 +196,8 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, } evidence = append(evidence, - abci.Misbehavior{ - Type: abci.MisbehaviorType_DUPLICATE_VOTE, + abci.Evidence{ + Type: abci.EvidenceType_DUPLICATE_VOTE, Validator: validator, Height: height, Time: time, @@ -210,7 +210,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, return abci.RequestBeginBlock{ Header: header, - LastCommitInfo: abci.CommitInfo{ + LastCommitInfo: abci.LastCommitInfo{ Votes: voteInfos, }, ByzantineValidators: evidence, diff --git a/x/simulation/params.go b/x/simulation/params.go index 3da5df2a983a..06d48b04f00c 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -5,6 +5,7 @@ import ( "fmt" "math/rand" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" @@ -150,7 +151,7 @@ func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulato // Param change proposals // randomConsensusParams returns random simulation consensus parameters, it extracts the Evidence from the Staking genesis state. -func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *tmproto.ConsensusParams { +func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *abci.ConsensusParams { var genesisState map[string]json.RawMessage err := json.Unmarshal(appState, &genesisState) if err != nil { @@ -158,8 +159,8 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO } stakingGenesisState := stakingtypes.GetGenesisStateFromAppState(cdc, genesisState) - consensusParams := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + consensusParams := &abci.ConsensusParams{ + Block: &abci.BlockParams{ MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)), MaxGas: -1, }, @@ -171,7 +172,7 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO MaxAgeDuration: stakingGenesisState.Params.UnbondingTime, }, Version: &tmproto.VersionParams{ - App: uint64(simulation.RandIntBetween(r, 0, 10000)), + AppVersion: uint64(simulation.RandIntBetween(r, 0, 10000)), }, } diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index e5c221a9f731..28662508eb2b 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -41,7 +41,7 @@ func initChain( Time: genesisTimestamp, } // Valid app version can only be zero on app initialization. - req.ConsensusParams.Version.App = 0 + req.ConsensusParams.Version.AppVersion = 0 res := app.InitChain(req) validators := newMockValidators(r, res.Validators, params) diff --git a/x/simulation/util.go b/x/simulation/util.go index f9e2c500f939..bb2a6ee62a85 100644 --- a/x/simulation/util.go +++ b/x/simulation/util.go @@ -102,7 +102,6 @@ func GenAndDeliverTxWithRandFees(txCtx OperationInput) (simtypes.OperationMsg, [ func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) tx, err := helpers.GenTx( - txCtx.R, txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index 64d2f594d30a..6121e3572b88 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -42,7 +42,7 @@ func TestBeginBlocker(t *testing.T) { // mark the validator as having signed req := abci.RequestBeginBlock{ - LastCommitInfo: abci.CommitInfo{ + LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, SignedLastBlock: true, @@ -65,7 +65,7 @@ func TestBeginBlocker(t *testing.T) { for ; height < app.SlashingKeeper.SignedBlocksWindow(ctx); height++ { ctx = ctx.WithBlockHeight(height) req = abci.RequestBeginBlock{ - LastCommitInfo: abci.CommitInfo{ + LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, SignedLastBlock: true, @@ -80,7 +80,7 @@ func TestBeginBlocker(t *testing.T) { for ; height < ((app.SlashingKeeper.SignedBlocksWindow(ctx) * 2) - app.SlashingKeeper.MinSignedPerWindow(ctx) + 1); height++ { ctx = ctx.WithBlockHeight(height) req = abci.RequestBeginBlock{ - LastCommitInfo: abci.CommitInfo{ + LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, SignedLastBlock: false, diff --git a/x/slashing/client/rest/grpc_query_test.go b/x/slashing/client/rest/grpc_query_test.go index c08bbc892846..39daf06f69c5 100644 --- a/x/slashing/client/rest/grpc_query_test.go +++ b/x/slashing/client/rest/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/x/slashing/client/testutil/suite.go b/x/slashing/client/testutil/suite.go index fbc2e43e6daa..cf5cf997b6c3 100644 --- a/x/slashing/client/testutil/suite.go +++ b/x/slashing/client/testutil/suite.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" diff --git a/x/slashing/keeper/signing_info.go b/x/slashing/keeper/signing_info.go index a32306a5b2e9..ed15ae3e4ff3 100644 --- a/x/slashing/keeper/signing_info.go +++ b/x/slashing/keeper/signing_info.go @@ -3,7 +3,7 @@ package keeper import ( "time" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" diff --git a/x/slashing/simulation/decoder.go b/x/slashing/simulation/decoder.go index d295a284ac18..6c845ace7174 100644 --- a/x/slashing/simulation/decoder.go +++ b/x/slashing/simulation/decoder.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" diff --git a/x/slashing/simulation/decoder_test.go b/x/slashing/simulation/decoder_test.go index 6efc693b75b3..94b9f5a1c88c 100644 --- a/x/slashing/simulation/decoder_test.go +++ b/x/slashing/simulation/decoder_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index 3c087386b332..01d79781e2f6 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -91,7 +91,6 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee txGen := simappparams.MakeTestEncodingConfig().TxConfig tx, err := helpers.GenTx( - r, txGen, []sdk.Msg{msg}, fees, diff --git a/x/slashing/types/genesis.pb.go b/x/slashing/types/genesis.pb.go index 8acc9782f599..34891adf02e4 100644 --- a/x/slashing/types/genesis.pb.go +++ b/x/slashing/types/genesis.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/slashing/types/query.pb.go b/x/slashing/types/query.pb.go index c673e0b7e76f..035a291e68e8 100644 --- a/x/slashing/types/query.pb.go +++ b/x/slashing/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/slashing/types/query.pb.gw.go b/x/slashing/types/query.pb.gw.go index 31fe8bb6f02c..95446797bfab 100644 --- a/x/slashing/types/query.pb.gw.go +++ b/x/slashing/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -144,14 +142,12 @@ func local_request_Query_SigningInfos_0(ctx context.Context, marshaler runtime.M // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -159,7 +155,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -173,8 +168,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SigningInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -182,7 +175,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SigningInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -196,8 +188,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SigningInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -205,7 +195,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SigningInfos_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/slashing/types/slashing.pb.go b/x/slashing/types/slashing.pb.go index 57ed087f83d8..af8d4efacf1c 100644 --- a/x/slashing/types/slashing.pb.go +++ b/x/slashing/types/slashing.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" @@ -345,7 +345,7 @@ func (m *ValidatorSigningInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.JailedUntil, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.JailedUntil):]) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.JailedUntil, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.JailedUntil):]) if err1 != nil { return 0, err1 } @@ -413,7 +413,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x22 - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.DowntimeJailDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DowntimeJailDuration):]) + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DowntimeJailDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DowntimeJailDuration):]) if err2 != nil { return 0, err2 } @@ -466,7 +466,7 @@ func (m *ValidatorSigningInfo) Size() (n int) { if m.IndexOffset != 0 { n += 1 + sovSlashing(uint64(m.IndexOffset)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.JailedUntil) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.JailedUntil) n += 1 + l + sovSlashing(uint64(l)) if m.Tombstoned { n += 2 @@ -488,7 +488,7 @@ func (m *Params) Size() (n int) { } l = m.MinSignedPerWindow.Size() n += 1 + l + sovSlashing(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DowntimeJailDuration) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DowntimeJailDuration) n += 1 + l + sovSlashing(uint64(l)) l = m.SlashFractionDoubleSign.Size() n += 1 + l + sovSlashing(uint64(l)) @@ -631,7 +631,7 @@ func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.JailedUntil, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.JailedUntil, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -805,7 +805,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.DowntimeJailDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DowntimeJailDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/slashing/types/tx.pb.go b/x/slashing/types/tx.pb.go index d4d83ca1af22..879d7e43929a 100644 --- a/x/slashing/types/tx.pb.go +++ b/x/slashing/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/staking/client/rest/grpc_query_test.go b/x/staking/client/rest/grpc_query_test.go index 218c1f77b687..55a10194f603 100644 --- a/x/staking/client/rest/grpc_query_test.go +++ b/x/staking/client/rest/grpc_query_test.go @@ -1,4 +1,3 @@ -//go:build norace // +build norace package rest_test @@ -7,7 +6,7 @@ import ( "fmt" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/staking/client/testutil/suite.go b/x/staking/client/testutil/suite.go index 1a6fb5dd478a..991433f2a25c 100644 --- a/x/staking/client/testutil/suite.go +++ b/x/staking/client/testutil/suite.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tendermint/tendermint/proto/tendermint/crypto" diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index a4d8fd77594d..f846991ba013 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -5,12 +5,14 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" + "github.com/golang/protobuf/proto" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -168,7 +170,7 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { initPower := int64(1000) app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) - ctx = ctx.WithConsensusParams(&tmproto.ConsensusParams{ + ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519}}, }) @@ -182,7 +184,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, sdk.NewInt(1000)) - ctx = ctx.WithConsensusParams(&tmproto.ConsensusParams{ + ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519, tmtypes.ABCIPubKeyTypeSecp256k1}}, }) diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 8781a5e08cc9..22f699366119 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 5bbb07613dce..b3d9bb917a23 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - gogotypes "github.com/cosmos/gogoproto/types" + gogotypes "github.com/gogo/protobuf/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go new file mode 100644 index 000000000000..af9e607d28ac --- /dev/null +++ b/x/staking/legacy/v040/genesis.pb.go @@ -0,0 +1,944 @@ +// Package v040 is taken from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/genesis.pb.go +// by copy-pasted only the relevants parts for Genesis. +// nolint +package v040 + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the staking module's genesis state. +type GenesisState struct { + // params defines all the paramaters of related to deposit. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // last_total_power tracks the total amounts of bonded tokens recorded during + // the previous end block. + LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power" yaml:"last_total_power"` + // last_validator_powers is a special index that provides a historical list + // of the last-block's bonded validators. + LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers" yaml:"last_validator_powers"` + // delegations defines the validator set at genesis. + Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` + // delegations defines the delegations active at genesis. + Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"` + // unbonding_delegations defines the unbonding delegations active at genesis. + UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations" yaml:"unbonding_delegations"` + // redelegations defines the redelegations active at genesis. + Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` + Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_9b3dec8894f2831b, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetLastValidatorPowers() []LastValidatorPower { + if m != nil { + return m.LastValidatorPowers + } + return nil +} + +func (m *GenesisState) GetValidators() []Validator { + if m != nil { + return m.Validators + } + return nil +} + +func (m *GenesisState) GetDelegations() []Delegation { + if m != nil { + return m.Delegations + } + return nil +} + +func (m *GenesisState) GetUnbondingDelegations() []UnbondingDelegation { + if m != nil { + return m.UnbondingDelegations + } + return nil +} + +func (m *GenesisState) GetRedelegations() []Redelegation { + if m != nil { + return m.Redelegations + } + return nil +} + +func (m *GenesisState) GetExported() bool { + if m != nil { + return m.Exported + } + return false +} + +// LastValidatorPower required for validator set update logic. +type LastValidatorPower struct { + // address is the address of the validator. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // power defines the power of the validator. + Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` +} + +func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } +func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } +func (*LastValidatorPower) ProtoMessage() {} +func (*LastValidatorPower) Descriptor() ([]byte, []int) { + return fileDescriptor_9b3dec8894f2831b, []int{1} +} +func (m *LastValidatorPower) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastValidatorPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastValidatorPower.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LastValidatorPower) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastValidatorPower.Merge(m, src) +} +func (m *LastValidatorPower) XXX_Size() int { + return m.Size() +} +func (m *LastValidatorPower) XXX_DiscardUnknown() { + xxx_messageInfo_LastValidatorPower.DiscardUnknown(m) +} + +var xxx_messageInfo_LastValidatorPower proto.InternalMessageInfo + +func init() { + // proto.RegisterType((*GenesisState)(nil), "cosmos.staking.v1beta1.GenesisState") + // proto.RegisterType((*LastValidatorPower)(nil), "cosmos.staking.v1beta1.LastValidatorPower") +} + +func init() { + // proto.RegisterFile("cosmos/staking/v1beta1/genesis.proto", fileDescriptor_9b3dec8894f2831b) +} + +var fileDescriptor_9b3dec8894f2831b = []byte{ + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xc7, 0x7d, 0xa4, 0x49, 0xc3, 0xa5, 0x20, 0x74, 0xa4, 0x60, 0x45, 0xc8, 0x0e, 0x56, 0x84, + 0x22, 0x5e, 0x6c, 0xb5, 0x6c, 0x15, 0x53, 0x84, 0xa8, 0x8a, 0x10, 0x8a, 0x8e, 0x97, 0x81, 0x25, + 0xba, 0xd4, 0x27, 0x63, 0xd5, 0xf1, 0x59, 0x7e, 0x2e, 0xa5, 0xdd, 0x11, 0x62, 0xe4, 0x23, 0xf4, + 0xe3, 0x74, 0xec, 0xc0, 0x80, 0x18, 0x2c, 0x94, 0x2c, 0xcc, 0xfd, 0x04, 0xc8, 0xe7, 0x17, 0x4c, + 0x52, 0x33, 0x25, 0x77, 0xfa, 0xfd, 0x7f, 0x7f, 0xfb, 0xfc, 0x1c, 0x1e, 0x1c, 0x0a, 0x98, 0x09, + 0x70, 0x40, 0xb2, 0x23, 0x3f, 0xf4, 0x9c, 0xe3, 0x9d, 0x29, 0x97, 0x6c, 0xc7, 0xf1, 0x78, 0xc8, + 0xc1, 0x07, 0x3b, 0x8a, 0x85, 0x14, 0x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, 0xff, 0xff, 0xff, 0x85, 0xad, 0xc8, 0xf1, 0x03, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exported { + i-- + if m.Exported { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.Redelegations) > 0 { + for iNdEx := len(m.Redelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Redelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.UnbondingDelegations) > 0 { + for iNdEx := len(m.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Delegations) > 0 { + for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.LastValidatorPowers) > 0 { + for iNdEx := len(m.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LastValidatorPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size := m.LastTotalPower.Size() + i -= size + if _, err := m.LastTotalPower.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastValidatorPower) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Power != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastTotalPower.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.LastValidatorPowers) > 0 { + for _, e := range m.LastValidatorPowers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Delegations) > 0 { + for _, e := range m.Delegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.UnbondingDelegations) > 0 { + for _, e := range m.UnbondingDelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Redelegations) > 0 { + for _, e := range m.Redelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.Exported { + n += 2 + } + return n +} + +func (m *LastValidatorPower) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Power != 0 { + n += 1 + sovGenesis(uint64(m.Power)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTotalPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastValidatorPowers = append(m.LastValidatorPowers, LastValidatorPower{}) + if err := m.LastValidatorPowers[len(m.LastValidatorPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, Validator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Delegations = append(m.Delegations, Delegation{}) + if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingDelegations = append(m.UnbondingDelegations, UnbondingDelegation{}) + if err := m.UnbondingDelegations[len(m.UnbondingDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Redelegations = append(m.Redelegations, Redelegation{}) + if err := m.Redelegations[len(m.Redelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exported = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastValidatorPower: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + m.Power = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Power |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/keys.go b/x/staking/legacy/v040/keys.go new file mode 100644 index 000000000000..c01c41a417e3 --- /dev/null +++ b/x/staking/legacy/v040/keys.go @@ -0,0 +1,330 @@ +// Package v040 is copy-pasted from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/staking/types/keys.go +package v040 + +import ( + "bytes" + "encoding/binary" + "fmt" + "strconv" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + v040auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +const ( + // ModuleName is the name of the staking module + ModuleName = "staking" + + // StoreKey is the string store representation + StoreKey = ModuleName + + // QuerierRoute is the querier route for the staking module + QuerierRoute = ModuleName + + // RouterKey is the msg router key for the staking module + RouterKey = ModuleName +) + +var ( + // Keys for store prefixes + // Last* values are constant during a block. + LastValidatorPowerKey = []byte{0x11} // prefix for each key to a validator index, for bonded validators + LastTotalPowerKey = []byte{0x12} // prefix for the total power + + ValidatorsKey = []byte{0x21} // prefix for each key to a validator + ValidatorsByConsAddrKey = []byte{0x22} // prefix for each key to a validator index, by pubkey + ValidatorsByPowerIndexKey = []byte{0x23} // prefix for each key to a validator index, sorted by power + + DelegationKey = []byte{0x31} // key for a delegation + UnbondingDelegationKey = []byte{0x32} // key for an unbonding-delegation + UnbondingDelegationByValIndexKey = []byte{0x33} // prefix for each key for an unbonding-delegation, by validator operator + RedelegationKey = []byte{0x34} // key for a redelegation + RedelegationByValSrcIndexKey = []byte{0x35} // prefix for each key for an redelegation, by source validator operator + RedelegationByValDstIndexKey = []byte{0x36} // prefix for each key for an redelegation, by destination validator operator + + UnbondingQueueKey = []byte{0x41} // prefix for the timestamps in unbonding queue + RedelegationQueueKey = []byte{0x42} // prefix for the timestamps in redelegations queue + ValidatorQueueKey = []byte{0x43} // prefix for the timestamps in validator queue + + HistoricalInfoKey = []byte{0x50} // prefix for the historical info +) + +// gets the key for the validator with address +// VALUE: staking/Validator +func GetValidatorKey(operatorAddr sdk.ValAddress) []byte { + return append(ValidatorsKey, operatorAddr.Bytes()...) +} + +// gets the key for the validator with pubkey +// VALUE: validator operator address ([]byte) +func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte { + return append(ValidatorsByConsAddrKey, addr.Bytes()...) +} + +// Get the validator operator address from LastValidatorPowerKey +func AddressFromLastValidatorPowerKey(key []byte) []byte { + return key[1:] // remove prefix bytes +} + +// get the validator by power index. +// Power index is the key used in the power-store, and represents the relative +// power ranking of the validator. +// VALUE: validator operator address ([]byte) +func GetValidatorsByPowerIndexKey(validator types.Validator) []byte { + // NOTE the address doesn't need to be stored because counter bytes must always be different + // NOTE the larger values are of higher value + + consensusPower := sdk.TokensToConsensusPower(validator.Tokens, sdk.DefaultPowerReduction) + consensusPowerBytes := make([]byte, 8) + binary.BigEndian.PutUint64(consensusPowerBytes, uint64(consensusPower)) + + powerBytes := consensusPowerBytes + powerBytesLen := len(powerBytes) // 8 + + // key is of format prefix || powerbytes || addrBytes + key := make([]byte, 1+powerBytesLen+v040auth.AddrLen) + + key[0] = ValidatorsByPowerIndexKey[0] + copy(key[1:powerBytesLen+1], powerBytes) + addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) + if err != nil { + panic(err) + } + operAddrInvr := sdk.CopyBytes(addr) + + for i, b := range operAddrInvr { + operAddrInvr[i] = ^b + } + + copy(key[powerBytesLen+1:], operAddrInvr) + + return key +} + +// get the bonded validator index key for an operator address +func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { + return append(LastValidatorPowerKey, operator...) +} + +// parse the validators operator address from power rank key +func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { + powerBytesLen := 8 + if len(key) != 1+powerBytesLen+v040auth.AddrLen { + panic("Invalid validator power rank key length") + } + + operAddr = sdk.CopyBytes(key[powerBytesLen+1:]) + + for i, b := range operAddr { + operAddr[i] = ^b + } + + return operAddr +} + +// GetValidatorQueueKey returns the prefix key used for getting a set of unbonding +// validators whose unbonding completion occurs at the given time and height. +func GetValidatorQueueKey(timestamp time.Time, height int64) []byte { + heightBz := sdk.Uint64ToBigEndian(uint64(height)) + timeBz := sdk.FormatTimeBytes(timestamp) + timeBzL := len(timeBz) + prefixL := len(ValidatorQueueKey) + + bz := make([]byte, prefixL+8+timeBzL+8) + + // copy the prefix + copy(bz[:prefixL], ValidatorQueueKey) + + // copy the encoded time bytes length + copy(bz[prefixL:prefixL+8], sdk.Uint64ToBigEndian(uint64(timeBzL))) + + // copy the encoded time bytes + copy(bz[prefixL+8:prefixL+8+timeBzL], timeBz) + + // copy the encoded height + copy(bz[prefixL+8+timeBzL:], heightBz) + + return bz +} + +// ParseValidatorQueueKey returns the encoded time and height from a key created +// from GetValidatorQueueKey. +func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) { + prefixL := len(ValidatorQueueKey) + if prefix := bz[:prefixL]; !bytes.Equal(prefix, ValidatorQueueKey) { + return time.Time{}, 0, fmt.Errorf("invalid prefix; expected: %X, got: %X", ValidatorQueueKey, prefix) + } + + timeBzL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + ts, err := sdk.ParseTimeBytes(bz[prefixL+8 : prefixL+8+int(timeBzL)]) + if err != nil { + return time.Time{}, 0, err + } + + height := sdk.BigEndianToUint64(bz[prefixL+8+int(timeBzL):]) + + return ts, int64(height), nil +} + +// gets the key for delegator bond with validator +// VALUE: staking/Delegation +func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append(GetDelegationsKey(delAddr), valAddr.Bytes()...) +} + +// gets the prefix for a delegator for all validators +func GetDelegationsKey(delAddr sdk.AccAddress) []byte { + return append(DelegationKey, delAddr.Bytes()...) +} + +// gets the key for an unbonding delegation by delegator and validator addr +// VALUE: staking/UnbondingDelegation +func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append( + GetUBDsKey(delAddr.Bytes()), + valAddr.Bytes()...) +} + +// gets the index-key for an unbonding delegation, stored by validator-index +// VALUE: none (key rearrangement used) +func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append(GetUBDsByValIndexKey(valAddr), delAddr.Bytes()...) +} + +// rearranges the ValIndexKey to get the UBDKey +func GetUBDKeyFromValIndexKey(indexKey []byte) []byte { + addrs := indexKey[1:] // remove prefix bytes + if len(addrs) != 2*v040auth.AddrLen { + panic("unexpected key length") + } + + valAddr := addrs[:v040auth.AddrLen] + delAddr := addrs[v040auth.AddrLen:] + + return GetUBDKey(delAddr, valAddr) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUBDsKey(delAddr sdk.AccAddress) []byte { + return append(UnbondingDelegationKey, delAddr.Bytes()...) +} + +// gets the prefix keyspace for the indexes of unbonding delegations for a validator +func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { + return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(UnbondingQueueKey, bz...) +} + +// GetREDKey returns a key prefix for indexing a redelegation from a delegator +// and source validator to a destination validator. +func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + key := make([]byte, 1+v040auth.AddrLen*3) + + copy(key[0:v040auth.AddrLen+1], GetREDsKey(delAddr.Bytes())) + copy(key[v040auth.AddrLen+1:2*v040auth.AddrLen+1], valSrcAddr.Bytes()) + copy(key[2*v040auth.AddrLen+1:3*v040auth.AddrLen+1], valDstAddr.Bytes()) + + return key +} + +// gets the index-key for a redelegation, stored by source-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) + offset := len(REDSFromValsSrcKey) + + // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr + key := make([]byte, len(REDSFromValsSrcKey)+2*v040auth.AddrLen) + copy(key[0:offset], REDSFromValsSrcKey) + copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valDstAddr.Bytes()) + + return key +} + +// gets the index-key for a redelegation, stored by destination-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) + offset := len(REDSToValsDstKey) + + // key is of the form REDSToValsDstKey || delAddr || valSrcAddr + key := make([]byte, len(REDSToValsDstKey)+2*v040auth.AddrLen) + copy(key[0:offset], REDSToValsDstKey) + copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valSrcAddr.Bytes()) + + return key +} + +// GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey +func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + if len(indexKey) != 3*v040auth.AddrLen+1 { + panic("unexpected key length") + } + + valSrcAddr := indexKey[1 : v040auth.AddrLen+1] + delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] + valDstAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} + +// GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey +func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + if len(indexKey) != 3*v040auth.AddrLen+1 { + panic("unexpected key length") + } + + valDstAddr := indexKey[1 : v040auth.AddrLen+1] + delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] + valSrcAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} + +// GetRedelegationTimeKey returns a key prefix for indexing an unbonding +// redelegation based on a completion time. +func GetRedelegationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(RedelegationQueueKey, bz...) +} + +// GetREDsKey returns a key prefix for indexing a redelegation from a delegator +// address. +func GetREDsKey(delAddr sdk.AccAddress) []byte { + return append(RedelegationKey, delAddr.Bytes()...) +} + +// GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to +// a source validator. +func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { + return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) +} + +// GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a +// destination (target) validator. +func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { + return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) +} + +// GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation +// from an address to a source validator. +func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte { + return append(GetREDsToValDstIndexKey(valDstAddr), delAddr.Bytes()...) +} + +// GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects. +func GetHistoricalInfoKey(height int64) []byte { + return append(HistoricalInfoKey, []byte(strconv.FormatInt(height, 10))...) +} diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go new file mode 100644 index 000000000000..88743cd2bc7e --- /dev/null +++ b/x/staking/legacy/v040/migrate.go @@ -0,0 +1,142 @@ +package v040 + +import ( + "fmt" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" + v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { + switch oldStatus { + case v034staking.Unbonded: + return Unbonded + + case v034staking.Unbonding: + return Unbonding + + case v034staking.Bonded: + return Bonded + + default: + panic(fmt.Errorf("invalid bond status %d", oldStatus)) + } +} + +// Migrate accepts exported v0.38 x/staking genesis state and migrates it to +// v0.40 x/staking genesis state. The migration includes: +// +// - Convert addresses from bytes to bech32 strings. +// - Update BondStatus staking constants. +// - Re-encode in v0.40 GenesisState. +func Migrate(stakingState v038staking.GenesisState) *GenesisState { + newLastValidatorPowers := make([]LastValidatorPower, len(stakingState.LastValidatorPowers)) + for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { + newLastValidatorPowers[i] = LastValidatorPower{ + Address: oldLastValidatorPower.Address.String(), + Power: oldLastValidatorPower.Power, + } + } + + newValidators := make([]Validator, len(stakingState.Validators)) + for i, oldValidator := range stakingState.Validators { + pkAny, err := codectypes.NewAnyWithValue(oldValidator.ConsPubKey) + if err != nil { + panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) + } + newValidators[i] = Validator{ + OperatorAddress: oldValidator.OperatorAddress.String(), + ConsensusPubkey: pkAny, + Jailed: oldValidator.Jailed, + Status: migrateBondStatus(oldValidator.Status), + Tokens: oldValidator.Tokens, + DelegatorShares: oldValidator.DelegatorShares, + Description: Description{ + Moniker: oldValidator.Description.Moniker, + Identity: oldValidator.Description.Identity, + Website: oldValidator.Description.Website, + SecurityContact: oldValidator.Description.SecurityContact, + Details: oldValidator.Description.Details, + }, + UnbondingHeight: oldValidator.UnbondingHeight, + UnbondingTime: oldValidator.UnbondingCompletionTime, + Commission: Commission{ + CommissionRates: CommissionRates{ + Rate: oldValidator.Commission.Rate, + MaxRate: oldValidator.Commission.MaxRate, + MaxChangeRate: oldValidator.Commission.MaxChangeRate, + }, + UpdateTime: oldValidator.Commission.UpdateTime, + }, + MinSelfDelegation: oldValidator.MinSelfDelegation, + } + } + + newDelegations := make([]Delegation, len(stakingState.Delegations)) + for i, oldDelegation := range stakingState.Delegations { + newDelegations[i] = Delegation{ + DelegatorAddress: oldDelegation.DelegatorAddress.String(), + ValidatorAddress: oldDelegation.ValidatorAddress.String(), + Shares: oldDelegation.Shares, + } + } + + newUnbondingDelegations := make([]UnbondingDelegation, len(stakingState.UnbondingDelegations)) + for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { + newEntries := make([]UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + for j, oldEntry := range oldUnbondingDelegation.Entries { + newEntries[j] = UnbondingDelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + Balance: oldEntry.Balance, + } + } + + newUnbondingDelegations[i] = UnbondingDelegation{ + DelegatorAddress: oldUnbondingDelegation.DelegatorAddress.String(), + ValidatorAddress: oldUnbondingDelegation.ValidatorAddress.String(), + Entries: newEntries, + } + } + + newRedelegations := make([]Redelegation, len(stakingState.Redelegations)) + for i, oldRedelegation := range stakingState.Redelegations { + newEntries := make([]RedelegationEntry, len(oldRedelegation.Entries)) + for j, oldEntry := range oldRedelegation.Entries { + newEntries[j] = RedelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + SharesDst: oldEntry.SharesDst, + } + } + + newRedelegations[i] = Redelegation{ + DelegatorAddress: oldRedelegation.DelegatorAddress.String(), + ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress.String(), + ValidatorDstAddress: oldRedelegation.ValidatorDstAddress.String(), + Entries: newEntries, + } + } + + return &GenesisState{ + Params: Params{ + UnbondingTime: stakingState.Params.UnbondingTime, + MaxValidators: uint32(stakingState.Params.MaxValidators), + MaxEntries: uint32(stakingState.Params.MaxEntries), + HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), + BondDenom: stakingState.Params.BondDenom, + MinCommissionRate: v040staking.DefaultMinCommissionRate, + }, + LastTotalPower: stakingState.LastTotalPower, + LastValidatorPowers: newLastValidatorPowers, + Validators: newValidators, + Delegations: newDelegations, + UnbondingDelegations: newUnbondingDelegations, + Redelegations: newRedelegations, + Exported: stakingState.Exported, + } +} diff --git a/x/staking/legacy/v040/migrate_test.go b/x/staking/legacy/v040/migrate_test.go new file mode 100644 index 000000000000..71da1a1ad55d --- /dev/null +++ b/x/staking/legacy/v040/migrate_test.go @@ -0,0 +1,97 @@ +package v040_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/simapp" + v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" + v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" +) + +func TestMigrate(t *testing.T) { + encodingConfig := simapp.MakeTestEncodingConfig() + clientCtx := client.Context{}. + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithLegacyAmino(encodingConfig.Amino). + WithJSONCodec(encodingConfig.Marshaler) + + consPubKey := ed25519.GenPrivKeyFromSecret([]byte("val0")).PubKey() + stakingGenState := v038staking.GenesisState{ + Validators: v038staking.Validators{v038staking.Validator{ + ConsPubKey: consPubKey, + Status: v034staking.Unbonded, + }}, + } + + migrated := v040staking.Migrate(stakingGenState) + + bz, err := clientCtx.Codec.MarshalJSON(migrated) + require.NoError(t, err) + + // Indent the JSON bz correctly. + var jsonObj map[string]interface{} + err = json.Unmarshal(bz, &jsonObj) + require.NoError(t, err) + indentedBz, err := json.MarshalIndent(jsonObj, "", " ") + require.NoError(t, err) + + // Make sure about: + // - consensus_pubkey: should be an any + // - validator's status should be 1 (new unbonded) + expected := `{ + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "", + "historical_entries": 0, + "max_entries": 0, + "max_validators": 0, + "min_commission_rate": "0.000000000000000000", + "unbonding_time": "0s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [ + { + "commission": { + "commission_rates": { + "max_change_rate": "0", + "max_rate": "0", + "rate": "0" + }, + "update_time": "0001-01-01T00:00:00Z" + }, + "consensus_pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "KTeVrjP7NJIufvgMJsQRxZjfFyD+Exda6O7x+oxIvmA=" + }, + "delegator_shares": "0", + "description": { + "details": "", + "identity": "", + "moniker": "", + "security_contact": "", + "website": "" + }, + "jailed": false, + "min_self_delegation": "0", + "operator_address": "", + "status": "BOND_STATUS_UNBONDED", + "tokens": "0", + "unbonding_height": "0", + "unbonding_time": "0001-01-01T00:00:00Z" + } + ] +}` + + require.Equal(t, expected, string(indentedBz)) +} diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go new file mode 100644 index 000000000000..8b1ea9039ff6 --- /dev/null +++ b/x/staking/legacy/v040/staking.pb.go @@ -0,0 +1,6621 @@ +// Package v040 is taken from: +// https://raw.githubusercontent.com/osmosis-labs/cosmos-sdk/v0.42.9-osmo-v2-upgrade/x/staking/types/staking.pb.go +// nolint +package v040 + +import ( + bytes "bytes" + compress_gzip "compress/gzip" + fmt "fmt" + io "io" + io_ioutil "io/ioutil" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" + time "time" + + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" + types "github.com/tendermint/tendermint/proto/tendermint/types" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// BondStatus is the status of a validator. +type BondStatus int32 + +const ( + // UNSPECIFIED defines an invalid validator status. + Unspecified BondStatus = 0 + // UNBONDED defines a validator that is not bonded. + Unbonded BondStatus = 1 + // UNBONDING defines a validator that is unbonding. + Unbonding BondStatus = 2 + // BONDED defines a validator that is bonded. + Bonded BondStatus = 3 +) + +var BondStatus_name = map[int32]string{ + 0: "BOND_STATUS_UNSPECIFIED", + 1: "BOND_STATUS_UNBONDED", + 2: "BOND_STATUS_UNBONDING", + 3: "BOND_STATUS_BONDED", +} + +var BondStatus_value = map[string]int32{ + "BOND_STATUS_UNSPECIFIED": 0, + "BOND_STATUS_UNBONDED": 1, + "BOND_STATUS_UNBONDING": 2, + "BOND_STATUS_BONDED": 3, +} + +func (x BondStatus) String() string { + return proto.EnumName(BondStatus_name, int32(x)) +} + +func (BondStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{0} +} + +// HistoricalInfo contains header and validator information for a given block. +// It is stored as part of staking module's state, which persists the `n` most +// recent HistoricalInfo +// (`n` is set by the staking module's `historical_entries` parameter). +type HistoricalInfo struct { + Header types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` + Valset []Validator `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset"` +} + +func (m *HistoricalInfo) Reset() { *m = HistoricalInfo{} } +func (m *HistoricalInfo) String() string { return proto.CompactTextString(m) } +func (*HistoricalInfo) ProtoMessage() {} +func (*HistoricalInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{0} +} +func (m *HistoricalInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HistoricalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HistoricalInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HistoricalInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_HistoricalInfo.Merge(m, src) +} +func (m *HistoricalInfo) XXX_Size() int { + return m.Size() +} +func (m *HistoricalInfo) XXX_DiscardUnknown() { + xxx_messageInfo_HistoricalInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_HistoricalInfo proto.InternalMessageInfo + +func (m *HistoricalInfo) GetHeader() types.Header { + if m != nil { + return m.Header + } + return types.Header{} +} + +func (m *HistoricalInfo) GetValset() []Validator { + if m != nil { + return m.Valset + } + return nil +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +type CommissionRates struct { + // rate is the commission rate charged to delegators, as a fraction. + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. + MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. + MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` +} + +func (m *CommissionRates) Reset() { *m = CommissionRates{} } +func (*CommissionRates) ProtoMessage() {} +func (*CommissionRates) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{1} +} +func (m *CommissionRates) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommissionRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommissionRates.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommissionRates) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommissionRates.Merge(m, src) +} +func (m *CommissionRates) XXX_Size() int { + return m.Size() +} +func (m *CommissionRates) XXX_DiscardUnknown() { + xxx_messageInfo_CommissionRates.DiscardUnknown(m) +} + +var xxx_messageInfo_CommissionRates proto.InternalMessageInfo + +// Commission defines commission parameters for a given validator. +type Commission struct { + // commission_rates defines the initial commission rates to be used for creating a validator. + CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` + // update_time is the last time the commission rate was changed. + UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` +} + +func (m *Commission) Reset() { *m = Commission{} } +func (*Commission) ProtoMessage() {} +func (*Commission) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{2} +} +func (m *Commission) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commission.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Commission) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commission.Merge(m, src) +} +func (m *Commission) XXX_Size() int { + return m.Size() +} +func (m *Commission) XXX_DiscardUnknown() { + xxx_messageInfo_Commission.DiscardUnknown(m) +} + +var xxx_messageInfo_Commission proto.InternalMessageInfo + +func (m *Commission) GetUpdateTime() time.Time { + if m != nil { + return m.UpdateTime + } + return time.Time{} +} + +// Description defines a validator description. +type Description struct { + // moniker defines a human-readable name for the validator. + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + // identity defines an optional identity signature (ex. UPort or Keybase). + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + // website defines an optional website link. + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + // security_contact defines an optional email for security contact. + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` + // details define other optional details. + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *Description) Reset() { *m = Description{} } +func (*Description) ProtoMessage() {} +func (*Description) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{3} +} +func (m *Description) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Description.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Description) XXX_Merge(src proto.Message) { + xxx_messageInfo_Description.Merge(m, src) +} +func (m *Description) XXX_Size() int { + return m.Size() +} +func (m *Description) XXX_DiscardUnknown() { + xxx_messageInfo_Description.DiscardUnknown(m) +} + +var xxx_messageInfo_Description proto.InternalMessageInfo + +func (m *Description) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *Description) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *Description) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *Description) GetSecurityContact() string { + if m != nil { + return m.SecurityContact + } + return "" +} + +func (m *Description) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +type Validator struct { + // operator_address defines the address of the validator's operator; bech encoded in JSON. + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + // jailed defined whether the validator has been jailed from bonded status or not. + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + // status is the validator status (bonded/unbonding/unbonded). + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + // tokens define the delegated tokens (incl. self-delegation). + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + // delegator_shares defines total shares issued to a validator's delegators. + DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + // description defines the description terms for the validator. + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + // commission defines the commission parameters. + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + // min_self_delegation is the validator's self declared minimum self delegation. + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` +} + +func (m *Validator) Reset() { *m = Validator{} } +func (*Validator) ProtoMessage() {} +func (*Validator) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{4} +} +func (m *Validator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Validator.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Validator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validator.Merge(m, src) +} +func (m *Validator) XXX_Size() int { + return m.Size() +} +func (m *Validator) XXX_DiscardUnknown() { + xxx_messageInfo_Validator.DiscardUnknown(m) +} + +var xxx_messageInfo_Validator proto.InternalMessageInfo + +// ValAddresses defines a repeated set of validator addresses. +type ValAddresses struct { + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` +} + +func (m *ValAddresses) Reset() { *m = ValAddresses{} } +func (*ValAddresses) ProtoMessage() {} +func (*ValAddresses) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{5} +} +func (m *ValAddresses) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValAddresses.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValAddresses) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValAddresses.Merge(m, src) +} +func (m *ValAddresses) XXX_Size() int { + return m.Size() +} +func (m *ValAddresses) XXX_DiscardUnknown() { + xxx_messageInfo_ValAddresses.DiscardUnknown(m) +} + +var xxx_messageInfo_ValAddresses proto.InternalMessageInfo + +func (m *ValAddresses) GetAddresses() []string { + if m != nil { + return m.Addresses + } + return nil +} + +// DVPair is struct that just has a delegator-validator pair with no other data. +// It is intended to be used as a marshalable pointer. For example, a DVPair can +// be used to construct the key to getting an UnbondingDelegation from state. +type DVPair struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` +} + +func (m *DVPair) Reset() { *m = DVPair{} } +func (*DVPair) ProtoMessage() {} +func (*DVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{6} +} +func (m *DVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVPair.Merge(m, src) +} +func (m *DVPair) XXX_Size() int { + return m.Size() +} +func (m *DVPair) XXX_DiscardUnknown() { + xxx_messageInfo_DVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_DVPair proto.InternalMessageInfo + +// DVPairs defines an array of DVPair objects. +type DVPairs struct { + Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` +} + +func (m *DVPairs) Reset() { *m = DVPairs{} } +func (m *DVPairs) String() string { return proto.CompactTextString(m) } +func (*DVPairs) ProtoMessage() {} +func (*DVPairs) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{7} +} +func (m *DVPairs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVPairs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVPairs) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVPairs.Merge(m, src) +} +func (m *DVPairs) XXX_Size() int { + return m.Size() +} +func (m *DVPairs) XXX_DiscardUnknown() { + xxx_messageInfo_DVPairs.DiscardUnknown(m) +} + +var xxx_messageInfo_DVPairs proto.InternalMessageInfo + +func (m *DVPairs) GetPairs() []DVPair { + if m != nil { + return m.Pairs + } + return nil +} + +// DVVTriplet is struct that just has a delegator-validator-validator triplet +// with no other data. It is intended to be used as a marshalable pointer. For +// example, a DVVTriplet can be used to construct the key to getting a +// Redelegation from state. +type DVVTriplet struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` +} + +func (m *DVVTriplet) Reset() { *m = DVVTriplet{} } +func (*DVVTriplet) ProtoMessage() {} +func (*DVVTriplet) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{8} +} +func (m *DVVTriplet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVVTriplet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVVTriplet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVVTriplet) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVVTriplet.Merge(m, src) +} +func (m *DVVTriplet) XXX_Size() int { + return m.Size() +} +func (m *DVVTriplet) XXX_DiscardUnknown() { + xxx_messageInfo_DVVTriplet.DiscardUnknown(m) +} + +var xxx_messageInfo_DVVTriplet proto.InternalMessageInfo + +// DVVTriplets defines an array of DVVTriplet objects. +type DVVTriplets struct { + Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` +} + +func (m *DVVTriplets) Reset() { *m = DVVTriplets{} } +func (m *DVVTriplets) String() string { return proto.CompactTextString(m) } +func (*DVVTriplets) ProtoMessage() {} +func (*DVVTriplets) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{9} +} +func (m *DVVTriplets) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVVTriplets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVVTriplets.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVVTriplets) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVVTriplets.Merge(m, src) +} +func (m *DVVTriplets) XXX_Size() int { + return m.Size() +} +func (m *DVVTriplets) XXX_DiscardUnknown() { + xxx_messageInfo_DVVTriplets.DiscardUnknown(m) +} + +var xxx_messageInfo_DVVTriplets proto.InternalMessageInfo + +func (m *DVVTriplets) GetTriplets() []DVVTriplet { + if m != nil { + return m.Triplets + } + return nil +} + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +type Delegation struct { + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_address is the bech32-encoded address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // shares define the delegation shares received. + Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` +} + +func (m *Delegation) Reset() { *m = Delegation{} } +func (*Delegation) ProtoMessage() {} +func (*Delegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{10} +} +func (m *Delegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Delegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Delegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Delegation.Merge(m, src) +} +func (m *Delegation) XXX_Size() int { + return m.Size() +} +func (m *Delegation) XXX_DiscardUnknown() { + xxx_messageInfo_Delegation.DiscardUnknown(m) +} + +var xxx_messageInfo_Delegation proto.InternalMessageInfo + +// UnbondingDelegation stores all of a single delegator's unbonding bonds +// for a single validator in an time-ordered list. +type UnbondingDelegation struct { + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_address is the bech32-encoded address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // entries are the unbonding delegation entries. + Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` +} + +func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } +func (*UnbondingDelegation) ProtoMessage() {} +func (*UnbondingDelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{11} +} +func (m *UnbondingDelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingDelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UnbondingDelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingDelegation.Merge(m, src) +} +func (m *UnbondingDelegation) XXX_Size() int { + return m.Size() +} +func (m *UnbondingDelegation) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingDelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingDelegation proto.InternalMessageInfo + +// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +type UnbondingDelegationEntry struct { + // creation_height is the height which the unbonding took place. + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + // completion_time is the unix time for unbonding completion. + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // initial_balance defines the tokens initially scheduled to receive at completion. + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + // balance defines the tokens to receive at completion. + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` +} + +func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } +func (*UnbondingDelegationEntry) ProtoMessage() {} +func (*UnbondingDelegationEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{12} +} +func (m *UnbondingDelegationEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingDelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingDelegationEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UnbondingDelegationEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingDelegationEntry.Merge(m, src) +} +func (m *UnbondingDelegationEntry) XXX_Size() int { + return m.Size() +} +func (m *UnbondingDelegationEntry) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingDelegationEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingDelegationEntry proto.InternalMessageInfo + +func (m *UnbondingDelegationEntry) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight + } + return 0 +} + +func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime + } + return time.Time{} +} + +// RedelegationEntry defines a redelegation object with relevant metadata. +type RedelegationEntry struct { + // creation_height defines the height which the redelegation took place. + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + // completion_time defines the unix time for redelegation completion. + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // initial_balance defines the initial balance when redelegation started. + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + // shares_dst is the amount of destination-validator shares created by redelegation. + SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` +} + +func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } +func (*RedelegationEntry) ProtoMessage() {} +func (*RedelegationEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{13} +} +func (m *RedelegationEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationEntry.Merge(m, src) +} +func (m *RedelegationEntry) XXX_Size() int { + return m.Size() +} +func (m *RedelegationEntry) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationEntry proto.InternalMessageInfo + +func (m *RedelegationEntry) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight + } + return 0 +} + +func (m *RedelegationEntry) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime + } + return time.Time{} +} + +// Redelegation contains the list of a particular delegator's redelegating bonds +// from a particular source validator to a particular destination validator. +type Redelegation struct { + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_src_address is the validator redelegation source operator address. + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + // validator_dst_address is the validator redelegation destination operator address. + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` + // entries are the redelegation entries. + Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` +} + +func (m *Redelegation) Reset() { *m = Redelegation{} } +func (*Redelegation) ProtoMessage() {} +func (*Redelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{14} +} +func (m *Redelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Redelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Redelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Redelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Redelegation.Merge(m, src) +} +func (m *Redelegation) XXX_Size() int { + return m.Size() +} +func (m *Redelegation) XXX_DiscardUnknown() { + xxx_messageInfo_Redelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_Redelegation proto.InternalMessageInfo + +// Params defines the parameters for the staking module. +type Params struct { + // unbonding_time is the time duration of unbonding. + UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` + // max_validators is the maximum number of validators. + MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` + // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). + MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` + // historical_entries is the number of historical entries to persist. + HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` + // bond_denom defines the bondable coin denomination. + BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` + // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators + MinCommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_commission_rate" yaml:"min_commission_rate"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{15} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetUnbondingTime() time.Duration { + if m != nil { + return m.UnbondingTime + } + return 0 +} + +func (m *Params) GetMaxValidators() uint32 { + if m != nil { + return m.MaxValidators + } + return 0 +} + +func (m *Params) GetMaxEntries() uint32 { + if m != nil { + return m.MaxEntries + } + return 0 +} + +func (m *Params) GetHistoricalEntries() uint32 { + if m != nil { + return m.HistoricalEntries + } + return 0 +} + +func (m *Params) GetBondDenom() string { + if m != nil { + return m.BondDenom + } + return "" +} + +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. +type DelegationResponse struct { + Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` + Balance types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` +} + +func (m *DelegationResponse) Reset() { *m = DelegationResponse{} } +func (*DelegationResponse) ProtoMessage() {} +func (*DelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{16} +} +func (m *DelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegationResponse.Merge(m, src) +} +func (m *DelegationResponse) XXX_Size() int { + return m.Size() +} +func (m *DelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegationResponse proto.InternalMessageInfo + +func (m *DelegationResponse) GetDelegation() Delegation { + if m != nil { + return m.Delegation + } + return Delegation{} +} + +func (m *DelegationResponse) GetBalance() types2.Coin { + if m != nil { + return m.Balance + } + return types2.Coin{} +} + +// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +// contains a balance in addition to shares which is more suitable for client +// responses. +type RedelegationEntryResponse struct { + RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` +} + +func (m *RedelegationEntryResponse) Reset() { *m = RedelegationEntryResponse{} } +func (m *RedelegationEntryResponse) String() string { return proto.CompactTextString(m) } +func (*RedelegationEntryResponse) ProtoMessage() {} +func (*RedelegationEntryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{17} +} +func (m *RedelegationEntryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationEntryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationEntryResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationEntryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationEntryResponse.Merge(m, src) +} +func (m *RedelegationEntryResponse) XXX_Size() int { + return m.Size() +} +func (m *RedelegationEntryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationEntryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationEntryResponse proto.InternalMessageInfo + +func (m *RedelegationEntryResponse) GetRedelegationEntry() RedelegationEntry { + if m != nil { + return m.RedelegationEntry + } + return RedelegationEntry{} +} + +// RedelegationResponse is equivalent to a Redelegation except that its entries +// contain a balance in addition to shares which is more suitable for client +// responses. +type RedelegationResponse struct { + Redelegation Redelegation `protobuf:"bytes,1,opt,name=redelegation,proto3" json:"redelegation"` + Entries []RedelegationEntryResponse `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` +} + +func (m *RedelegationResponse) Reset() { *m = RedelegationResponse{} } +func (m *RedelegationResponse) String() string { return proto.CompactTextString(m) } +func (*RedelegationResponse) ProtoMessage() {} +func (*RedelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{18} +} +func (m *RedelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationResponse.Merge(m, src) +} +func (m *RedelegationResponse) XXX_Size() int { + return m.Size() +} +func (m *RedelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationResponse proto.InternalMessageInfo + +func (m *RedelegationResponse) GetRedelegation() Redelegation { + if m != nil { + return m.Redelegation + } + return Redelegation{} +} + +func (m *RedelegationResponse) GetEntries() []RedelegationEntryResponse { + if m != nil { + return m.Entries + } + return nil +} + +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. +type Pool struct { + NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` + BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{19} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +func init() { + // proto.RegisterEnum("cosmos.staking.v1beta1.BondStatus", BondStatus_name, BondStatus_value) + // proto.RegisterType((*HistoricalInfo)(nil), "cosmos.staking.v1beta1.HistoricalInfo") + // proto.RegisterType((*CommissionRates)(nil), "cosmos.staking.v1beta1.CommissionRates") + // proto.RegisterType((*Commission)(nil), "cosmos.staking.v1beta1.Commission") + // proto.RegisterType((*Description)(nil), "cosmos.staking.v1beta1.Description") + // proto.RegisterType((*Validator)(nil), "cosmos.staking.v1beta1.Validator") + // proto.RegisterType((*ValAddresses)(nil), "cosmos.staking.v1beta1.ValAddresses") + // proto.RegisterType((*DVPair)(nil), "cosmos.staking.v1beta1.DVPair") + // proto.RegisterType((*DVPairs)(nil), "cosmos.staking.v1beta1.DVPairs") + // proto.RegisterType((*DVVTriplet)(nil), "cosmos.staking.v1beta1.DVVTriplet") + // proto.RegisterType((*DVVTriplets)(nil), "cosmos.staking.v1beta1.DVVTriplets") + // proto.RegisterType((*Delegation)(nil), "cosmos.staking.v1beta1.Delegation") + // proto.RegisterType((*UnbondingDelegation)(nil), "cosmos.staking.v1beta1.UnbondingDelegation") + // proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos.staking.v1beta1.UnbondingDelegationEntry") + // proto.RegisterType((*RedelegationEntry)(nil), "cosmos.staking.v1beta1.RedelegationEntry") + // proto.RegisterType((*Redelegation)(nil), "cosmos.staking.v1beta1.Redelegation") + // proto.RegisterType((*Params)(nil), "cosmos.staking.v1beta1.Params") + // proto.RegisterType((*DelegationResponse)(nil), "cosmos.staking.v1beta1.DelegationResponse") + // proto.RegisterType((*RedelegationEntryResponse)(nil), "cosmos.staking.v1beta1.RedelegationEntryResponse") + // proto.RegisterType((*RedelegationResponse)(nil), "cosmos.staking.v1beta1.RedelegationResponse") + // proto.RegisterType((*Pool)(nil), "cosmos.staking.v1beta1.Pool") +} + +func init() { + proto.RegisterFile("cosmos/staking/v1beta1/staking.proto", fileDescriptor_64c30c6cf92913c9) +} + +var fileDescriptor_64c30c6cf92913c9 = []byte{ + // 1820 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x23, 0x49, + 0x15, 0x76, 0xc7, 0x5e, 0xc7, 0x7e, 0x4e, 0xe2, 0xa4, 0x26, 0x33, 0xeb, 0x98, 0xc1, 0xed, 0x6d, + 0x56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, 0xe6, 0xd1, 0xdd, 0xc3, 0xce, 0xdd, 0x3b, 0x87, 0x07, + 0x7b, 0xbb, 0xed, 0x5b, 0xed, 0xbd, 0xd6, 0x6a, 0xa6, 0x5a, 0xbe, 0xff, 0xa0, 0x5e, 0xba, 0xeb, + 0xd1, 0x01, 0xb1, 0x9c, 0x13, 0x87, 0xd8, 0xe8, 0x35, 0x58, 0xbf, 0xc8, 0xcd, 0x57, 0x7b, 0xad, + 0x55, 0xad, 0xba, 0x74, 0xff, 0x41, 0xbd, 0x20, 0x27, 0x41, 0x62, 0xa3, 0x4d, 0xb8, 0x3a, 0xcd, + 0xd7, 0xbe, 0xf3, 0xad, 0xd5, 0x85, 0xea, 0xf2, 0xfd, 0x07, 0xf5, 0x62, 0x34, 0x32, 0x22, 0x03, + 0x50, 0x92, 0x53, 0xe1, 0x65, 0xab, 0x70, 0xff, 0x41, 0x3d, 0x2f, 0x1d, 0x58, 0xcd, 0xbd, 0xf7, + 0x61, 0x2d, 0xd3, 0xbc, 0xf5, 0xf1, 0xe3, 0x9a, 0xf6, 0xe8, 0x71, 0x4d, 0xfb, 0xfb, 0xe3, 0x9a, + 0xf6, 0xfe, 0x93, 0x5a, 0xe6, 0xd1, 0x93, 0x5a, 0xe6, 0xcf, 0x4f, 0x6a, 0x99, 0xef, 0xbf, 0xfe, + 0x54, 0xdf, 0x9d, 0x47, 0x9f, 0xd4, 0x85, 0x17, 0xbb, 0x79, 0x71, 0x09, 0xbc, 0xf9, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x45, 0x84, 0x47, 0xa8, 0x71, 0x17, 0x00, 0x00, +} + +func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return StakingDescription() +} +func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 9612 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, + 0x71, 0x18, 0x66, 0x77, 0x01, 0xec, 0x36, 0x16, 0xc0, 0xe2, 0x01, 0x77, 0xb7, 0xb7, 0x3c, 0x02, + 0xe0, 0xf0, 0xeb, 0x78, 0x24, 0x71, 0xe4, 0x91, 0x77, 0x24, 0xf7, 0x24, 0x51, 0x58, 0x60, 0x0f, + 0x07, 0x1e, 0xbe, 0x38, 0x00, 0x8e, 0xd4, 0x87, 0xb3, 0x35, 0x98, 0x7d, 0x58, 0x0c, 0xb1, 0x3b, + 0x33, 0x9c, 0x99, 0xbd, 0x3b, 0x50, 0x52, 0x8a, 0x96, 0x14, 0x45, 0xa2, 0xcb, 0xb1, 0x14, 0xa5, + 0x62, 0x89, 0xd2, 0x29, 0x92, 0xe5, 0x44, 0x8e, 0xac, 0xc4, 0x96, 0xa5, 0x28, 0x71, 0x92, 0xaa, + 0x48, 0xa9, 0x38, 0x96, 0x94, 0x8a, 0x4b, 0xaa, 0xb8, 0x12, 0xc7, 0x95, 0x9c, 0x1d, 0x4a, 0xe5, + 0x30, 0x8a, 0x12, 0xcb, 0x17, 0xba, 0xe2, 0x94, 0x2a, 0x95, 0xd4, 0xfb, 0x9a, 0xaf, 0xfd, 0x98, + 0x5d, 0xe8, 0x4e, 0x92, 0xe3, 0xfc, 0xc2, 0xbe, 0x9e, 0xee, 0x7e, 0xdd, 0xfd, 0xfa, 0x75, 0xf7, + 0x7b, 0xf3, 0xde, 0x00, 0xbe, 0x78, 0x1e, 0x66, 0x6b, 0xa6, 0x59, 0xab, 0xe3, 0xd3, 0x96, 0x6d, + 0xba, 0xe6, 0x4e, 0x73, 0xf7, 0x74, 0x15, 0x3b, 0x9a, 0xad, 0x5b, 0xae, 0x69, 0xcf, 0x51, 0x18, + 0x1a, 0x67, 0x18, 0x73, 0x02, 0x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xca, 0xfa, 0xfc, 0x56, 0x2e, 0xe1, 0xb5, 0x97, 0xd7, 0xb6, 0xce, 0x3d, 0x9e, 0x4b, 0x7a, + 0x04, 0xdb, 0x0c, 0x90, 0x0a, 0x22, 0x3c, 0x76, 0x26, 0x37, 0x88, 0x72, 0x90, 0x65, 0x0c, 0x96, + 0x9f, 0x2f, 0x2f, 0x9e, 0x7b, 0x3c, 0x37, 0x14, 0x86, 0x3c, 0x76, 0x26, 0x37, 0x8c, 0x46, 0x21, + 0x43, 0x21, 0xa5, 0xf5, 0xf5, 0x95, 0x5c, 0xda, 0xe3, 0xb9, 0xb9, 0xa5, 0x2c, 0xaf, 0x2d, 0xe5, + 0x32, 0x1e, 0xcf, 0x25, 0x65, 0x7d, 0x7b, 0x23, 0x07, 0x1e, 0x87, 0xd5, 0xf2, 0xe6, 0xe6, 0xfc, + 0x52, 0x39, 0x37, 0xe2, 0x61, 0x94, 0xde, 0xb6, 0x55, 0xde, 0xcc, 0x65, 0x43, 0x62, 0x3d, 0x76, + 0x26, 0x37, 0xea, 0x75, 0x51, 0x5e, 0xdb, 0x5e, 0xcd, 0x8d, 0xa1, 0x09, 0x18, 0x65, 0x5d, 0x08, + 0x21, 0xc6, 0x23, 0xa0, 0x73, 0x8f, 0xe7, 0x72, 0xbe, 0x20, 0x8c, 0xcb, 0x44, 0x08, 0x70, 0xee, + 0xf1, 0x1c, 0x92, 0x17, 0x60, 0x90, 0xba, 0x21, 0x42, 0x30, 0xb6, 0x32, 0x5f, 0x2a, 0xaf, 0x54, + 0xd6, 0x37, 0xb6, 0x96, 0xd7, 0xd7, 0xe6, 0x57, 0x72, 0x92, 0x0f, 0x53, 0xca, 0xcf, 0x6e, 0x2f, + 0x2b, 0xe5, 0xc5, 0x5c, 0x22, 0x08, 0xdb, 0x28, 0xcf, 0x6f, 0x95, 0x17, 0x73, 0x49, 0x59, 0x83, + 0xa9, 0x76, 0x01, 0xb5, 0xed, 0x14, 0x0a, 0xf8, 0x42, 0xa2, 0x83, 0x2f, 0x50, 0x5e, 0x51, 0x5f, + 0x90, 0xbf, 0x93, 0x80, 0xc9, 0x36, 0x49, 0xa5, 0x6d, 0x27, 0x4f, 0xc3, 0x20, 0xf3, 0x65, 0x96, + 0x66, 0x1f, 0x68, 0x9b, 0x9d, 0xa8, 0x67, 0xb7, 0xa4, 0x5a, 0x4a, 0x17, 0x2c, 0x35, 0x92, 0x1d, + 0x4a, 0x0d, 0xc2, 0xa2, 0xc5, 0x61, 0x7f, 0xa6, 0x25, 0xf8, 0xb3, 0xfc, 0x78, 0xae, 0x97, 0xfc, + 0x48, 0x61, 0xfd, 0x25, 0x81, 0xc1, 0x36, 0x49, 0xe0, 0x3c, 0x4c, 0xb4, 0x30, 0xea, 0x39, 0x18, + 0xbf, 0x4f, 0x82, 0x7c, 0x27, 0xe3, 0xc4, 0x84, 0xc4, 0x44, 0x28, 0x24, 0x9e, 0x8f, 0x5a, 0xf0, + 0xae, 0xce, 0x83, 0xd0, 0x32, 0xd6, 0x9f, 0x93, 0xe0, 0x68, 0xfb, 0x92, 0xb2, 0xad, 0x0c, 0x6f, + 0x81, 0xa1, 0x06, 0x76, 0xf7, 0x4c, 0x51, 0x56, 0xdd, 0xd7, 0x26, 0x59, 0x93, 0xc7, 0xd1, 0xc1, + 0xe6, 0x54, 0xc1, 0x6c, 0x9f, 0xec, 0x54, 0x17, 0x32, 0x69, 0x5a, 0x24, 0xfd, 0x50, 0x02, 0x8e, + 0xb4, 0x65, 0xde, 0x56, 0xd0, 0x3b, 0x01, 0x74, 0xc3, 0x6a, 0xba, 0xac, 0x74, 0x62, 0x91, 0x38, + 0x43, 0x21, 0x34, 0x78, 0x91, 0x28, 0xdb, 0x74, 0xbd, 0xe7, 0x49, 0xfa, 0x1c, 0x18, 0x88, 0x22, + 0x3c, 0xe9, 0x0b, 0x9a, 0xa2, 0x82, 0x4e, 0x77, 0xd0, 0xb4, 0xc5, 0x31, 0x1f, 0x81, 0x9c, 0x56, + 0xd7, 0xb1, 0xe1, 0x56, 0x1c, 0xd7, 0xc6, 0x6a, 0x43, 0x37, 0x6a, 0x34, 0xd5, 0xa4, 0x8b, 0x83, + 0xbb, 0x6a, 0xdd, 0xc1, 0xca, 0x38, 0x7b, 0xbc, 0x29, 0x9e, 0x12, 0x0a, 0xea, 0x40, 0x76, 0x80, + 0x62, 0x28, 0x44, 0xc1, 0x1e, 0x7b, 0x14, 0xf2, 0x47, 0x32, 0x30, 0x12, 0x28, 0xc0, 0xd1, 0x5d, + 0x90, 0x7d, 0x41, 0xbd, 0xa2, 0x56, 0xc4, 0xa2, 0x8a, 0x59, 0x62, 0x84, 0xc0, 0x36, 0xf8, 0xc2, + 0xea, 0x11, 0x98, 0xa2, 0x28, 0x66, 0xd3, 0xc5, 0x76, 0x45, 0xab, 0xab, 0x8e, 0x43, 0x8d, 0x96, + 0xa6, 0xa8, 0x88, 0x3c, 0x5b, 0x27, 0x8f, 0x16, 0xc4, 0x13, 0x74, 0x16, 0x26, 0x29, 0x45, 0xa3, + 0x59, 0x77, 0x75, 0xab, 0x8e, 0x2b, 0x64, 0x99, 0xe7, 0xd0, 0x94, 0xe3, 0x49, 0x36, 0x41, 0x30, + 0x56, 0x39, 0x02, 0x91, 0xc8, 0x41, 0x8b, 0x70, 0x27, 0x25, 0xab, 0x61, 0x03, 0xdb, 0xaa, 0x8b, + 0x2b, 0xf8, 0xc5, 0xa6, 0x5a, 0x77, 0x2a, 0xaa, 0x51, 0xad, 0xec, 0xa9, 0xce, 0x5e, 0x7e, 0x8a, + 0x30, 0x28, 0x25, 0xf2, 0x92, 0x72, 0x9c, 0x20, 0x2e, 0x71, 0xbc, 0x32, 0x45, 0x9b, 0x37, 0xaa, + 0x17, 0x55, 0x67, 0x0f, 0x15, 0xe1, 0x28, 0xe5, 0xe2, 0xb8, 0xb6, 0x6e, 0xd4, 0x2a, 0xda, 0x1e, + 0xd6, 0xf6, 0x2b, 0x4d, 0x77, 0xf7, 0xc9, 0xfc, 0x1d, 0xc1,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c, 0xad, 0xd5, 0x6c, 0xc2, 0x5c, 0x30, 0x62, + 0xeb, 0x92, 0x31, 0x0f, 0x4c, 0x11, 0x0b, 0xcf, 0x40, 0x5a, 0xd8, 0x81, 0xa4, 0x6a, 0x62, 0x89, + 0x8a, 0xc5, 0x16, 0xdb, 0x89, 0x93, 0x19, 0x25, 0x6d, 0x88, 0x87, 0x77, 0x41, 0x56, 0x77, 0x2a, + 0xfe, 0x26, 0x7e, 0x62, 0x36, 0x71, 0x32, 0xad, 0x8c, 0xe8, 0x8e, 0xb7, 0x01, 0x2a, 0x7f, 0x2e, + 0x01, 0x63, 0xe1, 0x97, 0x10, 0x68, 0x11, 0xd2, 0x75, 0x53, 0x53, 0xa9, 0x6b, 0xb1, 0x37, 0x60, + 0x27, 0x63, 0xde, 0x5b, 0xcc, 0xad, 0x70, 0x7c, 0xc5, 0xa3, 0x2c, 0xfc, 0x8e, 0x04, 0x69, 0x01, + 0x46, 0x47, 0x21, 0x65, 0xa9, 0xee, 0x1e, 0x65, 0x37, 0x58, 0x4a, 0xe4, 0x24, 0x85, 0xb6, 0x09, + 0xdc, 0xb1, 0x54, 0x83, 0xba, 0x00, 0x87, 0x93, 0x36, 0x19, 0xd7, 0x3a, 0x56, 0xab, 0x74, 0xd1, + 0x63, 0x36, 0x1a, 0xd8, 0x70, 0x1d, 0x31, 0xae, 0x1c, 0xbe, 0xc0, 0xc1, 0xe8, 0x41, 0x98, 0x70, + 0x6d, 0x55, 0xaf, 0x87, 0x70, 0x53, 0x14, 0x37, 0x27, 0x1e, 0x78, 0xc8, 0x45, 0x38, 0x2e, 0xf8, + 0x56, 0xb1, 0xab, 0x6a, 0x7b, 0xb8, 0xea, 0x13, 0x0d, 0xd1, 0xcd, 0x8d, 0x63, 0x1c, 0x61, 0x91, + 0x3f, 0x17, 0xb4, 0xf2, 0xb7, 0x25, 0x98, 0x10, 0xcb, 0xb4, 0xaa, 0x67, 0xac, 0x55, 0x00, 0xd5, + 0x30, 0x4c, 0x37, 0x68, 0xae, 0x56, 0x57, 0x6e, 0xa1, 0x9b, 0x9b, 0xf7, 0x88, 0x94, 0x00, 0x83, + 0x42, 0x03, 0xc0, 0x7f, 0xd2, 0xd1, 0x6c, 0x33, 0x30, 0xc2, 0xdf, 0x30, 0xd1, 0xd7, 0x94, 0x6c, + 0x61, 0x0f, 0x0c, 0x44, 0xd6, 0x73, 0x68, 0x0a, 0x06, 0x77, 0x70, 0x4d, 0x37, 0xf8, 0xbe, 0x31, + 0x6b, 0x88, 0xed, 0x97, 0x94, 0xb7, 0xfd, 0x52, 0xfa, 0xcb, 0x30, 0xa9, 0x99, 0x8d, 0xa8, 0xb8, + 0xa5, 0x5c, 0x64, 0x73, 0xc1, 0xb9, 0x28, 0xbd, 0xfd, 0x61, 0x8e, 0x54, 0x33, 0xeb, 0xaa, 0x51, + 0x9b, 0x33, 0xed, 0x9a, 0xff, 0x9a, 0x95, 0x54, 0x3c, 0x4e, 0xe0, 0x65, 0xab, 0xb5, 0xf3, 0x67, + 0x92, 0xf4, 0x4b, 0x89, 0xe4, 0xd2, 0x46, 0xe9, 0xf3, 0x89, 0xc2, 0x12, 0x23, 0xdc, 0x10, 0xc6, + 0x50, 0xf0, 0x6e, 0x1d, 0x6b, 0x44, 0x41, 0xf8, 0xde, 0x83, 0x30, 0x55, 0x33, 0x6b, 0x26, 0xe5, + 0x74, 0x9a, 0xfc, 0xe2, 0xef, 0x69, 0x33, 0x1e, 0xb4, 0x10, 0xfb, 0x52, 0xb7, 0xb8, 0x06, 0x93, + 0x1c, 0xb9, 0x42, 0x5f, 0x14, 0xb1, 0x65, 0x0c, 0xea, 0xba, 0x87, 0x96, 0xff, 0xe2, 0x77, 0x69, + 0xfa, 0x56, 0x26, 0x38, 0x29, 0x79, 0xc6, 0x56, 0x3a, 0x45, 0x05, 0x8e, 0x84, 0xf8, 0xb1, 0x49, + 0x8a, 0xed, 0x18, 0x8e, 0xbf, 0xc5, 0x39, 0x4e, 0x06, 0x38, 0x6e, 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c1, + 0x7f, 0x9e, 0x93, 0x32, 0xfc, 0xe2, 0x02, 0x8c, 0x04, 0xaa, 0x93, 0x78, 0xf2, 0xbf, 0xc6, 0xc9, + 0x83, 0x54, 0x44, 0x74, 0x5e, 0x9d, 0xc4, 0x33, 0xf8, 0x05, 0x21, 0x3a, 0xa7, 0x20, 0x66, 0x13, + 0x85, 0x49, 0x3c, 0xf5, 0x87, 0x85, 0xd5, 0x05, 0x49, 0xf1, 0x69, 0xc8, 0x78, 0xc9, 0x26, 0x9e, + 0xfe, 0x23, 0x9c, 0xde, 0xa7, 0x21, 0x16, 0x08, 0x24, 0xbb, 0x78, 0x16, 0x7f, 0x5d, 0x58, 0x20, + 0x40, 0x45, 0xa6, 0x51, 0xb4, 0x80, 0x89, 0xe7, 0xf4, 0x51, 0x31, 0x8d, 0x22, 0xf5, 0x0b, 0x19, + 0x4d, 0x1a, 0xf3, 0xe3, 0x59, 0xfc, 0x0d, 0x31, 0x9a, 0x14, 0x9f, 0x88, 0x11, 0xad, 0x08, 0xe2, + 0x79, 0xfc, 0xa2, 0x10, 0x23, 0x52, 0x10, 0x14, 0x37, 0x00, 0xb5, 0x56, 0x03, 0xf1, 0xfc, 0x3e, + 0xc6, 0xf9, 0x4d, 0xb4, 0x14, 0x03, 0xc5, 0xe7, 0xe0, 0x68, 0xfb, 0x4a, 0x20, 0x9e, 0xeb, 0xc7, + 0xdf, 0x88, 0xac, 0xdd, 0x82, 0x85, 0x40, 0x71, 0xcb, 0x4f, 0x29, 0xc1, 0x2a, 0x20, 0x9e, 0xed, + 0xab, 0x6f, 0x84, 0x03, 0x77, 0xb0, 0x08, 0x28, 0xce, 0x03, 0xf8, 0x09, 0x38, 0x9e, 0xd7, 0x27, + 0x39, 0xaf, 0x00, 0x11, 0x99, 0x1a, 0x3c, 0xff, 0xc6, 0xd3, 0x5f, 0x17, 0x53, 0x83, 0x53, 0x90, + 0xa9, 0x21, 0x52, 0x6f, 0x3c, 0xf5, 0xa7, 0xc4, 0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0, 0x9d, 0x90, 0xd4, + 0x0d, 0x76, 0x20, 0x2d, 0xd2, 0x3f, 0x81, 0x13, 0xd4, 0x45, 0xac, 0x79, 0xa8, 0x55, 0xac, 0x45, + 0x51, 0x09, 0x7b, 0x02, 0x2f, 0x2d, 0xfe, 0xde, 0x7f, 0x9a, 0x1e, 0x78, 0xf9, 0xb5, 0xe9, 0x81, + 0x8e, 0x23, 0x11, 0xcc, 0x15, 0xdc, 0xc4, 0x7c, 0x08, 0x9c, 0xea, 0x3e, 0x9b, 0x47, 0xde, 0x30, + 0x7c, 0x3e, 0x05, 0x77, 0xd2, 0x8b, 0x23, 0x76, 0x43, 0x37, 0xdc, 0xd3, 0x9a, 0x7d, 0x60, 0xb9, + 0x34, 0xb9, 0x98, 0xbb, 0x7c, 0x14, 0x26, 0xfc, 0xc7, 0x73, 0xec, 0x71, 0x87, 0x31, 0xd8, 0x85, + 0xc1, 0x0d, 0x42, 0x47, 0x0c, 0xe7, 0x9a, 0xae, 0x5a, 0xe7, 0x51, 0x83, 0x35, 0x08, 0x94, 0x5d, + 0x36, 0x49, 0x30, 0xa8, 0x2e, 0xee, 0x99, 0xd4, 0xb1, 0xba, 0xcb, 0xce, 0xec, 0x26, 0x69, 0x42, + 0x49, 0x13, 0x00, 0x3d, 0x9e, 0x3b, 0x05, 0x83, 0x6a, 0x93, 0xbd, 0x6e, 0x4e, 0x92, 0x4c, 0x43, + 0x1b, 0xf2, 0x25, 0x18, 0xe6, 0x2f, 0xbd, 0x50, 0x0e, 0x92, 0xfb, 0xf8, 0x80, 0xf6, 0x93, 0x55, + 0xc8, 0x4f, 0x34, 0x07, 0x83, 0x54, 0x78, 0x7e, 0x19, 0x21, 0x3f, 0xd7, 0x22, 0xfd, 0x1c, 0x15, + 0x52, 0x61, 0x68, 0xf2, 0x33, 0x90, 0x5e, 0x34, 0x1b, 0xba, 0x61, 0x86, 0xb9, 0x65, 0x18, 0x37, + 0x2a, 0xb3, 0xd5, 0xe4, 0x63, 0xad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34, 0xe3, 0xe2, 0x83, 0x29, 0xe2, 0x23, 0x30, 0x65, 0xe0, 0x6b, 0xf4, 0x10, 0x67, 0x08, + 0x3b, 0x43, 0xb1, 0x11, 0x79, 0x76, 0x39, 0x4c, 0x71, 0x2f, 0x8c, 0x69, 0xc2, 0xf8, 0x0c, 0x17, + 0x28, 0xee, 0xa8, 0x07, 0xa5, 0x68, 0xc7, 0x21, 0xad, 0x5a, 0x16, 0x43, 0x18, 0xe1, 0xf1, 0xd1, + 0xb2, 0xe8, 0xa3, 0x53, 0x30, 0x41, 0x75, 0xb4, 0xb1, 0xd3, 0xac, 0xbb, 0x9c, 0x49, 0x96, 0xe2, + 0x8c, 0x93, 0x07, 0x0a, 0x83, 0x53, 0xdc, 0xbb, 0x61, 0x14, 0x5f, 0xd1, 0xab, 0xd8, 0xd0, 0x30, + 0xc3, 0x1b, 0xa5, 0x78, 0x59, 0x01, 0xa4, 0x48, 0x0f, 0x80, 0x17, 0xf7, 0x2a, 0x22, 0x26, 0x8f, + 0x31, 0x7e, 0x02, 0x3e, 0xcf, 0xc0, 0x72, 0x1e, 0x52, 0x8b, 0xaa, 0xab, 0x92, 0x02, 0xc3, 0xbd, + 0xc6, 0x12, 0x4d, 0x56, 0x21, 0x3f, 0xe5, 0xd7, 0x13, 0x90, 0xba, 0x6c, 0xba, 0x18, 0x3d, 0x16, + 0x28, 0x00, 0xc7, 0xda, 0xf9, 0xf3, 0xa6, 0x5e, 0x33, 0x70, 0x75, 0xd5, 0xa9, 0x05, 0xee, 0x7c, + 0xfb, 0xee, 0x94, 0x08, 0xb9, 0xd3, 0x14, 0x0c, 0xda, 0x66, 0xd3, 0xa8, 0x8a, 0xd3, 0x86, 0xb4, + 0x81, 0xca, 0x90, 0xf6, 0xbc, 0x24, 0x15, 0xe7, 0x25, 0xe3, 0xc4, 0x4b, 0x88, 0x0f, 0x73, 0x80, + 0x32, 0xbc, 0xc3, 0x9d, 0xa5, 0x04, 0x19, 0x2f, 0x78, 0x71,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 0xd2, + 0xc5, 0xbe, 0x3b, 0x39, 0xea, 0x77, 0x12, 0x60, 0x27, 0x2b, 0xa3, 0x0d, 0xf5, 0xda, 0x02, 0x05, + 0x90, 0x1e, 0x8b, 0xe9, 0x8f, 0x7d, 0x7a, 0x66, 0x80, 0xee, 0xa6, 0x7f, 0x5b, 0x02, 0xf0, 0x2d, + 0x86, 0xde, 0x09, 0x39, 0xcd, 0x6b, 0x51, 0x5a, 0x87, 0x8f, 0xe1, 0xfd, 0x9d, 0xc6, 0x22, 0x62, + 0x6f, 0x96, 0x9b, 0xbf, 0x75, 0x63, 0x46, 0x52, 0xc6, 0xb5, 0xc8, 0x50, 0xbc, 0x03, 0x46, 0x9a, + 0x56, 0x55, 0x75, 0x71, 0x85, 0xae, 0xe3, 0x12, 0xb1, 0x79, 0x7e, 0x9a, 0xf0, 0xba, 0x79, 0x63, + 0x06, 0x31, 0xb5, 0x02, 0xc4, 0x32, 0xcd, 0xfe, 0xc0, 0x20, 0x84, 0x20, 0xa0, 0xd3, 0x37, 0x24, + 0x18, 0x59, 0x0c, 0x9c, 0xfb, 0xca, 0xc3, 0x70, 0xc3, 0x34, 0xf4, 0x7d, 0xee, 0x8f, 0x19, 0x45, + 0x34, 0x51, 0x01, 0xd2, 0xec, 0xc2, 0x9d, 0x7b, 0x20, 0xb6, 0x42, 0x45, 0x9b, 0x50, 0x5d, 0xc5, + 0x3b, 0x8e, 0x2e, 0x46, 0x43, 0x11, 0x4d, 0x74, 0x01, 0x72, 0x0e, 0xd6, 0x9a, 0xb6, 0xee, 0x1e, + 0x54, 0x34, 0xd3, 0x70, 0x55, 0xcd, 0x65, 0x57, 0xb7, 0x4a, 0x77, 0xdc, 0xbc, 0x31, 0x73, 0x8c, + 0xc9, 0x1a, 0xc5, 0x90, 0x95, 0x71, 0x01, 0x5a, 0x60, 0x10, 0xd2, 0x43, 0x15, 0xbb, 0xaa, 0x5e, + 0x77, 0xf2, 0xec, 0xc5, 0x90, 0x68, 0x06, 0x74, 0xf9, 0xc2, 0x70, 0x70, 0x63, 0xeb, 0x02, 0xe4, + 0x4c, 0x0b, 0xdb, 0xa1, 0x42, 0x54, 0x8a, 0xf6, 0x1c, 0xc5, 0x90, 0x95, 0x71, 0x01, 0x12, 0x45, + 0xaa, 0x4b, 0x86, 0x59, 0x2c, 0x14, 0xad, 0xe6, 0x8e, 0xbf, 0x1f, 0x36, 0xd5, 0x32, 0x1a, 0xf3, + 0xc6, 0x41, 0xe9, 0x31, 0x9f, 0x7b, 0x94, 0x4e, 0xfe, 0xe6, 0x97, 0x1f, 0x9e, 0xe2, 0xae, 0xe1, + 0xef, 0x4f, 0x5d, 0xc2, 0x07, 0x64, 0xf8, 0x39, 0xea, 0x06, 0xc5, 0x24, 0x65, 0xe7, 0x0b, 0xaa, + 0x5e, 0x17, 0x57, 0x90, 0x15, 0xde, 0x42, 0x45, 0x18, 0x72, 0x5c, 0xd5, 0x6d, 0x3a, 0xfc, 0xc3, + 0x60, 0x72, 0x27, 0x57, 0x2b, 0x99, 0x46, 0x75, 0x93, 0x62, 0x2a, 0x9c, 0x02, 0x5d, 0x80, 0x21, + 0xd7, 0xdc, 0xc7, 0x06, 0x37, 0x61, 0x5f, 0xf3, 0x9b, 0xbe, 0xa7, 0x62, 0xd4, 0xc4, 0x22, 0x55, + 0x5c, 0xc7, 0x35, 0x56, 0x56, 0xed, 0xa9, 0x64, 0xf5, 0x41, 0xbf, 0x0f, 0x56, 0x5a, 0xee, 0x7b, + 0x12, 0x72, 0x4b, 0x45, 0xf9, 0xc9, 0xca, 0xb8, 0x07, 0xda, 0xa4, 0x10, 0x74, 0x29, 0x74, 0x40, + 0x91, 0x7f, 0x44, 0xef, 0xee, 0x4e, 0xea, 0x07, 0x7c, 0x5a, 0xec, 0x4f, 0x04, 0x8f, 0x37, 0x5e, + 0x80, 0x5c, 0xd3, 0xd8, 0x31, 0x0d, 0x7a, 0x4f, 0x90, 0xd7, 0xf7, 0x64, 0x7d, 0x97, 0x0c, 0x3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61, 0xd0, 0x22, 0x3f, 0xf8, 0x8b, 0x81, 0xe9, 0x8e, 0xce, 0x4b, + 0xf1, 0xbd, 0x8d, 0x4c, 0x42, 0x22, 0x7f, 0x24, 0x01, 0xb0, 0x78, 0xf9, 0xf2, 0x96, 0xad, 0x5b, + 0x75, 0xec, 0xde, 0x4a, 0xcd, 0xb7, 0xe0, 0x48, 0x60, 0x95, 0x64, 0x6b, 0x11, 0xed, 0x67, 0x6f, + 0xde, 0x98, 0x39, 0x11, 0xd5, 0x3e, 0x80, 0x26, 0x2b, 0x93, 0xfe, 0x7a, 0xc9, 0xd6, 0xda, 0x72, + 0xad, 0x3a, 0xae, 0xc7, 0x35, 0xd9, 0x99, 0x6b, 0x00, 0x2d, 0xc8, 0x75, 0xd1, 0x71, 0xdb, 0x9b, + 0x76, 0x13, 0x46, 0x7c, 0x93, 0x38, 0x68, 0x11, 0xd2, 0x2e, 0xff, 0xcd, 0x2d, 0x2c, 0x77, 0xb6, + 0xb0, 0x20, 0xe3, 0x56, 0xf6, 0x28, 0xe5, 0x3f, 0x93, 0x00, 0x7c, 0x9f, 0xfd, 0xe9, 0x74, 0x31, + 0x12, 0xca, 0x79, 0xe0, 0x4d, 0x1e, 0xaa, 0x54, 0xe3, 0xd4, 0x11, 0x7b, 0xfe, 0x5c, 0x02, 0x26, + 0xb7, 0x45, 0xe4, 0xf9, 0xa9, 0xb7, 0xc1, 0x06, 0x0c, 0x63, 0xc3, 0xb5, 0x75, 0x6a, 0x04, 0x32, + 0xda, 0x8f, 0x74, 0x1a, 0xed, 0x36, 0x3a, 0xd1, 0x0f, 0xdd, 0x88, 0x4d, 0x77, 0xce, 0x26, 0x62, + 0x8d, 0x5f, 0x48, 0x42, 0xbe, 0x13, 0x25, 0x5a, 0x80, 0x71, 0xcd, 0xc6, 0x14, 0x50, 0x09, 0xee, + 0xfc, 0x95, 0x0a, 0x7e, 0x65, 0x19, 0x41, 0x90, 0x95, 0x31, 0x01, 0xe1, 0xd9, 0xa3, 0x06, 0xa4, + 0xec, 0x23, 0x6e, 0x47, 0xb0, 0x7a, 0xac, 0xf3, 0x64, 0x9e, 0x3e, 0x44, 0x27, 0x61, 0x06, 0x2c, + 0x7f, 0x8c, 0xf9, 0x50, 0x9a, 0x40, 0x5e, 0x84, 0x71, 0xdd, 0xd0, 0x5d, 0x5d, 0xad, 0x57, 0x76, + 0xd4, 0xba, 0x6a, 0x68, 0x87, 0xa9, 0x9a, 0x59, 0xc8, 0xe7, 0xdd, 0x46, 0xd8, 0xc9, 0xca, 0x18, + 0x87, 0x94, 0x18, 0x00, 0x5d, 0x84, 0x61, 0xd1, 0x55, 0xea, 0x50, 0xd5, 0x86, 0x20, 0x0f, 0x14, + 0x78, 0x3f, 0x9f, 0x84, 0x09, 0x05, 0x57, 0xff, 0xff, 0x50, 0xf4, 0x37, 0x14, 0xab, 0x00, 0x6c, + 0xba, 0x93, 0x00, 0x7b, 0x88, 0xd1, 0x20, 0x01, 0x23, 0xc3, 0x38, 0x2c, 0x3a, 0x6e, 0x60, 0x3c, + 0x6e, 0x24, 0x20, 0x1b, 0x1c, 0x8f, 0xbf, 0xa0, 0x59, 0x09, 0x2d, 0xfb, 0x91, 0x28, 0xc5, 0x3f, + 0x0f, 0xda, 0x21, 0x12, 0xb5, 0x78, 0x6f, 0xf7, 0x10, 0xf4, 0x46, 0x12, 0x86, 0x36, 0x54, 0x5b, + 0x6d, 0x38, 0x48, 0x6b, 0xa9, 0x34, 0xc5, 0xf6, 0x63, 0xcb, 0x47, 0xa0, 0xf9, 0x6e, 0x47, 0x4c, + 0xa1, 0xf9, 0xb1, 0x36, 0x85, 0xe6, 0x5b, 0x61, 0x8c, 0x2c, 0x87, 0x03, 0x47, 0x18, 0x88, 0xb5, + 0x47, 0x4b, 0xc7, 0x7d, 0x2e, 0xe1, 0xe7, 0x6c, 0xb5, 0x7c, 0x39, 0x78, 0x86, 0x61, 0x84, 0x60, + 0xf8, 0x81, 0x99, 0x90, 0x1f, 0xf5, 0x97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2e, 0xc1, + 0xe8, 0xaa, 0x53, 0xdb, 0x36, 0xaa, 0xff, 0xcf, 0xfb, 0xef, 0x2e, 0x1c, 0x09, 0x69, 0x7a, 0x9b, + 0x4c, 0x7a, 0xe6, 0xd5, 0x14, 0x24, 0x57, 0x9d, 0x1a, 0x7a, 0x11, 0xc6, 0xa3, 0x45, 0x43, 0xc7, + 0x5a, 0xb0, 0x35, 0x23, 0x74, 0x5e, 0xaf, 0x75, 0xce, 0x1e, 0x68, 0x1f, 0x46, 0xc3, 0x99, 0xe3, + 0x64, 0x17, 0x26, 0x21, 0xcc, 0xc2, 0x23, 0xbd, 0x62, 0x7a, 0x9d, 0xbd, 0x13, 0xd2, 0x5e, 0xd0, + 0xbb, 0xbb, 0x0b, 0xb5, 0x40, 0xea, 0x5c, 0xdd, 0xb6, 0x09, 0x2b, 0xc4, 0x7a, 0xd1, 0x90, 0xd2, + 0xcd, 0x7a, 0x11, 0xdc, 0xae, 0xd6, 0xeb, 0x34, 0xb5, 0x76, 0x00, 0x02, 0xf3, 0xe0, 0xde, 0x2e, + 0x1c, 0x7c, 0xb4, 0xc2, 0xc3, 0x3d, 0xa1, 0x79, 0x2f, 0x9d, 0x6e, 0x71, 0x31, 0xfe, 0x7f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xa4, 0x8b, 0x68, 0x27, 0xe4, 0x94, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *CommissionRates) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CommissionRates) + if !ok { + that2, ok := that.(CommissionRates) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Rate.Equal(that1.Rate) { + return false + } + if !this.MaxRate.Equal(that1.MaxRate) { + return false + } + if !this.MaxChangeRate.Equal(that1.MaxChangeRate) { + return false + } + return true +} +func (this *Commission) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Commission) + if !ok { + that2, ok := that.(Commission) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CommissionRates.Equal(&that1.CommissionRates) { + return false + } + if !this.UpdateTime.Equal(that1.UpdateTime) { + return false + } + return true +} +func (this *Description) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Description) + if !ok { + that2, ok := that.(Description) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Moniker != that1.Moniker { + return false + } + if this.Identity != that1.Identity { + return false + } + if this.Website != that1.Website { + return false + } + if this.SecurityContact != that1.SecurityContact { + return false + } + if this.Details != that1.Details { + return false + } + return true +} +func (this *UnbondingDelegationEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnbondingDelegationEntry) + if !ok { + that2, ok := that.(UnbondingDelegationEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CreationHeight != that1.CreationHeight { + return false + } + if !this.CompletionTime.Equal(that1.CompletionTime) { + return false + } + if !this.InitialBalance.Equal(that1.InitialBalance) { + return false + } + if !this.Balance.Equal(that1.Balance) { + return false + } + return true +} +func (this *RedelegationEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RedelegationEntry) + if !ok { + that2, ok := that.(RedelegationEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CreationHeight != that1.CreationHeight { + return false + } + if !this.CompletionTime.Equal(that1.CompletionTime) { + return false + } + if !this.InitialBalance.Equal(that1.InitialBalance) { + return false + } + if !this.SharesDst.Equal(that1.SharesDst) { + return false + } + return true +} +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.UnbondingTime != that1.UnbondingTime { + return false + } + if this.MaxValidators != that1.MaxValidators { + return false + } + if this.MaxEntries != that1.MaxEntries { + return false + } + if this.HistoricalEntries != that1.HistoricalEntries { + return false + } + if this.BondDenom != that1.BondDenom { + return false + } + if !this.MinCommissionRate.Equal(that1.MinCommissionRate) { + return false + } + return true +} +func (this *RedelegationEntryResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RedelegationEntryResponse) + if !ok { + that2, ok := that.(RedelegationEntryResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RedelegationEntry.Equal(&that1.RedelegationEntry) { + return false + } + if !this.Balance.Equal(that1.Balance) { + return false + } + return true +} +func (this *Pool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Pool) + if !ok { + that2, ok := that.(Pool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NotBondedTokens.Equal(that1.NotBondedTokens) { + return false + } + if !this.BondedTokens.Equal(that1.BondedTokens) { + return false + } + return true +} +func (m *HistoricalInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HistoricalInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistoricalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Valset) > 0 { + for iNdEx := len(m.Valset) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Valset[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CommissionRates) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommissionRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxChangeRate.Size() + i -= size + if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.MaxRate.Size() + i -= size + if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Rate.Size() + i -= size + if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Commission) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Commission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintStaking(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + { + size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Description) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Description) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.SecurityContact) > 0 { + i -= len(m.SecurityContact) + copy(dAtA[i:], m.SecurityContact) + i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Validator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Validator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintStaking(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x4a + if m.UnbondingHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) + i-- + dAtA[i] = 0x40 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.DelegatorShares.Size() + i -= size + if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Status != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ConsensusPubkey != nil { + { + size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValAddresses) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValAddresses) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DVPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DVPairs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVPairs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DVVTriplet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVVTriplet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVVTriplet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DVVTriplets) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVVTriplets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVVTriplets) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Triplets) > 0 { + for iNdEx := len(m.Triplets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Triplets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Delegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Delegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Shares.Size() + i -= size + if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintStaking(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RedelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SharesDst.Size() + i -= size + if _, err := m.SharesDst.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintStaking(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Redelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Redelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Redelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinCommissionRate.Size() + i -= size + if _, err := m.MinCommissionRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if len(m.BondDenom) > 0 { + i -= len(m.BondDenom) + copy(dAtA[i:], m.BondDenom) + i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) + i-- + dAtA[i] = 0x2a + } + if m.HistoricalEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x20 + } + if m.MaxEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) + i-- + dAtA[i] = 0x18 + } + if m.MaxValidators != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) + i-- + dAtA[i] = 0x10 + } + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintStaking(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DelegationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Delegation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RedelegationEntryResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationEntryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationEntryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.RedelegationEntry.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RedelegationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Redelegation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Pool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.BondedTokens.Size() + i -= size + if _, err := m.BondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.NotBondedTokens.Size() + i -= size + if _, err := m.NotBondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { + offset -= sovStaking(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *HistoricalInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovStaking(uint64(l)) + if len(m.Valset) > 0 { + for _, e := range m.Valset { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *CommissionRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxRate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxChangeRate.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Commission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CommissionRates.Size() + n += 1 + l + sovStaking(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Description) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.SecurityContact) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if m.ConsensusPubkey != nil { + l = m.ConsensusPubkey.Size() + n += 1 + l + sovStaking(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovStaking(uint64(m.Status)) + } + l = m.Tokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.DelegatorShares.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Description.Size() + n += 1 + l + sovStaking(uint64(l)) + if m.UnbondingHeight != 0 { + n += 1 + sovStaking(uint64(m.UnbondingHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.Commission.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MinSelfDelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *ValAddresses) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *DVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *DVPairs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *DVVTriplet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *DVVTriplets) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Triplets) > 0 { + for _, e := range m.Triplets { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Delegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = m.Shares.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *UnbondingDelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *UnbondingDelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.SharesDst.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Redelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + if m.MaxValidators != 0 { + n += 1 + sovStaking(uint64(m.MaxValidators)) + } + if m.MaxEntries != 0 { + n += 1 + sovStaking(uint64(m.MaxEntries)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovStaking(uint64(m.HistoricalEntries)) + } + l = len(m.BondDenom) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = m.MinCommissionRate.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *DelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Delegation.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationEntryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.RedelegationEntry.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Redelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.NotBondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.BondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func sovStaking(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStaking(x uint64) (n int) { + return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ValAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func valueToStringStaking(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *HistoricalInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistoricalInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistoricalInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valset = append(m.Valset, Validator{}) + if err := m.Valset[len(m.Valset)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommissionRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommissionRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commission) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Commission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Description) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Validator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Validator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusPubkey == nil { + m.ConsensusPubkey = &types1.Any{} + } + if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) + } + m.UnbondingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValAddresses) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVPairs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVPairs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVPairs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pairs = append(m.Pairs, DVPair{}) + if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVVTriplet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVVTriplet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVVTriplet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVVTriplets) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVVTriplets: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVVTriplets: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Triplets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Triplets = append(m.Triplets, DVVTriplet{}) + if err := m.Triplets[len(m.Triplets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Delegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Delegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, UnbondingDelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesDst", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SharesDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Redelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Redelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Redelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, RedelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) + } + m.MaxValidators = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxValidators |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) + } + m.MaxEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BondDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinCommissionRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinCommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DelegationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Delegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationEntryResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationEntryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationEntryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedelegationEntry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RedelegationEntry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redelegation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Redelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, RedelegationEntryResponse{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NotBondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NotBondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStaking(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStaking + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStaking + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStaking + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/types.go b/x/staking/legacy/v040/types.go index c01c41a417e3..8964296fa97d 100644 --- a/x/staking/legacy/v040/types.go +++ b/x/staking/legacy/v040/types.go @@ -1,330 +1,201 @@ -// Package v040 is copy-pasted from: -// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/staking/types/keys.go package v040 import ( - "bytes" - "encoding/binary" "fmt" - "strconv" + "strings" "time" + yaml "gopkg.in/yaml.v2" + sdk "github.com/cosmos/cosmos-sdk/types" - v040auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" - "github.com/cosmos/cosmos-sdk/x/staking/types" ) +// Staking params default values const ( - // ModuleName is the name of the staking module - ModuleName = "staking" - - // StoreKey is the string store representation - StoreKey = ModuleName - - // QuerierRoute is the querier route for the staking module - QuerierRoute = ModuleName - - // RouterKey is the msg router key for the staking module - RouterKey = ModuleName -) - -var ( - // Keys for store prefixes - // Last* values are constant during a block. - LastValidatorPowerKey = []byte{0x11} // prefix for each key to a validator index, for bonded validators - LastTotalPowerKey = []byte{0x12} // prefix for the total power - - ValidatorsKey = []byte{0x21} // prefix for each key to a validator - ValidatorsByConsAddrKey = []byte{0x22} // prefix for each key to a validator index, by pubkey - ValidatorsByPowerIndexKey = []byte{0x23} // prefix for each key to a validator index, sorted by power + // DefaultUnbondingTime reflects three weeks in seconds as the default + // unbonding time. + // TODO: Justify our choice of default here. + DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3 - DelegationKey = []byte{0x31} // key for a delegation - UnbondingDelegationKey = []byte{0x32} // key for an unbonding-delegation - UnbondingDelegationByValIndexKey = []byte{0x33} // prefix for each key for an unbonding-delegation, by validator operator - RedelegationKey = []byte{0x34} // key for a redelegation - RedelegationByValSrcIndexKey = []byte{0x35} // prefix for each key for an redelegation, by source validator operator - RedelegationByValDstIndexKey = []byte{0x36} // prefix for each key for an redelegation, by destination validator operator + // Default maximum number of bonded validators + DefaultMaxValidators uint32 = 100 - UnbondingQueueKey = []byte{0x41} // prefix for the timestamps in unbonding queue - RedelegationQueueKey = []byte{0x42} // prefix for the timestamps in redelegations queue - ValidatorQueueKey = []byte{0x43} // prefix for the timestamps in validator queue + // Default maximum entries in a UBD/RED pair + DefaultMaxEntries uint32 = 7 - HistoricalInfoKey = []byte{0x50} // prefix for the historical info + // DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this + // value by not adding the staking module to the application module manager's + // SetOrderBeginBlockers. + DefaultHistoricalEntries uint32 = 10000 ) -// gets the key for the validator with address -// VALUE: staking/Validator -func GetValidatorKey(operatorAddr sdk.ValAddress) []byte { - return append(ValidatorsKey, operatorAddr.Bytes()...) -} - -// gets the key for the validator with pubkey -// VALUE: validator operator address ([]byte) -func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte { - return append(ValidatorsByConsAddrKey, addr.Bytes()...) -} - -// Get the validator operator address from LastValidatorPowerKey -func AddressFromLastValidatorPowerKey(key []byte) []byte { - return key[1:] // remove prefix bytes -} - -// get the validator by power index. -// Power index is the key used in the power-store, and represents the relative -// power ranking of the validator. -// VALUE: validator operator address ([]byte) -func GetValidatorsByPowerIndexKey(validator types.Validator) []byte { - // NOTE the address doesn't need to be stored because counter bytes must always be different - // NOTE the larger values are of higher value - - consensusPower := sdk.TokensToConsensusPower(validator.Tokens, sdk.DefaultPowerReduction) - consensusPowerBytes := make([]byte, 8) - binary.BigEndian.PutUint64(consensusPowerBytes, uint64(consensusPower)) - - powerBytes := consensusPowerBytes - powerBytesLen := len(powerBytes) // 8 - - // key is of format prefix || powerbytes || addrBytes - key := make([]byte, 1+powerBytesLen+v040auth.AddrLen) - - key[0] = ValidatorsByPowerIndexKey[0] - copy(key[1:powerBytesLen+1], powerBytes) - addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) - if err != nil { - panic(err) +// NewParams creates a new Params instance +func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string) Params { + return Params{ + UnbondingTime: unbondingTime, + MaxValidators: maxValidators, + MaxEntries: maxEntries, + HistoricalEntries: historicalEntries, + BondDenom: bondDenom, } - operAddrInvr := sdk.CopyBytes(addr) - - for i, b := range operAddrInvr { - operAddrInvr[i] = ^b - } - - copy(key[powerBytesLen+1:], operAddrInvr) - - return key } -// get the bonded validator index key for an operator address -func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { - return append(LastValidatorPowerKey, operator...) +// String returns a human readable string representation of the parameters. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) } -// parse the validators operator address from power rank key -func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { - powerBytesLen := 8 - if len(key) != 1+powerBytesLen+v040auth.AddrLen { - panic("Invalid validator power rank key length") - } - - operAddr = sdk.CopyBytes(key[powerBytesLen+1:]) - - for i, b := range operAddr { - operAddr[i] = ^b - } - - return operAddr +func DefaultParams() Params { + return NewParams( + DefaultUnbondingTime, + DefaultMaxValidators, + DefaultMaxEntries, + DefaultHistoricalEntries, + sdk.DefaultBondDenom, + ) } -// GetValidatorQueueKey returns the prefix key used for getting a set of unbonding -// validators whose unbonding completion occurs at the given time and height. -func GetValidatorQueueKey(timestamp time.Time, height int64) []byte { - heightBz := sdk.Uint64ToBigEndian(uint64(height)) - timeBz := sdk.FormatTimeBytes(timestamp) - timeBzL := len(timeBz) - prefixL := len(ValidatorQueueKey) - - bz := make([]byte, prefixL+8+timeBzL+8) - - // copy the prefix - copy(bz[:prefixL], ValidatorQueueKey) - - // copy the encoded time bytes length - copy(bz[prefixL:prefixL+8], sdk.Uint64ToBigEndian(uint64(timeBzL))) - - // copy the encoded time bytes - copy(bz[prefixL+8:prefixL+8+timeBzL], timeBz) - - // copy the encoded height - copy(bz[prefixL+8+timeBzL:], heightBz) - - return bz +// String implements the Stringer interface for a Commission object. +func (c Commission) String() string { + out, _ := yaml.Marshal(c) + return string(out) } -// ParseValidatorQueueKey returns the encoded time and height from a key created -// from GetValidatorQueueKey. -func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) { - prefixL := len(ValidatorQueueKey) - if prefix := bz[:prefixL]; !bytes.Equal(prefix, ValidatorQueueKey) { - return time.Time{}, 0, fmt.Errorf("invalid prefix; expected: %X, got: %X", ValidatorQueueKey, prefix) - } - - timeBzL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) - ts, err := sdk.ParseTimeBytes(bz[prefixL+8 : prefixL+8+int(timeBzL)]) - if err != nil { - return time.Time{}, 0, err - } - - height := sdk.BigEndianToUint64(bz[prefixL+8+int(timeBzL):]) - - return ts, int64(height), nil +// String implements the Stringer interface for a CommissionRates object. +func (cr CommissionRates) String() string { + out, _ := yaml.Marshal(cr) + return string(out) } -// gets the key for delegator bond with validator -// VALUE: staking/Delegation -func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append(GetDelegationsKey(delAddr), valAddr.Bytes()...) +// String implements the Stringer interface for a DVPair object. +func (dv DVPair) String() string { + out, _ := yaml.Marshal(dv) + return string(out) } -// gets the prefix for a delegator for all validators -func GetDelegationsKey(delAddr sdk.AccAddress) []byte { - return append(DelegationKey, delAddr.Bytes()...) +// String implements the Stringer interface for a DVVTriplet object. +func (dvv DVVTriplet) String() string { + out, _ := yaml.Marshal(dvv) + return string(out) } -// gets the key for an unbonding delegation by delegator and validator addr -// VALUE: staking/UnbondingDelegation -func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append( - GetUBDsKey(delAddr.Bytes()), - valAddr.Bytes()...) +// String returns a human readable string representation of a Delegation. +func (d Delegation) String() string { + out, _ := yaml.Marshal(d) + return string(out) } -// gets the index-key for an unbonding delegation, stored by validator-index -// VALUE: none (key rearrangement used) -func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append(GetUBDsByValIndexKey(valAddr), delAddr.Bytes()...) -} +// Delegations is a collection of delegations +type Delegations []Delegation -// rearranges the ValIndexKey to get the UBDKey -func GetUBDKeyFromValIndexKey(indexKey []byte) []byte { - addrs := indexKey[1:] // remove prefix bytes - if len(addrs) != 2*v040auth.AddrLen { - panic("unexpected key length") +func (d Delegations) String() (out string) { + for _, del := range d { + out += del.String() + "\n" } - valAddr := addrs[:v040auth.AddrLen] - delAddr := addrs[v040auth.AddrLen:] - - return GetUBDKey(delAddr, valAddr) -} - -// gets the prefix for all unbonding delegations from a delegator -func GetUBDsKey(delAddr sdk.AccAddress) []byte { - return append(UnbondingDelegationKey, delAddr.Bytes()...) + return strings.TrimSpace(out) } -// gets the prefix keyspace for the indexes of unbonding delegations for a validator -func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { - return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) +// String implements the stringer interface for a UnbondingDelegationEntry. +func (e UnbondingDelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) } -// gets the prefix for all unbonding delegations from a delegator -func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { - bz := sdk.FormatTimeBytes(timestamp) - return append(UnbondingQueueKey, bz...) -} - -// GetREDKey returns a key prefix for indexing a redelegation from a delegator -// and source validator to a destination validator. -func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - key := make([]byte, 1+v040auth.AddrLen*3) - - copy(key[0:v040auth.AddrLen+1], GetREDsKey(delAddr.Bytes())) - copy(key[v040auth.AddrLen+1:2*v040auth.AddrLen+1], valSrcAddr.Bytes()) - copy(key[2*v040auth.AddrLen+1:3*v040auth.AddrLen+1], valDstAddr.Bytes()) - - return key -} - -// gets the index-key for a redelegation, stored by source-validator-index -// VALUE: none (key rearrangement used) -func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) - offset := len(REDSFromValsSrcKey) - - // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr - key := make([]byte, len(REDSFromValsSrcKey)+2*v040auth.AddrLen) - copy(key[0:offset], REDSFromValsSrcKey) - copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) - copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valDstAddr.Bytes()) +// String returns a human readable string representation of an UnbondingDelegation. +func (ubd UnbondingDelegation) String() string { + out := fmt.Sprintf(`Unbonding Delegations between: + Delegator: %s + Validator: %s + Entries:`, ubd.DelegatorAddress, ubd.ValidatorAddress) + for i, entry := range ubd.Entries { + out += fmt.Sprintf(` Unbonding Delegation %d: + Creation Height: %v + Min time to unbond (unix): %v + Expected balance: %s`, i, entry.CreationHeight, + entry.CompletionTime, entry.Balance) + } - return key + return out } -// gets the index-key for a redelegation, stored by destination-validator-index -// VALUE: none (key rearrangement used) -func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) - offset := len(REDSToValsDstKey) - - // key is of the form REDSToValsDstKey || delAddr || valSrcAddr - key := make([]byte, len(REDSToValsDstKey)+2*v040auth.AddrLen) - copy(key[0:offset], REDSToValsDstKey) - copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) - copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valSrcAddr.Bytes()) - - return key -} +// UnbondingDelegations is a collection of UnbondingDelegation +type UnbondingDelegations []UnbondingDelegation -// GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey -func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - if len(indexKey) != 3*v040auth.AddrLen+1 { - panic("unexpected key length") +func (ubds UnbondingDelegations) String() (out string) { + for _, u := range ubds { + out += u.String() + "\n" } - valSrcAddr := indexKey[1 : v040auth.AddrLen+1] - delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] - valDstAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + return strings.TrimSpace(out) +} + +// String implements the Stringer interface for a RedelegationEntry object. +func (e RedelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) +} + +// String returns a human readable string representation of a Redelegation. +func (red Redelegation) String() string { + out := fmt.Sprintf(`Redelegations between: + Delegator: %s + Source Validator: %s + Destination Validator: %s + Entries: +`, + red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress, + ) + + for i, entry := range red.Entries { + out += fmt.Sprintf(` Redelegation Entry #%d: + Creation height: %v + Min time to unbond (unix): %v + Dest Shares: %s +`, + i, entry.CreationHeight, entry.CompletionTime, entry.SharesDst, + ) + } - return GetREDKey(delAddr, valSrcAddr, valDstAddr) + return strings.TrimRight(out, "\n") } -// GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey -func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - if len(indexKey) != 3*v040auth.AddrLen+1 { - panic("unexpected key length") - } +// Redelegations are a collection of Redelegation +type Redelegations []Redelegation - valDstAddr := indexKey[1 : v040auth.AddrLen+1] - delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] - valSrcAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] +func (d Redelegations) String() (out string) { + for _, red := range d { + out += red.String() + "\n" + } - return GetREDKey(delAddr, valSrcAddr, valDstAddr) + return strings.TrimSpace(out) } -// GetRedelegationTimeKey returns a key prefix for indexing an unbonding -// redelegation based on a completion time. -func GetRedelegationTimeKey(timestamp time.Time) []byte { - bz := sdk.FormatTimeBytes(timestamp) - return append(RedelegationQueueKey, bz...) +// String implements the Stringer interface for DelegationResponse. +func (d DelegationResponse) String() string { + return fmt.Sprintf("%s\n Balance: %s", d.Delegation.String(), d.Balance) } -// GetREDsKey returns a key prefix for indexing a redelegation from a delegator -// address. -func GetREDsKey(delAddr sdk.AccAddress) []byte { - return append(RedelegationKey, delAddr.Bytes()...) +// String implements the Stringer interface for a Validator object. +func (v Validator) String() string { + out, _ := yaml.Marshal(v) + return string(out) } -// GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to -// a source validator. -func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { - return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) -} +// Validators is a collection of Validator +type Validators []Validator -// GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a -// destination (target) validator. -func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { - return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) -} +func (v Validators) String() (out string) { + for _, val := range v { + out += val.String() + "\n" + } -// GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation -// from an address to a source validator. -func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte { - return append(GetREDsToValDstIndexKey(valDstAddr), delAddr.Bytes()...) + return strings.TrimSpace(out) } -// GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects. -func GetHistoricalInfoKey(height int64) []byte { - return append(HistoricalInfoKey, []byte(strconv.FormatInt(height, 10))...) +// String implements the Stringer interface for a Description object. +func (d Description) String() string { + out, _ := yaml.Marshal(d) + return string(out) } diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index ca9f3ffdf340..79fa79954ed0 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -153,7 +153,6 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k } txCtx := simulation.OperationInput{ - R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, @@ -279,7 +278,6 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K msg := types.NewMsgDelegate(simAccount.Address, val.GetOperator(), bondAmt) txCtx := simulation.OperationInput{ - R: r, App: app, TxGen: simappparams.MakeTestEncodingConfig().TxConfig, Cdc: nil, diff --git a/x/staking/types/authz.pb.go b/x/staking/types/authz.pb.go index 0e013239312e..6ec92bae59ad 100644 --- a/x/staking/types/authz.pb.go +++ b/x/staking/types/authz.pb.go @@ -5,11 +5,11 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -250,7 +250,7 @@ var fileDescriptor_d6d8cdbc6f4432f0 = []byte{ 0x94, 0x88, 0xac, 0x2e, 0x1e, 0xe4, 0x29, 0x09, 0x16, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x4d, 0x5c, 0xc6, 0xa3, 0x98, 0x1c, 0x52, 0x59, 0x90, 0x1a, 0x24, 0x98, 0x88, 0x2e, 0x24, 0xa5, 0xc6, 0xc5, 0x85, 0xb0, 0x53, 0x48, 0x82, 0x8b, 0x3d, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0x18, 0x14, 0xf2, 0xcc, - 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x95, 0xf1, 0xa9, 0x2d, 0xba, 0xbc, 0x28, 0x26, 0x76, 0x3d, 0xdf, + 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x95, 0xf1, 0xa5, 0x2d, 0xba, 0xbc, 0x28, 0x26, 0x76, 0x3d, 0xdf, 0xa0, 0x25, 0x8b, 0x14, 0xce, 0x98, 0xbe, 0x71, 0xe2, 0xe1, 0xe2, 0x2a, 0x83, 0x1b, 0xae, 0x35, 0x8f, 0x91, 0x4b, 0x10, 0xc3, 0x4d, 0x42, 0x4a, 0x5c, 0x72, 0x8e, 0xa1, 0x21, 0x1e, 0xfe, 0x41, 0x9e, 0x51, 0x8e, 0x21, 0x9e, 0xfe, 0x7e, 0xf1, 0x21, 0x91, 0x01, 0xae, 0xf1, 0xa1, 0x7e, 0xc1, @@ -259,7 +259,7 @@ var fileDescriptor_d6d8cdbc6f4432f0 = []byte{ 0x04, 0xae, 0x84, 0x09, 0x87, 0x92, 0x20, 0x57, 0xb8, 0x12, 0x66, 0x27, 0xb7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0xc1, 0x9b, 0xc2, 0x2a, 0xe0, 0x79, 0x0c, 0x9c, - 0xd6, 0x92, 0xd8, 0xc0, 0x09, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xcc, 0x70, 0xa5, + 0xd6, 0x92, 0xd8, 0xc0, 0x09, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x04, 0x1c, 0xf5, 0x06, 0x82, 0x03, 0x00, 0x00, } diff --git a/x/staking/types/genesis.pb.go b/x/staking/types/genesis.pb.go index f7383444142e..fe9b65b8ec3a 100644 --- a/x/staking/types/genesis.pb.go +++ b/x/staking/types/genesis.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index ecdecbd41a6c..447a559bda7b 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -3,7 +3,7 @@ package types import ( "sort" - "github.com/cosmos/gogoproto/proto" + "github.com/gogo/protobuf/proto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/staking/types/query.pb.go b/x/staking/types/query.pb.go index 81ed6a23796f..00d0dfc383ed 100644 --- a/x/staking/types/query.pb.go +++ b/x/staking/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/staking/types/query.pb.gw.go b/x/staking/types/query.pb.gw.go index 7ed30880ddff..0982dfc3d671 100644 --- a/x/staking/types/query.pb.gw.go +++ b/x/staking/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join var ( filter_Query_Validators_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -876,14 +874,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Validators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -891,7 +887,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Validators_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -905,8 +900,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Validator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -914,7 +907,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Validator_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -928,8 +920,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorDelegations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -937,7 +927,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorDelegations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -951,8 +940,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorUnbondingDelegations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -960,7 +947,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorUnbondingDelegations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -974,8 +960,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Delegation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -983,7 +967,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Delegation_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -997,8 +980,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_UnbondingDelegation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1006,7 +987,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_UnbondingDelegation_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1020,8 +1000,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorDelegations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1029,7 +1007,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorDelegations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1043,8 +1020,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorUnbondingDelegations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1052,7 +1027,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorUnbondingDelegations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1066,8 +1040,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Redelegations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1075,7 +1047,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Redelegations_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1089,8 +1060,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1098,7 +1067,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorValidators_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1112,8 +1080,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DelegatorValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1121,7 +1087,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DelegatorValidator_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1135,8 +1100,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_HistoricalInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1144,7 +1107,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_HistoricalInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1158,8 +1120,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Pool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1167,7 +1127,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Pool_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1181,8 +1140,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1190,7 +1147,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 13ebe752635c..5ad278e420b8 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -7,16 +7,16 @@ import ( bytes "bytes" compress_gzip "compress/gzip" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types2 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - github_com_cosmos_gogoproto_proto "github.com/cosmos/gogoproto/proto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" types "github.com/tendermint/tendermint/proto/tendermint/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" @@ -1263,504 +1263,644 @@ var fileDescriptor_64c30c6cf92913c9 = []byte{ 0x39, 0x8c, 0x18, 0x00, 0x00, } -func (this *Pool) Description() (desc *github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet) { +func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { return StakingDescription() } -func StakingDescription() (desc *github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet) { - d := &github_com_cosmos_gogoproto_protoc_gen_gogo_descriptor.FileDescriptorSet{} +func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 7842 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7c, 0x7b, 0x90, 0x1c, 0xc7, - 0x79, 0xdf, 0xed, 0x7b, 0xf7, 0xbb, 0xbd, 0xbd, 0xb9, 0xb9, 0x03, 0xb0, 0x38, 0x90, 0x77, 0xc7, - 0xe1, 0x03, 0x20, 0x48, 0x1e, 0x48, 0x90, 0x00, 0xc9, 0x85, 0x25, 0x7a, 0xf7, 0x76, 0x71, 0x58, - 0xf0, 0x5e, 0x9a, 0xbd, 0x83, 0x28, 0xc6, 0xa9, 0xf1, 0xdc, 0x6c, 0xdf, 0xde, 0x10, 0xb3, 0x33, - 0xa3, 0x99, 0x59, 0x00, 0xc7, 0x72, 0xa5, 0xa8, 0x52, 0x1e, 0x32, 0xe2, 0x38, 0x7a, 0xb8, 0x22, - 0x59, 0x16, 0x14, 0xca, 0x4a, 0x2c, 0x45, 0xb1, 0x63, 0xd9, 0x72, 0x94, 0x38, 0xae, 0xa4, 0x94, - 0x54, 0x25, 0x91, 0xfd, 0x47, 0x4a, 0xfe, 0x27, 0x71, 0x39, 0x09, 0xe2, 0x90, 0xaa, 0x48, 0x71, - 0xe4, 0xd8, 0x86, 0xe9, 0x2a, 0xa7, 0x54, 0xae, 0x4a, 0xf5, 0x6b, 0x1e, 0xfb, 0xb8, 0xd9, 0x43, - 0x44, 0x5a, 0x55, 0xf1, 0x3f, 0xc0, 0xf5, 0xd7, 0xdf, 0xef, 0xd7, 0xdd, 0x5f, 0x7f, 0xfd, 0xf5, - 0xd7, 0x3d, 0x33, 0x0b, 0x7f, 0x72, 0x09, 0x96, 0x3a, 0x96, 0xd5, 0x31, 0xd0, 0x39, 0xdb, 0xb1, - 0x3c, 0x6b, 0xb7, 0xb7, 0x77, 0xae, 0x8d, 0x5c, 0xcd, 0xd1, 0x6d, 0xcf, 0x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x00, 0x11, 0x5c, 0x5e, 0xdb, 0xac, 0x6e, - 0x0b, 0x49, 0xbf, 0xdc, 0xdc, 0xd8, 0xbe, 0xf8, 0x9c, 0x90, 0xf2, 0x01, 0x3b, 0x54, 0x90, 0x0e, - 0x2b, 0x3c, 0x7b, 0x5e, 0xc8, 0x88, 0x02, 0x14, 0x29, 0x41, 0xf3, 0x95, 0x46, 0xfd, 0xe2, 0x73, - 0x42, 0x36, 0x2a, 0x79, 0xf6, 0xbc, 0x90, 0x13, 0xa7, 0xa0, 0x40, 0x24, 0xb5, 0xcd, 0xcd, 0x35, - 0x21, 0xef, 0x73, 0xb6, 0xb6, 0xe5, 0xe6, 0xc6, 0xaa, 0x50, 0xf0, 0x39, 0x57, 0xe5, 0xcd, 0x9d, - 0x2d, 0x01, 0x7c, 0x86, 0xf5, 0x46, 0xab, 0x55, 0x5d, 0x6d, 0x08, 0x93, 0xbe, 0x46, 0xed, 0x43, - 0xdb, 0x8d, 0x96, 0x50, 0x8c, 0x74, 0xeb, 0xd9, 0xf3, 0xc2, 0x94, 0xdf, 0x44, 0x63, 0x63, 0x67, - 0x5d, 0x28, 0x89, 0x33, 0x30, 0x45, 0x9b, 0xe0, 0x9d, 0x98, 0xee, 0x13, 0x5d, 0x7c, 0x4e, 0x10, - 0x82, 0x8e, 0x50, 0x96, 0x99, 0x88, 0xe0, 0xe2, 0x73, 0x82, 0x28, 0xad, 0x40, 0x86, 0xb8, 0xa1, - 0x28, 0x42, 0x69, 0xad, 0x5a, 0x6b, 0xac, 0x29, 0x9b, 0x5b, 0xdb, 0xcd, 0xcd, 0x8d, 0xea, 0x9a, - 0x90, 0x08, 0x64, 0x72, 0xe3, 0x03, 0x3b, 0x4d, 0xb9, 0x51, 0x17, 0x92, 0x61, 0xd9, 0x56, 0xa3, - 0xba, 0xdd, 0xa8, 0x0b, 0x29, 0x49, 0x83, 0xb9, 0x61, 0x01, 0x75, 0xe8, 0x12, 0x0a, 0xf9, 0x42, - 0x72, 0x84,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xf4, 0xb0, 0x45, 0x74, 0x56, 0xb0, 0xca, 0x8e, 0xb7, 0xf7, 0x82, 0xd8, 0x82, 0x22, 0x9e, - 0x8c, 0xae, 0xfe, 0x3a, 0x52, 0xf6, 0x2c, 0x87, 0xec, 0xa1, 0xa5, 0x21, 0xa1, 0x29, 0x64, 0xc1, - 0xe5, 0x4d, 0x06, 0x58, 0xb7, 0xda, 0xa8, 0x92, 0x69, 0x6d, 0x35, 0x1a, 0x75, 0x79, 0x92, 0xb3, - 0x5c, 0xb6, 0x1c, 0xec, 0x50, 0x1d, 0xcb, 0x37, 0xf0, 0x24, 0x75, 0xa8, 0x8e, 0xc5, 0xcd, 0x7b, - 0x01, 0x66, 0x35, 0x8d, 0x8e, 0x59, 0xd7, 0x14, 0x76, 0x18, 0x73, 0xcb, 0x42, 0xc4, 0x58, 0x9a, - 0xb6, 0x4a, 0x15, 0x98, 0x8f, 0xbb, 0xe2, 0x8b, 0x70, 0x2c, 0x30, 0x56, 0x18, 0x38, 0x33, 0x30, - 0xca, 0x7e, 0xe8, 0x05, 0x98, 0xb5, 0x0f, 0x06, 0x81, 0x62, 0xa4, 0x45, 0xfb, 0xa0, 0x1f, 0xf6, - 0x3c, 0xcc, 0xd9, 0xfb, 0xf6, 0x20, 0xee, 0x6c, 0x18, 0x27, 0xda, 0xfb, 0x76, 0x3f, 0xf0, 0x51, - 0x72, 0x32, 0x77, 0x90, 0xa6, 0x7a, 0xa8, 0x5d, 0x3e, 0x11, 0x56, 0x0f, 0x55, 0x88, 0xcb, 0x20, - 0x68, 0x9a, 0x82, 0x4c, 0x75, 0xd7, 0x40, 0x8a, 0xea, 0x20, 0x53, 0x75, 0xcb, 0x8b, 0x44, 0x39, - 0xed, 0x39, 0x3d, 0x24, 0x97, 0x34, 0xad, 0x41, 0x2a, 0xab, 0xa4, 0x4e, 0x3c, 0x0b, 0x33, 0xd6, - 0xee, 0x6b, 0x1a, 0xf5, 0x48, 0xc5, 0x76, 0xd0, 0x9e, 0x7e, 0xab, 0xfc, 0x08, 0x31, 0xef, 0x34, - 0xae, 0x20, 0xfe, 0xb8, 0x45, 0xc4, 0xe2, 0xe3, 0x20, 0x68, 0xee, 0xbe, 0xea, 0xd8, 0x24, 0x24, - 0xbb, 0xb6, 0xaa, 0xa1, 0xf2, 0xa3, 0x54, 0x95, 0xca, 0x37, 0xb8, 0x18, 0xaf, 0x08, 0xf7, 0xa6, - 0xbe, 0xe7, 0x71, 0xc6, 0xd3, 0x74, 0x45, 0x10, 0x19, 0x63, 0x3b, 0x03, 0x02, 0xb6, 0x44, 0xa4, - 0xe1, 0x33, 0x44, 0xad, 0x64, 0xef, 0xdb, 0xe1, 0x76, 0x1f, 0x86, 0x29, 0xac, 0x19, 0x34, 0xfa, - 0x38, 0x4d, 0xdc, 0xec, 0xfd, 0x50, 0x8b, 0xcf, 0xc1, 0x71, 0xac, 0xd4, 0x45, 0x9e, 0xda, 0x56, - 0x3d, 0x35, 0xa4, 0xfd, 0x24, 0xd1, 0xc6, 0x66, 0x5f, 0x67, 0x95, 0x91, 0x7e, 0x3a, 0xbd, 0xdd, - 0x03, 0xdf, 0xb1, 0x9e, 0xa2, 0xfd, 0xc4, 0x32, 0xee, 0x5a, 0xef, 0x5a, 0x72, 0x2e, 0x55, 0xa0, - 0x18, 0xf6, 0x7b, 0xb1, 0x00, 0xd4, 0xf3, 0x85, 0x04, 0x4e, 0x82, 0x56, 0x36, 0xeb, 0x38, 0x7d, - 0x79, 0xb5, 0x21, 0x24, 0x71, 0x1a, 0xb5, 0xd6, 0xdc, 0x6e, 0x28, 0xf2, 0xce, 0xc6, 0x76, 0x73, - 0xbd, 0x21, 0xa4, 0x42, 0x89, 0xfd, 0xd5, 0x74, 0xfe, 0x31, 0xe1, 0x34, 0xce, 0x1a, 0x4a, 0xd1, - 0x93, 0x9a, 0xf8, 0x23, 0x70, 0x82, 0x5f, 0xab, 0xb8, 0xc8, 0x53, 0x6e, 0xea, 0x0e, 0x59, 0x90, - 0x5d, 0x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 0xe1, 0xbd, 0x26, 0x21, 0x4f, 0x52, 0x99, 0xaf, 0xc2, 0xce, 0x01, 0xc1, 0xbd, - 0x59, 0x51, 0x9e, 0xa4, 0x32, 0xaa, 0x72, 0x1a, 0xa6, 0xd5, 0x4e, 0xc7, 0xc1, 0xe4, 0x9c, 0x88, - 0x9e, 0x6c, 0x4a, 0xbe, 0x98, 0x28, 0xce, 0x5f, 0x85, 0x3c, 0xb7, 0x03, 0xde, 0xec, 0xb1, 0x25, - 0x14, 0x9b, 0x1e, 0xd7, 0x93, 0x67, 0x0a, 0x72, 0xde, 0xe4, 0x95, 0x0f, 0x41, 0x51, 0x77, 0x95, - 0xe0, 0x31, 0x40, 0x72, 0x29, 0x79, 0x26, 0x2f, 0x4f, 0xea, 0xae, 0x7f, 0x85, 0x2a, 0x7d, 0x29, - 0x09, 0xa5, 0xe8, 0x63, 0x0c, 0xb1, 0x0e, 0x79, 0xc3, 0xd2, 0x54, 0xe2, 0x5a, 0xf4, 0x19, 0xda, - 0x99, 0x98, 0x27, 0x1f, 0xcb, 0x6b, 0x4c, 0x5f, 0xf6, 0x91, 0xf3, 0xff, 0x21, 0x01, 0x79, 0x2e, - 0x16, 0x8f, 0x43, 0xda, 0x56, 0xbd, 0x7d, 0x42, 0x97, 0xa9, 0x25, 0x85, 0x84, 0x4c, 0xca, 0x58, - 0xee, 0xda, 0xaa, 0x49, 0x5c, 0x80, 0xc9, 0x71, 0x19, 0xcf, 0xab, 0x81, 0xd4, 0x36, 0x39, 0x36, - 0x59, 0xdd, 0x2e, 0x32, 0x3d, 0x97, 0xcf, 0x2b, 0x93, 0xaf, 0x30, 0xb1, 0xf8, 0x04, 0xcc, 0x78, - 0x8e, 0xaa, 0x1b, 0x11, 0xdd, 0x34, 0xd1, 0x15, 0x78, 0x85, 0xaf, 0x5c, 0x81, 0x93, 0x9c, 0xb7, - 0x8d, 0x3c, 0x55, 0xdb, 0x47, 0xed, 0x00, 0x94, 0x25, 0xd7, 0x23, 0x27,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1b, 0x67, 0x02, 0xfb, 0x48, 0xef, 0xec, - 0x7b, 0x6c, 0x85, 0xb1, 0x92, 0xf8, 0x02, 0xa4, 0xb1, 0x43, 0xb0, 0xaf, 0x41, 0xe7, 0x07, 0x12, - 0x71, 0xff, 0x92, 0xa3, 0x96, 0xc7, 0x0d, 0x7f, 0xfc, 0xbf, 0x2d, 0x26, 0x64, 0x82, 0x10, 0x57, - 0x60, 0xca, 0x50, 0x5d, 0x4f, 0x21, 0x3b, 0x18, 0x6e, 0x3e, 0x43, 0x28, 0x4e, 0x0e, 0x1a, 0x84, - 0x19, 0x96, 0x75, 0x7d, 0x12, 0xa3, 0xa8, 0xa8, 0x2d, 0x9e, 0x01, 0x81, 0x90, 0x68, 0x56, 0xb7, - 0xab, 0x7b, 0x34, 0xb7, 0xca, 0x12, 0xbb, 0x97, 0xb0, 0x7c, 0x85, 0x88, 0x49, 0x86, 0x75, 0x0a, - 0x0a, 0xe4, 0xfb, 0x33, 0xa2, 0x42, 0xdf, 0x94, 0xce, 0x63, 0x01, 0xa9, 0x3c, 0x0d, 0xd3, 0x41, - 0x7c, 0xa4, 0x2a, 0x79, 0xca, 0x12, 0x88, 0x89, 0xe2, 0xd3, 0x30, 0x67, 0xa2, 0x5b, 0xe4, 0xdd, - 0xed, 0x88, 0x76, 0x81, 0x68, 0x8b, 0xb8, 0xee, 0x5a, 0x14, 0xf1, 0x28, 0x94, 0x34, 0x6e, 0x7c, - 0xaa, 0x0b, 0x44, 0x77, 0xca, 0x97, 0x12, 0xb5, 0x93, 0x90, 0x57, 0x6d, 0x9b, 0x2a, 0x4c, 0xb2, - 0xf8, 0x68, 0xdb, 0xa4, 0xea, 0x2c, 0xcc, 0x90, 0x31, 0x3a, 0xc8, 0xed, 0x19, 0x1e, 0x23, 0x29, - 0x12, 0x9d, 0x69, 0x5c, 0x21, 0x53, 0x39, 0xd1, 0x7d, 0x18, 0xa6, 0xd0, 0x0d, 0xbd, 0x8d, 0x4c, - 0x0d, 0x51,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cb, 0xe8, 0x00, 0xfb, 0x00, 0x53, 0xdd, 0x22, 0x9a, 0x38, 0x3b, 0x7d, 0x4d, 0xd5, 0x0d, - 0xfe, 0x03, 0x05, 0x32, 0x2b, 0x89, 0x15, 0xc8, 0xba, 0x9e, 0xea, 0xf5, 0x5c, 0xf6, 0xc3, 0x83, - 0xd2, 0x28, 0xa7, 0xab, 0x59, 0x66, 0xbb, 0x45, 0x34, 0x65, 0x86, 0x10, 0x2f, 0x43, 0xd6, 0xb3, - 0xae, 0x23, 0x93, 0x99, 0xf0, 0x48, 0x2b, 0xbd, 0x69, 0x7a, 0x32, 0x43, 0x63, 0x8b, 0xb4, 0x91, - 0x81, 0x3a, 0x34, 0xfb, 0xda, 0x57, 0xf1, 0x21, 0x85, 0xfc, 0xfe, 0x60, 0xad, 0x79, 0xe4, 0xe5, - 0xc8, 0x2c, 0xd5, 0xcf, 0x27, 0xc9, 0xd3, 0xbe, 0xa8, 0x45, 0x24, 0xe2, 0x56, 0xf4, 0x15, 0x04, - 0xfa, 0x23, 0x9d, 0x0f, 0x8f, 0x1a, 0x7e, 0xc8, 0xa7, 0xc3, 0x61, 0x30, 0xf2, 0xca, 0xc2, 0x65, - 0x10, 0x7a, 0xe6, 0xae, 0x65, 0x92, 0x4f, 0x89, 0xd9, 0x59, 0x00, 0x9f, 0x05, 0x53, 0x61, 0x0f, - 0xe9, 0xd7, 0x90, 0xe4, 0x69, 0x5f, 0x74, 0x85, 0x9e, 0x18, 0x74, 0x28, 0x05, 0x5a, 0x64, 0xc9, - 0x16, 0x62, 0x97, 0xec, 0x63, 0x6c, 0xc9, 0x1e, 0xeb, 0x6f, 0xa5, 0x6f, 0xd5, 0x4e, 0xf9, 0x35, - 0x18, 0x2b, 0xae, 0x03, 0x04, 0xd1, 0x82, 0x5c, 0x6c, 0x4c, 0x8e, 0x76, 0x81, 0x20, 0xee, 0x84, - 0x4d, 0x10, 0x22, 0x10, 0x7f, 0x02, 0x66, 0xbb, 0xba, 0xa9,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x15, 0xc8, 0xf1, 0xa6, 0xd2, 0xf7, 0x95, 0x90, 0x70, 0x78, 0x28, - 0x07, 0xfc, 0x64, 0x0a, 0x66, 0x64, 0xd4, 0xfe, 0xcb, 0xf9, 0xb8, 0x8f, 0xf9, 0x58, 0x07, 0xa0, - 0xab, 0x1f, 0x07, 0xdd, 0xfb, 0x98, 0x12, 0x1c, 0x3f, 0x0a, 0x94, 0xa1, 0xee, 0x7a, 0xa1, 0x49, - 0x79, 0x3b, 0x09, 0xc5, 0xf0, 0xa4, 0xfc, 0x7f, 0xba, 0x53, 0x89, 0x1b, 0x41, 0x60, 0x4a, 0xb3, - 0x9f, 0x29, 0x1e, 0x11, 0x98, 0x06, 0x5c, 0x78, 0x8c, 0x88, 0xf4, 0xe9, 0x0c, 0x64, 0xb7, 0x54, - 0x47, 0xed, 0xba, 0xe2, 0xfe, 0x40, 0x46, 0xca, 0xaf, 0x34, 0x07, 0x7e, 0x91, 0x9e, 0xdd, 0xa0, - 0xc4, 0x24, 0xa4, 0x9f, 0x19, 0x95, 0x90, 0xfe, 0x28, 0x94, 0xf0, 0x51, 0x3a, 0xf4, 0x6e, 0x04, - 0xb6, 0xfb, 0x54, 0xed, 0x64, 0x40, 0x15, 0xad, 0xa7, 0x27, 0xed, 0x6b, 0xe1, 0x97, 0x23, 0x26, - 0xb1, 0x46, 0x10, 0xb1, 0x31, 0xfc, 0x78, 0x70, 0x9a, 0x0d, 0x55, 0x4a, 0x32, 0x74, 0xd5, 0x5b, - 0x0d, 0x5a, 0x10, 0xd7, 0x40, 0xdc, 0xf7, 0xef, 0x57, 0x94, 0xc0, 0xb0, 0x18, 0xff, 0xe0, 0xbd, - 0xbb, 0x8b, 0x27, 0x29, 0x7e, 0x50, 0x47, 0x92, 0x67, 0x02, 0x21, 0x67, 0x7b, 0x0e, 0x00, 0x8f, - 0x4b, 0xa1, 0xef, 0xe5, 0xd1, 0x03, 0xd2, 0xb1, 0x7b, 0x77, 0x17, 0x67, 0x28, 0x4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 0x00, 0xff, 0xff, 0x3d, 0xfb, 0x65, 0x4a, 0x7d, 0x6a, - 0x00, 0x00, + // 10093 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7d, 0x74, 0x1c, 0xd7, + 0x75, 0x18, 0x8e, 0xd9, 0x0f, 0x60, 0xf7, 0xe2, 0x6b, 0xf1, 0x00, 0x52, 0xcb, 0x25, 0x09, 0x40, + 0xa3, 0x2f, 0x8a, 0x92, 0x40, 0x89, 0x12, 0x29, 0x69, 0x69, 0x4b, 0xde, 0x05, 0x96, 0x20, 0x28, + 0x7c, 0x69, 0x00, 0xd0, 0xb2, 0xe2, 0x9c, 0xfd, 0x0d, 0x76, 0x1f, 0x16, 0x23, 0xec, 0xce, 0x8c, + 0x66, 0x66, 0x49, 0x40, 0x8e, 0x7f, 0x95, 0xed, 0xd6, 0xb5, 0x99, 0xb4, 0xb5, 0xe3, 0x9c, 0xda, + 0x96, 0x4d, 0x57, 0x8e, 0xd3, 0xd8, 0x75, 0x93, 0x46, 0x8e, 0x5d, 0x37, 0x6e, 0xfa, 0x87, 0xdd, + 0x73, 0xd2, 0xd8, 0xfe, 0xa3, 0xc7, 0xee, 0x47, 0x9a, 0xe3, 0xa6, 0x74, 0x2a, 0xfb, 0xc4, 0xae, + 0xeb, 0x24, 0x0e, 0x2b, 0x9f, 0xa4, 0xc7, 0xa7, 0x3d, 0x3d, 0xef, 0x6b, 0xbe, 0x76, 0x17, 0xb3, + 0x0b, 0x91, 0xb2, 0xd3, 0xf4, 0x1f, 0x72, 0xdf, 0x7d, 0xf7, 0xde, 0x77, 0xdf, 0xbd, 0xf7, 0xdd, + 0x77, 0xdf, 0xd7, 0x00, 0x3e, 0x77, 0x0e, 0xa6, 0x6b, 0x86, 0x51, 0xab, 0xe3, 0x53, 0xa6, 0x65, + 0x38, 0xc6, 0x66, 0x73, 0xeb, 0x54, 0x15, 0xd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 0x22, 0x64, + 0x9c, 0xc5, 0x80, 0x8d, 0xad, 0xcb, 0x5a, 0x05, 0x67, 0xfb, 0x29, 0x83, 0x7b, 0x5a, 0x18, 0xac, + 0xb1, 0xfa, 0x30, 0x0f, 0x41, 0x87, 0x66, 0x21, 0x8d, 0x77, 0x1d, 0xac, 0xdb, 0x9a, 0xa1, 0x67, + 0x07, 0x28, 0x93, 0xbb, 0xda, 0x58, 0x11, 0xd7, 0xab, 0x61, 0x16, 0x1e, 0x1d, 0x3a, 0x0b, 0x03, + 0x86, 0xe9, 0x68, 0x86, 0x6e, 0x67, 0x53, 0xd3, 0xd2, 0x89, 0xc1, 0xd3, 0xc7, 0xda, 0x3a, 0xc2, + 0x0a, 0xc3, 0x51, 0x04, 0x32, 0x5a, 0x80, 0x8c, 0x6d, 0x34, 0xad, 0x0a, 0x2e, 0x57, 0x8c, 0x2a, + 0x2e, 0x6b, 0xfa, 0x96, 0x91, 0x4d, 0x53, 0x06, 0x53, 0xad, 0x1d, 0xa1, 0x88, 0xb3, 0x46, 0x15, + 0x2f, 0xe8, 0x5b, 0x86, 0x32, 0x62, 0x07, 0xca, 0xe8, 0x30, 0xf4, 0xdb, 0x7b, 0xba, 0xa3, 0xee, + 0x66, 0x87, 0xa8, 0x87, 0xf0, 0x92, 0xfc, 0xa5, 0x7e, 0x18, 0xed, 0xc6, 0xc5, 0xce, 0x41, 0x72, + 0x8b, 0xf4, 0x32, 0x1b, 0xeb, 0x45, 0x07, 0x8c, 0x26, 0xa8, 0xc4, 0xfe, 0x03, 0x2a, 0xb1, 0x00, + 0x83, 0x3a, 0xb6, 0x1d, 0x5c, 0x65, 0x1e, 0x11, 0xef, 0xd2, 0xa7, 0x80, 0x11, 0xb5, 0xba, 0x54, + 0xe2, 0x40, 0x2e, 0xf5, 0x0c, 0x8c, 0xba, 0x22, 0x95, 0x2d, 0x55, 0xaf, 0x09, 0xdf, 0x3c, 0x15, + 0x25, 0xc9, 0x4c, 0x49, 0xd0, 0x29,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9, 0x3c, 0xb7, 0xb2, 0x51, 0x5c, 0x2c, 0x65, 0x24, 0x34, 0x02, 0x40, 0x01, + 0xe7, 0x17, 0x57, 0x0a, 0xeb, 0x99, 0x98, 0x5b, 0x5e, 0x58, 0x5e, 0x3f, 0xfb, 0x48, 0x26, 0xee, + 0x12, 0x6c, 0x30, 0x40, 0xc2, 0x8f, 0xf0, 0xf0, 0xe9, 0x4c, 0x12, 0x65, 0x60, 0x88, 0x31, 0x58, + 0x78, 0xa6, 0x34, 0x77, 0xf6, 0x91, 0x4c, 0x7f, 0x10, 0xf2, 0xf0, 0xe9, 0xcc, 0x00, 0x1a, 0x86, + 0x34, 0x85, 0x14, 0x57, 0x56, 0x16, 0x33, 0x29, 0x97, 0xe7, 0xda, 0xba, 0xb2, 0xb0, 0x3c, 0x9f, + 0x49, 0xbb, 0x3c, 0xe7, 0x95, 0x95, 0x8d, 0xd5, 0x0c, 0xb8, 0x1c, 0x96, 0x4a, 0x6b, 0x6b, 0x85, + 0xf9, 0x52, 0x66, 0xd0, 0xc5, 0x28, 0xbe, 0x6d, 0xbd, 0xb4, 0x96, 0x19, 0x0a, 0x88, 0xf5, 0xf0, + 0xe9, 0xcc, 0xb0, 0xdb, 0x44, 0x69, 0x79, 0x63, 0x29, 0x33, 0x82, 0xc6, 0x60, 0x98, 0x35, 0x21, + 0x84, 0x18, 0x0d, 0x81, 0xce, 0x3e, 0x92, 0xc9, 0x78, 0x82, 0x30, 0x2e, 0x63, 0x01, 0xc0, 0xd9, + 0x47, 0x32, 0x48, 0x9e, 0x85, 0x24, 0x75, 0x43, 0x84, 0x60, 0x64, 0xb1, 0x50, 0x2c, 0x2d, 0x96, + 0x57, 0x56, 0xd7, 0x17, 0x56, 0x96, 0x0b, 0x8b, 0x19, 0xc9, 0x83, 0x29, 0xa5, 0xa7, 0x37, 0x16, + 0x94, 0xd2, 0x5c, 0x26, 0xe6, 0x87, 0xad, 0x96, 0x0a, 0xeb, 0xa5, 0xb9, 0x4c, 0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x50, 0x41, 0x27, 0x3b, 0xf4, 0xb4, 0xc5, 0x31, 0x1f, 0x84, 0x4c, 0xa5, + 0xae, 0x61, 0xdd, 0x29, 0xdb, 0x8e, 0x85, 0xd5, 0x86, 0xa6, 0xd7, 0xe8, 0x54, 0x93, 0xca, 0x27, + 0xb7, 0xd4, 0xba, 0x8d, 0x95, 0x51, 0x56, 0xbd, 0x26, 0x6a, 0x09, 0x05, 0x75, 0x20, 0xcb, 0x47, + 0xd1, 0x1f, 0xa0, 0x60, 0xd5, 0x2e, 0x85, 0xfc, 0xc1, 0x34, 0x0c, 0xfa, 0x12, 0x70, 0x74, 0x3b, + 0x0c, 0x3d, 0xa7, 0x5e, 0x56, 0xcb, 0x62, 0x51, 0xc5, 0x34, 0x31, 0x48, 0x60, 0xab, 0x7c, 0x61, + 0xf5, 0x20, 0x4c, 0x50, 0x14, 0xa3, 0xe9, 0x60, 0xab, 0x5c, 0xa9, 0xab, 0xb6, 0x4d, 0x95, 0x96, + 0xa2, 0xa8, 0x88, 0xd4, 0xad, 0x90, 0xaa, 0x59, 0x51, 0x83, 0xce, 0xc0, 0x38, 0xa5, 0x68, 0x34, + 0xeb, 0x8e, 0x66, 0xd6, 0x71, 0x99, 0x2c, 0xf3, 0x6c, 0x3a, 0xe5, 0xb8, 0x92, 0x8d, 0x11, 0x8c, + 0x25, 0x8e, 0x40, 0x24, 0xb2, 0xd1, 0x1c, 0x1c, 0xa7, 0x64, 0x35, 0xac, 0x63, 0x4b, 0x75, 0x70, + 0x19, 0x3f, 0xdf, 0x54, 0xeb, 0x76, 0x59, 0xd5, 0xab, 0xe5, 0x6d, 0xd5, 0xde, 0xce, 0x4e, 0x10, + 0x06, 0xc5, 0x58, 0x56, 0x52, 0x8e, 0x10, 0xc4, 0x79, 0x8e, 0x57, 0xa2, 0x68, 0x05, 0xbd, 0x7a, + 0x41, 0xb5, 0xb7, 0x51, 0x1e, 0x0e, 0x53, 0x2e, 0xb6, 0x63, 0x69, 0x7a, 0xad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, 0x58, 0x54, 0x38, 0x39, 0x3a, 0x02, 0x89, 0xba, 0xfa, 0xc2, 0x5e, 0x70, 0xd2, 0xa3, 0xa0, + 0x6e, 0x8d, 0x70, 0x04, 0x12, 0x57, 0xb0, 0xba, 0x13, 0x9c, 0x6a, 0x28, 0xe8, 0x16, 0x0e, 0x86, + 0x53, 0x90, 0xa4, 0xfa, 0x42, 0x00, 0x5c, 0x63, 0x99, 0x3e, 0x94, 0x82, 0xc4, 0xec, 0x8a, 0x42, + 0x06, 0x44, 0x06, 0x86, 0x18, 0xb4, 0xbc, 0xba, 0x50, 0x9a, 0x2d, 0x65, 0x62, 0xf2, 0x19, 0xe8, + 0x67, 0x4a, 0x20, 0x83, 0xc5, 0x55, 0x43, 0xa6, 0x8f, 0x17, 0x39, 0x0f, 0x49, 0xd4, 0x6e, 0x2c, + 0x15, 0x4b, 0x4a, 0x26, 0x16, 0x34, 0x75, 0x22, 0x93, 0x94, 0x6d, 0x18, 0xf2, 0xe7, 0xe1, 0x6f, + 0xcc, 0x62, 0xfc, 0xcb, 0x12, 0x0c, 0xfa, 0xf2, 0x6a, 0x92, 0x10, 0xa9, 0xf5, 0xba, 0x71, 0xa5, + 0xac, 0xd6, 0x35, 0xd5, 0xe6, 0xae, 0x01, 0x14, 0x54, 0x20, 0x90, 0x6e, 0x4d, 0xf7, 0x06, 0x0d, + 0x91, 0x64, 0xa6, 0x5f, 0xfe, 0x84, 0x04, 0x99, 0x70, 0x62, 0x1b, 0x12, 0x53, 0xfa, 0x69, 0x8a, + 0x29, 0x7f, 0x5c, 0x82, 0x91, 0x60, 0x36, 0x1b, 0x12, 0xef, 0xf6, 0x9f, 0xaa, 0x78, 0x7f, 0x1c, + 0x83, 0xe1, 0x40, 0x0e, 0xdb, 0xad, 0x74, 0xcf, 0xc3, 0x98, 0x56, 0xc5, 0x0d, 0xd3, 0x70, 0xb0, + 0x5e, 0xd9, 0x2b, 0xd7, 0xf1, 0x65, 0x5c, 0xcf, 0xca, 0x34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0xbd, 0x86, 0x94, 0x41, 0x06, 0x63, 0x28, 0xf7, 0xc0, 0xa8, 0x5a, 0xab, 0x59, 0x84, 0xb9, 0x60, + 0xc4, 0xd6, 0x25, 0x23, 0x2e, 0x98, 0x22, 0xe6, 0x2e, 0x42, 0x4a, 0xe8, 0x81, 0x4c, 0xd5, 0x44, + 0x13, 0x65, 0x93, 0x2d, 0xb6, 0x63, 0x27, 0xd2, 0x4a, 0x4a, 0x17, 0x95, 0xb7, 0xc3, 0x90, 0x66, + 0x97, 0xbd, 0x4d, 0xfc, 0xd8, 0x74, 0xec, 0x44, 0x4a, 0x19, 0xd4, 0x6c, 0x77, 0x03, 0x54, 0xfe, + 0x74, 0x0c, 0x46, 0x82, 0x87, 0x10, 0x68, 0x0e, 0x52, 0x75, 0xa3, 0xa2, 0x52, 0xd7, 0x62, 0x27, + 0x60, 0x27, 0x22, 0xce, 0x2d, 0x66, 0x16, 0x39, 0xbe, 0xe2, 0x52, 0xe6, 0xfe, 0xad, 0x04, 0x29, + 0x01, 0x46, 0x87, 0x21, 0x61, 0xaa, 0xce, 0x36, 0x65, 0x97, 0x2c, 0xc6, 0x32, 0x92, 0x42, 0xcb, + 0x04, 0x6e, 0x9b, 0xaa, 0x4e, 0x5d, 0x80, 0xc3, 0x49, 0x99, 0xd8, 0xb5, 0x8e, 0xd5, 0x2a, 0x5d, + 0xf4, 0x18, 0x8d, 0x06, 0xd6, 0x1d, 0x5b, 0xd8, 0x95, 0xc3, 0x67, 0x39, 0x18, 0xdd, 0x07, 0x63, + 0x8e, 0xa5, 0x6a, 0xf5, 0x00, 0x6e, 0x82, 0xe2, 0x66, 0x44, 0x85, 0x8b, 0x9c, 0x87, 0x23, 0x82, + 0x6f, 0x15, 0x3b, 0x6a, 0x65, 0x1b, 0x57, 0x3d, 0xa2, 0x7e, 0xba, 0xb9, 0x71, 0x1b, 0x47, 0x98, + 0xe3, 0xf5, 0x82, 0x56, 0xfe, 0xa6, 0x04, 0x63, 0x62, 0x99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 0x5c, 0x53, 0xac, 0x40, 0xa0, 0xec, 0xc9, 0x5f, 0x8c, 0x41, + 0x35, 0xf1, 0xda, 0xaf, 0x8e, 0xd5, 0x2d, 0xf6, 0x72, 0x22, 0x4e, 0x07, 0x54, 0x8a, 0x00, 0xe8, + 0x23, 0x89, 0x09, 0x48, 0xaa, 0x4d, 0x76, 0xe9, 0x27, 0x4e, 0x46, 0x1a, 0x2d, 0xc8, 0x4f, 0xc1, + 0x00, 0xbf, 0x7a, 0x80, 0x32, 0x10, 0xdf, 0xc1, 0x7b, 0xb4, 0x9d, 0x21, 0x85, 0xfc, 0x44, 0x33, + 0x90, 0xa4, 0xc2, 0xf3, 0x29, 0x26, 0x3b, 0xd3, 0x22, 0xfd, 0x0c, 0x15, 0x52, 0x61, 0x68, 0xf2, + 0x45, 0x48, 0xcd, 0x19, 0x64, 0x96, 0x0c, 0x72, 0x4b, 0x33, 0x6e, 0x54, 0x66, 0xb3, 0xc9, 0x93, + 0x14, 0x85, 0x15, 0xd0, 0x61, 0xe8, 0x67, 0x2f, 0x69, 0xf8, 0xc5, 0x25, 0x5e, 0x92, 0x67, 0x61, + 0x80, 0xf2, 0x5e, 0x31, 0x11, 0xe2, 0x6f, 0x30, 0xf9, 0x93, 0x1d, 0xba, 0x88, 0xe1, 0xec, 0x63, + 0x9e, 0xb0, 0x08, 0x12, 0x55, 0xd5, 0x51, 0x79, 0xbf, 0xe9, 0x6f, 0xf9, 0x09, 0x48, 0x71, 0x26, + 0x36, 0x3a, 0x0d, 0x71, 0xc3, 0xb4, 0xf9, 0xd5, 0xa3, 0x5c, 0xa7, 0xae, 0xac, 0x98, 0xc5, 0x04, + 0x49, 0x6f, 0x14, 0x82, 0x5c, 0x54, 0x3a, 0x06, 0xd5, 0xc7, 0x7c, 0x41, 0xd5, 0x67, 0x72, 0xdf, + 0x4f, 0x66, 0xd2, 0x16, 0x77, 0x70, 0x9d, 0xe5, 0x93, 0x31, 0x98, 0xf4, 0xd5, 0x5e, 0x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b, 0x0e, 0x92, 0x9b, 0xec, 0x15, 0x53, 0xa4, 0xe1, 0x0f, 0x7c, 0x7b, 0x4a, 0x52, 0x28, + 0x05, 0x9a, 0x85, 0xe1, 0xba, 0x6a, 0x3b, 0x65, 0x3a, 0x83, 0x91, 0xe6, 0x93, 0x7c, 0x45, 0xde, + 0xa2, 0x10, 0xae, 0x58, 0x2e, 0xfa, 0x20, 0xa1, 0x62, 0xa0, 0x2a, 0x3a, 0x01, 0x19, 0xca, 0xa4, + 0x62, 0x34, 0x1a, 0x9a, 0xc3, 0x72, 0xab, 0x7e, 0xaa, 0xf7, 0x11, 0x02, 0x9f, 0xa5, 0x60, 0x9a, + 0x61, 0x1d, 0x85, 0x34, 0x7d, 0xcc, 0x47, 0x51, 0xd8, 0xc5, 0xf5, 0x14, 0x01, 0xd0, 0xca, 0x7b, + 0x60, 0xd4, 0x8b, 0x8f, 0x0c, 0x25, 0xc5, 0xb8, 0x78, 0x60, 0x8a, 0xf8, 0x20, 0x4c, 0xe8, 0x78, + 0x97, 0x5e, 0xa5, 0x0f, 0x60, 0xa7, 0x29, 0x36, 0x22, 0x75, 0x97, 0x82, 0x14, 0x77, 0xc1, 0x48, + 0x45, 0x28, 0x9f, 0xe1, 0x02, 0xc5, 0x1d, 0x76, 0xa1, 0x14, 0xed, 0x08, 0xa4, 0x54, 0xd3, 0x64, + 0x08, 0x83, 0x3c, 0x3e, 0x9a, 0x26, 0xad, 0x3a, 0x09, 0x63, 0xb4, 0x8f, 0x16, 0xb6, 0x9b, 0x75, + 0x87, 0x33, 0x19, 0xa2, 0x38, 0xa3, 0xa4, 0x42, 0x61, 0x70, 0x8a, 0x7b, 0x07, 0x0c, 0xe3, 0xcb, + 0x5a, 0x15, 0xeb, 0x15, 0xcc, 0xf0, 0x86, 0x29, 0xde, 0x90, 0x00, 0x52, 0xa4, 0x7b, 0xc1, 0x8d, + 0x7b, 0x65, 0x11, 0x93, 0x47, 0x18, 0x3f, 0x01, 0x2f, 0x30, 0xb0, 0x9c, 0x85, 0xc4, 0x9c, 0xea, + 0xa8, 0x24, 0xc1, 0x70, 0x76, 0xd9, 0x44, 0x33, 0xa4, 0x90, 0x9f, 0xf2, 0xf7, 0x63, 0x90, 0xb8, + 0x64, 0x38, 0x18, 0x3d, 0xec, 0x4b, 0x00, 0x47, 0xda, 0xf9, 0xf3, 0x9a, 0x56, 0xd3, 0x71, 0x75, + 0xc9, 0xae, 0xf9, 0xbe, 0xbc, 0xe1, 0xb9, 0x53, 0x2c, 0xe0, 0x4e, 0x13, 0x90, 0xb4, 0x8c, 0xa6, + 0x5e, 0x15, 0x77, 0xbe, 0x69, 0x01, 0x95, 0x20, 0xe5, 0x7a, 0x49, 0x22, 0xca, 0x4b, 0x46, 0x89, + 0x97, 0x10, 0x1f, 0xe6, 0x00, 0x65, 0x60, 0x93, 0x3b, 0x4b, 0x11, 0xd2, 0x6e, 0xf0, 0xe2, 0xde, + 0xd6, 0x9d, 0xc3, 0x7a, 0x64, 0x64, 0x32, 0x71, 0x6d, 0xef, 0x2a, 0x8f, 0x79, 0x5c, 0xc6, 0xad, + 0xe0, 0xda, 0x0b, 0xb8, 0x15, 0xff, 0x0a, 0xc8, 0x00, 0xed, 0x97, 0xe7, 0x56, 0xec, 0x4b, 0x20, + 0xc7, 0x20, 0x6d, 0x6b, 0x35, 0x5d, 0x75, 0x9a, 0x16, 0xe6, 0x9e, 0xe7, 0x01, 0xe4, 0x2f, 0x4b, + 0xd0, 0xcf, 0x3c, 0xd9, 0xa7, 0x37, 0xa9, 0xbd, 0xde, 0x62, 0x9d, 0xf4, 0x16, 0x3f, 0xb8, 0xde, + 0x0a, 0x00, 0xae, 0x30, 0x36, 0xff, 0x38, 0x43, 0x9b, 0x8c, 0x81, 0x89, 0xb8, 0xa6, 0xd5, 0xf8, + 0x40, 0xf5, 0x11, 0xc9, 0xff, 0x45, 0x22, 0x49, 0x2c, 0xaf, 0x47, 0x05, 0x18, 0x16, 0x72, 0x95, + 0xb7, 0xea, 0x6a, 0x8d, 0xfb, 0xce, 0xf1, 0x8e, 0xc2, 0x9d, 0xaf, 0xab, 0x35, 0x65, 0x90, 0xcb, + 0x43, 0x0a, 0xed, 0xed, 0x10, 0xeb, 0x60, 0x87, 0x80, 0xe1, 0xe3, 0x07, 0x33, 0x7c, 0xc0, 0x44, + 0x89, 0xb0, 0x89, 0x3e, 0x1f, 0xa3, 0x8b, 0x19, 0xd3, 0xb0, 0xd5, 0xfa, 0x1b, 0x31, 0x22, 0x8e, + 0x42, 0xda, 0x34, 0xea, 0x65, 0x56, 0xc3, 0xde, 0x42, 0xa4, 0x4c, 0xa3, 0xae, 0xb4, 0x98, 0x3d, + 0x79, 0x93, 0x86, 0x4b, 0xff, 0x4d, 0xd0, 0xda, 0x40, 0x58, 0x6b, 0x16, 0x0c, 0x31, 0x55, 0xf0, + 0xb9, 0xec, 0x41, 0xa2, 0x03, 0x3a, 0x39, 0x4a, 0xad, 0x73, 0x2f, 0x13, 0x9b, 0x61, 0x2a, 0x1c, + 0x8f, 0x50, 0xb0, 0xd0, 0xdf, 0x6e, 0x15, 0xec, 0x77, 0x4b, 0x85, 0xe3, 0xc9, 0xff, 0x50, 0x02, + 0x58, 0x24, 0x9a, 0xa5, 0xfd, 0x25, 0xb3, 0x90, 0x4d, 0x45, 0x28, 0x07, 0x5a, 0x9e, 0xec, 0x64, + 0x34, 0xde, 0xfe, 0x90, 0xed, 0x97, 0x7b, 0x16, 0x86, 0x3d, 0x67, 0xb4, 0xb1, 0x10, 0x66, 0x72, + 0x9f, 0xac, 0x7a, 0x0d, 0x3b, 0xca, 0xd0, 0x65, 0x5f, 0x49, 0xfe, 0xd7, 0x12, 0xa4, 0xa9, 0x4c, + 0x4b, 0xd8, 0x51, 0x03, 0x36, 0x94, 0x0e, 0x6e, 0xc3, 0xe3, 0x00, 0x8c, 0x8d, 0xad, 0xbd, 0x80, + 0xb9, 0x67, 0xa5, 0x29, 0x64, 0x4d, 0x7b, 0x01, 0xa3, 0xb3, 0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, 0x00, 0x2b, 0x42, 0xc2, 0x52, 0x1d, 0xbe, 0xa3, 0x58, 0x9c, 0xe1, 0xe7, 0x99, 0x77, + 0x77, 0x71, 0x14, 0x37, 0x87, 0x2b, 0x0a, 0xa5, 0x45, 0x6f, 0x87, 0x54, 0x43, 0xdd, 0x2d, 0x53, + 0x3e, 0x6c, 0x59, 0x53, 0xe8, 0x8d, 0xcf, 0x8d, 0xeb, 0x53, 0xa3, 0x7b, 0x6a, 0xa3, 0x9e, 0x97, + 0x05, 0x1f, 0x59, 0x19, 0x68, 0xa8, 0xbb, 0x44, 0x44, 0x64, 0xc2, 0x28, 0x81, 0x56, 0xb6, 0x55, + 0xbd, 0x86, 0x59, 0x23, 0x74, 0x7f, 0xb4, 0x78, 0xa1, 0xe7, 0x46, 0x0e, 0x7b, 0x8d, 0xf8, 0xd8, + 0xc9, 0xca, 0x70, 0x43, 0xdd, 0x9d, 0xa5, 0x00, 0xd2, 0x62, 0x3e, 0xf5, 0x91, 0x97, 0xa7, 0xfa, + 0xe8, 0x19, 0xf1, 0x7f, 0x96, 0x00, 0x3c, 0x8d, 0x21, 0x15, 0x32, 0x15, 0xb7, 0x44, 0x69, 0xc5, + 0xd1, 0xe6, 0x3d, 0x9d, 0x0c, 0x12, 0xd2, 0x77, 0x71, 0x98, 0x08, 0xfd, 0x8d, 0xeb, 0x53, 0x12, + 0x33, 0xcd, 0x68, 0x25, 0x64, 0x8f, 0xff, 0x0f, 0x06, 0x9b, 0x66, 0x55, 0x75, 0x70, 0x99, 0xae, + 0xf4, 0x62, 0x91, 0x99, 0xc0, 0x1d, 0x84, 0xe1, 0x8d, 0xeb, 0x53, 0x88, 0xf5, 0xcd, 0x47, 0x2c, + 0x93, 0xfc, 0x80, 0x35, 0x03, 0x0c, 0x4c, 0xa8, 0x7c, 0xbd, 0xfb, 0x9a, 0x04, 0x83, 0x73, 0xbe, + 0x4b, 0xba, 0x59, 0x18, 0x68, 0x18, 0xba, 0xb6, 0xc3, 0x7d,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7f, 0x36, 0x9d, 0x8d, 0xc4, 0x78, 0x1e, 0x91, 0xe3, 0x07, + 0xca, 0xe6, 0x38, 0x75, 0x48, 0xa9, 0x1f, 0x88, 0xc1, 0xf8, 0x86, 0x08, 0x44, 0x3f, 0xf3, 0x3a, + 0xd8, 0x80, 0x01, 0xac, 0x3b, 0x96, 0x46, 0x95, 0x40, 0x4c, 0xfe, 0x60, 0x27, 0x93, 0xb7, 0xe9, + 0x13, 0xfd, 0x5c, 0x99, 0xdf, 0x01, 0x04, 0xaf, 0x90, 0x4a, 0x7e, 0x25, 0x0e, 0xd9, 0x4e, 0xe4, + 0x68, 0x16, 0x46, 0x2b, 0x16, 0x66, 0xf7, 0xbb, 0xfc, 0xdb, 0x87, 0xc5, 0x9c, 0x97, 0x81, 0x86, + 0x10, 0x64, 0x65, 0x44, 0x40, 0xf8, 0xb4, 0x52, 0x07, 0x92, 0x19, 0x12, 0xdf, 0xa3, 0xd7, 0xc4, + 0xba, 0x4b, 0x05, 0xef, 0xe1, 0xf3, 0x8a, 0x68, 0x24, 0xc8, 0xc0, 0x37, 0xb1, 0x8c, 0x78, 0x55, + 0x74, 0x66, 0x79, 0x1e, 0x46, 0x35, 0x5d, 0x73, 0x34, 0xb5, 0x5e, 0xde, 0x54, 0xeb, 0xaa, 0x5e, + 0x39, 0x48, 0x8a, 0xcd, 0xa6, 0x01, 0xde, 0x76, 0x88, 0x9d, 0xac, 0x8c, 0x70, 0x48, 0x91, 0x01, + 0xd0, 0x05, 0x18, 0x10, 0x4d, 0x25, 0x0e, 0x94, 0x90, 0x08, 0x72, 0x5f, 0x0e, 0xf8, 0xcb, 0x71, + 0x18, 0x53, 0x70, 0xf5, 0xff, 0xd9, 0xe3, 0x00, 0xf6, 0x58, 0x02, 0x60, 0xa3, 0x9f, 0x04, 0xdd, + 0x03, 0x98, 0x84, 0xc4, 0x8f, 0x34, 0xe3, 0x30, 0x67, 0x3b, 0x3e, 0xa3, 0x7c, 0x27, 0x06, 0x43, + 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5a, 0xa2, 0x98, 0x63, 0x14, + 0x6d, 0x8e, 0x62, 0x89, 0xbf, 0x32, 0x53, 0x12, 0x38, 0xf2, 0xb7, 0x62, 0x90, 0x12, 0xac, 0xe9, + 0x5b, 0x00, 0x5c, 0xc7, 0x15, 0xc7, 0x10, 0x87, 0x5e, 0x6e, 0x19, 0x21, 0x88, 0xd7, 0xb8, 0xf1, + 0xd2, 0x17, 0xfa, 0x14, 0x52, 0x20, 0x30, 0xf7, 0x85, 0x06, 0x81, 0x99, 0x4d, 0x62, 0xcf, 0x84, + 0x69, 0x88, 0x55, 0xf3, 0x85, 0x3e, 0x85, 0x96, 0x50, 0x16, 0xfa, 0xc9, 0xa0, 0x71, 0x98, 0xb5, + 0x08, 0x9c, 0x97, 0xd1, 0x61, 0x48, 0x9a, 0xaa, 0x53, 0x61, 0x97, 0x27, 0x49, 0x05, 0x2b, 0xa2, + 0x47, 0xa1, 0x9f, 0x7d, 0x8e, 0x21, 0xfc, 0x47, 0xa8, 0x88, 0x32, 0xd8, 0x77, 0x2f, 0x89, 0xdc, + 0xab, 0xaa, 0xe3, 0x60, 0x4b, 0x27, 0x0c, 0x19, 0x3a, 0x42, 0x90, 0xd8, 0x34, 0xaa, 0x7b, 0xfc, + 0x0f, 0x63, 0xd1, 0xdf, 0xfc, 0x2f, 0xf1, 0x50, 0x7f, 0x28, 0xd3, 0x4a, 0xf6, 0xf7, 0x00, 0x87, + 0x04, 0xb0, 0x48, 0x90, 0x4a, 0x30, 0xae, 0x56, 0xab, 0x1a, 0xfb, 0x1b, 0x55, 0xe5, 0x4d, 0x8d, + 0x46, 0x10, 0x9b, 0xfe, 0xb5, 0xc7, 0x4e, 0xb6, 0x40, 0x1e, 0x41, 0x91, 0xe3, 0x17, 0xd3, 0x30, + 0x60, 0x32, 0xa1, 0xe4, 0x73, 0x30, 0xd6, 0x22, 0x29, 0x91, 0x6f, 0x47, 0xd3, 0xab, 0xe2, 0xd9, + 0x0a, 0xf9, 0x4d, 0x60,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3, 0xac, 0x86, 0x76, 0x60, 0x38, 0x38, 0xa3, + 0x9d, 0xd8, 0x87, 0x49, 0x00, 0x33, 0xf7, 0x60, 0xb7, 0x98, 0x6e, 0x63, 0x6f, 0x87, 0x94, 0x1b, + 0x67, 0xef, 0xd8, 0x87, 0x5a, 0x20, 0x75, 0xce, 0xdc, 0xdb, 0x44, 0x2a, 0xa2, 0xbd, 0x70, 0x94, + 0xda, 0x4f, 0x7b, 0x21, 0xdc, 0x7d, 0xb5, 0xd7, 0x69, 0x18, 0x6e, 0x02, 0xf8, 0x86, 0xcb, 0x5d, + 0xfb, 0x70, 0xf0, 0xd0, 0x72, 0x0f, 0x74, 0x85, 0xe6, 0x9e, 0xb4, 0xdd, 0xe4, 0x85, 0xc6, 0xff, + 0x09, 0x00, 0x00, 0xff, 0xff, 0x17, 0xa4, 0x82, 0xf6, 0x01, 0x9d, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) @@ -1771,7 +1911,7 @@ func StakingDescription() (desc *github_com_cosmos_gogoproto_protoc_gen_gogo_des if err != nil { panic(err) } - if err := github_com_cosmos_gogoproto_proto.Unmarshal(ungzipped, d); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { panic(err) } return d @@ -2151,7 +2291,7 @@ func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UpdateTime):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) if err2 != nil { return 0, err2 } @@ -2270,7 +2410,7 @@ func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x52 - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnbondingTime):]) + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) if err5 != nil { return 0, err5 } @@ -2675,7 +2815,7 @@ func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error } i-- dAtA[i] = 0x1a - n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) if err8 != nil { return 0, err8 } @@ -2731,7 +2871,7 @@ func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) if err9 != nil { return 0, err9 } @@ -2867,7 +3007,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - n10, err10 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingTime):]) + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) if err10 != nil { return 0, err10 } @@ -3105,7 +3245,7 @@ func (m *Commission) Size() (n int) { _ = l l = m.CommissionRates.Size() n += 1 + l + sovStaking(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UpdateTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) n += 1 + l + sovStaking(uint64(l)) return n } @@ -3168,7 +3308,7 @@ func (m *Validator) Size() (n int) { if m.UnbondingHeight != 0 { n += 1 + sovStaking(uint64(m.UnbondingHeight)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.UnbondingTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) n += 1 + l + sovStaking(uint64(l)) l = m.Commission.Size() n += 1 + l + sovStaking(uint64(l)) @@ -3311,7 +3451,7 @@ func (m *UnbondingDelegationEntry) Size() (n int) { if m.CreationHeight != 0 { n += 1 + sovStaking(uint64(m.CreationHeight)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovStaking(uint64(l)) l = m.InitialBalance.Size() n += 1 + l + sovStaking(uint64(l)) @@ -3329,7 +3469,7 @@ func (m *RedelegationEntry) Size() (n int) { if m.CreationHeight != 0 { n += 1 + sovStaking(uint64(m.CreationHeight)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovStaking(uint64(l)) l = m.InitialBalance.Size() n += 1 + l + sovStaking(uint64(l)) @@ -3371,7 +3511,7 @@ func (m *Params) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingTime) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) n += 1 + l + sovStaking(uint64(l)) if m.MaxValidators != 0 { n += 1 + sovStaking(uint64(m.MaxValidators)) @@ -3833,7 +3973,7 @@ func (m *Commission) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4353,7 +4493,7 @@ func (m *Validator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5328,7 +5468,7 @@ func (m *UnbondingDelegationEntry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5498,7 +5638,7 @@ func (m *RedelegationEntry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5829,7 +5969,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index ad97a8aa25f9..b5c79c985ec7 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -6,15 +6,15 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -1111,7 +1111,7 @@ func (m *MsgBeginRedelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) if err8 != nil { return 0, err8 } @@ -1189,7 +1189,7 @@ func (m *MsgUndelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime):]) + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) if err10 != nil { return 0, err10 } @@ -1338,7 +1338,7 @@ func (m *MsgBeginRedelegateResponse) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovTx(uint64(l)) return n } @@ -1368,7 +1368,7 @@ func (m *MsgUndelegateResponse) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CompletionTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) n += 1 + l + sovTx(uint64(l)) return n } @@ -2383,7 +2383,7 @@ func (m *MsgBeginRedelegateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2613,7 +2613,7 @@ func (m *MsgUndelegateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index 9137b4a5aee0..d79e402c099e 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -6,8 +6,8 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/upgrade/types/query.pb.gw.go b/x/upgrade/types/query.pb.gw.go index 951ddc24b5c0..ab64b67348a6 100644 --- a/x/upgrade/types/query.pb.gw.go +++ b/x/upgrade/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_CurrentPlan_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCurrentPlanRequest @@ -198,14 +196,12 @@ func local_request_Query_ModuleVersions_0(ctx context.Context, marshaler runtime // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_CurrentPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -213,7 +209,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CurrentPlan_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -227,8 +222,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AppliedPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -236,7 +229,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AppliedPlan_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -250,8 +242,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_UpgradedConsensusState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -259,7 +249,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_UpgradedConsensusState_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -273,8 +262,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ModuleVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -282,7 +269,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ModuleVersions_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/upgrade/types/upgrade.pb.go b/x/upgrade/types/upgrade.pb.go index f56323017b6c..5bcc20fa687c 100644 --- a/x/upgrade/types/upgrade.pb.go +++ b/x/upgrade/types/upgrade.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -421,7 +421,7 @@ func (m *Plan) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err2 != nil { return 0, err2 } @@ -579,7 +579,7 @@ func (m *Plan) Size() (n int) { if l > 0 { n += 1 + l + sovUpgrade(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovUpgrade(uint64(l)) if m.Height != 0 { n += 1 + sovUpgrade(uint64(m.Height)) @@ -743,7 +743,7 @@ func (m *Plan) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex