feat: Add MsgSoftwareUpgrade and MsgCancelUpgrade (for new msgs-based gov proposals) (#11116)
This commit is contained in:
@@ -26,7 +26,6 @@ const (
|
||||
FlagDescription = "description"
|
||||
// Deprecated: only used for v1beta1 legacy proposals.
|
||||
FlagProposalType = "type"
|
||||
// Deprecated: only used for v1beta1 legacy proposals.
|
||||
FlagDeposit = "deposit"
|
||||
flagVoter = "voter"
|
||||
flagDepositor = "depositor"
|
||||
@@ -51,7 +50,7 @@ var ProposalFlags = []string{
|
||||
// it contains a slice of "proposal" child commands. These commands are respective
|
||||
// to proposal type handlers that are implemented in other modules but are mounted
|
||||
// under the governance CLI (eg. parameter change proposals).
|
||||
func NewTxCmd(propCmds []*cobra.Command) *cobra.Command {
|
||||
func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command {
|
||||
govTxCmd := &cobra.Command{
|
||||
Use: types.ModuleName,
|
||||
Short: "Governance transactions subcommands",
|
||||
@@ -61,7 +60,7 @@ func NewTxCmd(propCmds []*cobra.Command) *cobra.Command {
|
||||
}
|
||||
|
||||
cmdSubmitLegacyProp := NewCmdSubmitLegacyProposal()
|
||||
for _, propCmd := range propCmds {
|
||||
for _, propCmd := range legacyPropCmds {
|
||||
flags.AddTxFlagsToCmd(propCmd)
|
||||
cmdSubmitLegacyProp.AddCommand(propCmd)
|
||||
}
|
||||
@@ -71,6 +70,8 @@ func NewTxCmd(propCmds []*cobra.Command) *cobra.Command {
|
||||
NewCmdVote(),
|
||||
NewCmdWeightedVote(),
|
||||
NewCmdSubmitProposal(),
|
||||
|
||||
// Deprecated
|
||||
cmdSubmitLegacyProp,
|
||||
)
|
||||
|
||||
|
||||
+13
-8
@@ -36,14 +36,14 @@ var (
|
||||
|
||||
// AppModuleBasic defines the basic application module used by the gov module.
|
||||
type AppModuleBasic struct {
|
||||
cdc codec.Codec
|
||||
proposalHandlers []govclient.ProposalHandler // proposal handlers which live in governance cli and rest
|
||||
cdc codec.Codec
|
||||
legacyProposalHandlers []govclient.ProposalHandler // legacy proposal handlers which live in governance cli and rest
|
||||
}
|
||||
|
||||
// NewAppModuleBasic creates a new AppModuleBasic object
|
||||
func NewAppModuleBasic(proposalHandlers ...govclient.ProposalHandler) AppModuleBasic {
|
||||
func NewAppModuleBasic(legacyProposalHandlers []govclient.ProposalHandler) AppModuleBasic {
|
||||
return AppModuleBasic{
|
||||
proposalHandlers: proposalHandlers,
|
||||
legacyProposalHandlers: legacyProposalHandlers,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,12 +91,17 @@ func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux
|
||||
|
||||
// GetTxCmd returns the root tx command for the gov module.
|
||||
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
|
||||
proposalCLIHandlers := make([]*cobra.Command, 0, len(a.proposalHandlers))
|
||||
for _, proposalHandler := range a.proposalHandlers {
|
||||
legacyProposalCLIHandlers := getProposalCLIHandlers(a.legacyProposalHandlers)
|
||||
|
||||
return cli.NewTxCmd(legacyProposalCLIHandlers)
|
||||
}
|
||||
|
||||
func getProposalCLIHandlers(handlers []govclient.ProposalHandler) []*cobra.Command {
|
||||
proposalCLIHandlers := make([]*cobra.Command, 0, len(handlers))
|
||||
for _, proposalHandler := range handlers {
|
||||
proposalCLIHandlers = append(proposalCLIHandlers, proposalHandler.CLIHandler())
|
||||
}
|
||||
|
||||
return cli.NewTxCmd(proposalCLIHandlers)
|
||||
return proposalCLIHandlers
|
||||
}
|
||||
|
||||
// GetQueryCmd returns the root query command for the gov module.
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
|
||||
gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func parseArgsToContent(cmd *cobra.Command, name string) (gov.Content, error) {
|
||||
title, err := cmd.Flags().GetString(cli.FlagTitle)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
description, err := cmd.Flags().GetString(cli.FlagDescription)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
height, err := cmd.Flags().GetInt64(FlagUpgradeHeight)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info, err := cmd.Flags().GetString(FlagUpgradeInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
plan := types.Plan{Name: name, Height: height, Info: info}
|
||||
content := types.NewSoftwareUpgradeProposal(title, description, plan)
|
||||
return content, nil
|
||||
}
|
||||
+16
-38
@@ -10,16 +10,18 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
|
||||
gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/plan"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// Deprecated: only used for v1beta1 legacy proposals.
|
||||
FlagUpgradeHeight = "upgrade-height"
|
||||
FlagUpgradeInfo = "upgrade-info"
|
||||
FlagNoValidate = "no-validate"
|
||||
FlagDaemonName = "daemon-name"
|
||||
// Deprecated: only used for v1beta1 legacy proposals.
|
||||
FlagUpgradeInfo = "upgrade-info"
|
||||
FlagNoValidate = "no-validate"
|
||||
FlagDaemonName = "daemon-name"
|
||||
)
|
||||
|
||||
// GetTxCmd returns the transaction commands for this module
|
||||
@@ -32,10 +34,11 @@ func GetTxCmd() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// NewCmdSubmitUpgradeProposal implements a command handler for submitting a software upgrade proposal transaction.
|
||||
func NewCmdSubmitUpgradeProposal() *cobra.Command {
|
||||
// NewCmdSubmitLegacyUpgradeProposal implements a command handler for submitting a software upgrade proposal transaction.
|
||||
// Deprecated: please use NewCmdSubmitUpgradeProposal instead.
|
||||
func NewCmdSubmitLegacyUpgradeProposal() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]",
|
||||
Use: "legacy-software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Short: "Submit a software upgrade proposal",
|
||||
Long: "Submit a software upgrade along with an initial deposit.\n" +
|
||||
@@ -81,7 +84,7 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
msg, err := gov.NewMsgSubmitProposal(content, deposit, from)
|
||||
msg, err := v1beta1.NewMsgSubmitProposal(content, deposit, from)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -101,10 +104,11 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// NewCmdSubmitCancelUpgradeProposal implements a command handler for submitting a software upgrade cancel proposal transaction.
|
||||
func NewCmdSubmitCancelUpgradeProposal() *cobra.Command {
|
||||
// NewCmdSubmitLegacyCancelUpgradeProposal implements a command handler for submitting a software upgrade cancel proposal transaction.
|
||||
// Deprecated: please use NewCmdSubmitCancelUpgradeProposal instead.
|
||||
func NewCmdSubmitLegacyCancelUpgradeProposal() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "cancel-software-upgrade [flags]",
|
||||
Use: "legacy-cancel-software-upgrade [flags]",
|
||||
Args: cobra.ExactArgs(0),
|
||||
Short: "Cancel the current software upgrade proposal",
|
||||
Long: "Cancel a software upgrade along with an initial deposit.",
|
||||
@@ -137,7 +141,7 @@ func NewCmdSubmitCancelUpgradeProposal() *cobra.Command {
|
||||
|
||||
content := types.NewCancelSoftwareUpgradeProposal(title, description)
|
||||
|
||||
msg, err := gov.NewMsgSubmitProposal(content, deposit, from)
|
||||
msg, err := v1beta1.NewMsgSubmitProposal(content, deposit, from)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -155,32 +159,6 @@ func NewCmdSubmitCancelUpgradeProposal() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func parseArgsToContent(cmd *cobra.Command, name string) (gov.Content, error) {
|
||||
title, err := cmd.Flags().GetString(cli.FlagTitle)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
description, err := cmd.Flags().GetString(cli.FlagDescription)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
height, err := cmd.Flags().GetInt64(FlagUpgradeHeight)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info, err := cmd.Flags().GetString(FlagUpgradeInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
plan := types.Plan{Name: name, Height: height, Info: info}
|
||||
content := types.NewSoftwareUpgradeProposal(title, description, plan)
|
||||
return content, nil
|
||||
}
|
||||
|
||||
// getDefaultDaemonName gets the default name to use for the daemon.
|
||||
// If a DAEMON_NAME env var is set, that is used.
|
||||
// Otherwise, the last part of the currently running executable is used.
|
||||
|
||||
@@ -5,5 +5,5 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/client/cli"
|
||||
)
|
||||
|
||||
var ProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal)
|
||||
var CancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitCancelUpgradeProposal)
|
||||
var LegacyProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyUpgradeProposal)
|
||||
var LegacyCancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyCancelUpgradeProposal)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
|
||||
package testutil
|
||||
|
||||
@@ -70,3 +70,8 @@ func (k Keeper) ModuleVersions(c context.Context, req *types.QueryModuleVersions
|
||||
ModuleVersions: mv,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Authority implementsthe the Query/Authority gRPC method, returning the account capable of performing upgrades
|
||||
func (k Keeper) Authority(c context.Context, req *types.QueryAuthorityRequest) (*types.QueryAuthorityResponse, error) {
|
||||
return &types.QueryAuthorityResponse{Address: k.authority}, nil
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
@@ -203,6 +205,12 @@ func (suite *UpgradeTestSuite) TestModuleVersions() {
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *UpgradeTestSuite) TestAuthority() {
|
||||
res, err := suite.queryClient.Authority(gocontext.Background(), &types.QueryAuthorityRequest{})
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(authtypes.NewModuleAddress(govtypes.ModuleName).String(), res.Address)
|
||||
}
|
||||
|
||||
func TestUpgradeTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(UpgradeTestSuite))
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ type Keeper struct {
|
||||
upgradeHandlers map[string]types.UpgradeHandler // map of plan name to upgrade handler
|
||||
versionSetter xp.ProtocolVersionSetter // implements setting the protocol version field on BaseApp
|
||||
downgradeVerified bool // tells if we've already sanity checked that this binary version isn't being used against an old state.
|
||||
authority string // the address capable of executing and cancelling an upgrade. Usually the gov module account
|
||||
}
|
||||
|
||||
// NewKeeper constructs an upgrade Keeper which requires the following arguments:
|
||||
@@ -44,7 +45,7 @@ type Keeper struct {
|
||||
// cdc - the app-wide binary codec
|
||||
// homePath - root directory of the application's config
|
||||
// vs - the interface implemented by baseapp which allows setting baseapp's protocol version field
|
||||
func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, homePath string, vs xp.ProtocolVersionSetter) Keeper {
|
||||
func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, homePath string, vs xp.ProtocolVersionSetter, authority string) Keeper {
|
||||
return Keeper{
|
||||
homePath: homePath,
|
||||
skipUpgradeHeights: skipUpgradeHeights,
|
||||
@@ -52,6 +53,7 @@ func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey,
|
||||
cdc: cdc,
|
||||
upgradeHandlers: map[string]types.UpgradeHandler{},
|
||||
versionSetter: vs,
|
||||
authority: authority,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
@@ -21,6 +23,8 @@ type KeeperTestSuite struct {
|
||||
homeDir string
|
||||
app *simapp.SimApp
|
||||
ctx sdk.Context
|
||||
msgSrvr types.MsgServer
|
||||
addrs []sdk.AccAddress
|
||||
}
|
||||
|
||||
func (s *KeeperTestSuite) SetupTest() {
|
||||
@@ -28,6 +32,7 @@ func (s *KeeperTestSuite) SetupTest() {
|
||||
homeDir := filepath.Join(s.T().TempDir(), "x_upgrade_keeper_test")
|
||||
app.UpgradeKeeper = keeper.NewKeeper( // recreate keeper in order to use a custom home path
|
||||
make(map[int64]bool), app.GetKey(types.StoreKey), app.AppCodec(), homeDir, app.BaseApp,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
s.T().Log("home dir:", homeDir)
|
||||
s.homeDir = homeDir
|
||||
@@ -36,6 +41,8 @@ func (s *KeeperTestSuite) SetupTest() {
|
||||
Time: time.Now(),
|
||||
Height: 10,
|
||||
})
|
||||
s.msgSrvr = keeper.NewMsgServerImpl(s.app.UpgradeKeeper)
|
||||
s.addrs = simapp.AddTestAddrsIncremental(app, s.ctx, 1, sdk.NewInt(30000000))
|
||||
}
|
||||
|
||||
func (s *KeeperTestSuite) TestReadUpgradeInfoFromDisk() {
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/errors"
|
||||
gov "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
type msgServer struct {
|
||||
Keeper
|
||||
}
|
||||
|
||||
// NewMsgServerImpl returns an implementation of the upgrade MsgServer interface
|
||||
// for the provided Keeper.
|
||||
func NewMsgServerImpl(k Keeper) types.MsgServer {
|
||||
return &msgServer{
|
||||
Keeper: k,
|
||||
}
|
||||
}
|
||||
|
||||
var _ types.MsgServer = msgServer{}
|
||||
|
||||
// SoftwareUpgrade implements the Msg/SoftwareUpgrade Msg service.
|
||||
func (k msgServer) SoftwareUpgrade(goCtx context.Context, req *types.MsgSoftwareUpgrade) (*types.MsgSoftwareUpgradeResponse, error) {
|
||||
if k.authority != req.Authority {
|
||||
return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, req.Authority)
|
||||
}
|
||||
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
err := k.ScheduleUpgrade(ctx, req.Plan)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &types.MsgSoftwareUpgradeResponse{}, nil
|
||||
}
|
||||
|
||||
// CancelUpgrade implements the Msg/CancelUpgrade Msg service.
|
||||
func (k msgServer) CancelUpgrade(goCtx context.Context, req *types.MsgCancelUpgrade) (*types.MsgCancelUpgradeResponse, error) {
|
||||
if k.authority != req.Authority {
|
||||
return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, req.Authority)
|
||||
}
|
||||
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
k.ClearUpgradePlan(ctx)
|
||||
|
||||
return &types.MsgCancelUpgradeResponse{}, nil
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
func (s *KeeperTestSuite) TestSoftwareUpgrade() {
|
||||
govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String()
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
req *types.MsgSoftwareUpgrade
|
||||
expectErr bool
|
||||
errMsg string
|
||||
}{
|
||||
{
|
||||
"unauthorized authority address",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: s.addrs[0].String(),
|
||||
Plan: types.Plan{
|
||||
Name: "all-good",
|
||||
Info: "some text here",
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
true,
|
||||
"expected gov account as only signer for proposal message",
|
||||
},
|
||||
{
|
||||
"invalid plan",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: govAccAddr,
|
||||
Plan: types.Plan{
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
true,
|
||||
"name cannot be empty: invalid request",
|
||||
},
|
||||
{
|
||||
"successful upgrade scheduled",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: govAccAddr,
|
||||
Plan: types.Plan{
|
||||
Name: "all-good",
|
||||
Info: "some text here",
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
false,
|
||||
"",
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
s.Run(tc.name, func() {
|
||||
_, err := s.msgSrvr.SoftwareUpgrade(s.ctx, tc.req)
|
||||
if tc.expectErr {
|
||||
s.Require().Error(err)
|
||||
s.Require().Contains(err.Error(), tc.errMsg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -97,9 +97,9 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd
|
||||
return keeper.NewQuerier(am.keeper, legacyQuerierCdc)
|
||||
}
|
||||
|
||||
// RegisterServices registers a GRPC query service to respond to the
|
||||
// module-specific GRPC queries.
|
||||
// RegisterServices registers module services.
|
||||
func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
|
||||
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
|
||||
}
|
||||
|
||||
|
||||
@@ -76,23 +76,19 @@ will ensure these `StoreUpgrades` takes place only in planned upgrade handler.
|
||||
|
||||
## Proposal
|
||||
|
||||
Typically, a `Plan` is proposed and submitted through governance via a `SoftwareUpgradeProposal`.
|
||||
Typically, a `Plan` is proposed and submitted through governance via a proposal
|
||||
containing a `MsgSoftwareUpgrade` message.
|
||||
This proposal prescribes to the standard governance process. If the proposal passes,
|
||||
the `Plan`, which targets a specific `Handler`, is persisted and scheduled. The
|
||||
upgrade can be delayed or hastened by updating the `Plan.Height` in a new proposal.
|
||||
|
||||
```go
|
||||
type SoftwareUpgradeProposal struct {
|
||||
Title string
|
||||
Description string
|
||||
Plan Plan
|
||||
}
|
||||
```
|
||||
+++ https://github.com/cosmos/cosmos-sdk/blob/08ddb217c176abe31c96af9d5f6c4c6fc645c4d4/proto/cosmos/upgrade/v1beta1/tx.proto#L19-L28
|
||||
|
||||
### Cancelling Upgrade Proposals
|
||||
|
||||
Upgrade proposals can be cancelled. There exists a `CancelSoftwareUpgrade` proposal
|
||||
type, which can be voted on and passed and will remove the scheduled upgrade `Plan`.
|
||||
Upgrade proposals can be cancelled. There exists a gov-enabled `MsgCancelUpgrade`
|
||||
message type, which can be embedded in a proposal, voted on and, if passed, will
|
||||
remove the scheduled upgrade `Plan`.
|
||||
Of course this requires that the upgrade was known to be a bad idea well before the
|
||||
upgrade itself, to allow time for a vote.
|
||||
|
||||
@@ -101,6 +97,6 @@ If such a possibility is desired, the upgrade height is to be
|
||||
upgrade proposal. The `SafetyDelta` is the time available from the success of an
|
||||
upgrade proposal and the realization it was a bad idea (due to external social consensus).
|
||||
|
||||
A `CancelSoftwareUpgrade` proposal can also be made while the original
|
||||
`SoftwareUpgradeProposal` is still being voted upon, as long as the `VotingPeriod`
|
||||
ends after the `SoftwareUpgradeProposal`.
|
||||
A `MsgCancelUpgrade` proposal can also be made while the original
|
||||
`MsgSoftwareUpgrade` proposal is still being voted upon, as long as the `VotingPeriod`
|
||||
ends after the `MsgSoftwareUpgrade` proposal.
|
||||
|
||||
@@ -2,15 +2,24 @@ package types
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterLegacyAminoCodec(legacy.Cdc)
|
||||
}
|
||||
|
||||
// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec
|
||||
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
cdc.RegisterConcrete(Plan{}, "cosmos-sdk/Plan", nil)
|
||||
cdc.RegisterConcrete(&SoftwareUpgradeProposal{}, "cosmos-sdk/SoftwareUpgradeProposal", nil)
|
||||
cdc.RegisterConcrete(&CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal", nil)
|
||||
cdc.RegisterConcrete(&MsgSoftwareUpgrade{}, "cosmos-sdk/MsgSoftwareUpgrade", nil)
|
||||
cdc.RegisterConcrete(&MsgCancelUpgrade{}, "cosmos-sdk/MsgCancelUpgrade", nil)
|
||||
}
|
||||
|
||||
func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
@@ -19,4 +28,11 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
&SoftwareUpgradeProposal{},
|
||||
&CancelSoftwareUpgradeProposal{},
|
||||
)
|
||||
|
||||
registry.RegisterImplementations((*sdk.Msg)(nil),
|
||||
&MsgSoftwareUpgrade{},
|
||||
&MsgCancelUpgrade{},
|
||||
)
|
||||
|
||||
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
|
||||
)
|
||||
|
||||
var (
|
||||
_, _ sdk.Msg = &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{}
|
||||
_, _ legacytx.LegacyMsg = &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{}
|
||||
)
|
||||
|
||||
// Route implements the LegacyMsg interface.
|
||||
func (m MsgSoftwareUpgrade) Route() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// Type implements the LegacyMsg interface.
|
||||
func (m MsgSoftwareUpgrade) Type() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// GetSignBytes implements the LegacyMsg interface.
|
||||
func (m MsgSoftwareUpgrade) GetSignBytes() []byte {
|
||||
return sdk.MustSortJSON(legacy.Cdc.MustMarshalJSON(&m))
|
||||
}
|
||||
|
||||
// ValidateBasic does a sanity check on the provided data.
|
||||
func (m *MsgSoftwareUpgrade) ValidateBasic() error {
|
||||
if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil {
|
||||
return sdkerrors.Wrap(err, "authority")
|
||||
}
|
||||
|
||||
if err := m.Plan.ValidateBasic(); err != nil {
|
||||
return sdkerrors.Wrap(err, "plan")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSigners returns the expected signers for MsgSoftwareUpgrade.
|
||||
func (m *MsgSoftwareUpgrade) GetSigners() []sdk.AccAddress {
|
||||
addr, _ := sdk.AccAddressFromBech32(m.Authority)
|
||||
return []sdk.AccAddress{addr}
|
||||
}
|
||||
|
||||
// Route implements the LegacyMsg interface.
|
||||
func (m MsgCancelUpgrade) Route() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// Type implements the LegacyMsg interface.
|
||||
func (m MsgCancelUpgrade) Type() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// GetSignBytes implements the LegacyMsg interface.
|
||||
func (m MsgCancelUpgrade) GetSignBytes() []byte {
|
||||
return sdk.MustSortJSON(legacy.Cdc.MustMarshalJSON(&m))
|
||||
}
|
||||
|
||||
// ValidateBasic does a sanity check on the provided data.
|
||||
func (m *MsgCancelUpgrade) ValidateBasic() error {
|
||||
if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil {
|
||||
return sdkerrors.Wrap(err, "authority")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSigners returns the expected signers for MsgSoftwareUpgrade.
|
||||
func (m *MsgCancelUpgrade) GetSigners() []sdk.AccAddress {
|
||||
addr, _ := sdk.AccAddressFromBech32(m.Authority)
|
||||
return []sdk.AccAddress{addr}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package types_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||
)
|
||||
|
||||
var authority = sdk.AccAddress("authority")
|
||||
|
||||
func TestMsgSoftwareUpgrade(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
msg *types.MsgSoftwareUpgrade
|
||||
expErr bool
|
||||
errMsg string
|
||||
}{
|
||||
{
|
||||
"invalid authority address",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: "authority",
|
||||
Plan: types.Plan{
|
||||
Name: "all-good",
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
true,
|
||||
"authority: decoding bech32 failed",
|
||||
},
|
||||
{
|
||||
"invalid plan",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: authority.String(),
|
||||
Plan: types.Plan{
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
true,
|
||||
"plan",
|
||||
},
|
||||
{
|
||||
"all good",
|
||||
&types.MsgSoftwareUpgrade{
|
||||
Authority: authority.String(),
|
||||
Plan: types.Plan{
|
||||
Name: "all-good",
|
||||
Height: 123450000,
|
||||
},
|
||||
},
|
||||
false,
|
||||
"",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
err := tc.msg.ValidateBasic()
|
||||
if tc.expErr {
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), tc.errMsg)
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.msg.Type(), sdk.MsgTypeURL(&types.MsgSoftwareUpgrade{}))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestMsgCancelUpgrade(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
msg *types.MsgCancelUpgrade
|
||||
expErr bool
|
||||
errMsg string
|
||||
}{
|
||||
{
|
||||
"invalid authority address",
|
||||
&types.MsgCancelUpgrade{
|
||||
Authority: "authority",
|
||||
},
|
||||
true,
|
||||
"authority: decoding bech32 failed",
|
||||
},
|
||||
{
|
||||
"all good",
|
||||
&types.MsgCancelUpgrade{
|
||||
Authority: authority.String(),
|
||||
},
|
||||
false,
|
||||
"",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
err := tc.msg.ValidateBasic()
|
||||
if tc.expErr {
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), tc.errMsg)
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.msg.Type(), sdk.MsgTypeURL(&types.MsgCancelUpgrade{}))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
+371
-37
@@ -406,6 +406,88 @@ func (m *QueryModuleVersionsResponse) GetModuleVersions() []*ModuleVersion {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryAuthorityRequest is the request type for Query/Authority
|
||||
type QueryAuthorityRequest struct {
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityRequest) Reset() { *m = QueryAuthorityRequest{} }
|
||||
func (m *QueryAuthorityRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAuthorityRequest) ProtoMessage() {}
|
||||
func (*QueryAuthorityRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4a334d07ad8374f0, []int{8}
|
||||
}
|
||||
func (m *QueryAuthorityRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAuthorityRequest.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 *QueryAuthorityRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAuthorityRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAuthorityRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAuthorityRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAuthorityRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAuthorityRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryAuthorityResponse is the response type for Query/Authority
|
||||
type QueryAuthorityResponse struct {
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityResponse) Reset() { *m = QueryAuthorityResponse{} }
|
||||
func (m *QueryAuthorityResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAuthorityResponse) ProtoMessage() {}
|
||||
func (*QueryAuthorityResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4a334d07ad8374f0, []int{9}
|
||||
}
|
||||
func (m *QueryAuthorityResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAuthorityResponse.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 *QueryAuthorityResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAuthorityResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAuthorityResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAuthorityResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAuthorityResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAuthorityResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAuthorityResponse) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryCurrentPlanRequest)(nil), "cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")
|
||||
proto.RegisterType((*QueryCurrentPlanResponse)(nil), "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")
|
||||
@@ -415,6 +497,8 @@ func init() {
|
||||
proto.RegisterType((*QueryUpgradedConsensusStateResponse)(nil), "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")
|
||||
proto.RegisterType((*QueryModuleVersionsRequest)(nil), "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")
|
||||
proto.RegisterType((*QueryModuleVersionsResponse)(nil), "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")
|
||||
proto.RegisterType((*QueryAuthorityRequest)(nil), "cosmos.upgrade.v1beta1.QueryAuthorityRequest")
|
||||
proto.RegisterType((*QueryAuthorityResponse)(nil), "cosmos.upgrade.v1beta1.QueryAuthorityResponse")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -422,43 +506,48 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_4a334d07ad8374f0 = []byte{
|
||||
// 576 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6e, 0xd3, 0x30,
|
||||
0x1c, 0xae, 0xbb, 0x6e, 0x02, 0x17, 0x0d, 0xe4, 0x43, 0x09, 0x61, 0x0a, 0x95, 0x19, 0x50, 0xc4,
|
||||
0x1a, 0x6f, 0xed, 0x05, 0x0d, 0x81, 0x80, 0x49, 0x88, 0x21, 0x98, 0xa0, 0x08, 0x0e, 0x5c, 0x2a,
|
||||
0xb7, 0xb1, 0xda, 0x88, 0x24, 0xce, 0x62, 0x67, 0x62, 0x9a, 0x76, 0xe1, 0xc4, 0x11, 0x89, 0x3b,
|
||||
0x37, 0x2e, 0x3c, 0x09, 0xc7, 0x49, 0x5c, 0x38, 0xec, 0x80, 0x5a, 0x1e, 0x04, 0xc5, 0x71, 0x51,
|
||||
0x4a, 0x93, 0x0e, 0x76, 0x6a, 0x63, 0x7f, 0xff, 0x7e, 0xf1, 0xe7, 0x40, 0xdc, 0xe7, 0xc2, 0xe7,
|
||||
0x82, 0xc4, 0xe1, 0x20, 0xa2, 0x0e, 0x23, 0x7b, 0x1b, 0x3d, 0x26, 0xe9, 0x06, 0xd9, 0x8d, 0x59,
|
||||
0xb4, 0x6f, 0x87, 0x11, 0x97, 0x1c, 0xd5, 0x52, 0x8c, 0xad, 0x31, 0xb6, 0xc6, 0x98, 0x2b, 0x03,
|
||||
0xce, 0x07, 0x1e, 0x23, 0x34, 0x74, 0x09, 0x0d, 0x02, 0x2e, 0xa9, 0x74, 0x79, 0x20, 0x52, 0x96,
|
||||
0xb9, 0x5a, 0xa0, 0x3c, 0x51, 0x51, 0x28, 0x7c, 0x09, 0x5e, 0x7c, 0x91, 0x58, 0x6d, 0xc5, 0x51,
|
||||
0xc4, 0x02, 0xf9, 0xdc, 0xa3, 0x41, 0x87, 0xed, 0xc6, 0x4c, 0x48, 0xfc, 0x14, 0x1a, 0xb3, 0x5b,
|
||||
0x22, 0xe4, 0x81, 0x60, 0x68, 0x1d, 0x56, 0x42, 0x8f, 0x06, 0x06, 0xa8, 0x83, 0x46, 0xb5, 0xb5,
|
||||
0x62, 0xe7, 0x27, 0xb4, 0x15, 0x47, 0x21, 0x71, 0x53, 0x1b, 0x3d, 0x08, 0x43, 0xcf, 0x65, 0x4e,
|
||||
0xc6, 0x08, 0x21, 0x58, 0x09, 0xa8, 0xcf, 0x94, 0xd8, 0xd9, 0x8e, 0xfa, 0x8f, 0x5b, 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xe8, 0xba, 0xdf, 0x05, 0x00, 0x00,
|
||||
// 644 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x4f, 0x13, 0x4f,
|
||||
0x14, 0x66, 0x0a, 0x3f, 0x7e, 0xf2, 0x6a, 0xd0, 0x4c, 0x62, 0x59, 0x57, 0x52, 0x71, 0x40, 0x85,
|
||||
0x48, 0x77, 0xa0, 0x5c, 0x0c, 0x46, 0xa3, 0x92, 0x18, 0x31, 0x4a, 0xb4, 0x46, 0x0f, 0x5e, 0x9a,
|
||||
0xa1, 0x3b, 0x69, 0x37, 0xb6, 0x3b, 0xcb, 0xce, 0x2c, 0x91, 0x10, 0x2e, 0x9e, 0x3c, 0x9a, 0x18,
|
||||
0xaf, 0xde, 0xbc, 0xf8, 0x97, 0x78, 0x24, 0xf1, 0xe2, 0xc1, 0x83, 0x01, 0xff, 0x04, 0xff, 0x00,
|
||||
0xb3, 0xb3, 0xb3, 0xa4, 0xa5, 0xbb, 0x0b, 0x7a, 0x6a, 0x77, 0xde, 0xf7, 0x7d, 0xef, 0x7b, 0x3b,
|
||||
0xdf, 0x6b, 0x81, 0xb4, 0x84, 0xec, 0x09, 0x49, 0xa3, 0xa0, 0x1d, 0x32, 0x97, 0xd3, 0xed, 0xe5,
|
||||
0x4d, 0xae, 0xd8, 0x32, 0xdd, 0x8a, 0x78, 0xb8, 0xe3, 0x04, 0xa1, 0x50, 0x02, 0x57, 0x12, 0x8c,
|
||||
0x63, 0x30, 0x8e, 0xc1, 0xd8, 0xd3, 0x6d, 0x21, 0xda, 0x5d, 0x4e, 0x59, 0xe0, 0x51, 0xe6, 0xfb,
|
||||
0x42, 0x31, 0xe5, 0x09, 0x5f, 0x26, 0x2c, 0x7b, 0x2e, 0x47, 0x39, 0x55, 0xd1, 0x28, 0x72, 0x11,
|
||||
0xa6, 0x9e, 0xc5, 0xad, 0xd6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, 0x7d, 0x9b, 0xba, 0xf7, 0xae, 0x84, 0xf0, 0x17, 0x04, 0x93, 0x83, 0x49, 0xc7, 0xf5, 0x42,
|
||||
0x6b, 0x99, 0x5b, 0x65, 0xaf, 0xfc, 0x15, 0xc7, 0x8c, 0x41, 0xf5, 0x18, 0x0b, 0xf8, 0x7a, 0xde,
|
||||
0x18, 0xc7, 0x16, 0x0d, 0x7f, 0x44, 0x30, 0x71, 0xb4, 0x0e, 0xb8, 0x56, 0x1c, 0x80, 0x63, 0xfb,
|
||||
0x64, 0x3b, 0xa7, 0x85, 0x1b, 0x77, 0x0b, 0xda, 0xdd, 0x2c, 0xbe, 0x92, 0x9b, 0x96, 0x94, 0x72,
|
||||
0xff, 0xc1, 0xd7, 0x83, 0x2a, 0xda, 0x3f, 0xa8, 0xa2, 0x9f, 0x07, 0x55, 0xf4, 0xfe, 0xb0, 0x3a,
|
||||
0xb2, 0x7f, 0x58, 0x1d, 0xf9, 0x7e, 0x58, 0x1d, 0x79, 0xb5, 0xd8, 0xf6, 0x54, 0x27, 0xda, 0x74,
|
||||
0x5a, 0xa2, 0x97, 0xca, 0x24, 0x1f, 0x35, 0xe9, 0xbe, 0xa6, 0x6f, 0x8e, 0x34, 0xd5, 0x4e, 0xc0,
|
||||
0xe5, 0xe6, 0xb8, 0xfe, 0x0b, 0x59, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x18, 0x7f, 0x99, 0xff,
|
||||
0xc4, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -488,6 +577,8 @@ type QueryClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error)
|
||||
// Returns the account with authority to conduct upgrades
|
||||
Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -535,6 +626,15 @@ func (c *queryClient) ModuleVersions(ctx context.Context, in *QueryModuleVersion
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) {
|
||||
out := new(QueryAuthorityResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/Authority", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// CurrentPlan queries the current upgrade plan.
|
||||
@@ -552,6 +652,8 @@ type QueryServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error)
|
||||
// Returns the account with authority to conduct upgrades
|
||||
Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@@ -570,6 +672,9 @@ func (*UnimplementedQueryServer) UpgradedConsensusState(ctx context.Context, req
|
||||
func (*UnimplementedQueryServer) ModuleVersions(ctx context.Context, req *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ModuleVersions not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) Authority(ctx context.Context, req *QueryAuthorityRequest) (*QueryAuthorityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Authority not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@@ -647,6 +752,24 @@ func _Query_ModuleVersions_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Authority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAuthorityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Authority(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.upgrade.v1beta1.Query/Authority",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Authority(ctx, req.(*QueryAuthorityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.upgrade.v1beta1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@@ -667,6 +790,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ModuleVersions",
|
||||
Handler: _Query_ModuleVersions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Authority",
|
||||
Handler: _Query_Authority_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/upgrade/v1beta1/query.proto",
|
||||
@@ -913,6 +1040,59 @@ func (m *QueryModuleVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityRequest) 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 *QueryAuthorityRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityResponse) 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 *QueryAuthorityResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovQuery(v)
|
||||
base := offset
|
||||
@@ -1024,6 +1204,28 @@ func (m *QueryModuleVersionsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAuthorityResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Address)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovQuery(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@@ -1636,6 +1838,138 @@ func (m *QueryModuleVersionsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAuthorityRequest) 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 ErrIntOverflowQuery
|
||||
}
|
||||
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: QueryAuthorityRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAuthorityRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAuthorityResponse) 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 ErrIntOverflowQuery
|
||||
}
|
||||
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: QueryAuthorityResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAuthorityResponse: 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 ErrIntOverflowQuery
|
||||
}
|
||||
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 ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Address = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipQuery(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@@ -193,6 +193,24 @@ func local_request_Query_ModuleVersions_0(ctx context.Context, marshaler runtime
|
||||
|
||||
}
|
||||
|
||||
func request_Query_Authority_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAuthorityRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Authority(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_Authority_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAuthorityRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.Authority(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// 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.
|
||||
@@ -279,6 +297,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Authority_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Authority_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Authority_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -400,6 +438,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Authority_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_Authority_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Authority_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -411,6 +469,8 @@ var (
|
||||
pattern_Query_UpgradedConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "upgrade", "v1beta1", "upgraded_consensus_state", "last_height"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ModuleVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "upgrade", "v1beta1", "module_versions"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Authority_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "upgrade", "v1beta1", "authority"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -421,4 +481,6 @@ var (
|
||||
forward_Query_UpgradedConsensusState_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_ModuleVersions_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Authority_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
@@ -0,0 +1,941 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: cosmos/upgrade/v1beta1/tx.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
_ "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"
|
||||
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
|
||||
|
||||
// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
type MsgSoftwareUpgrade struct {
|
||||
// authority is the address of the governance account.
|
||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
// plan is the upgrade plan.
|
||||
Plan Plan `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan"`
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgrade) Reset() { *m = MsgSoftwareUpgrade{} }
|
||||
func (m *MsgSoftwareUpgrade) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSoftwareUpgrade) ProtoMessage() {}
|
||||
func (*MsgSoftwareUpgrade) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2852c16e3ab79fef, []int{0}
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSoftwareUpgrade.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 *MsgSoftwareUpgrade) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSoftwareUpgrade.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSoftwareUpgrade.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSoftwareUpgrade proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgSoftwareUpgrade) GetAuthority() string {
|
||||
if m != nil {
|
||||
return m.Authority
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgrade) GetPlan() Plan {
|
||||
if m != nil {
|
||||
return m.Plan
|
||||
}
|
||||
return Plan{}
|
||||
}
|
||||
|
||||
// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
type MsgSoftwareUpgradeResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgradeResponse) Reset() { *m = MsgSoftwareUpgradeResponse{} }
|
||||
func (m *MsgSoftwareUpgradeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSoftwareUpgradeResponse) ProtoMessage() {}
|
||||
func (*MsgSoftwareUpgradeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2852c16e3ab79fef, []int{1}
|
||||
}
|
||||
func (m *MsgSoftwareUpgradeResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSoftwareUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSoftwareUpgradeResponse.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 *MsgSoftwareUpgradeResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSoftwareUpgradeResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSoftwareUpgradeResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSoftwareUpgradeResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSoftwareUpgradeResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSoftwareUpgradeResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgCancelUpgrade is the Msg/CancelUpgrade request type.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
type MsgCancelUpgrade struct {
|
||||
// authority is the address of the governance account.
|
||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgrade) Reset() { *m = MsgCancelUpgrade{} }
|
||||
func (m *MsgCancelUpgrade) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgCancelUpgrade) ProtoMessage() {}
|
||||
func (*MsgCancelUpgrade) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2852c16e3ab79fef, []int{2}
|
||||
}
|
||||
func (m *MsgCancelUpgrade) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgCancelUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgCancelUpgrade.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 *MsgCancelUpgrade) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgCancelUpgrade.Merge(m, src)
|
||||
}
|
||||
func (m *MsgCancelUpgrade) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgCancelUpgrade) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgCancelUpgrade.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgCancelUpgrade proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgCancelUpgrade) GetAuthority() string {
|
||||
if m != nil {
|
||||
return m.Authority
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
type MsgCancelUpgradeResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgradeResponse) Reset() { *m = MsgCancelUpgradeResponse{} }
|
||||
func (m *MsgCancelUpgradeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgCancelUpgradeResponse) ProtoMessage() {}
|
||||
func (*MsgCancelUpgradeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2852c16e3ab79fef, []int{3}
|
||||
}
|
||||
func (m *MsgCancelUpgradeResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgCancelUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgCancelUpgradeResponse.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 *MsgCancelUpgradeResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgCancelUpgradeResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgCancelUpgradeResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgCancelUpgradeResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgCancelUpgradeResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgCancelUpgradeResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgSoftwareUpgrade)(nil), "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")
|
||||
proto.RegisterType((*MsgSoftwareUpgradeResponse)(nil), "cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")
|
||||
proto.RegisterType((*MsgCancelUpgrade)(nil), "cosmos.upgrade.v1beta1.MsgCancelUpgrade")
|
||||
proto.RegisterType((*MsgCancelUpgradeResponse)(nil), "cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cosmos/upgrade/v1beta1/tx.proto", fileDescriptor_2852c16e3ab79fef) }
|
||||
|
||||
var fileDescriptor_2852c16e3ab79fef = []byte{
|
||||
// 363 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce,
|
||||
0xcd, 0x2f, 0xd6, 0x2f, 0x2d, 0x48, 0x2f, 0x4a, 0x4c, 0x49, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d,
|
||||
0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x28, 0xd0,
|
||||
0x83, 0x2a, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, 0xb1,
|
||||
0x20, 0xaa, 0xa5, 0x24, 0x21, 0xaa, 0xe3, 0x21, 0x12, 0x50, 0xad, 0x10, 0x29, 0x15, 0x1c, 0x36,
|
||||
0xc1, 0x0c, 0x86, 0xa8, 0x12, 0x87, 0xaa, 0xca, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x04, 0x51, 0x10,
|
||||
0x09, 0xa5, 0x29, 0x8c, 0x5c, 0x42, 0xbe, 0xc5, 0xe9, 0xc1, 0xf9, 0x69, 0x25, 0xe5, 0x89, 0x45,
|
||||
0xa9, 0xa1, 0x10, 0x5d, 0x42, 0x66, 0x5c, 0x9c, 0x89, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x25,
|
||||
0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x12, 0x97, 0xb6, 0xe8, 0x8a, 0x40, 0xad, 0x76,
|
||||
0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x42, 0x28, 0x15,
|
||||
0x32, 0xe3, 0x62, 0x29, 0xc8, 0x49, 0xcc, 0x93, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd1,
|
||||
0xc3, 0xee, 0x4b, 0xbd, 0x80, 0x9c, 0xc4, 0x3c, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xc0,
|
||||
0xea, 0xad, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0x98, 0xa3, 0x24, 0xc3, 0x25, 0x85, 0xe9, 0xaa,
|
||||
0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa5, 0x28, 0x2e, 0x01, 0xdf, 0xe2, 0x74, 0xe7,
|
||||
0xc4, 0xbc, 0xe4, 0xd4, 0x1c, 0x0a, 0x5d, 0x8c, 0x61, 0xb3, 0x14, 0x97, 0x04, 0xba, 0xd9, 0x30,
|
||||
0x7b, 0x8d, 0x9e, 0x32, 0x72, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x15, 0x72, 0xf1, 0xa3, 0x07, 0x98,
|
||||
0x16, 0x2e, 0xaf, 0x62, 0x7a, 0x43, 0xca, 0x88, 0x78, 0xb5, 0x30, 0xab, 0x85, 0xb2, 0xb9, 0x78,
|
||||
0x51, 0xfd, 0xab, 0x81, 0xc7, 0x10, 0x14, 0x95, 0x52, 0x06, 0xc4, 0xaa, 0x84, 0x59, 0xe6, 0xe4,
|
||||
0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c,
|
||||
0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x3a, 0xe9, 0x99, 0x25, 0x19,
|
||||
0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xd0, 0x64, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b,
|
||||
0xe0, 0xa9, 0xb0, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x9c, 0xc6, 0x8c, 0x01, 0x01, 0x00,
|
||||
0x00, 0xff, 0xff, 0x11, 0x7e, 0xae, 0x0d, 0x0e, 0x03, 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
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type MsgClient interface {
|
||||
// SoftwareUpgrade is a governance operation for initiating a software upgrade.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error)
|
||||
// CancelUpgrade is a governance operation for cancelling a previously
|
||||
// approvid software upgrade.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc1.ClientConn
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc1.ClientConn) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) {
|
||||
out := new(MsgSoftwareUpgradeResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) {
|
||||
out := new(MsgCancelUpgradeResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
type MsgServer interface {
|
||||
// SoftwareUpgrade is a governance operation for initiating a software upgrade.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error)
|
||||
// CancelUpgrade is a governance operation for cancelling a previously
|
||||
// approvid software upgrade.
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedMsgServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedMsgServer) SoftwareUpgrade(ctx context.Context, req *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) CancelUpgrade(ctx context.Context, req *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelUpgrade not implemented")
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSoftwareUpgrade)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SoftwareUpgrade(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*MsgSoftwareUpgrade))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_CancelUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgCancelUpgrade)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).CancelUpgrade(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).CancelUpgrade(ctx, req.(*MsgCancelUpgrade))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.upgrade.v1beta1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "SoftwareUpgrade",
|
||||
Handler: _Msg_SoftwareUpgrade_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CancelUpgrade",
|
||||
Handler: _Msg_CancelUpgrade_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/upgrade/v1beta1/tx.proto",
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgrade) 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 *MsgSoftwareUpgrade) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
{
|
||||
size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
if len(m.Authority) > 0 {
|
||||
i -= len(m.Authority)
|
||||
copy(dAtA[i:], m.Authority)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgradeResponse) 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 *MsgSoftwareUpgradeResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgrade) 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 *MsgCancelUpgrade) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Authority) > 0 {
|
||||
i -= len(m.Authority)
|
||||
copy(dAtA[i:], m.Authority)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgradeResponse) 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 *MsgCancelUpgradeResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovTx(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Authority)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = m.Plan.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSoftwareUpgradeResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgrade) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Authority)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgCancelUpgradeResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func sovTx(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozTx(x uint64) (n int) {
|
||||
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *MsgSoftwareUpgrade) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSoftwareUpgrade: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSoftwareUpgrade: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
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 ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authority = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSoftwareUpgradeResponse) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSoftwareUpgradeResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSoftwareUpgradeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgCancelUpgrade) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgCancelUpgrade: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgCancelUpgrade: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
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 ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authority = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgCancelUpgradeResponse) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgCancelUpgradeResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgCancelUpgradeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipTx(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, ErrIntOverflowTx
|
||||
}
|
||||
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, ErrIntOverflowTx
|
||||
}
|
||||
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, ErrIntOverflowTx
|
||||
}
|
||||
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, ErrInvalidLengthTx
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupTx
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthTx
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowTx = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
@@ -88,6 +88,10 @@ var xxx_messageInfo_Plan proto.InternalMessageInfo
|
||||
|
||||
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
||||
// upgrade.
|
||||
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
|
||||
// proposals, see MsgSoftwareUpgrade.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type SoftwareUpgradeProposal struct {
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
@@ -128,6 +132,10 @@ var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo
|
||||
|
||||
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
||||
// upgrade.
|
||||
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
|
||||
// proposals, see MsgCancelUpgrade.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type CancelSoftwareUpgradeProposal struct {
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
@@ -220,36 +228,36 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_ccf2a7d4d7b48dca = []byte{
|
||||
// 450 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x3f, 0x6f, 0xd4, 0x30,
|
||||
0x14, 0x8f, 0xdb, 0xb4, 0x50, 0x9f, 0x58, 0xcc, 0x51, 0xcc, 0x09, 0x92, 0x53, 0xc5, 0x70, 0x03,
|
||||
0x38, 0x6a, 0x91, 0x18, 0xba, 0x71, 0x1d, 0x90, 0x10, 0x48, 0x55, 0x0a, 0x0c, 0x2c, 0x95, 0x2f,
|
||||
0xf1, 0xe5, 0x2c, 0x1c, 0x3b, 0x8a, 0x9d, 0xc2, 0x7d, 0x8b, 0x4a, 0x2c, 0x8c, 0xfd, 0x38, 0x37,
|
||||
0x76, 0x44, 0x0c, 0xfc, 0xb9, 0x5b, 0xf8, 0x18, 0xc8, 0x76, 0x82, 0x4e, 0x70, 0x23, 0x53, 0xde,
|
||||
0x7b, 0xf9, 0xfd, 0x79, 0xcf, 0xef, 0xc1, 0x87, 0x99, 0xd2, 0xa5, 0xd2, 0x49, 0x53, 0x15, 0x35,
|
||||
0xcd, 0x59, 0x72, 0x71, 0x38, 0x61, 0x86, 0x1e, 0x76, 0x39, 0xa9, 0x6a, 0x65, 0x14, 0xda, 0xf7,
|
||||
0x28, 0xd2, 0x55, 0x5b, 0xd4, 0xe0, 0x5e, 0xa1, 0x54, 0x21, 0x58, 0xe2, 0x50, 0x93, 0x66, 0x9a,
|
||||
0x50, 0x39, 0xf7, 0x94, 0x41, 0xbf, 0x50, 0x85, 0x72, 0x61, 0x62, 0xa3, 0xb6, 0x1a, 0xff, 0x4d,
|
||||
0x30, 0xbc, 0x64, 0xda, 0xd0, 0xb2, 0xf2, 0x80, 0x83, 0xaf, 0x00, 0x86, 0xa7, 0x82, 0x4a, 0x84,
|
||||
0x60, 0x28, 0x69, 0xc9, 0x30, 0x18, 0x82, 0xd1, 0x5e, 0xea, 0x62, 0x74, 0x0c, 0x43, 0x8b, 0xc7,
|
||||
0x5b, 0x43, 0x30, 0xea, 0x1d, 0x0d, 0x88, 0x17, 0x23, 0x9d, 0x18, 0x79, 0xdd, 0x89, 0x8d, 0xe1,
|
||||
0xe2, 0x5b, 0x1c, 0x5c, 0x7e, 0x8f, 0x01, 0x06, 0xa9, 0xe3, 0xa0, 0x7d, 0xb8, 0x3b, 0x63, 0xbc,
|
||||
0x98, 0x19, 0xbc, 0x3d, 0x04, 0xa3, 0xed, 0xb4, 0xcd, 0xac, 0x0f, 0x97, 0x53, 0x85, 0x43, 0xef,
|
||||
0x63, 0x63, 0xf4, 0x12, 0xde, 0x69, 0x27, 0xcd, 0xcf, 0x33, 0xc1, 0x99, 0x34, 0xe7, 0xda, 0x50,
|
||||
0xc3, 0xf0, 0x8e, 0x33, 0xee, 0xff, 0x63, 0xfc, 0x4c,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f2, 0xf1, 0xcf, 0x91, 0x9b, 0x79, 0xc5, 0xf4, 0x64,
|
||||
0xd7, 0xad, 0xef, 0xc9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x2b, 0xd1, 0x8c, 0x03, 0x03,
|
||||
0x00, 0x00,
|
||||
// 453 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbb, 0x6f, 0xd4, 0x30,
|
||||
0x18, 0x8f, 0xdb, 0xb4, 0x50, 0x9f, 0x58, 0xcc, 0x51, 0xcc, 0x09, 0x92, 0xd3, 0x89, 0xe1, 0x06,
|
||||
0x48, 0xd4, 0x22, 0x31, 0xdc, 0xc6, 0x75, 0x40, 0x42, 0x20, 0x55, 0x29, 0x30, 0xb0, 0x54, 0xbe,
|
||||
0xc4, 0x97, 0xb3, 0x70, 0xec, 0x28, 0x76, 0x0a, 0xf7, 0x5f, 0x74, 0x41, 0x62, 0xec, 0x9f, 0x73,
|
||||
0x63, 0x47, 0xc4, 0xc0, 0xe3, 0x6e, 0xe1, 0xcf, 0x40, 0xb6, 0x63, 0xc4, 0xa3, 0x23, 0x53, 0xbe,
|
||||
0xef, 0xcb, 0xef, 0xf1, 0x3d, 0x0c, 0xef, 0xe7, 0x52, 0x55, 0x52, 0xa5, 0x6d, 0x5d, 0x36, 0xa4,
|
||||
0xa0, 0xe9, 0xd9, 0xc1, 0x8c, 0x6a, 0x72, 0xe0, 0xf3, 0xa4, 0x6e, 0xa4, 0x96, 0x68, 0xdf, 0xa1,
|
||||
0x12, 0x5f, 0xed, 0x50, 0x83, 0x3b, 0xa5, 0x94, 0x25, 0xa7, 0xa9, 0x45, 0xcd, 0xda, 0x79, 0x4a,
|
||||
0xc4, 0xd2, 0x51, 0x06, 0xfd, 0x52, 0x96, 0xd2, 0x86, 0xa9, 0x89, 0xba, 0x6a, 0xfc, 0x37, 0x41,
|
||||
0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
||||
0xa7, 0xea, 0x1d, 0xde, 0x4d, 0xae, 0xbe, 0x54, 0x62, 0x76, 0x3a, 0x0d, 0xcd, 0x56, 0x32, 0x8b,
|
||||
0x9f, 0x40, 0xdf, 0x15, 0x06, 0xa3, 0x1c, 0xde, 0x3b, 0x22, 0x22, 0xa7, 0xfc, 0x3f, 0x37, 0xf7,
|
||||
0x87, 0xc9, 0x53, 0x78, 0xe3, 0x85, 0x2c, 0x5a, 0x4e, 0x5f, 0xd3, 0x46, 0x99, 0xce, 0xaf, 0xba,
|
||||
0x30, 0x86, 0xd7, 0xce, 0xdc, 0x6f, 0x2b, 0x17, 0x66, 0x3e, 0xb5, 0x5b, 0x04, 0x46, 0x6a, 0xfa,
|
||||
0x6c, 0xf5, 0x3d, 0x0a, 0x56, 0xeb, 0x08, 0x5c, 0xae, 0x23, 0xf0, 0x6d, 0x1d, 0x81, 0xf3, 0x4d,
|
||||
0x14, 0x5c, 0x6e, 0xa2, 0xe0, 0xd3, 0x26, 0x0a, 0xde, 0x3c, 0x28, 0x99, 0x5e, 0xb4, 0xb3, 0x24,
|
||||
0x97, 0x55, 0xda, 0xbd, 0x6d, 0xf7, 0x79, 0xa8, 0x8a, 0xb7, 0xe9, 0xfb, 0x5f, 0x0f, 0x5d, 0x2f,
|
||||
0x6b, 0xaa, 0x66, 0xbb, 0xf6, 0x84, 0x8f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x55, 0x74, 0xf2,
|
||||
0xb7, 0x07, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Plan) Equal(that interface{}) bool {
|
||||
|
||||
Reference in New Issue
Block a user