diff --git a/client/grpc/reflection/reflection.pb.go b/client/grpc/reflection/reflection.pb.go index eaa329a0a5..99878b2a34 100644 --- a/client/grpc/reflection/reflection.pb.go +++ b/client/grpc/reflection/reflection.pb.go @@ -111,7 +111,8 @@ func (m *ListAllInterfacesResponse) GetInterfaceNames() []string { return nil } -// ListImplementationsRequest is the request type of the ListImplementations RPC. +// ListImplementationsRequest is the request type of the ListImplementations +// RPC. type ListImplementationsRequest struct { // interface_name defines the interface to query the implementations for. InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"` @@ -157,7 +158,8 @@ func (m *ListImplementationsRequest) GetInterfaceName() string { return "" } -// ListImplementationsResponse is the response type of the ListImplementations RPC. +// ListImplementationsResponse is the response type of the ListImplementations +// RPC. type ListImplementationsResponse struct { ImplementationMessageNames []string `protobuf:"bytes,1,rep,name=implementation_message_names,json=implementationMessageNames,proto3" json:"implementation_message_names,omitempty"` } diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index 7dd851a4d5..d98a73fbf2 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -54,7 +54,7 @@ func (s *IntegrationTestSuite) TestGRPCQuery() { var header metadata.MD bankRes, err := bankClient.Balance( context.Background(), - &banktypes.QueryBalanceRequest{Address: val0.Address, Denom: denom}, + &banktypes.QueryBalanceRequest{Address: val0.Address.String(), Denom: denom}, grpc.Header(&header), // Also fetch grpc header ) s.Require().NoError(err) @@ -70,7 +70,7 @@ func (s *IntegrationTestSuite) TestGRPCQuery() { bankClient = banktypes.NewQueryClient(val0.ClientCtx) bankRes, err = bankClient.Balance( context.Background(), - &banktypes.QueryBalanceRequest{Address: val0.Address, Denom: denom}, + &banktypes.QueryBalanceRequest{Address: val0.Address.String(), Denom: denom}, grpc.Header(&header), ) blockHeight = header.Get(grpctypes.GRPCBlockHeightHeader) diff --git a/crypto/types/crypto.pb.go b/crypto/types/crypto.pb.go index 62d25568ec..c634a8cc90 100644 --- a/crypto/types/crypto.pb.go +++ b/crypto/types/crypto.pb.go @@ -164,8 +164,8 @@ func (*PublicKey) XXX_OneofWrappers() []interface{} { } } -// PubKeyMultisigThreshold specifies a public key type which nests multiple public -// keys and a threshold +// PubKeyMultisigThreshold specifies a public key type which nests multiple +// public keys and a threshold type PubKeyMultisigThreshold struct { K uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty" yaml:"threshold"` PubKeys []*PublicKey `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" yaml:"pubkeys"` @@ -219,8 +219,8 @@ func (m *PubKeyMultisigThreshold) GetPubKeys() []*PublicKey { } // MultiSignature wraps the signatures from a PubKeyMultisigThreshold. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers signed and -// with which modes. +// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +// signed and with which modes. type MultiSignature struct { Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` XXX_unrecognized []byte `json:"-"` diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index 0c613edaa2..0caa123829 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -11,11 +11,13 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // for basic account functionality. Any custom account type should extend this // type for additional functionality (e.g. vesting). message BaseAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + option (cosmos_proto.implements_interface) = "AccountI"; - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; uint64 sequence = 4; diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 9fb8b89516..a885792683 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -24,8 +24,11 @@ service Query { // QueryAccountRequest is the request type for the Query/Account RPC method. message QueryAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // address defines the address to query for. - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; } // QueryAccountResponse is the response type for the Query/Account RPC method. diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/proto/cosmos/bank/v1beta1/bank.proto index 95e0fbc921..5a9383362e 100644 --- a/proto/cosmos/bank/v1beta1/bank.proto +++ b/proto/cosmos/bank/v1beta1/bank.proto @@ -14,7 +14,8 @@ message Params { bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; } -// SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). +// SendEnabled maps coin denom to a send_enabled status (whether a denom is +// sendable). message SendEnabled { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; @@ -24,18 +25,20 @@ message SendEnabled { // Input models transaction input. message Input { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; repeated cosmos.base.v1beta1.Coin coins = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // Output models transaction outputs. message Output { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; repeated cosmos.base.v1beta1.Coin coins = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -43,9 +46,10 @@ message Output { // Supply represents a struct that passively keeps track of the total supply // amounts in the network. message Supply { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI"; repeated cosmos.base.v1beta1.Coin total = 1 diff --git a/proto/cosmos/bank/v1beta1/genesis.proto b/proto/cosmos/bank/v1beta1/genesis.proto index ec9c56d267..25c80a38b5 100644 --- a/proto/cosmos/bank/v1beta1/genesis.proto +++ b/proto/cosmos/bank/v1beta1/genesis.proto @@ -26,10 +26,11 @@ message GenesisState { // Balance defines an account address and balance pair used in the bank module's // genesis state. message Balance { + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the address of the balance holder. - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; // coins defines the different coins this balance holds. repeated cosmos.base.v1beta1.Coin coins = 2 diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index bda2191151..8f8cfe1263 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -39,8 +39,11 @@ service Query { // QueryBalanceRequest is the request type for the Query/Balance RPC method. message QueryBalanceRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // address is the address to query balances for. - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; // denom is the coin denom to query balances for. string denom = 2; @@ -54,14 +57,18 @@ message QueryBalanceResponse { // QueryBalanceRequest is the request type for the Query/AllBalances RPC method. message QueryAllBalancesRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // address is the address to query balances for. - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string address = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. message QueryAllBalancesResponse { // balances is the balances of all the coins. repeated cosmos.base.v1beta1.Coin balances = 1 @@ -71,10 +78,12 @@ message QueryAllBalancesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC method. +// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +// method. message QueryTotalSupplyRequest {} -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method message QueryTotalSupplyResponse { // supply is the supply of the coins repeated cosmos.base.v1beta1.Coin supply = 1 diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto index 1195025f7f..449deba115 100644 --- a/proto/cosmos/bank/v1beta1/tx.proto +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -9,23 +9,18 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; // MsgSend represents a message to send coins from one account to another. message MsgSend { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes from_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"from_address\"" - ]; - bytes to_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"to_address\"" - ]; + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // MsgMultiSend represents an arbitrary multi-in, multi-out send message. message MsgMultiSend { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; repeated Input inputs = 1 [(gogoproto.nullable) = false]; repeated Output outputs = 2 [(gogoproto.nullable) = false]; diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index 554337de39..9d7edbbbbd 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -22,7 +22,8 @@ message TxResponse { uint32 code = 4; // Result bytes, if any. string data = 5; - // The output of the application's logger (raw string). May be non-deterministic. + // The output of the application's logger (raw string). May be + // non-deterministic. string raw_log = 6; // The output of the application's logger (typed). May be non-deterministic. repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; @@ -34,8 +35,9 @@ message TxResponse { int64 gas_used = 10; // The request transaction bytes. google.protobuf.Any tx = 11; - // 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. + // 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. string timestamp = 12; } @@ -80,15 +82,15 @@ message GasInfo { message Result { option (gogoproto.goproto_getters) = false; - // Data is any data returned from message or handler execution. It MUST be length - // prefixed in order to separate data from multiple message executions. + // Data is any data returned from message or handler execution. It MUST be + // length prefixed in order to separate data from multiple message executions. bytes data = 1; // Log contains the log information from message or handler execution. string log = 2; - // Events contains a slice of Event objects that were emitted during message or - // handler execution. + // Events contains a slice of Event objects that were emitted during message + // or handler execution. repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; } @@ -99,7 +101,8 @@ message SimulationResponse { Result result = 2; } -// MsgData defines the data returned in a Result object during message execution. +// MsgData defines the data returned in a Result object during message +// execution. message MsgData { option (gogoproto.stringer) = true; @@ -107,8 +110,8 @@ message MsgData { bytes data = 2; } -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object for -// each message. +// TxMsgData defines a list of MsgData. A transaction will have a MsgData object +// for each message. message TxMsgData { option (gogoproto.stringer) = true; diff --git a/proto/cosmos/base/crypto/v1beta1/crypto.proto b/proto/cosmos/base/crypto/v1beta1/crypto.proto index a38a22dc12..b9804790bc 100644 --- a/proto/cosmos/base/crypto/v1beta1/crypto.proto +++ b/proto/cosmos/base/crypto/v1beta1/crypto.proto @@ -22,16 +22,16 @@ message PublicKey { } } -// PubKeyMultisigThreshold specifies a public key type which nests multiple public -// keys and a threshold +// PubKeyMultisigThreshold specifies a public key type which nests multiple +// public keys and a threshold message PubKeyMultisigThreshold { uint32 threshold = 1 [(gogoproto.customname) = "K", (gogoproto.moretags) = "yaml:\"threshold\""]; repeated PublicKey public_keys = 2 [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; } // MultiSignature wraps the signatures from a PubKeyMultisigThreshold. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers signed and -// with which modes. +// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +// signed and with which modes. message MultiSignature { option (gogoproto.goproto_unrecognized) = true; repeated bytes signatures = 1; diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/proto/cosmos/base/query/v1beta1/pagination.proto index 48b00bd39d..2a8cbccedd 100644 --- a/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/proto/cosmos/base/query/v1beta1/pagination.proto @@ -26,13 +26,14 @@ message PageRequest { uint64 limit = 3; // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. count_total - // is only respected when offset is used. It is ignored when key is set. + // a count of the total number of items available for pagination in UIs. + // count_total is only respected when offset is used. It is ignored when key + // is set. bool count_total = 4; } -// PageResponse is to be embedded in gRPC response messages where the corresponding -// request message has used PageRequest. +// PageResponse is to be embedded in gRPC response messages where the +// corresponding request message has used PageRequest. // // message SomeResponse { // repeated Bar results = 1; diff --git a/proto/cosmos/base/reflection/v1beta1/reflection.proto b/proto/cosmos/base/reflection/v1beta1/reflection.proto index 950c94c98c..22670e72b8 100644 --- a/proto/cosmos/base/reflection/v1beta1/reflection.proto +++ b/proto/cosmos/base/reflection/v1beta1/reflection.proto @@ -16,7 +16,8 @@ service ReflectionService { // ListImplementations list all the concrete types that implement a given // interface. rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations"; + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" + "{interface_name}/implementations"; }; } @@ -29,13 +30,15 @@ message ListAllInterfacesResponse { repeated string interface_names = 1; } -// ListImplementationsRequest is the request type of the ListImplementations RPC. +// ListImplementationsRequest is the request type of the ListImplementations +// RPC. message ListImplementationsRequest { // interface_name defines the interface to query the implementations for. string interface_name = 1; } -// ListImplementationsResponse is the response type of the ListImplementations RPC. +// ListImplementationsResponse is the response type of the ListImplementations +// RPC. message ListImplementationsResponse { repeated string implementation_message_names = 1; } diff --git a/proto/cosmos/capability/v1beta1/capability.proto b/proto/cosmos/capability/v1beta1/capability.proto index 001f121cbe..1c8332f341 100644 --- a/proto/cosmos/capability/v1beta1/capability.proto +++ b/proto/cosmos/capability/v1beta1/capability.proto @@ -5,8 +5,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; import "gogoproto/gogo.proto"; -// Capability defines an implementation of an object capability. The index provided to -// a Capability must be globally unique. +// Capability defines an implementation of an object capability. The index +// provided to a Capability must be globally unique. message Capability { option (gogoproto.goproto_stringer) = false; diff --git a/proto/cosmos/crisis/v1beta1/tx.proto b/proto/cosmos/crisis/v1beta1/tx.proto index 11693c41ba..5c77a6a491 100644 --- a/proto/cosmos/crisis/v1beta1/tx.proto +++ b/proto/cosmos/crisis/v1beta1/tx.proto @@ -7,9 +7,10 @@ import "gogoproto/gogo.proto"; // MsgVerifyInvariant represents a message to verify a particular invariance. message MsgVerifyInvariant { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string sender = 1; string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; } diff --git a/proto/cosmos/crypto/multisig/keys.proto b/proto/cosmos/crypto/multisig/keys.proto index 5fb2fe6f03..f8398e8052 100644 --- a/proto/cosmos/crypto/multisig/keys.proto +++ b/proto/cosmos/crypto/multisig/keys.proto @@ -6,12 +6,13 @@ import "google/protobuf/any.proto"; option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; -// LegacyAminoPubKey specifies a public key type +// LegacyAminoPubKey specifies a public key type // which nests multiple public keys and a threshold, // it uses legacy amino address rules. message LegacyAminoPubKey { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; - repeated google.protobuf.Any public_keys = 2 [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; + uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; + repeated google.protobuf.Any public_keys = 2 + [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; } diff --git a/proto/cosmos/crypto/secp256k1/keys.proto b/proto/cosmos/crypto/secp256k1/keys.proto index c1ba7db34d..a22725713a 100644 --- a/proto/cosmos/crypto/secp256k1/keys.proto +++ b/proto/cosmos/crypto/secp256k1/keys.proto @@ -11,12 +11,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; // the x-coordinate. Otherwise the first byte is a 0x03. // This prefix is followed with the x-coordinate. message PubKey { - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_stringer) = false; - bytes key = 1; + bytes key = 1; } // PrivKey defines a secp256k1 private key. message PrivKey { - bytes key = 1; + bytes key = 1; } diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto index 2c98f19801..ae98ec0b98 100644 --- a/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -35,9 +35,10 @@ message Params { // 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) +// 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 message ValidatorHistoricalRewards { repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ @@ -103,21 +104,22 @@ message FeePool { // together with how many coins are proposed to be spent, and to which // recipient account. message CommunityPoolSpendProposal { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + string title = 1; string description = 2; - bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string recipient = 3; repeated cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } -// DelegatorStartingInfo represents the starting info for a delegator reward period. -// It tracks the previous validator period, the delegation's amount -// of staking token, and the creation height (to check later on -// if any slashes have occurred). -// NOTE: Even though validators are slashed to whole staking tokens, the -// delegators within the validator may be left with less than a full token, +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, // thus sdk.Dec is used. message DelegatorStartingInfo { uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; @@ -132,23 +134,24 @@ message DelegatorStartingInfo { // DelegationDelegatorReward represents the properties // of a delegator's delegation reward. message DelegationDelegatorReward { - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; repeated cosmos.base.v1beta1.DecCoin reward = 2 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit message CommunityPoolSpendProposalWithDeposit { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - bytes recipient = 3 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"recipient\"" - ]; - string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; - string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; + string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; + string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; } diff --git a/proto/cosmos/distribution/v1beta1/genesis.proto b/proto/cosmos/distribution/v1beta1/genesis.proto index 4b8dcc1bfb..7fb6e7c541 100644 --- a/proto/cosmos/distribution/v1beta1/genesis.proto +++ b/proto/cosmos/distribution/v1beta1/genesis.proto @@ -8,29 +8,27 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/distribution/v1beta1/distribution.proto"; -// DelegatorWithdrawInfo is the address for where distributions rewards are withdrawn to by default -// this struct is only used at genesis to feed in default withdraw addresses. +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. message DelegatorWithdrawInfo { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address is the address of the delegator. - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; // withdraw_address is the address to withdraw the delegation rewards to. - bytes withdraw_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"withdraw_address\"" - ]; + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; } // ValidatorOutstandingRewardsRecord is used for import/export via genesis json. message ValidatorOutstandingRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validator_address is the address of the validator. - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // outstanding_rewards represents the oustanding rewards of a validator. repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ @@ -40,26 +38,28 @@ message ValidatorOutstandingRewardsRecord { ]; } -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis json. +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. message ValidatorAccumulatedCommissionRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validator_address is the address of the validator. - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // accumulated is the accumulated commission of a validator. ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; } -// ValidatorHistoricalRewardsRecord is used for import / export via genesis json. +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. message ValidatorHistoricalRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validator_address is the address of the validator. - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // period defines the period the historical rewards apply to. uint64 period = 2; @@ -70,11 +70,11 @@ message ValidatorHistoricalRewardsRecord { // ValidatorCurrentRewardsRecord is used for import / export via genesis json. message ValidatorCurrentRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validator_address is the address of the validator. - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // rewards defines the current rewards of a validator. ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; @@ -82,17 +82,14 @@ message ValidatorCurrentRewardsRecord { // DelegatorStartingInfoRecord used for import / export via genesis json. message DelegatorStartingInfoRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address is the address of the delegator. - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; // validator_address is the address of the validator. - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // starting_info defines the starting info of a delegator. DelegatorStartingInfo starting_info = 3 @@ -101,11 +98,11 @@ message DelegatorStartingInfoRecord { // ValidatorSlashEventRecord is used for import / export via genesis json. message ValidatorSlashEventRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validator_address is the address of the validator. - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // height defines the block height at which the slash event occured. uint64 height = 2; // period is the period of the slash event. @@ -116,6 +113,9 @@ message ValidatorSlashEventRecord { // GenesisState defines the distribution module's genesis state. message GenesisState { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // params defines all the paramaters of the module. Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; @@ -127,10 +127,7 @@ message GenesisState { [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; // fee_pool defines the previous proposer at genesis. - bytes previous_proposer = 4 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress", - (gogoproto.moretags) = "yaml:\"previous_proposer\"" - ]; + string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; // fee_pool defines the outstanding rewards of all validators at genesis. repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto index fc48f7e456..2991218d80 100644 --- a/proto/cosmos/distribution/v1beta1/query.proto +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -19,12 +19,14 @@ service Query { // ValidatorOutstandingRewards queries rewards of a validator address. rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) returns (QueryValidatorOutstandingRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards"; + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/outstanding_rewards"; } // ValidatorCommission queries accumulated commission for a validator. rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/commission"; + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/commission"; } // ValidatorSlashes queries slash events of a validator. @@ -34,23 +36,26 @@ service Query { // DelegationRewards queries the total rewards accrued by a delegation. rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = - "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}"; + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" + "{validator_address}"; } - // DelegationTotalRewards queries the total rewards accrued by a each validator. + // DelegationTotalRewards queries the total rewards accrued by a each + // validator. rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; } // DelegatorValidators queries the validators of a delegator. rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators"; + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/validators"; } // DelegatorWithdrawAddress queries withdraw address of a delegator. rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address"; + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/withdraw_address"; } // CommunityPool queries the community pool coins. @@ -68,33 +73,41 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } -// QueryValidatorOutstandingRewardsRequest is the request type for the Query/ValidatorOutstandingRewards RPC method. +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. message QueryValidatorOutstandingRewardsRequest { // validator_address defines the validator address to query for. - bytes validator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_address = 1; } -// QueryValidatorOutstandingRewardsResponse is the response type for the Query/ValidatorOutstandingRewards RPC method. +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. message QueryValidatorOutstandingRewardsResponse { ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; } -// QueryValidatorCommissionRequest is the request type for the Query/ValidatorCommission RPC method +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method message QueryValidatorCommissionRequest { // validator_address defines the validator address to query for. - bytes validator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_address = 1; } -// QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method message QueryValidatorCommissionResponse { // commission defines the commision the validator received. ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; } -// QueryValidatorSlashesRequest is the request type for the Query/ValidatorSlashes RPC method +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method message QueryValidatorSlashesRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + // validator_address defines the validator address to query for. - bytes validator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_address = 1; // starting_height defines the optional starting height to query the slashes. uint64 starting_height = 2; // starting_height defines the optional ending height to query the slashes. @@ -103,7 +116,8 @@ message QueryValidatorSlashesRequest { cosmos.base.query.v1beta1.PageRequest pagination = 4; } -// QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. message QueryValidatorSlashesResponse { // slashes defines the slashes the validator received. repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; @@ -112,28 +126,37 @@ message QueryValidatorSlashesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method. +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. message QueryDelegationRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. - bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_address = 1; // validator_address defines the validator address to query for. - bytes validator_address = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_address = 2; } -// QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. message QueryDelegationRewardsResponse { // rewards defines the rewards accrued by a delegation. repeated cosmos.base.v1beta1.DecCoin rewards = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; } -// QueryDelegationTotalRewardsRequest is the request type for the Query/DelegationTotalRewards RPC method. +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. message QueryDelegationTotalRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; // delegator_address defines the delegator address to query for. - bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_address = 1; } -// QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. message QueryDelegationTotalRewardsResponse { // rewards defines all the rewards accrued by a delegator. repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; @@ -142,34 +165,52 @@ message QueryDelegationTotalRewardsResponse { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; } -// QueryDelegatorValidatorsRequest is the request type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. - bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_address = 1; } -// QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // validators defines the validators a delegator is delegating for. - repeated bytes validators = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + repeated string validators = 1; } -// QueryDelegatorWithdrawAddressRequest is the request type for the Query/DelegatorWithdrawAddress RPC method. +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. message QueryDelegatorWithdrawAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. - bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_address = 1; } -// QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // withdraw_address defines the delegator address to query for. - bytes withdraw_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string withdraw_address = 1; } -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC method. +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. message QueryCommunityPoolRequest {} -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method. +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. message QueryCommunityPoolResponse { // pool defines community pool's coins. repeated cosmos.base.v1beta1.DecCoin pool = 1 diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index 7988a47be5..97427c49bd 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -10,41 +10,39 @@ import "cosmos/base/v1beta1/coin.proto"; // MsgSetWithdrawAddress sets the withdraw address for // a delegator (or validator self-delegation). message MsgSetWithdrawAddress { - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes withdraw_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"withdraw_address\"" - ]; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; } // MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator // from a single validator. message MsgWithdrawDelegatorReward { - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; } -// MsgWithdrawValidatorCommission withdraws the full commission to the validator address. +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. message MsgWithdrawValidatorCommission { - bytes validator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; } // MsgFundCommunityPool allows an account to directly // fund the community pool. message MsgFundCommunityPool { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + repeated cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string depositor = 2; } \ No newline at end of file diff --git a/proto/cosmos/evidence/v1beta1/evidence.proto b/proto/cosmos/evidence/v1beta1/evidence.proto index 6d6fa2d029..14612c314f 100644 --- a/proto/cosmos/evidence/v1beta1/evidence.proto +++ b/proto/cosmos/evidence/v1beta1/evidence.proto @@ -12,12 +12,10 @@ import "google/protobuf/timestamp.proto"; message Equivocation { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; int64 height = 1; google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; int64 power = 3; - bytes consensus_address = 4 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress", - (gogoproto.moretags) = "yaml:\"consensus_address\"" - ]; + string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; } \ No newline at end of file diff --git a/proto/cosmos/evidence/v1beta1/query.proto b/proto/cosmos/evidence/v1beta1/query.proto index 27bc6be3c9..eda00544c7 100644 --- a/proto/cosmos/evidence/v1beta1/query.proto +++ b/proto/cosmos/evidence/v1beta1/query.proto @@ -33,13 +33,15 @@ message QueryEvidenceResponse { google.protobuf.Any evidence = 1; } -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC method. +// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC +// method. message QueryAllEvidenceRequest { // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. +// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +// method. message QueryAllEvidenceResponse { // evidence returns all evidences. repeated google.protobuf.Any evidence = 1; diff --git a/proto/cosmos/evidence/v1beta1/tx.proto b/proto/cosmos/evidence/v1beta1/tx.proto index bb42e24cd0..352f7a1c23 100644 --- a/proto/cosmos/evidence/v1beta1/tx.proto +++ b/proto/cosmos/evidence/v1beta1/tx.proto @@ -11,7 +11,9 @@ import "cosmos_proto/cosmos.proto"; // MsgSubmitEvidence represents a message that supports submitting arbitrary // Evidence of misbehavior such as equivocation or counterfactual signing. message MsgSubmitEvidence { + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - bytes submitter = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; + + string submitter = 1; + google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; } diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 62e0596c9e..1d72e64321 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -40,12 +40,14 @@ message TextProposal { string description = 2; } -// Deposit defines an amount deposited by an account address to an active proposal. +// Deposit defines an amount deposited by an account address to an active +// proposal. message Deposit { - option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string depositor = 2; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -80,15 +82,20 @@ enum ProposalStatus { // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. + // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + // period. PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. + // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + // period. PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. + // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + // passed. PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. + // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + // been rejected. PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. + // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + // failed. PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; } @@ -109,10 +116,11 @@ message TallyResult { // Vote defines a vote on a governance proposal. // A Vote consists of a proposal ID, the voter, and the vote option. message Vote { - option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string voter = 2; VoteOption option = 3; } @@ -126,7 +134,8 @@ message DepositParams { (gogoproto.jsontag) = "min_deposit,omitempty" ]; - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. google.protobuf.Duration max_deposit_period = 2 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, @@ -148,7 +157,8 @@ message VotingParams { // TallyParams defines the params for tallying votes on governance proposals. message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be considered valid. + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. bytes quorum = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, @@ -162,7 +172,8 @@ message TallyParams { (gogoproto.jsontag) = "threshold,omitempty" ]; - // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. bytes veto_threshold = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto index de32398483..da62bdbad1 100644 --- a/proto/cosmos/gov/v1beta1/query.proto +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -64,20 +64,24 @@ message QueryProposalResponse { // QueryProposalsRequest is the request type for the Query/Proposals RPC method. message QueryProposalsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // proposal_status defines the status of the proposals. ProposalStatus proposal_status = 1; // voter defines the voter address for the proposals. - bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string voter = 2; // depositor defines the deposit addresses from the proposals. - bytes depositor = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string depositor = 3; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; } -// QueryProposalsResponse is the response type for the Query/Proposals RPC method. +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. message QueryProposalsResponse { repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; @@ -87,11 +91,14 @@ message QueryProposalsResponse { // QueryVoteRequest is the request type for the Query/Vote RPC method. message QueryVoteRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; // voter defines the oter address for the proposals. - bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string voter = 2; } // QueryVoteResponse is the response type for the Query/Vote RPC method. @@ -120,7 +127,8 @@ message QueryVotesResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". string params_type = 1; } @@ -136,11 +144,14 @@ message QueryParamsResponse { // QueryDepositRequest is the request type for the Query/Deposit RPC method. message QueryDepositRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; // depositor defines the deposit addresses from the proposals. - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string depositor = 2; } // QueryDepositResponse is the response type for the Query/Deposit RPC method. diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 6dc541a85d..01e3bf2be0 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -15,7 +15,7 @@ option (gogoproto.goproto_getters_all) = false; // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary // proposal Content. message MsgSubmitProposal { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ @@ -23,24 +23,24 @@ message MsgSubmitProposal { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"initial_deposit\"" ]; - bytes proposer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string proposer = 3; } // MsgVote defines a message to cast a vote. message MsgVote { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string voter = 2; VoteOption option = 3; } // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string depositor = 2; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } \ No newline at end of file diff --git a/proto/cosmos/mint/v1beta1/query.proto b/proto/cosmos/mint/v1beta1/query.proto index bf6d76d3a9..acd341d777 100644 --- a/proto/cosmos/mint/v1beta1/query.proto +++ b/proto/cosmos/mint/v1beta1/query.proto @@ -37,16 +37,19 @@ message QueryParamsResponse { // QueryInflationRequest is the request type for the Query/Inflation RPC method. message QueryInflationRequest {} -// QueryInflationResponse is the response type for the Query/Inflation RPC method. +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. message QueryInflationResponse { // inflation is the current minting inflation value. bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } -// QueryAnnualProvisionsRequest is the request type for the Query/AnnualProvisions RPC method. +// QueryAnnualProvisionsRequest is the request type for the +// Query/AnnualProvisions RPC method. message QueryAnnualProvisionsRequest {} -// QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. message QueryAnnualProvisionsResponse { // annual_provisions is the current minting annual provisions value. bytes annual_provisions = 1 diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index 2c075d2ab6..5b47261b19 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -16,7 +16,8 @@ message ParameterChangeProposal { repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; } -// ParamChange defines an individual parameter change, for use in ParameterChangeProposal. +// ParamChange defines an individual parameter change, for use in +// ParameterChangeProposal. message ParamChange { option (gogoproto.goproto_stringer) = false; diff --git a/proto/cosmos/params/v1beta1/query.proto b/proto/cosmos/params/v1beta1/query.proto index 81f5a4c749..1078e02ae3 100644 --- a/proto/cosmos/params/v1beta1/query.proto +++ b/proto/cosmos/params/v1beta1/query.proto @@ -9,7 +9,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; // Query defines the gRPC querier service. service Query { - // Params queries a specific parameter of a module, given its subspace and key. + // Params queries a specific parameter of a module, given its subspace and + // key. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/params/v1beta1/params"; } diff --git a/proto/cosmos/slashing/v1beta1/genesis.proto b/proto/cosmos/slashing/v1beta1/genesis.proto index ce12768b29..c813561343 100644 --- a/proto/cosmos/slashing/v1beta1/genesis.proto +++ b/proto/cosmos/slashing/v1beta1/genesis.proto @@ -31,7 +31,8 @@ message SigningInfo { [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; } -// ValidatorMissedBlocks contains array of missed blocks of corresponding address. +// ValidatorMissedBlocks contains array of missed blocks of corresponding +// address. message ValidatorMissedBlocks { // address is the validator address. string address = 1; diff --git a/proto/cosmos/slashing/v1beta1/query.proto b/proto/cosmos/slashing/v1beta1/query.proto index b4393dc51e..869049a0ed 100644 --- a/proto/cosmos/slashing/v1beta1/query.proto +++ b/proto/cosmos/slashing/v1beta1/query.proto @@ -34,24 +34,28 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC method +// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC +// method message QuerySigningInfoRequest { // cons_address is the address to query signing info of - bytes cons_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + string cons_address = 1; } -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method message QuerySigningInfoResponse { // val_signing_info is the signing info of requested val cons address ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; } -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method +// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC +// method message QuerySigningInfosRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method message QuerySigningInfosResponse { // info is the signing info of all validators repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto index ba885cde13..657a90f1bd 100644 --- a/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -8,14 +8,13 @@ import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -// ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. +// ValidatorSigningInfo defines a validator's signing info for monitoring their +// liveness activity. message ValidatorSigningInfo { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress" // validator consensus address - ]; + string address = 1; // height at which validator was first a candidate OR was unjailed int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; // index offset into signed block bit array @@ -23,7 +22,8 @@ message ValidatorSigningInfo { // timestamp validator cannot be unjailed until google.protobuf.Timestamp jailed_until = 4 [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // whether or not a validator has been tombstoned (killed out of validator set) + // whether or not a validator has been tombstoned (killed out of validator + // set) bool tombstoned = 5; // missed blocks counter (to avoid scanning the array every time) int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; diff --git a/proto/cosmos/slashing/v1beta1/tx.proto b/proto/cosmos/slashing/v1beta1/tx.proto index 7cb1ffd924..14494aa477 100644 --- a/proto/cosmos/slashing/v1beta1/tx.proto +++ b/proto/cosmos/slashing/v1beta1/tx.proto @@ -10,9 +10,8 @@ import "gogoproto/gogo.proto"; // them into the bonded validator set, so they can begin receiving provisions // and rewards again. message MsgUnjail { - bytes validator_addr = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"address\"", - (gogoproto.jsontag) = "address" - ]; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; } \ No newline at end of file diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto index a073120f35..d1563dbc54 100644 --- a/proto/cosmos/staking/v1beta1/genesis.proto +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -42,8 +42,11 @@ message GenesisState { // LastValidatorPower required for validator set update logic. message LastValidatorPower { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // address is the address of the validator. - bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string address = 1; // power defines the power of the validator. int64 power = 2; diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index a1b7edd144..4852c53535 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -28,18 +28,21 @@ service Query { // ValidatorUnbondingDelegations queries unbonding delegations of a validator. rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) returns (QueryValidatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations"; + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" + "{validator_addr}/unbonding_delegations"; } // Delegation queries delegate info for given validator delegator pair. rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}"; + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}"; } - // UnbondingDelegation queries unbonding info for given validator delegator pair. + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (google.api.http).get = - "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation"; + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}/unbonding_delegation"; } // DelegatorDelegations queries all delegations of a given delegator address. @@ -47,10 +50,12 @@ service Query { option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; } - // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) returns (QueryDelegatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations"; + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" + "{delegator_addr}/unbonding_delegations"; } // Redelegations queries redelegations of given address. @@ -58,14 +63,17 @@ service Query { option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; } - // DelegatorValidators queries all validators info for given delegator address. + // DelegatorValidators queries all validators info for given delegator + // address. rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; } - // DelegatorValidator queries validator info for given delegator validator pair. + // DelegatorValidator queries validator info for given delegator validator + // pair. rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}"; + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" + "{validator_addr}"; } // HistoricalInfo queries the historical info for given height. @@ -105,7 +113,7 @@ message QueryValidatorsResponse { // QueryValidatorRequest is response type for the Query/Validator RPC method message QueryValidatorRequest { // validator_addr defines the validator address to query for. - bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 1; } // QueryValidatorResponse is response type for the Query/Validator RPC method @@ -114,16 +122,18 @@ message QueryValidatorResponse { Validator validator = 1 [(gogoproto.nullable) = false]; } -// QueryValidatorDelegationsRequest is request type for the Query/ValidatorDelegations RPC method +// QueryValidatorDelegationsRequest is request type for the +// Query/ValidatorDelegations RPC method message QueryValidatorDelegationsRequest { // validator_addr defines the validator address to query for. - bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method message QueryValidatorDelegationsResponse { repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; @@ -132,16 +142,18 @@ message QueryValidatorDelegationsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryValidatorUnbondingDelegationsRequest is required type for the Query/ValidatorUnbondingDelegations RPC method +// QueryValidatorUnbondingDelegationsRequest is required type for the +// Query/ValidatorUnbondingDelegations RPC method message QueryValidatorUnbondingDelegationsRequest { // validator_addr defines the validator address to query for. - bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method. +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. message QueryValidatorUnbondingDelegationsResponse { repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; @@ -151,11 +163,14 @@ message QueryValidatorUnbondingDelegationsResponse { // QueryDelegationRequest is request type for the Query/Delegation RPC method. message QueryDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // validator_addr defines the validator address to query for. - bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 2; } // QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -164,31 +179,41 @@ message QueryDelegationResponse { DelegationResponse delegation_response = 1; } -// QueryUnbondingDelegationRequest is request type for the Query/UnbondingDelegation RPC method. +// QueryUnbondingDelegationRequest is request type for the +// Query/UnbondingDelegation RPC method. message QueryUnbondingDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // validator_addr defines the validator address to query for. - bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 2; } -// QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. message QueryUnbondingDelegationResponse { // unbond defines the unbonding information of a delegation. UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; } -// QueryDelegatorDelegationsRequest is request type for the Query/DelegatorDelegations RPC method. +// QueryDelegatorDelegationsRequest is request type for the +// Query/DelegatorDelegations RPC method. message QueryDelegatorDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. message QueryDelegatorDelegationsResponse { // delegation_responses defines all the delegations' info of a delegator. repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; @@ -197,16 +222,21 @@ message QueryDelegatorDelegationsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryDelegatorUnbondingDelegationsRequest is request type for the Query/DelegatorUnbondingDelegations RPC method. +// QueryDelegatorUnbondingDelegationsRequest is request type for the +// Query/DelegatorUnbondingDelegations RPC method. message QueryDelegatorUnbondingDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method. +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. message QueryDelegatorUnbondingDelegationsResponse { repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; @@ -214,22 +244,27 @@ message QueryDelegatorUnbondingDelegationsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC method. +// QueryRedelegationsRequest is request type for the Query/Redelegations RPC +// method. message QueryRedelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // src_validator_addr defines the validator address to redelegate from. - bytes src_validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string src_validator_addr = 2; // dst_validator_addr defines the validator address to redelegate to. - bytes dst_validator_addr = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string dst_validator_addr = 3; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; } -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC method. +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. message QueryRedelegationsResponse { repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; @@ -237,16 +272,21 @@ message QueryRedelegationsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryDelegatorValidatorsRequest is request type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsRequest is request type for the +// Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsResponse { // validators defines the the validators' info of a delegator. repeated Validator validators = 1 [(gogoproto.nullable) = false]; @@ -255,28 +295,35 @@ message QueryDelegatorValidatorsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryDelegatorValidatorRequest is request type for the Query/DelegatorValidator RPC method. +// QueryDelegatorValidatorRequest is request type for the +// Query/DelegatorValidator RPC method. message QueryDelegatorValidatorRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_addr defines the delegator address to query for. - bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string delegator_addr = 1; // validator_addr defines the validator address to query for. - bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + string validator_addr = 2; } -// QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. message QueryDelegatorValidatorResponse { // validator defines the the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC method. +// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +// method. message QueryHistoricalInfoRequest { // height defines at which height to query the historical info. int64 height = 1; } -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method. +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. message QueryHistoricalInfoResponse { // hist defines the historical info at the given height. HistoricalInfo hist = 1; diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index 82eaf8c94e..aee82dcb42 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -9,8 +9,9 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; -// 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 +// 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). message HistoricalInfo { tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; @@ -58,23 +59,20 @@ message Description { string details = 5; } -// 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. +// 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. message Validator { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; - bytes operator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"operator_address\"" - ]; + string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; string consensus_pubkey = 2 [(gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; bool jailed = 3; int32 status = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.BondStatus"]; @@ -101,24 +99,19 @@ message ValAddresses { option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = true; - repeated bytes addresses = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; + repeated string addresses = 1; } // 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. message DVPair { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; } // DVPairs defines an array of DVPair objects. @@ -131,21 +124,13 @@ message DVPairs { // example, a DVVTriplet can be used to construct the key to getting a // Redelegation from state. message DVVTriplet { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_src_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_src_address\"" - ]; - bytes validator_dst_address = 3 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_dst_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; } // DVVTriplets defines an array of DVVTriplet objects. @@ -157,34 +142,24 @@ message DVVTriplets { // owned by one delegator, and is associated with the voting power of one // validator. message Delegation { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list. message UnbondingDelegation { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } @@ -224,21 +199,13 @@ message RedelegationEntry { // Redelegation contains the list of a particular delegator's redelegating bonds // from a particular source validator to a particular destination validator. message Redelegation { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_src_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_src_address\"" - ]; - bytes validator_dst_address = 3 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_dst_address\"" - ]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } @@ -255,10 +222,10 @@ message Params { string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; } -// DelegationResponse is equivalent to Delegation except that it contains a balance -// in addition to shares which is more suitable for client responses. +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. message DelegationResponse { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; Delegation delegation = 1 [(gogoproto.nullable) = false]; @@ -280,13 +247,14 @@ message RedelegationEntryResponse { // contain a balance in addition to shares which is more suitable for client // responses. message RedelegationResponse { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; Redelegation redelegation = 1 [(gogoproto.nullable) = false]; repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; } -// Pool is used for tracking bonded and not-bonded token supply of the bond denomination. +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. message Pool { option (gogoproto.description) = true; option (gogoproto.equal) = true; diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index a4cdf65a7c..4eb3c8418a 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -9,7 +9,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; // MsgCreateValidator defines an SDK message for creating a new validator. message MsgCreateValidator { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; Description description = 1 [(gogoproto.nullable) = false]; CommissionRates commission = 2 [(gogoproto.nullable) = false]; @@ -18,27 +19,19 @@ message MsgCreateValidator { (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.nullable) = false ]; - bytes delegator_address = 4 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 5 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; - string pubkey = 6; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; + string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string pubkey = 6; + cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; } // MsgEditValidator defines an SDK message for editing an existing validator. message MsgEditValidator { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; Description description = 1 [(gogoproto.nullable) = false]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"address\"" - ]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; // We pass a reference to the new commission rate and min self delegation as // it's not mandatory to update. If not updated, the deserialized rate will be @@ -58,51 +51,33 @@ message MsgEditValidator { // MsgDelegate defines an SDK message for performing a delegation of coins // from a delegator to a validator. message MsgDelegate { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; } // MsgBeginRedelegate defines an SDK message for performing a redelegation // of coins from a delegator and source validator to a destination validator. message MsgBeginRedelegate { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_src_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_src_address\"" - ]; - bytes validator_dst_address = 3 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_dst_address\"" - ]; - cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; } // MsgUndelegate defines an SDK message for performing an undelegation from a // delegate and a validator. message MsgUndelegate { - option (gogoproto.equal) = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; - bytes delegator_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"delegator_address\"" - ]; - bytes validator_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", - (gogoproto.moretags) = "yaml:\"validator_address\"" - ]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; } \ No newline at end of file diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto index e07ce73a7b..32b182bc78 100644 --- a/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -8,15 +8,17 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; // SignMode represents a signing mode with its own security guarantees. enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected + // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + // rejected SIGN_MODE_UNSPECIFIED = 0; - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified - // with raw bytes from Tx + // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + // verified with raw bytes from Tx SIGN_MODE_DIRECT = 1; - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable - // textual representation on top of the binary representation from SIGN_MODE_DIRECT + // SIGN_MODE_TEXTUAL is a future signing mode that will verify some + // human-readable textual representation on top of the binary representation + // from SIGN_MODE_DIRECT SIGN_MODE_TEXTUAL = 2; // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses @@ -30,9 +32,10 @@ message SignatureDescriptors { repeated SignatureDescriptor signatures = 1; } -// SignatureDescriptor is a convenience type which represents the full data for a -// signature including the public key of the signer, signing modes and the signature -// itself. It is primarily used for coordinating signatures between clients. +// SignatureDescriptor is a convenience type which represents the full data for +// a signature including the public key of the signer, signing modes and the +// signature itself. It is primarily used for coordinating signatures between +// clients. message SignatureDescriptor { // public_key is the public key of the signer google.protobuf.Any public_key = 1; diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index 1a3b21e05a..75604f98a8 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -14,37 +14,44 @@ message Tx { // body is the processable content of the transaction TxBody body = 1; - // auth_info is the authorization related content of the transaction, specifically - // signers, signer modes and fee + // auth_info is the authorization related content of the transaction, + // specifically signers, signer modes and fee AuthInfo auth_info = 2; - // signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to - // allow connecting signature meta information like public key and signing mode by position. + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. repeated bytes signatures = 3; } -// TxRaw is a variant of Tx that pins the signer's exact binary representation of body and -// auth_info. This is used for signing, broadcasting and verification. The binary -// `serialize(tx: TxRaw)` is stored in Tendermint and the hash `sha256(serialize(tx: TxRaw))` -// becomes the "txhash", commonly used as the transaction ID. +// TxRaw is a variant of Tx that pins the signer's exact binary representation +// of body and auth_info. This is used for signing, broadcasting and +// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and +// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used +// as the transaction ID. message TxRaw { - // body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc. + // body_bytes is a protobuf serialization of a TxBody that matches the + // representation in SignDoc. bytes body_bytes = 1; - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc. + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in SignDoc. bytes auth_info_bytes = 2; - // signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to - // allow connecting signature meta information like public key and signing mode by position. + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. repeated bytes signatures = 3; } // SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. message SignDoc { - // body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw. + // body_bytes is protobuf serialization of a TxBody that matches the + // representation in TxRaw. bytes body_bytes = 1; - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw. + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in TxRaw. bytes auth_info_bytes = 2; // chain_id is the unique identifier of the chain this transaction targets. @@ -58,12 +65,14 @@ message SignDoc { // TxBody is the body of a transaction that all signers sign over. message TxBody { - // messages is a list of messages to be executed. The required signers of those messages define - // the number and order of elements in AuthInfo's signer_infos and Tx's signatures. - // Each required signer address is added to the list only the first time it occurs. + // messages is a list of messages to be executed. The required signers of + // those messages define the number and order of elements in AuthInfo's + // signer_infos and Tx's signatures. Each required signer address is added to + // the list only the first time it occurs. // - // By convention, the first required signer (usually from the first message) is referred - // to as the primary signer and pays the fee for the whole transaction. + // By convention, the first required signer (usually from the first message) + // is referred to as the primary signer and pays the fee for the whole + // transaction. repeated google.protobuf.Any messages = 1; // memo is any arbitrary memo to be added to the transaction @@ -84,11 +93,13 @@ message TxBody { repeated google.protobuf.Any non_critical_extension_options = 2047; } -// AuthInfo describes the fee and signer modes that are used to sign a transaction. +// AuthInfo describes the fee and signer modes that are used to sign a +// transaction. message AuthInfo { // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's messages. - // The first element is the primary signer and the one which pays the fee. + // and order of elements must match the required signers from TxBody's + // messages. The first element is the primary signer and the one which pays + // the fee. repeated SignerInfo signer_infos = 1; // Fee is the fee and gas limit for the transaction. The first signer is the @@ -98,7 +109,8 @@ message AuthInfo { Fee fee = 2; } -// SignerInfo describes the public key and signing mode of a single top-level signer. +// SignerInfo describes the public key and signing mode of a single top-level +// signer. message SignerInfo { // public_key is the public key of the signer. It is optional for accounts // that already exist in state. If unset, the verifier can use the required \ @@ -110,8 +122,8 @@ message SignerInfo { ModeInfo mode_info = 2; // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. + // number of committed transactions signed by a given address. It is used to + // prevent replay attacks. uint64 sequence = 3; } @@ -128,7 +140,8 @@ message ModeInfo { } // Single is the mode info for a single signer. It is structured as a message - // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future + // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + // future message Single { // mode is the signing mode of the single signer cosmos.tx.signing.v1beta1.SignMode mode = 1; diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index fc6b4a234e..d5c6bd7b2b 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -19,22 +19,26 @@ service Query { } } -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC method. +// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +// method. message QueryCurrentPlanRequest {} -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. +// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +// method. message QueryCurrentPlanResponse { // plan is the current upgrade plan. Plan plan = 1; } -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC method. +// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +// method. message QueryAppliedPlanRequest { // name is the name of the applied plan to query for. string name = 1; } -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method. +// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +// method. message QueryAppliedPlanResponse { // height is the block height at which the plan was applied. int64 height = 1; diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto index 470fae3da9..b5f976bdef 100644 --- a/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -12,11 +12,13 @@ option (gogoproto.goproto_getters_all) = false; message Plan { option (gogoproto.equal) = true; - // Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any - // special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been - // set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height - // is reached and the software will exit. + // Sets the name for the upgrade. This name will be used by the upgraded + // version of the software to apply any special "on-upgrade" commands during + // the first BeginBlock method after the upgrade is applied. It is also used + // to detect whether a software version can handle a given upgrade. If no + // upgrade handler with this name has been set in the software, it will be + // assumed that the software is out-of-date when the upgrade Time or Height is + // reached and the software will exit. string name = 1; // The time after which the upgrade must be performed. @@ -32,7 +34,8 @@ message Plan { string info = 4; } -// SoftwareUpgradeProposal is a gov Content type for initiating a software upgrade. +// SoftwareUpgradeProposal is a gov Content type for initiating a software +// upgrade. message SoftwareUpgradeProposal { option (gogoproto.equal) = true; @@ -41,7 +44,8 @@ message SoftwareUpgradeProposal { Plan plan = 3 [(gogoproto.nullable) = false]; } -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software upgrade. +// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +// upgrade. message CancelSoftwareUpgradeProposal { option (gogoproto.equal) = true; diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 4219c01c24..0c5ce53ac8 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -11,14 +11,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; message MsgCreateVestingAccount { option (gogoproto.equal) = true; - bytes from_address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"from_address\"" - ]; - bytes to_address = 2 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"to_address\"" - ]; + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/proto/ibc/channel/channel.proto b/proto/ibc/channel/channel.proto index fc9b23a181..48b9ab1a2e 100644 --- a/proto/ibc/channel/channel.proto +++ b/proto/ibc/channel/channel.proto @@ -9,97 +9,127 @@ import "ibc/client/client.proto"; // MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It // is called by a relayer on Chain A. message MsgChannelOpenInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; Channel channel = 3 [(gogoproto.nullable) = false]; - bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 4; } // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // on Chain B. message MsgChannelOpenTry { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; Channel channel = 3 [(gogoproto.nullable) = false]; string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 7 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 7; } // MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge // the change of channel state to TRYOPEN on Chain B. message MsgChannelOpenAck { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""]; ibc.client.Height proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 6; } // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of channel state to OPEN on Chain A. message MsgChannelOpenConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 5; } // MsgChannelCloseInit defines a msg sent by a Relayer to Chain A // to close a channel with Chain B. message MsgChannelCloseInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 3; } // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // to acknowledge the change of channel state to CLOSED on Chain A. message MsgChannelCloseConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 5; } // MsgRecvPacket receives incoming IBC packet message MsgRecvPacket { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof = 2; ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 4; } // MsgTimeout receives timed-out packet message MsgTimeout { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof = 2; ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 5; } // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. message MsgTimeoutOnClose { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + Packet packet = 1 [(gogoproto.nullable) = false]; bytes proof = 2; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 6; } // MsgAcknowledgement receives incoming IBC acknowledgement message MsgAcknowledgement { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + Packet packet = 1 [(gogoproto.nullable) = false]; bytes acknowledgement = 2; bytes proof = 3; ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 5; } // Channel defines pipeline for exactly-once packet delivery between specific diff --git a/proto/ibc/channel/query.proto b/proto/ibc/channel/query.proto index b0a82c0491..39e0bf035e 100644 --- a/proto/ibc/channel/query.proto +++ b/proto/ibc/channel/query.proto @@ -72,7 +72,6 @@ service Query { "{packet_commitment_sequences}/unrelayed_acks"; } - // NextSequenceReceive returns the next receive sequence for a given channel. rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; diff --git a/proto/ibc/client/client.proto b/proto/ibc/client/client.proto index 3eaaf9701e..563bd54607 100644 --- a/proto/ibc/client/client.proto +++ b/proto/ibc/client/client.proto @@ -50,6 +50,9 @@ message ClientUpdateProposal { // MsgCreateClient defines a message to create an IBC client message MsgCreateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // client unique identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // light client state @@ -58,29 +61,35 @@ message MsgCreateClient { // height. google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; // signer address - bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 4; } // MsgUpdateClient defines an sdk.Msg to update a IBC client state using // the given header. message MsgUpdateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // client unique identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // header to update the light client google.protobuf.Any header = 2; // signer address - bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 3; } // MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for // light client misbehaviour. message MsgSubmitMisbehaviour { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // client unique identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // misbehaviour used for freezing the light client google.protobuf.Any misbehaviour = 2; // signer address - bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 3; } // Height is a monotonically increasing data type diff --git a/proto/ibc/client/query.proto b/proto/ibc/client/query.proto index 0dba4fb1ef..41897adbec 100644 --- a/proto/ibc/client/query.proto +++ b/proto/ibc/client/query.proto @@ -21,13 +21,15 @@ service Query { option (google.api.http).get = "/ibc/client/v1beta1/client_states"; } - // ConsensusState queries a consensus state associated with a client state at a given height. + // ConsensusState queries a consensus state associated with a client state at + // a given height. rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = - "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}"; + option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/" + "height/{epoch_height}"; } - // ConsensusStates queries all the consensus state associated with a given client. + // ConsensusStates queries all the consensus state associated with a given + // client. rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}"; } @@ -70,8 +72,9 @@ message QueryClientStatesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryConsensusStateRequest is the request type for the Query/ConsensusState RPC method. Besides -// the consensus state, it includes a proof and the height from which the proof was retrieved. +// QueryConsensusStateRequest is the request type for the Query/ConsensusState +// RPC method. Besides the consensus state, it includes a proof and the height +// from which the proof was retrieved. message QueryConsensusStateRequest { // client identifier string client_id = 1; @@ -79,11 +82,13 @@ message QueryConsensusStateRequest { uint64 epoch_number = 2; // consensus state epoch height uint64 epoch_height = 3; - // latest_height overrrides the height field and queries the latest stored ConsensusState + // latest_height overrrides the height field and queries the latest stored + // ConsensusState bool latest_height = 4; } -// QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method +// QueryConsensusStateResponse is the response type for the Query/ConsensusState +// RPC method message QueryConsensusStateResponse { // consensus state associated with the client identifier at the given height google.protobuf.Any consensus_state = 1; @@ -93,10 +98,10 @@ message QueryConsensusStateResponse { string proof_path = 3; // height at which the proof was retrieved ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; - ; } -// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates RPC method. +// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +// RPC method. message QueryConsensusStatesRequest { // client identifier string client_id = 1; @@ -104,7 +109,8 @@ message QueryConsensusStatesRequest { cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method +// QueryConsensusStatesResponse is the response type for the +// Query/ConsensusStates RPC method message QueryConsensusStatesResponse { // consensus states associated with the identifier repeated ConsensusStateWithHeight consensus_states = 1 [(gogoproto.nullable) = false]; diff --git a/proto/ibc/commitment/commitment.proto b/proto/ibc/commitment/commitment.proto index a02cd7c057..eed9f7b904 100644 --- a/proto/ibc/commitment/commitment.proto +++ b/proto/ibc/commitment/commitment.proto @@ -15,13 +15,14 @@ message MerkleRoot { } // MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) +// The constructed key from the Path and the key will be append(Path.KeyPath, +// append(Path.KeyPrefix, key...)) message MerklePrefix { bytes key_prefix = 1 [(gogoproto.moretags) = "yaml:\"key_prefix\""]; } -// MerklePath is the path used to verify commitment proofs, which can be an arbitrary -// structured object (defined by a commitment type). +// MerklePath is the path used to verify commitment proofs, which can be an +// arbitrary structured object (defined by a commitment type). message MerklePath { option (gogoproto.goproto_stringer) = false; @@ -29,9 +30,9 @@ message MerklePath { } // MerkleProof is a wrapper type that contains a merkle proof. -// It demonstrates membership or non-membership for an element or set of elements, -// verifiable in conjunction with a known commitment root. Proofs should be -// succinct. +// It demonstrates membership or non-membership for an element or set of +// elements, verifiable in conjunction with a known commitment root. Proofs +// should be succinct. message MerkleProof { tendermint.crypto.ProofOps proof = 1; } diff --git a/proto/ibc/connection/connection.proto b/proto/ibc/connection/connection.proto index 8c550f5c14..261fd85b03 100644 --- a/proto/ibc/connection/connection.proto +++ b/proto/ibc/connection/connection.proto @@ -11,15 +11,21 @@ import "ibc/client/client.proto"; // MsgConnectionOpenInit defines the msg sent by an account on Chain A to // initialize a connection with Chain B. message MsgConnectionOpenInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 4; } // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // connection on Chain B. message MsgConnectionOpenTry { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; @@ -35,12 +41,15 @@ message MsgConnectionOpenTry { bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.client.Height consensus_height = 10 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - bytes signer = 11 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 11; } // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. message MsgConnectionOpenAck { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; string version = 2; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; @@ -54,17 +63,20 @@ message MsgConnectionOpenAck { bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; ibc.client.Height consensus_height = 8 [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - bytes signer = 9 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 9; } // MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of connection state to OPEN on Chain A. message MsgConnectionOpenConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; // proof for the change of the connection state on Chain A: `INIT -> OPEN` bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string signer = 4; } // ICS03 - Connection Data Structures as defined in diff --git a/proto/ibc/connection/query.proto b/proto/ibc/connection/query.proto index de53edfa59..ba4b9b3e44 100644 --- a/proto/ibc/connection/query.proto +++ b/proto/ibc/connection/query.proto @@ -37,8 +37,8 @@ service Query { // ConnectionConsensusState queries the consensus state associated with the // connection. rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/" - "{epoch_number}/height/{epoch_height}"; + option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/" + "epoch/{epoch_number}/height/{epoch_height}"; } } diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 4209bfed6d..45bada7fed 100644 --- a/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -102,7 +102,8 @@ message ClientStateData { google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; } -// ConsensusStateSignBytes returns the SignBytes data for consensus state verification. +// ConsensusStateSignBytes returns the SignBytes data for consensus state +// verification. message ConsensusStateData { option (gogoproto.goproto_getters) = false; @@ -110,7 +111,8 @@ message ConsensusStateData { google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; } -// ConnectionStateSignBytes returns the SignBytes data for connection state verification. +// ConnectionStateSignBytes returns the SignBytes data for connection state +// verification. message ConnectionStateData { option (gogoproto.goproto_getters) = false; @@ -118,7 +120,8 @@ message ConnectionStateData { ibc.connection.ConnectionEnd connection = 2; } -// ChannelStateSignBytes returns the SignBytes data for channel state verification. +// ChannelStateSignBytes returns the SignBytes data for channel state +// verification. message ChannelStateData { option (gogoproto.goproto_getters) = false; @@ -126,20 +129,22 @@ message ChannelStateData { ibc.channel.Channel channel = 2; } -// PacketCommitmentSignBytes returns the SignBytes data for packet commitment verification. +// PacketCommitmentSignBytes returns the SignBytes data for packet commitment +// verification. message PacketCommitmentData { bytes path = 1; bytes commitment = 2; } -// PacketAcknowledgementSignBytes returns the SignBytes data for acknowledgement verification. +// PacketAcknowledgementSignBytes returns the SignBytes data for acknowledgement +// verification. message PacketAcknowledgementData { bytes path = 1; bytes acknowledgement = 2; } -// PacketAcknowledgementAbsenceSignBytes returns the SignBytes data for acknowledgement absence -// verification. +// PacketAcknowledgementAbsenceSignBytes returns the SignBytes data for +// acknowledgement absence verification. message PacketAcknowledgementAbsenseData { bytes path = 1; } diff --git a/proto/ibc/transfer/query.proto b/proto/ibc/transfer/query.proto index 31701531aa..9dc47a7c4c 100644 --- a/proto/ibc/transfer/query.proto +++ b/proto/ibc/transfer/query.proto @@ -26,25 +26,29 @@ service Query { } } -// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC method +// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +// method message QueryDenomTraceRequest { // hash (in hex format) of the denomination trace information. string hash = 1; } -// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. +// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +// method. message QueryDenomTraceResponse { // denom_trace returns the requested denomination trace information. DenomTrace denom_trace = 1; } -// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC method +// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +// method message QueryDenomTracesRequest { // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. +// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +// method. message QueryDenomTracesResponse { // denom_traces returns all denominations trace information. repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; diff --git a/proto/ibc/transfer/transfer.proto b/proto/ibc/transfer/transfer.proto index e7fd1383bc..c9709ae208 100644 --- a/proto/ibc/transfer/transfer.proto +++ b/proto/ibc/transfer/transfer.proto @@ -11,6 +11,9 @@ import "ibc/client/client.proto"; // ICS20 enabled chains. See ICS Spec here: // https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures message MsgTransfer { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // the port on which the packet will be sent string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; // the channel by which the packet will be sent @@ -18,7 +21,7 @@ message MsgTransfer { // the tokens to be transferred cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; // the sender address - bytes sender = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string sender = 4; // the recipient address on the destination chain string receiver = 5; // Timeout height relative to the current block height. diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 953aa825c5..19cac38acf 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -61,7 +61,7 @@ func (s *IntegrationTestSuite) TestGRPCServer() { var header metadata.MD bankRes, err := bankClient.Balance( context.Background(), - &banktypes.QueryBalanceRequest{Address: val0.Address, Denom: denom}, + &banktypes.QueryBalanceRequest{Address: val0.Address.String(), Denom: denom}, grpc.Header(&header), // Also fetch grpc header ) s.Require().NoError(err) @@ -75,7 +75,7 @@ func (s *IntegrationTestSuite) TestGRPCServer() { // Request metadata should work bankRes, err = bankClient.Balance( metadata.AppendToOutgoingContext(context.Background(), grpctypes.GRPCBlockHeightHeader, "1"), // Add metadata to request - &banktypes.QueryBalanceRequest{Address: val0.Address, Denom: denom}, + &banktypes.QueryBalanceRequest{Address: val0.Address.String(), Denom: denom}, grpc.Header(&header), ) blockHeight = header.Get(grpctypes.GRPCBlockHeightHeader) diff --git a/simapp/export.go b/simapp/export.go index 08deec4619..7586a90ae7 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -80,7 +80,16 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] // withdraw all delegator rewards dels := app.StakingKeeper.GetAllDelegations(ctx) for _, delegation := range dels { - _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) + if err != nil { + panic(err) + } + + delAddr, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } // clear validator slash events @@ -107,8 +116,16 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] // reinitialize all delegations for _, del := range dels { - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress) + valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + if err != nil { + panic(err) + } + delAddr, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + if err != nil { + panic(err) + } + app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) } // reset context height diff --git a/simapp/simd/cmd/genaccounts.go b/simapp/simd/cmd/genaccounts.go index bda0fcba53..27a182f1a4 100644 --- a/simapp/simd/cmd/genaccounts.go +++ b/simapp/simd/cmd/genaccounts.go @@ -84,7 +84,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa // create concrete account type based on input parameters var genAccount authtypes.GenesisAccount - balances := banktypes.Balance{Address: addr, Coins: coins.Sort()} + balances := banktypes.Balance{Address: addr.String(), Coins: coins.Sort()} baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) if !vestingAmt.IsZero() { diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 530447bb11..d93953e1f4 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -200,7 +200,7 @@ func InitTestnet( sdk.NewCoin(sdk.DefaultBondDenom, accStakingTokens), } - genBalances = append(genBalances, banktypes.Balance{Address: addr, Coins: coins.Sort()}) + genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) valTokens := sdk.TokensFromConsensusPower(100) diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index f4cccbf87d..31fed4c996 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -92,7 +92,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs for _, val := range valSet.Validators { validator := stakingtypes.Validator{ - OperatorAddress: val.Address.Bytes(), + OperatorAddress: sdk.ValAddress(val.Address).String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, val.PubKey), Jailed: false, Status: sdk.Bonded, diff --git a/testutil/network/network.go b/testutil/network/network.go index 349e053f71..582a0cb1a0 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -283,7 +283,7 @@ func New(t *testing.T, cfg Config) *Network { ) genFiles = append(genFiles, tmCfg.GenesisFile()) - genBalances = append(genBalances, banktypes.Balance{Address: addr, Coins: balances.Sort()}) + genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: balances.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) commission, err := sdk.NewDecFromStr("0.5") diff --git a/testutil/testdata/proto.pb.go b/testutil/testdata/proto.pb.go index d24ec3b6c5..929f0d4423 100644 --- a/testutil/testdata/proto.pb.go +++ b/testutil/testdata/proto.pb.go @@ -8,7 +8,6 @@ import ( encoding_binary "encoding/binary" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" tx "github.com/cosmos/cosmos-sdk/types/tx" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -576,7 +575,7 @@ func (m *TestAnyResponse) GetHasAnimal() *HasAnimal { // msg type for testing type TestMsg struct { - Signers []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,rep,name=signers,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signers,omitempty"` + Signers []string `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` } func (m *TestMsg) Reset() { *m = TestMsg{} } @@ -612,13 +611,6 @@ func (m *TestMsg) XXX_DiscardUnknown() { var xxx_messageInfo_TestMsg proto.InternalMessageInfo -func (m *TestMsg) GetSigners() []github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signers - } - return nil -} - // bad MultiSignature with extra fields type BadMultiSignature struct { Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` @@ -3435,132 +3427,131 @@ func init() { func init() { proto.RegisterFile("proto.proto", fileDescriptor_2fcc84b9998d60d8) } var fileDescriptor_2fcc84b9998d60d8 = []byte{ - // 2003 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x8f, 0x1b, 0x49, - 0x15, 0x9f, 0x76, 0xdb, 0x33, 0xf6, 0x1b, 0xaf, 0xc7, 0xa9, 0x0d, 0x4b, 0xc7, 0xd9, 0x4c, 0x66, - 0x5b, 0xd9, 0xc4, 0xac, 0x36, 0x76, 0xdc, 0x76, 0x24, 0x94, 0x03, 0x8a, 0x3d, 0x99, 0xd9, 0x89, - 0x48, 0x26, 0xa8, 0x93, 0x0d, 0x28, 0x17, 0xab, 0xdd, 0x5d, 0xb6, 0x5b, 0xb1, 0xab, 0x86, 0xae, - 0x72, 0x32, 0xe6, 0x84, 0xe0, 0xc0, 0x75, 0x2f, 0x08, 0x89, 0x1b, 0x47, 0x4e, 0x68, 0xbf, 0x01, - 0x37, 0x72, 0x41, 0xca, 0x05, 0x09, 0x09, 0x29, 0x42, 0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 0x7a, 0xd0, 0x85, 0x04, 0x73, 0xe4, 0x8e, 0xa8, - 0x52, 0x99, 0xf7, 0x48, 0x51, 0xfc, 0x20, 0xbc, 0x6d, 0x11, 0x35, 0xcf, 0x98, 0x2d, 0x2b, 0xc9, - 0x75, 0x50, 0xe5, 0xc2, 0x9c, 0x27, 0xe1, 0xf8, 0xce, 0xde, 0x8b, 0xd7, 0x9b, 0xda, 0xcb, 0xd7, - 0x9b, 0xda, 0xdf, 0x5f, 0x6f, 0x6a, 0x5f, 0xbc, 0xd9, 0x5c, 0x79, 0xf9, 0x66, 0x73, 0xe5, 0xaf, - 0x6f, 0x36, 0x57, 0x9e, 0xd4, 0x4e, 0xbe, 0xa7, 0xc1, 0x8c, 0x4f, 0xb8, 0x3f, 0xaa, 0x47, 0xcc, - 0xbd, 0x55, 0x19, 0x32, 0xcd, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x37, 0x15, 0xe8, 0xdf, + // 1987 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x72, 0x49, 0x89, 0x7c, 0xa2, 0x29, 0x7a, 0xe2, 0xa6, 0x6b, 0x3a, 0x96, 0x95, 0x85, + 0x63, 0x33, 0x41, 0x4c, 0x5a, 0x4b, 0x1a, 0x28, 0x7c, 0x28, 0x4c, 0xca, 0x52, 0x64, 0xc0, 0x96, + 0x8b, 0xb5, 0x93, 0x16, 0xbe, 0x10, 0xcb, 0xdd, 0x21, 0xb9, 0x30, 0x39, 0xa3, 0xee, 0x2c, 0x25, + 0xb1, 0xa7, 0xa2, 0x3d, 0xb4, 0xc7, 0x5c, 0x8a, 0x02, 0x3d, 0xb5, 0xc7, 0x9e, 0x8a, 0xfc, 0x07, + 0xbd, 0xd5, 0x97, 0x02, 0xbe, 0x14, 0x28, 0x50, 0x20, 0x28, 0xec, 0x6b, 0xff, 0x83, 0xa2, 0x48, + 0x31, 0x1f, 0xfb, 0x41, 0x89, 0x54, 0x68, 0xa5, 0x8d, 0x21, 0x20, 0x17, 0x72, 0xe6, 0xed, 0x6f, + 0x7e, 0xf3, 0xe6, 0x7d, 0xed, 0xce, 0x0c, 0xac, 0xee, 0x07, 0x34, 0xa4, 0x35, 0xf1, 0x8b, 0xf2, + 0x21, 0x66, 0xa1, 0xe7, 0x84, 0x4e, 0xe5, 0x52, 0x9f, 0xf6, 0xa9, 0x10, 0xd6, 0x79, 0x4b, 0x3e, + 0xaf, 0x5c, 0xee, 0x53, 0xda, 0x1f, 0xe2, 0xba, 0xe8, 0x75, 0xc7, 0xbd, 0xba, 0x43, 0x26, 0xea, + 0x51, 0xc5, 0xa5, 0x6c, 0x44, 0x59, 0x3d, 0x3c, 0xaa, 0x1f, 0x6c, 0x76, 0x71, 0xe8, 0x6c, 0xd6, + 0xc3, 0x23, 0xf9, 0xcc, 0xbc, 0x05, 0xfa, 0x7d, 0xda, 0x47, 0x08, 0xb2, 0xcc, 0xff, 0x19, 0x36, + 0xb4, 0x0d, 0xad, 0x5a, 0xb0, 0x45, 0x9b, 0xcb, 0x88, 0x33, 0xc2, 0x46, 0x46, 0xca, 0x78, 0xdb, + 0xbc, 0x03, 0xfa, 0x96, 0x13, 0x22, 0x03, 0x56, 0x46, 0x94, 0xf8, 0xcf, 0x71, 0xa0, 0x46, 0x44, + 0x5d, 0x74, 0x09, 0x72, 0x43, 0xff, 0x00, 0x33, 0x31, 0x2a, 0x67, 0xcb, 0x8e, 0xf9, 0x09, 0x14, + 0x76, 0x1d, 0xd6, 0x22, 0xfe, 0xc8, 0x19, 0xa2, 0x8f, 0x61, 0xd9, 0x11, 0x2d, 0x31, 0x76, 0xd5, + 0xba, 0x54, 0x93, 0xaa, 0xd7, 0x22, 0xd5, 0x6b, 0x2d, 0x32, 0xb1, 0x15, 0x06, 0x15, 0x41, 0x3b, + 0x12, 0x64, 0xba,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 0x91, 0xe3, 0xdb, 0xbb, 0x2f, 0x5e, 0xad, 0x6b, 0x2f, + 0x5f, 0xad, 0x6b, 0xff, 0x7c, 0xb5, 0xae, 0x7d, 0xfe, 0x7a, 0x7d, 0xe9, 0xe5, 0xeb, 0xf5, 0xa5, + 0xbf, 0xbf, 0x5e, 0x5f, 0x7a, 0x56, 0xeb, 0xfb, 0xe1, 0x60, 0xdc, 0xad, 0xb9, 0x74, 0x54, 0x57, + 0x97, 0x87, 0xf2, 0xef, 0x16, 0xf3, 0x9e, 0xd7, 0x39, 0xe1, 0x38, 0xf4, 0x87, 0xf5, 0x88, 0xb9, + 0xbb, 0x2c, 0x42, 0xa6, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xd7, 0x2e, 0x82, 0xb2, 0x1c, 0x00, 0x00, } @@ -6808,8 +6799,8 @@ func (m *TestMsg) Size() (n int) { var l int _ = l if len(m.Signers) > 0 { - for _, b := range m.Signers { - l = len(b) + for _, s := range m.Signers { + l = len(s) n += 1 + l + sovProto(uint64(l)) } } @@ -8990,7 +8981,7 @@ func (m *TestMsg) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signers", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProto @@ -9000,23 +8991,23 @@ func (m *TestMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthProto } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthProto } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signers = append(m.Signers, make([]byte, postIndex-iNdEx)) - copy(m.Signers[len(m.Signers)-1], dAtA[iNdEx:postIndex]) + m.Signers = append(m.Signers, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex diff --git a/testutil/testdata/proto.proto b/testutil/testdata/proto.proto index f9d3ad8af9..154bd92be8 100644 --- a/testutil/testdata/proto.proto +++ b/testutil/testdata/proto.proto @@ -62,7 +62,8 @@ message TestAnyResponse { // msg type for testing message TestMsg { - repeated bytes signers = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + option (gogoproto.goproto_getters) = false; + repeated string signers = 1; } // bad MultiSignature with extra fields diff --git a/testutil/testdata/test_tx.go b/testutil/testdata/test_tx.go index bbcfde5f81..d80daaa03d 100644 --- a/testutil/testdata/test_tx.go +++ b/testutil/testdata/test_tx.go @@ -29,8 +29,14 @@ func NewTestGasLimit() uint64 { // NewTestMsg creates a message for testing with the given signers. func NewTestMsg(addrs ...sdk.AccAddress) *TestMsg { + var accAddresses []string + + for _, addr := range addrs { + accAddresses = append(accAddresses, addr.String()) + } + return &TestMsg{ - Signers: addrs, + Signers: accAddresses, } } @@ -45,4 +51,13 @@ func (msg *TestMsg) GetSignBytes() []byte { } return sdk.MustSortJSON(bz) } +func (msg *TestMsg) GetSigners() []sdk.AccAddress { + addrs := make([]sdk.AccAddress, len(msg.Signers)) + for i, in := range msg.Signers { + addr, _ := sdk.AccAddressFromBech32(in) + addrs[i] = addr + } + + return addrs +} func (msg *TestMsg) ValidateBasic() error { return nil } diff --git a/types/abci.pb.go b/types/abci.pb.go index cc4a54055f..c17680722e 100644 --- a/types/abci.pb.go +++ b/types/abci.pb.go @@ -40,7 +40,8 @@ type TxResponse struct { Code uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"` // Result bytes, if any. Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` - // The output of the application's logger (raw string). May be non-deterministic. + // The output of the application's logger (raw string). May be + // non-deterministic. RawLog string `protobuf:"bytes,6,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` // The output of the application's logger (typed). May be non-deterministic. Logs ABCIMessageLogs `protobuf:"bytes,7,rep,name=logs,proto3,castrepeated=ABCIMessageLogs" json:"logs"` @@ -52,8 +53,9 @@ type TxResponse struct { GasUsed int64 `protobuf:"varint,10,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The request transaction bytes. Tx *types.Any `protobuf:"bytes,11,opt,name=tx,proto3" json:"tx,omitempty"` - // 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. + // 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. Timestamp string `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -313,13 +315,13 @@ func (m *GasInfo) GetGasUsed() uint64 { // Result is the union of ResponseFormat and ResponseCheckTx. type Result struct { - // Data is any data returned from message or handler execution. It MUST be length - // prefixed in order to separate data from multiple message executions. + // Data is any data returned from message or handler execution. It MUST be + // length prefixed in order to separate data from multiple message executions. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Log contains the log information from message or handler execution. Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"` - // Events contains a slice of Event objects that were emitted during message or - // handler execution. + // Events contains a slice of Event objects that were emitted during message + // or handler execution. Events []types1.Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events"` } @@ -401,7 +403,8 @@ func (m *SimulationResponse) GetResult() *Result { return nil } -// MsgData defines the data returned in a Result object during message execution. +// MsgData defines the data returned in a Result object during message +// execution. type MsgData struct { MsgType string `protobuf:"bytes,1,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -453,8 +456,8 @@ func (m *MsgData) GetData() []byte { return nil } -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object for -// each message. +// TxMsgData defines a list of MsgData. A transaction will have a MsgData object +// for each message. type TxMsgData struct { Data []*MsgData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` } diff --git a/types/address.go b/types/address.go index 47edbd9526..8683a50fe3 100644 --- a/types/address.go +++ b/types/address.go @@ -185,6 +185,7 @@ func (aa AccAddress) MarshalYAML() (interface{}, error) { func (aa *AccAddress) UnmarshalJSON(data []byte) error { var s string err := json.Unmarshal(data, &s) + if err != nil { return err } diff --git a/types/query/pagination.pb.go b/types/query/pagination.pb.go index 6b292bfd5e..0a404696d7 100644 --- a/types/query/pagination.pb.go +++ b/types/query/pagination.pb.go @@ -42,8 +42,9 @@ type PageRequest struct { // If left empty it will default to a value to be set by each app. Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. count_total - // is only respected when offset is used. It is ignored when key is set. + // a count of the total number of items available for pagination in UIs. + // count_total is only respected when offset is used. It is ignored when key + // is set. CountTotal bool `protobuf:"varint,4,opt,name=count_total,json=countTotal,proto3" json:"count_total,omitempty"` } @@ -108,8 +109,8 @@ func (m *PageRequest) GetCountTotal() bool { return false } -// PageResponse is to be embedded in gRPC response messages where the corresponding -// request message has used PageRequest. +// PageResponse is to be embedded in gRPC response messages where the +// corresponding request message has used PageRequest. // // message SomeResponse { // repeated Bar results = 1; diff --git a/types/query/pagination_test.go b/types/query/pagination_test.go index c16bc197ef..9927adce6c 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -46,7 +47,7 @@ func TestPagination(t *testing.T) { balances = append(balances, sdk.NewInt64Coin(denom, 100)) } - addr1 := sdk.AccAddress([]byte("addr1")) + addr1 := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) app.AccountKeeper.SetAccount(ctx, acc1) require.NoError(t, app.BankKeeper.SetBalances(ctx, addr1, balances)) diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index c7e95c6eec..b8657e55b7 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -28,13 +28,15 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SignMode int32 const ( - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected + // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + // rejected SignMode_SIGN_MODE_UNSPECIFIED SignMode = 0 - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified - // with raw bytes from Tx + // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + // verified with raw bytes from Tx SignMode_SIGN_MODE_DIRECT SignMode = 1 - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable - // textual representation on top of the binary representation from SIGN_MODE_DIRECT + // SIGN_MODE_TEXTUAL is a future signing mode that will verify some + // human-readable textual representation on top of the binary representation + // from SIGN_MODE_DIRECT SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses // Amino JSON and will be removed in the future @@ -109,9 +111,10 @@ func (m *SignatureDescriptors) GetSignatures() []*SignatureDescriptor { return nil } -// SignatureDescriptor is a convenience type which represents the full data for a -// signature including the public key of the signer, signing modes and the signature -// itself. It is primarily used for coordinating signatures between clients. +// SignatureDescriptor is a convenience type which represents the full data for +// a signature including the public key of the signer, signing modes and the +// signature itself. It is primarily used for coordinating signatures between +// clients. type SignatureDescriptor struct { // public_key is the public key of the signer PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index 68bb723b38..e6a1ac3161 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -32,11 +32,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Tx struct { // body is the processable content of the transaction Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // auth_info is the authorization related content of the transaction, specifically - // signers, signer modes and fee + // auth_info is the authorization related content of the transaction, + // specifically signers, signer modes and fee AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` - // signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to - // allow connecting signature meta information like public key and signing mode by position. + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` } @@ -94,17 +95,21 @@ func (m *Tx) GetSignatures() [][]byte { return nil } -// TxRaw is a variant of Tx that pins the signer's exact binary representation of body and -// auth_info. This is used for signing, broadcasting and verification. The binary -// `serialize(tx: TxRaw)` is stored in Tendermint and the hash `sha256(serialize(tx: TxRaw))` -// becomes the "txhash", commonly used as the transaction ID. +// TxRaw is a variant of Tx that pins the signer's exact binary representation +// of body and auth_info. This is used for signing, broadcasting and +// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and +// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used +// as the transaction ID. type TxRaw struct { - // body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc. + // body_bytes is a protobuf serialization of a TxBody that matches the + // representation in SignDoc. BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc. + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in SignDoc. AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - // signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to - // allow connecting signature meta information like public key and signing mode by position. + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` } @@ -164,9 +169,11 @@ func (m *TxRaw) GetSignatures() [][]byte { // SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. type SignDoc struct { - // body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw. + // body_bytes is protobuf serialization of a TxBody that matches the + // representation in TxRaw. BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw. + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in TxRaw. AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` // chain_id is the unique identifier of the chain this transaction targets. // It prevents signed transactions from being used on another chain by an @@ -239,12 +246,14 @@ func (m *SignDoc) GetAccountNumber() uint64 { // TxBody is the body of a transaction that all signers sign over. type TxBody struct { - // messages is a list of messages to be executed. The required signers of those messages define - // the number and order of elements in AuthInfo's signer_infos and Tx's signatures. - // Each required signer address is added to the list only the first time it occurs. + // messages is a list of messages to be executed. The required signers of + // those messages define the number and order of elements in AuthInfo's + // signer_infos and Tx's signatures. Each required signer address is added to + // the list only the first time it occurs. // - // By convention, the first required signer (usually from the first message) is referred - // to as the primary signer and pays the fee for the whole transaction. + // By convention, the first required signer (usually from the first message) + // is referred to as the primary signer and pays the fee for the whole + // transaction. Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // memo is any arbitrary memo to be added to the transaction Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` @@ -329,11 +338,13 @@ func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any { return nil } -// AuthInfo describes the fee and signer modes that are used to sign a transaction. +// AuthInfo describes the fee and signer modes that are used to sign a +// transaction. type AuthInfo struct { // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's messages. - // The first element is the primary signer and the one which pays the fee. + // and order of elements must match the required signers from TxBody's + // messages. The first element is the primary signer and the one which pays + // the fee. SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` // Fee is the fee and gas limit for the transaction. The first signer is the // primary signer and the one which pays the fee. The fee can be calculated @@ -389,7 +400,8 @@ func (m *AuthInfo) GetFee() *Fee { return nil } -// SignerInfo describes the public key and signing mode of a single top-level signer. +// SignerInfo describes the public key and signing mode of a single top-level +// signer. type SignerInfo struct { // public_key is the public key of the signer. It is optional for accounts // that already exist in state. If unset, the verifier can use the required \ @@ -399,8 +411,8 @@ type SignerInfo struct { // structure to support nested multisig pubkey's ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"` // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. + // number of committed transactions signed by a given address. It is used to + // prevent replay attacks. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` } @@ -548,7 +560,8 @@ func (*ModeInfo) XXX_OneofWrappers() []interface{} { } // Single is the mode info for a single signer. It is structured as a message -// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future +// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the +// future type ModeInfo_Single struct { // mode is the signing mode of the single signer Mode signing.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index fcfbb5f0a1..df0dce31fc 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -93,7 +93,7 @@ func GetAccountCmd() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Account(context.Background(), &types.QueryAccountRequest{Address: key}) + res, err := queryClient.Account(context.Background(), &types.QueryAccountRequest{Address: key.String()}) if err != nil { return err } diff --git a/x/auth/client/rest/rest_test.go b/x/auth/client/rest/rest_test.go index 7ae6fe824f..1c8d492426 100644 --- a/x/auth/client/rest/rest_test.go +++ b/x/auth/client/rest/rest_test.go @@ -2,9 +2,10 @@ package rest_test import ( "fmt" - "strings" "testing" + "strings" + "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/tx" @@ -14,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/types/tx/signing" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + rest2 "github.com/cosmos/cosmos-sdk/x/auth/client/rest" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -182,8 +184,8 @@ func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, sequence txConfig := legacytx.StdTxConfig{Cdc: s.cfg.LegacyAmino} msg := &types.MsgSend{ - FromAddress: val.Address, - ToAddress: val.Address, + FromAddress: val.Address.String(), + ToAddress: val.Address.String(), Amount: sdk.Coins{sdk.NewInt64Coin(fmt.Sprintf("%stoken", val.Moniker), 100)}, } diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index ef6e43ded9..cf3c7b8443 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -19,12 +19,17 @@ func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountReques return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.Address.Empty() { + if req.Address == "" { return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) - account := ak.GetAccount(ctx, req.Address) + addr, err := sdk.AccAddressFromBech32(req.Address) + + if err != nil { + return nil, err + } + account := ak.GetAccount(ctx, addr) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) } diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 732535cf10..47c48f0276 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -31,7 +31,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { { "invalid request", func() { - req = &types.QueryAccountRequest{Address: []byte("")} + req = &types.QueryAccountRequest{Address: ""} }, false, func(res *types.QueryAccountResponse) {}, @@ -39,7 +39,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { { "invalid request with empty byte array", func() { - req = &types.QueryAccountRequest{Address: []byte{}} + req = &types.QueryAccountRequest{Address: ""} }, false, func(res *types.QueryAccountResponse) {}, @@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { { "account not found", func() { - req = &types.QueryAccountRequest{Address: addr} + req = &types.QueryAccountRequest{Address: addr.String()} }, false, func(res *types.QueryAccountResponse) {}, @@ -57,7 +57,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { func() { suite.app.AccountKeeper.SetAccount(suite.ctx, suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr)) - req = &types.QueryAccountRequest{Address: addr} + req = &types.QueryAccountRequest{Address: addr.String()} }, true, func(res *types.QueryAccountResponse) { diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index bb74d7b500..87744d58c5 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -47,7 +47,7 @@ func TestKeeperTestSuite(t *testing.T) { func TestAccountMapperGetSet(t *testing.T) { app, ctx := createTestApp(true) - addr := sdk.AccAddress([]byte("some-address")) + addr := sdk.AccAddress([]byte("some---------address")) // no account before its created acc := app.AccountKeeper.GetAccount(ctx, addr) @@ -77,8 +77,8 @@ func TestAccountMapperGetSet(t *testing.T) { func TestAccountMapperRemoveAccount(t *testing.T) { app, ctx := createTestApp(true) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1---------------")) + addr2 := sdk.AccAddress([]byte("addr2---------------")) // create accounts acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) diff --git a/x/auth/keeper/querier.go b/x/auth/keeper/querier.go index 0a654867d4..130aaacda9 100644 --- a/x/auth/keeper/querier.go +++ b/x/auth/keeper/querier.go @@ -31,7 +31,12 @@ func queryAccount(ctx sdk.Context, req abci.RequestQuery, k AccountKeeper, legac return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - account := k.GetAccount(ctx, params.Address) + addr, err := sdk.AccAddressFromBech32(params.Address) + if err != nil { + return nil, err + } + + account := k.GetAccount(ctx, addr) if account == nil { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "account %s does not exist", params.Address) } diff --git a/x/auth/keeper/querier_test.go b/x/auth/keeper/querier_test.go index 55bb20ca7b..b64f971b3c 100644 --- a/x/auth/keeper/querier_test.go +++ b/x/auth/keeper/querier_test.go @@ -39,13 +39,13 @@ func TestQueryAccount(t *testing.T) { require.Error(t, err) require.Nil(t, res) - req.Data = legacyQuerierCdc.MustMarshalJSON(&types.QueryAccountRequest{Address: []byte("")}) + req.Data = legacyQuerierCdc.MustMarshalJSON(&types.QueryAccountRequest{Address: ""}) res, err = querier(ctx, path, req) require.Error(t, err) require.Nil(t, res) _, _, addr := testdata.KeyTestPubAddr() - req.Data = legacyQuerierCdc.MustMarshalJSON(&types.QueryAccountRequest{Address: addr}) + req.Data = legacyQuerierCdc.MustMarshalJSON(&types.QueryAccountRequest{Address: addr.String()}) res, err = querier(ctx, path, req) require.Error(t, err) require.Nil(t, res) diff --git a/x/auth/signing/handler_map_test.go b/x/auth/signing/handler_map_test.go index 6ca4056612..041b8182e9 100644 --- a/x/auth/signing/handler_map_test.go +++ b/x/auth/signing/handler_map_test.go @@ -37,8 +37,8 @@ func TestHandlerMap_GetSignBytes(t *testing.T) { memo := "foo" msgs := []sdk.Msg{ &banktypes.MsgSend{ - FromAddress: addr1, - ToAddress: addr2, + FromAddress: addr1.String(), + ToAddress: addr2.String(), Amount: coins, }, } diff --git a/x/auth/types/account.go b/x/auth/types/account.go index d243e74a78..6c83b2075e 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -8,9 +8,8 @@ import ( "strings" "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/crypto" - yaml "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -26,9 +25,10 @@ var ( ) // NewBaseAccount creates a new BaseAccount object +//nolint:interfacer func NewBaseAccount(address sdk.AccAddress, pubKey crypto.PubKey, accountNumber, sequence uint64) *BaseAccount { acc := &BaseAccount{ - Address: address, + Address: address.String(), AccountNumber: accountNumber, Sequence: sequence, } @@ -49,13 +49,14 @@ func ProtoBaseAccount() AccountI { // NewBaseAccountWithAddress - returns a new base account with a given address func NewBaseAccountWithAddress(addr sdk.AccAddress) *BaseAccount { return &BaseAccount{ - Address: addr, + Address: addr.String(), } } // GetAddress - Implements sdk.AccountI. func (acc BaseAccount) GetAddress() sdk.AccAddress { - return acc.Address + addr, _ := sdk.AccAddressFromBech32(acc.Address) + return addr } // SetAddress - Implements sdk.AccountI. @@ -64,7 +65,7 @@ func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error { return errors.New("cannot override BaseAccount address") } - acc.Address = addr + acc.Address = addr.String() return nil } @@ -125,8 +126,16 @@ func (acc *BaseAccount) SetSequence(seq uint64) error { // Validate checks for errors on the account fields func (acc BaseAccount) Validate() error { - if acc.PubKey != nil && acc.Address != nil && - !bytes.Equal(acc.GetPubKey().Address().Bytes(), acc.Address.Bytes()) { + if acc.Address == "" || acc.PubKey == nil { + return nil + } + + accAddr, err := sdk.AccAddressFromBech32(acc.Address) + if err != nil { + return err + } + + if !bytes.Equal(acc.GetPubKey().Address().Bytes(), accAddr.Bytes()) { return errors.New("account address and pubkey address do not match") } @@ -226,7 +235,7 @@ func (ma ModuleAccount) Validate() error { return errors.New("module account name cannot be blank") } - if !ma.Address.Equals(sdk.AccAddress(crypto.AddressHash([]byte(ma.Name)))) { + if ma.Address != sdk.AccAddress(crypto.AddressHash([]byte(ma.Name))).String() { return fmt.Errorf("address %s cannot be derived from the module name '%s'", ma.Address, ma.Name) } @@ -249,8 +258,13 @@ func (ma ModuleAccount) String() string { // MarshalYAML returns the YAML representation of a ModuleAccount. func (ma ModuleAccount) MarshalYAML() (interface{}, error) { + accAddr, err := sdk.AccAddressFromBech32(ma.Address) + if err != nil { + return nil, err + } + bs, err := yaml.Marshal(moduleAccountPretty{ - Address: ma.Address, + Address: accAddr, PubKey: "", AccountNumber: ma.AccountNumber, Sequence: ma.Sequence, @@ -267,8 +281,13 @@ func (ma ModuleAccount) MarshalYAML() (interface{}, error) { // MarshalJSON returns the JSON representation of a ModuleAccount. func (ma ModuleAccount) MarshalJSON() ([]byte, error) { + accAddr, err := sdk.AccAddressFromBech32(ma.Address) + if err != nil { + return nil, err + } + return json.Marshal(moduleAccountPretty{ - Address: ma.Address, + Address: accAddr, PubKey: "", AccountNumber: ma.AccountNumber, Sequence: ma.Sequence, diff --git a/x/auth/types/account_retriever.go b/x/auth/types/account_retriever.go index dc96a2522e..2b8d24ac27 100644 --- a/x/auth/types/account_retriever.go +++ b/x/auth/types/account_retriever.go @@ -27,11 +27,12 @@ func (ar AccountRetriever) GetAccount(clientCtx client.Context, addr sdk.AccAddr // GetAccountWithHeight queries for an account given an address. Returns the // height of the query with the account. An error is returned if the query // or decoding fails. +//nolint:interfacer func (ar AccountRetriever) GetAccountWithHeight(clientCtx client.Context, addr sdk.AccAddress) (AccountI, int64, error) { var header metadata.MD queryClient := NewQueryClient(clientCtx) - res, err := queryClient.Account(context.Background(), &QueryAccountRequest{Address: addr}, grpc.Header(&header)) + res, err := queryClient.Account(context.Background(), &QueryAccountRequest{Address: addr.String()}, grpc.Header(&header)) if err != nil { return nil, 0, err } diff --git a/x/auth/types/auth.pb.go b/x/auth/types/auth.pb.go index ea770d1f9a..4a05cf8158 100644 --- a/x/auth/types/auth.pb.go +++ b/x/auth/types/auth.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "github.com/regen-network/cosmos-proto" @@ -30,10 +29,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // for basic account functionality. Any custom account type should extend this // type for additional functionality (e.g. vesting). type BaseAccount struct { - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` - PubKey *types.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"public_key,omitempty" yaml:"public_key"` - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + PubKey *types.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"public_key,omitempty" yaml:"public_key"` + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` } func (m *BaseAccount) Reset() { *m = BaseAccount{} } @@ -192,50 +191,50 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/auth.proto", fileDescriptor_7e1f7e915d020d2d) } var fileDescriptor_7e1f7e915d020d2d = []byte{ - // 687 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0x3f, 0x6f, 0xd3, 0x5e, - 0x14, 0x8d, 0x9b, 0xfc, 0xfa, 0xe7, 0xa5, 0xad, 0x54, 0x37, 0x6d, 0x93, 0xfc, 0x90, 0x6d, 0x79, - 0x0a, 0x12, 0x71, 0x94, 0xa0, 0x22, 0x35, 0x03, 0x22, 0x2e, 0x0c, 0x55, 0x69, 0x55, 0xb9, 0x12, - 0x03, 0x42, 0x32, 0xcf, 0xce, 0xab, 0x6b, 0x35, 0x2f, 0xcf, 0xf5, 0x7b, 0xae, 0xe2, 0x7e, 0x02, - 0x46, 0x46, 0xc6, 0x7e, 0x00, 0x46, 0xbe, 0x01, 0x0b, 0x63, 0xc5, 0xc4, 0x64, 0x50, 0xba, 0x20, - 0xc6, 0x8c, 0x4c, 0xc8, 0xef, 0xb9, 0x69, 0x52, 0x05, 0xa6, 0xbc, 0x7b, 0xce, 0xb9, 0xf7, 0x9e, - 0xdc, 0xab, 0x6b, 0xa0, 0xb8, 0x84, 0x62, 0x42, 0x1b, 0x30, 0x62, 0xa7, 0x8d, 0x8b, 0xa6, 0x83, - 0x18, 0x6c, 0xf2, 0xc0, 0x08, 0x42, 0xc2, 0x88, 0xbc, 0x2e, 0x78, 0x83, 0x43, 0x19, 0x5f, 0xad, - 0x08, 0xd0, 0xe6, 0x92, 0x46, 0xa6, 0xe0, 0x41, 0xb5, 0xe4, 0x11, 0x8f, 0x08, 0x3c, 0x7d, 0x65, - 0x68, 0xc5, 0x23, 0xc4, 0xeb, 0xa1, 0x06, 0x8f, 0x9c, 0xe8, 0xa4, 0x01, 0xfb, 0xb1, 0xa0, 0xf4, - 0x8f, 0x73, 0xa0, 0x68, 0x42,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0x89, 0x76, 0x09, 0x65, 0x47, 0x28, 0x34, 0x63, 0x86, 0xe4, 0x73, 0xb0, 0x95, 0x76, - 0xbb, 0x40, 0xa1, 0x7f, 0x12, 0x0b, 0x3d, 0xea, 0xb6, 0xb6, 0xb7, 0x9b, 0x3b, 0x62, 0xe1, 0x66, - 0x7b, 0x98, 0xa8, 0xa5, 0x63, 0xdf, 0x7b, 0xc5, 0x15, 0x69, 0xea, 0x8b, 0xe7, 0x9c, 0x1f, 0x25, - 0xaa, 0x22, 0xba, 0xfd, 0xa5, 0x80, 0x6e, 0x95, 0xe8, 0x54, 0x9e, 0x80, 0xe5, 0x18, 0x54, 0xee, - 0x67, 0x50, 0xe4, 0x06, 0xad, 0xed, 0x27, 0x67, 0xcd, 0xf2, 0x7f, 0xbc, 0xe9, 0xd3, 0x61, 0xa2, - 0x6e, 0x4e, 0x35, 0x3d, 0xbe, 0x55, 0x8c, 0x12, 0x55, 0x9b, 0xdd, 0x76, 0x5c, 0x44, 0xb7, 0x36, - 0xe9, 0xcc, 0xdc, 0xf6, 0x62, 0xba, 0xef, 0x9f, 0x57, 0xaa, 0x64, 0xee, 0x7e, 0x19, 0x2a, 0xd2, - 0xf5, 0x50, 0x91, 0x7e, 0x0c, 0x15, 0xe9, 0xfd, 0x8d, 0x92, 0xbb, 0xbe, 0x51, 0x72, 0xdf, 0x6e, - 0x94, 0xdc, 0xeb, 0x87, 0xff, 0xbc, 0xe5, 0x81, 0xf8, 0x12, 0xf1, 0x93, 0x76, 0xe6, 0xf9, 0x95, - 0x3e, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x49, 0xdd, 0xa9, 0xa5, 0x04, 0x00, 0x00, + // 674 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4d, 0x4f, 0xdb, 0x4a, + 0x14, 0x8d, 0x5f, 0xf2, 0xf8, 0x98, 0x00, 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 0xc8, 0x0b, 0xdb, 0x3b, 0x4f, 0xcf, 0x5b, + 0xca, 0xdf, 0xbc, 0xe8, 0xb3, 0x61, 0xaa, 0x6d, 0xcd, 0x14, 0x3d, 0x19, 0x2b, 0x46, 0xa9, 0xa6, + 0xcf, 0x2f, 0x3b, 0x31, 0x31, 0xec, 0x2d, 0x3a, 0x37, 0xb7, 0xb3, 0x94, 0xff, 0x67, 0x25, 0x6b, + 0xff, 0xcb, 0x50, 0x95, 0x6e, 0x87, 0xaa, 0xf4, 0x7d, 0xa8, 0x4a, 0x1f, 0xef, 0xd5, 0xc2, 0xed, + 0xbd, 0x5a, 0xf8, 0x7a, 0xaf, 0x16, 0xde, 0xfe, 0xe7, 0x07, 0xec, 0x2c, 0x76, 0x4d, 0x8f, 0xe0, + 0xfc, 0x2d, 0xc8, 0x7f, 0x1a, 0xb4, 0x7b, 0xde, 0x1c, 0x88, 0xa7, 0x85, 0x25, 0x21, 0xa2, 0xee, + 0x02, 0xff, 0x52, 0x9f, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x49, 0x90, 0x16, 0xd9, 0x76, 0x04, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -545,7 +544,7 @@ func (m *BaseAccount) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuth @@ -555,25 +554,23 @@ func (m *BaseAccount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthAuth } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAuth } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 8aba24cccd..ff8be08a3f 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -7,7 +7,6 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -35,7 +34,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryAccountRequest is the request type for the Query/Account RPC method. type QueryAccountRequest struct { // address defines the address to query for. - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (m *QueryAccountRequest) Reset() { *m = QueryAccountRequest{} } @@ -71,13 +70,6 @@ func (m *QueryAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo -func (m *QueryAccountRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Address - } - return nil -} - // QueryAccountResponse is the response type for the Query/Account RPC method. type QueryAccountResponse struct { // account defines the account of the corresponding address. @@ -217,34 +209,34 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 428 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xbd, 0xce, 0xd3, 0x30, - 0x14, 0x4d, 0x2a, 0x68, 0x91, 0xe9, 0xe4, 0x66, 0x80, 0x14, 0x52, 0x14, 0x86, 0xb6, 0x43, 0x6d, - 0xb5, 0x4c, 0x48, 0x2c, 0x09, 0x13, 0x62, 0x29, 0x11, 0x13, 0x0b, 0x72, 0x52, 0x93, 0x56, 0xd0, - 0x38, 0x8d, 0x1d, 0x44, 0x85, 0x90, 0x10, 0x2f, 0x00, 0x12, 0x2b, 0x8f, 0xc1, 0x43, 0x54, 0x4c, - 0x95, 0x58, 0x98, 0x2a, 0xd4, 0x7e, 0x4f, 0xf1, 0x4d, 0x9f, 0x6a, 0xdf, 0x0c, 0x95, 0xf2, 0xfd, - 0x4c, 0x89, 0xef, 0x3d, 0xf7, 0x9c, 0xe3, 0x73, 0x8d, 0x7a, 0x89, 0x90, 0x4b, 0x21, 0x29, 0x2b, - 0xd5, 0x9c, 0x7e, 0x1c, 0xc7, 0x5c, 0xb1, 0x31, 0x5d, 0x95, 0xbc, 0x58, 0x93, 0xbc, 0x10, 0x4a, - 0xe0, 0x8e, 0x01, 0x90, 0x23, 0x80, 0x00, 0xc0, 0x75, 0x52, 0x91, 0x0a, 0xdd, 0xa7, 0xc7, 0x3f, - 0x03, 0x75, 0xef, 0xa7, 0x42, 0xa4, 0x1f, 0x38, 0xd5, 0xa7, 0xb8, 0x7c, 0x47, 0x59, 0x06, 0x2c, - 0xee, 0x03, 0x68, 0xb1, 0x7c, 0x41, 0x59, 0x96, 0x09, 0xc5, 0xd4, 0x42, 0x64, 0x12, 0xba, 0x5e, - 0x9d, 0x09, 0x2d, 0x08, 0xc4, 0xa6, 0xff, 0xd6, 0x28, 0x82, 0x21, 0x7d, 0xf0, 0x63, 0xd4, 0x79, - 0x75, 0x74, 0x1b, 0x24, 0x89, 0x28, 0x33, 0x15, 0xf1, 0x55, 0xc9, 0xa5, 0xc2, 0x2f, 0x51, 0x8b, - 0xcd, 0x66, 0x05, 0x97, 0xf2, 0x9e, 0xfd, 0xc8, 0x1e, 0xb4, 0xc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0xcf, 0xfe, 0xbf, 0xf7, 0xec, 0x1f, 0x07, 0xcf, 0xda, 0x1e, 0x3c, 0xeb, 0xdf, 0xc1, 0xb3, 0xde, - 0x0c, 0xaf, 0x7c, 0x2e, 0x9f, 0x0c, 0x9b, 0x7e, 0x35, 0x71, 0x53, 0x2f, 0xfc, 0xc9, 0x45, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xa6, 0x5e, 0x10, 0x0d, 0x4e, 0x03, 0x00, 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x6f, 0xda, 0x40, + 0x14, 0xc7, 0x6d, 0xd4, 0x02, 0xbd, 0x76, 0x3a, 0x3c, 0x50, 0xd3, 0xda, 0x95, 0x3b, 0x00, 0x03, + 0x77, 0x82, 0x4e, 0x54, 0x5d, 0xa0, 0x53, 0x37, 0x6a, 0x75, 0xea, 0x52, 0x9d, 0xcd, 0xd5, 0xa0, + 0x16, 0x9f, 0xf1, 0x9d, 0xab, 0xa2, 0xaa, 0x52, 0x94, 0x29, 0x5b, 0x22, 0x65, 0xcd, 0xc0, 0x87, + 0xc8, 0x87, 0x40, 0x99, 0x90, 0xb2, 0x64, 0x8a, 0x22, 0xc8, 0x90, 0x8f, 0x11, 0x71, 0x77, 0x1e, + 0x90, 0x1c, 0x25, 0x13, 0xbc, 0xf7, 0xfe, 0xff, 0xff, 0xfb, 0xf9, 0x1d, 0x70, 0x43, 0xc6, 0x67, + 0x8c, 0x63, 0x92, 0x89, 0x09, 0xfe, 0xd3, 0x0d, 0xa8, 0x20, 0x5d, 0x3c, 0xcf, 0x68, 0xba, 0x40, + 0x49, 0xca, 0x04, 0x83, 0x35, 0x25, 0x40, 0x3b, 0x01, 0xd2, 0x02, 0xdb, 0x8a, 0x58, 0xc4, 0xe4, + 0x1c, 0xef, 0xfe, 0x29, 0xa9, 0xfd, 0x3a, 0x62, 0x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 0xcb, 0xdb, 0xd3, + 0x52, 0x1b, 0x36, 0x71, 0xe1, 0x3b, 0x29, 0x35, 0xc7, 0xff, 0xf4, 0x89, 0xff, 0xc3, 0x03, 0x13, + 0x94, 0x15, 0x34, 0x6c, 0x3e, 0xbc, 0x66, 0xef, 0x42, 0x76, 0xeb, 0x71, 0xa1, 0xc6, 0x79, 0x2f, + 0x71, 0xde, 0xc2, 0x46, 0x21, 0x8e, 0x3a, 0xcf, 0xf0, 0xf3, 0x6a, 0xe3, 0x98, 0xeb, 0x8d, 0x63, + 0xde, 0x6c, 0x1c, 0xf3, 0x64, 0xeb, 0x18, 0xeb, 0xad, 0x63, 0x5c, 0x6d, 0x1d, 0xe3, 0x7b, 0x3b, + 0x9a, 0x8a, 0x49, 0x16, 0xa0, 0x90, 0xcd, 0xf2, 0x00, 0xf5, 0xd3, 0xe1, 0xe3, 0x5f, 0xf8, 0xaf, + 0x4a, 0x13, 0x8b, 0x84, 0xf2, 0xa0, 0x2c, 0x1f, 0xfc, 0xc3, 0x7d, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xef, 0x40, 0xd8, 0x2e, 0x25, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -584,7 +576,7 @@ func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -594,25 +586,23 @@ func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 3b156842dd..0525b9c153 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -47,7 +47,7 @@ func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) @@ -74,7 +74,7 @@ func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) diff --git a/x/auth/vesting/handler.go b/x/auth/vesting/handler.go index 963f66eb80..eef8787bda 100644 --- a/x/auth/vesting/handler.go +++ b/x/auth/vesting/handler.go @@ -31,15 +31,24 @@ func handleMsgCreateVestingAccount(ctx sdk.Context, ak keeper.AccountKeeper, bk return nil, err } - if bk.BlockedAddr(msg.ToAddress) { + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + return nil, err + } + to, err := sdk.AccAddressFromBech32(msg.ToAddress) + if err != nil { + return nil, err + } + + if bk.BlockedAddr(to) { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", msg.ToAddress) } - if acc := ak.GetAccount(ctx, msg.ToAddress); acc != nil { + if acc := ak.GetAccount(ctx, to); acc != nil { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "account %s already exists", msg.ToAddress) } - baseAccount := ak.NewAccountWithAddress(ctx, msg.ToAddress) + baseAccount := ak.NewAccountWithAddress(ctx, to) if _, ok := baseAccount.(*authtypes.BaseAccount); !ok { return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid account type; expected: BaseAccount, got: %T", baseAccount) } @@ -70,7 +79,7 @@ func handleMsgCreateVestingAccount(ctx sdk.Context, ak keeper.AccountKeeper, bk } }() - err := bk.SendCoins(ctx, msg.FromAddress, msg.ToAddress, msg.Amount) + err = bk.SendCoins(ctx, from, to, msg.Amount) if err != nil { return nil, err } diff --git a/x/auth/vesting/handler_test.go b/x/auth/vesting/handler_test.go index b92c398253..490fc59971 100644 --- a/x/auth/vesting/handler_test.go +++ b/x/auth/vesting/handler_test.go @@ -31,9 +31,9 @@ func (suite *HandlerTestSuite) TestMsgCreateVestingAccount() { ctx := suite.app.BaseApp.NewContext(false, tmproto.Header{Height: suite.app.LastBlockHeight() + 1}) balances := sdk.NewCoins(sdk.NewInt64Coin("test", 1000)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) - addr3 := sdk.AccAddress([]byte("addr3")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) + addr3 := sdk.AccAddress([]byte("addr3_______________")) acc1 := suite.app.AccountKeeper.NewAccountWithAddress(ctx, addr1) suite.app.AccountKeeper.SetAccount(ctx, acc1) @@ -72,7 +72,9 @@ func (suite *HandlerTestSuite) TestMsgCreateVestingAccount() { suite.Require().NoError(err) suite.Require().NotNil(res) - accI := suite.app.AccountKeeper.GetAccount(ctx, tc.msg.ToAddress) + toAddr, err := sdk.AccAddressFromBech32(tc.msg.ToAddress) + suite.Require().NoError(err) + accI := suite.app.AccountKeeper.GetAccount(ctx, toAddr) suite.Require().NotNil(accI) if tc.msg.Delayed { diff --git a/x/auth/vesting/types/msgs.go b/x/auth/vesting/types/msgs.go index 01e8d95e1a..3308e03048 100644 --- a/x/auth/vesting/types/msgs.go +++ b/x/auth/vesting/types/msgs.go @@ -11,10 +11,11 @@ const TypeMsgCreateVestingAccount = "msg_create_vesting_account" var _ sdk.Msg = &MsgCreateVestingAccount{} // NewMsgCreateVestingAccount returns a reference to a new MsgCreateVestingAccount. +//nolint:interfacer func NewMsgCreateVestingAccount(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins, endTime int64, delayed bool) *MsgCreateVestingAccount { return &MsgCreateVestingAccount{ - FromAddress: fromAddr, - ToAddress: toAddr, + FromAddress: fromAddr.String(), + ToAddress: toAddr.String(), Amount: amount, EndTime: endTime, Delayed: delayed, @@ -29,11 +30,19 @@ func (msg MsgCreateVestingAccount) Type() string { return TypeMsgCreateVestingAc // ValidateBasic Implements Msg. func (msg MsgCreateVestingAccount) ValidateBasic() error { - if err := sdk.VerifyAddressFormat(msg.FromAddress); err != nil { + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + return err + } + to, err := sdk.AccAddressFromBech32(msg.ToAddress) + if err != nil { + return err + } + if err := sdk.VerifyAddressFormat(from); err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address: %s", err) } - if err := sdk.VerifyAddressFormat(msg.ToAddress); err != nil { + if err := sdk.VerifyAddressFormat(to); err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address: %s", err) } @@ -60,5 +69,9 @@ func (msg MsgCreateVestingAccount) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgCreateVestingAccount. func (msg MsgCreateVestingAccount) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.FromAddress} + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{from} } diff --git a/x/auth/vesting/types/tx.pb.go b/x/auth/vesting/types/tx.pb.go index d9b283d33a..b277f3518f 100644 --- a/x/auth/vesting/types/tx.pb.go +++ b/x/auth/vesting/types/tx.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -29,11 +28,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateVestingAccount defines a message that enables creating a vesting // account. type MsgCreateVestingAccount struct { - FromAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"from_address,omitempty" yaml:"from_address"` - ToAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"to_address,omitempty" yaml:"to_address"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` - EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty" yaml:"end_time"` - Delayed bool `protobuf:"varint,5,opt,name=delayed,proto3" json:"delayed,omitempty"` + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty" yaml:"end_time"` + Delayed bool `protobuf:"varint,5,opt,name=delayed,proto3" json:"delayed,omitempty"` } func (m *MsgCreateVestingAccount) Reset() { *m = MsgCreateVestingAccount{} } @@ -69,18 +68,18 @@ func (m *MsgCreateVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateVestingAccount proto.InternalMessageInfo -func (m *MsgCreateVestingAccount) GetFromAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *MsgCreateVestingAccount) GetFromAddress() string { if m != nil { return m.FromAddress } - return nil + return "" } -func (m *MsgCreateVestingAccount) GetToAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *MsgCreateVestingAccount) GetToAddress() string { if m != nil { return m.ToAddress } - return nil + return "" } func (m *MsgCreateVestingAccount) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { @@ -111,32 +110,30 @@ func init() { func init() { proto.RegisterFile("cosmos/vesting/v1beta1/tx.proto", fileDescriptor_5338ca97811f9792) } var fileDescriptor_5338ca97811f9792 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x31, 0xcf, 0xd2, 0x40, - 0x18, 0xc7, 0x7b, 0x16, 0x01, 0x0f, 0x12, 0x63, 0x31, 0x5a, 0x19, 0x7a, 0x4d, 0xa7, 0x2e, 0x5c, - 0x45, 0x37, 0x36, 0x4a, 0x62, 0x4c, 0x8c, 0x4b, 0x63, 0x1c, 0x5c, 0xc8, 0xf5, 0x7a, 0x96, 0x06, - 0xda, 0x23, 0xbd, 0x83, 0xc0, 0xb7, 0xf0, 0x23, 0x18, 0x47, 0x3f, 0x09, 0x23, 0xa3, 0x53, 0x35, - 0xb0, 0x38, 0x33, 0x3a, 0x99, 0xf6, 0x5a, 0xde, 0x77, 0x7a, 0xf3, 0xe6, 0x9d, 0xda, 0x27, 0xff, - 0xff, 0xf3, 0xff, 0x3d, 0xcf, 0xd3, 0x42, 0x44, 0xb9, 0x48, 0xb9, 0xf0, 0xb6, 0x4c, 0xc8, 0x24, - 0x8b, 0xbd, 0xed, 0x38, 0x64, 0x92, 0x8c, 0x3d, 0xb9, 0xc3, 0xeb, 0x9c, 0x4b, 0x6e, 0xbc, 0x50, - 0x06, 0x5c, 0x1b, 0x70, 0x6d, 0x18, 0x3e, 0x8f, 0x79, 0xcc, 0x2b, 0x8b, 0x57, 0xbe, 0x29, 0xf7, - 0xd0, 0xaa, 0xe3, 0x42, 0x22, 0xd8, 0x35, 0x8b, 0xf2, 0x24, 0x53, 0xba, 0xf3, 0x43, 0x87, 0x2f, - 0x3f, 0x8a, 0x78, 0x96, 0x33, 0x22, 0xd9, 0x67, 0x15, 0x39, 0xa5, 0x94, 0x6f, 0x32, 0x69, 0x2c, - 0x61, 0xff, 0x6b, 0xce, 0xd3, 0x39, 0x89, 0xa2, 0x9c, 0x09, 0x61, 0x02, 0x1b, 0xb8, 0x7d, 0xff, - 0xfd, 0xa5, 0x40, 0x83, 0x3d, 0x49, 0x57, 0x13, 0xe7, 0xb6, 0xea, 0xfc, 0x2b, 0xd0, 0x28, 0x4e, - 0xe4, 0x62, 0x13, 0x62, 0xca, 0x53, 0xaf, 0xe6, 0xaa, 0xc7, 0x48, 0x44, 0x4b, 0x4f, 0xee, 0xd7, - 0x4c, 0xe0, 0x29, 0xa5, 0x53, 0xd5, 0x11, 0xf4, 0xca, 0xfe, 0xba, 0x30, 0x18, 0x84, 0x92, 0x5f, - 0x51, 0x8f, 0x2a, 0xd4, 0xbb, 0x4b, 0x81, 0x9e, 0x29, 0xd4, 0x8d, 0xf6, 0x00, 0xd0, 0x13, 0xc9, - 0x1b, 0x0c, 0x85, 0x6d, 0x92, 0x96, 0xdb, 0x99, 0xba, 0xad, 0xbb, 0xbd, 0x37, 0xaf, 0x70, 0x7d, - 0xce, 0xf2, 0x40, 0xcd, 0x2d, 0xf1, 0x8c, 0x27, 0x99, 0xff, 0xfa, 0x50, 0x20, 0xed, 0xe7, 0x6f, - 0xe4, 0xde, 0x03, 0x56, 0x36, 0x88, 0xa0, 0x8e, 0x36, 0x30, 0xec, 0xb2, 0x2c, 0x9a, 0xcb, 0x24, - 0x65, 0x66, 0xcb, 0x06, 0xae, 0xee, 0x0f, 0x2e, 0x05, 0x7a, 0xaa, 0x36, 0x69, 0x14, 0x27, 0xe8, - 0xb0, 0x2c, 0xfa, 0x94, 0xa4, 0xcc, 0x30, 0x61, 0x27, 0x62, 0x2b, 0xb2, 0x67, 0x91, 0xf9, 0xd8, - 0x06, 0x6e, 0x37, 0x68, 0xca, 0x49, 0xeb, 0xef, 0x77, 0x04, 0xfc, 0x0f, 0x87, 0x93, 0x05, 0x8e, - 0x27, 0x0b, 0xfc, 0x39, 0x59, 0xe0, 0xdb, 0xd9, 0xd2, 0x8e, 0x67, 0x4b, 0xfb, 0x75, 0xb6, 0xb4, - 0x2f, 0xe3, 0x3b, 0x67, 0xdb, 0x79, 0x64, 0x23, 0x17, 0xd7, 0x5f, 0xa9, 0x1a, 0x35, 0x6c, 0x57, - 0x1f, 0xfe, 0xed, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x09, 0x49, 0x69, 0x02, 0x00, - 0x00, + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x3f, 0x4f, 0xf2, 0x40, + 0x1c, 0xee, 0x01, 0x2f, 0x7f, 0x8e, 0x37, 0x79, 0xf3, 0x16, 0x95, 0xca, 0xd0, 0x36, 0x9d, 0xba, + 0xd8, 0x8a, 0x3a, 0xb1, 0x51, 0x46, 0xe3, 0xd2, 0x18, 0x07, 0x17, 0x72, 0x6d, 0xcf, 0xd2, 0xc8, + 0xf5, 0x48, 0xef, 0x20, 0xf0, 0x2d, 0xfc, 0x08, 0xce, 0x7e, 0x0a, 0x47, 0x46, 0x46, 0xa7, 0x6a, + 0x60, 0x71, 0xe6, 0x13, 0x98, 0xf6, 0x5a, 0x74, 0x72, 0x6a, 0x9f, 0x3c, 0x7f, 0xee, 0x79, 0xf2, + 0x83, 0x9a, 0x4f, 0x19, 0xa1, 0xcc, 0x5e, 0x60, 0xc6, 0xa3, 0x38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0x6a, 0x3a, 0x30, 0xab, 0x4e, 0x67, 0x9f, 0x6a, 0xff, 0x44, 0xb1, 0x92, 0x31, 0xdc, 0x06, 0x8e, + 0x83, 0xdb, 0x88, 0x60, 0x59, 0x81, 0x8d, 0x00, 0x4f, 0xd1, 0x0a, 0x07, 0xca, 0x1f, 0x1d, 0x98, + 0x4d, 0xb7, 0x84, 0x83, 0xda, 0xe7, 0xb3, 0x06, 0x9c, 0xeb, 0xf5, 0x56, 0x05, 0x9b, 0xad, 0x0a, + 0x3e, 0xb6, 0x2a, 0x78, 0xda, 0xa9, 0xd2, 0x66, 0xa7, 0x4a, 0x6f, 0x3b, 0x55, 0xba, 0xef, 0xff, + 0xda, 0x6d, 0x69, 0xa3, 0x39, 0x9f, 0x1c, 0x0e, 0x9d, 0x57, 0xf5, 0xea, 0xf9, 0x59, 0x2e, 0xbf, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x22, 0x3f, 0x4e, 0xe2, 0x07, 0x02, 0x00, 0x00, } func (this *MsgCreateVestingAccount) Equal(that interface{}) bool { @@ -158,10 +155,10 @@ func (this *MsgCreateVestingAccount) Equal(that interface{}) bool { } else if this == nil { return false } - if !bytes.Equal(this.FromAddress, that1.FromAddress) { + if this.FromAddress != that1.FromAddress { return false } - if !bytes.Equal(this.ToAddress, that1.ToAddress) { + if this.ToAddress != that1.ToAddress { return false } if len(this.Amount) != len(that1.Amount) { @@ -325,7 +322,7 @@ func (m *MsgCreateVestingAccount) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -335,31 +332,29 @@ func (m *MsgCreateVestingAccount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } + m.FromAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -369,25 +364,23 @@ func (m *MsgCreateVestingAccount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } + m.ToAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index 80c1b5f8d6..e011bd6efb 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -183,8 +183,13 @@ func (bva BaseVestingAccount) String() string { // MarshalYAML returns the YAML representation of a BaseVestingAccount. func (bva BaseVestingAccount) MarshalYAML() (interface{}, error) { + accAddr, err := sdk.AccAddressFromBech32(bva.Address) + if err != nil { + return nil, err + } + alias := vestingAccountYAML{ - Address: bva.Address, + Address: accAddr, AccountNumber: bva.AccountNumber, Sequence: bva.Sequence, OriginalVesting: bva.OriginalVesting, @@ -306,8 +311,13 @@ func (cva ContinuousVestingAccount) String() string { // MarshalYAML returns the YAML representation of a ContinuousVestingAccount. func (cva ContinuousVestingAccount) MarshalYAML() (interface{}, error) { + accAddr, err := sdk.AccAddressFromBech32(cva.Address) + if err != nil { + return nil, err + } + alias := vestingAccountYAML{ - Address: cva.Address, + Address: accAddr, AccountNumber: cva.AccountNumber, Sequence: cva.Sequence, OriginalVesting: cva.OriginalVesting, @@ -459,8 +469,13 @@ func (pva PeriodicVestingAccount) String() string { // MarshalYAML returns the YAML representation of a PeriodicVestingAccount. func (pva PeriodicVestingAccount) MarshalYAML() (interface{}, error) { + accAddr, err := sdk.AccAddressFromBech32(pva.Address) + if err != nil { + return nil, err + } + alias := vestingAccountYAML{ - Address: pva.Address, + Address: accAddr, AccountNumber: pva.AccountNumber, Sequence: pva.Sequence, OriginalVesting: pva.OriginalVesting, diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 4f0822398d..c8a5c88985 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -88,7 +88,7 @@ var ( func TestSendNotEnoughBalance(t *testing.T) { acc := &authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } genAccs := []authtypes.GenesisAccount{acc} @@ -164,12 +164,17 @@ func TestSendToModuleAcc(t *testing.T) { app := simapp.SetupWithGenesisAccounts(genAccs) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - err := app.BankKeeper.SetBalances(ctx, test.msg.FromAddress, test.fromBalance) + fromAddr, err := sdk.AccAddressFromBech32(test.msg.FromAddress) + require.NoError(t, err) + toAddr, err := sdk.AccAddressFromBech32(test.msg.ToAddress) + require.NoError(t, err) + + err = app.BankKeeper.SetBalances(ctx, fromAddr, test.fromBalance) require.NoError(t, err) app.Commit() - res1 := app.AccountKeeper.GetAccount(ctx, test.msg.FromAddress) + res1 := app.AccountKeeper.GetAccount(ctx, fromAddr) require.NotNil(t, res1) require.Equal(t, acc, res1.(*authtypes.BaseAccount)) @@ -185,8 +190,8 @@ func TestSendToModuleAcc(t *testing.T) { require.Error(t, err) } - simapp.CheckBalance(t, app, test.msg.FromAddress, test.expFromBalance) - simapp.CheckBalance(t, app, test.msg.ToAddress, test.expToBalance) + simapp.CheckBalance(t, app, fromAddr, test.expFromBalance) + simapp.CheckBalance(t, app, toAddr, test.expToBalance) res2 := app.AccountKeeper.GetAccount(app.NewContext(true, tmproto.Header{}), addr1) require.NotNil(t, res2) @@ -199,7 +204,7 @@ func TestSendToModuleAcc(t *testing.T) { func TestMsgMultiSendWithAccounts(t *testing.T) { acc := &authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } genAccs := []authtypes.GenesisAccount{acc} @@ -267,10 +272,10 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { func TestMsgMultiSendMultipleOut(t *testing.T) { acc1 := &authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } acc2 := &authtypes.BaseAccount{ - Address: addr2, + Address: addr2.String(), } genAccs := []authtypes.GenesisAccount{acc1, acc2} @@ -315,13 +320,13 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { func TestMsgMultiSendMultipleInOut(t *testing.T) { acc1 := &authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } acc2 := &authtypes.BaseAccount{ - Address: addr2, + Address: addr2.String(), } acc4 := &authtypes.BaseAccount{ - Address: addr4, + Address: addr4.String(), } genAccs := []authtypes.GenesisAccount{acc1, acc2, acc4} diff --git a/x/bank/bench_test.go b/x/bank/bench_test.go index deb3f6dd1c..a5cc84bd15 100644 --- a/x/bank/bench_test.go +++ b/x/bank/bench_test.go @@ -20,7 +20,7 @@ var moduleAccAddr = authtypes.NewModuleAddress(stakingtypes.BondedPoolName) func BenchmarkOneBankSendTxPerBlock(b *testing.B) { // Add an account at genesis acc := authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } // construct genesis state @@ -62,7 +62,7 @@ func BenchmarkOneBankSendTxPerBlock(b *testing.B) { func BenchmarkOneBankMultiSendTxPerBlock(b *testing.B) { // Add an account at genesis acc := authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } // Construct genesis state diff --git a/x/bank/client/rest/grpc_query_test.go b/x/bank/client/rest/grpc_query_test.go index 2f2cf2e264..6274946705 100644 --- a/x/bank/client/rest/grpc_query_test.go +++ b/x/bank/client/rest/grpc_query_test.go @@ -3,7 +3,6 @@ package rest_test import ( - "encoding/base64" "fmt" "github.com/gogo/protobuf/proto" @@ -103,10 +102,6 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - accAddrBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -115,7 +110,7 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { }{ { "gRPC total account balance", - fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", baseURL, accAddrBase64), + fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", baseURL, val.Address.String()), &types.QueryAllBalancesResponse{}, &types.QueryAllBalancesResponse{ Balances: sdk.NewCoins( @@ -129,7 +124,7 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { }, { "gPRC account balance of a denom", - fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/%s", baseURL, accAddrBase64, s.cfg.BondDenom), + fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/%s", baseURL, val.Address.String(), s.cfg.BondDenom), &types.QueryBalanceResponse{}, &types.QueryBalanceResponse{ Balance: &sdk.Coin{ @@ -140,7 +135,7 @@ func (s *IntegrationTestSuite) TestBalancesGRPCHandler() { }, { "gPRC account balance of a bogus denom", - fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/foobar", baseURL, accAddrBase64), + fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s/foobar", baseURL, val.Address.String()), &types.QueryBalanceResponse{}, &types.QueryBalanceResponse{ Balance: &sdk.Coin{ diff --git a/x/bank/client/rest/tx_test.go b/x/bank/client/rest/tx_test.go index a11985c244..0e52408fed 100644 --- a/x/bank/client/rest/tx_test.go +++ b/x/bank/client/rest/tx_test.go @@ -37,8 +37,8 @@ func (s *IntegrationTestSuite) TestCoinSend() { s.Require().Nil(stdTx.Signatures) s.Require().Equal([]types.Msg{ &banktypes.MsgSend{ - FromAddress: account.GetAddress(), - ToAddress: account.GetAddress(), + FromAddress: account.GetAddress().String(), + ToAddress: account.GetAddress().String(), Amount: sendReq.Amount, }, }, stdTx.GetMsgs()) diff --git a/x/bank/handler.go b/x/bank/handler.go index 7371412e2d..f2f710fa2f 100644 --- a/x/bank/handler.go +++ b/x/bank/handler.go @@ -34,11 +34,20 @@ func handleMsgSend(ctx sdk.Context, k keeper.Keeper, msg *types.MsgSend) (*sdk.R return nil, err } - if k.BlockedAddr(msg.ToAddress) { + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + return nil, err + } + to, err := sdk.AccAddressFromBech32(msg.ToAddress) + if err != nil { + return nil, err + } + + if k.BlockedAddr(to) { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", msg.ToAddress) } - err := k.SendCoins(ctx, msg.FromAddress, msg.ToAddress, msg.Amount) + err = k.SendCoins(ctx, from, to, msg.Amount) if err != nil { return nil, err } @@ -73,7 +82,11 @@ func handleMsgMultiSend(ctx sdk.Context, k keeper.Keeper, msg *types.MsgMultiSen } for _, out := range msg.Outputs { - if k.BlockedAddr(out.Address) { + accAddr, err := sdk.AccAddressFromBech32(out.Address) + if err != nil { + panic(err) + } + if k.BlockedAddr(accAddr) { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive transactions", out.Address) } } diff --git a/x/bank/keeper/genesis.go b/x/bank/keeper/genesis.go index 35dea7068b..ba1b076486 100644 --- a/x/bank/keeper/genesis.go +++ b/x/bank/keeper/genesis.go @@ -15,11 +15,16 @@ func (k BaseKeeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { genState.Balances = types.SanitizeGenesisBalances(genState.Balances) for _, balance := range genState.Balances { - if err := k.ValidateBalance(ctx, balance.Address); err != nil { + addr, err := sdk.AccAddressFromBech32(balance.Address) + if err != nil { panic(err) } - if err := k.SetBalances(ctx, balance.Address, balance.Coins); err != nil { + if err := k.ValidateBalance(ctx, addr); err != nil { + panic(err) + } + + if err := k.SetBalances(ctx, addr, balance.Coins); err != nil { panic(fmt.Errorf("error on setting balances %w", err)) } diff --git a/x/bank/keeper/genesis_test.go b/x/bank/keeper/genesis_test.go index a6ffb6d5ed..8bd46d6817 100644 --- a/x/bank/keeper/genesis_test.go +++ b/x/bank/keeper/genesis_test.go @@ -12,7 +12,11 @@ func (suite *IntegrationTestSuite) TestExportGenesis() { expectedBalances := suite.getTestBalances() for i := range []int{1, 2} { app.BankKeeper.SetDenomMetaData(ctx, expectedMetadata[i]) - err := app.BankKeeper.SetBalances(ctx, expectedBalances[i].Address, expectedBalances[i].Coins) + accAddr, err1 := sdk.AccAddressFromBech32(expectedBalances[i].Address) + if err1 != nil { + panic(err1) + } + err := app.BankKeeper.SetBalances(ctx, accAddr, expectedBalances[i].Coins) suite.Require().NoError(err) } @@ -33,8 +37,8 @@ func (suite *IntegrationTestSuite) getTestBalances() []types.Balance { addr2, _ := sdk.AccAddressFromBech32("cosmos1f9xjhxm0plzrh9cskf4qee4pc2xwp0n0556gh0") addr1, _ := sdk.AccAddressFromBech32("cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") return []types.Balance{ - {addr2, sdk.Coins{sdk.NewInt64Coin("testcoin1", 32), sdk.NewInt64Coin("testcoin2", 34)}}, - {addr1, sdk.Coins{sdk.NewInt64Coin("testcoin3", 10)}}, + {addr2.String(), sdk.Coins{sdk.NewInt64Coin("testcoin1", 32), sdk.NewInt64Coin("testcoin2", 34)}}, + {addr1.String(), sdk.Coins{sdk.NewInt64Coin("testcoin3", 10)}}, } } diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index 2fe705d488..bb0a5b176c 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -20,7 +20,7 @@ func (k BaseKeeper) Balance(ctx context.Context, req *types.QueryBalanceRequest) return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.Address.Empty() { + if req.Address == "" { return nil, status.Error(codes.InvalidArgument, "address cannot be empty") } @@ -29,7 +29,12 @@ func (k BaseKeeper) Balance(ctx context.Context, req *types.QueryBalanceRequest) } sdkCtx := sdk.UnwrapSDKContext(ctx) - balance := k.GetBalance(sdkCtx, req.Address, req.Denom) + address, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + + balance := k.GetBalance(sdkCtx, address, req.Denom) return &types.QueryBalanceResponse{Balance: &balance}, nil } @@ -40,9 +45,9 @@ func (k BaseKeeper) AllBalances(ctx context.Context, req *types.QueryAllBalances return nil, status.Error(codes.InvalidArgument, "empty request") } - addr := req.Address - if addr.Empty() { - return nil, status.Errorf(codes.InvalidArgument, "address cannot be empty") + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err } sdkCtx := sdk.UnwrapSDKContext(ctx) diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 9e34d08e8a..27c29fd9e7 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -18,7 +18,7 @@ func (suite *IntegrationTestSuite) TestQueryBalance() { _, err := queryClient.Balance(gocontext.Background(), &types.QueryBalanceRequest{}) suite.Require().Error(err) - _, err = queryClient.Balance(gocontext.Background(), &types.QueryBalanceRequest{Address: addr}) + _, err = queryClient.Balance(gocontext.Background(), &types.QueryBalanceRequest{Address: addr.String()}) suite.Require().Error(err) req := types.NewQueryBalanceRequest(addr, fooDenom) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 744de818e4..aea72006a4 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -271,7 +271,7 @@ func (suite *IntegrationTestSuite) TestSendCoinsNewAccount() { app, ctx := suite.app, suite.ctx balances := sdk.NewCoins(newFooCoin(100), newBarCoin(50)) - addr1 := sdk.AccAddress([]byte("addr1")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) app.AccountKeeper.SetAccount(ctx, acc1) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, addr1, balances)) @@ -279,7 +279,7 @@ func (suite *IntegrationTestSuite) TestSendCoinsNewAccount() { acc1Balances := app.BankKeeper.GetAllBalances(ctx, addr1) suite.Require().Equal(balances, acc1Balances) - addr2 := sdk.AccAddress([]byte("addr2")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) suite.Require().Nil(app.AccountKeeper.GetAccount(ctx, addr2)) app.BankKeeper.GetAllBalances(ctx, addr2) @@ -311,10 +311,10 @@ func (suite *IntegrationTestSuite) TestInputOutputNewAccount() { suite.Require().Empty(app.BankKeeper.GetAllBalances(ctx, addr2)) inputs := []types.Input{ - {Address: addr1, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr1.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, } outputs := []types.Output{ - {Address: addr2, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr2.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, } suite.Require().NoError(app.BankKeeper.InputOutputCoins(ctx, inputs, outputs)) @@ -342,12 +342,12 @@ func (suite *IntegrationTestSuite) TestInputOutputCoins() { app.AccountKeeper.SetAccount(ctx, acc3) inputs := []types.Input{ - {Address: addr1, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, - {Address: addr1, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr1.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr1.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, } outputs := []types.Output{ - {Address: addr2, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, - {Address: addr3, Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr2.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, + {Address: addr3.String(), Coins: sdk.NewCoins(newFooCoin(30), newBarCoin(10))}, } suite.Require().Error(app.BankKeeper.InputOutputCoins(ctx, inputs, []types.Output{})) @@ -356,12 +356,12 @@ func (suite *IntegrationTestSuite) TestInputOutputCoins() { suite.Require().NoError(app.BankKeeper.SetBalances(ctx, addr1, balances)) insufficientInputs := []types.Input{ - {Address: addr1, Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, - {Address: addr1, Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, + {Address: addr1.String(), Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, + {Address: addr1.String(), Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, } insufficientOutputs := []types.Output{ - {Address: addr2, Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, - {Address: addr3, Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, + {Address: addr2.String(), Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, + {Address: addr3.String(), Coins: sdk.NewCoins(newFooCoin(300), newBarCoin(100))}, } suite.Require().Error(app.BankKeeper.InputOutputCoins(ctx, insufficientInputs, insufficientOutputs)) suite.Require().NoError(app.BankKeeper.InputOutputCoins(ctx, inputs, outputs)) @@ -381,11 +381,11 @@ func (suite *IntegrationTestSuite) TestSendCoins() { app, ctx := suite.app, suite.ctx balances := sdk.NewCoins(newFooCoin(100), newBarCoin(50)) - addr1 := sdk.AccAddress([]byte("addr1")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) app.AccountKeeper.SetAccount(ctx, acc1) - addr2 := sdk.AccAddress([]byte("addr2")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) acc2 := app.AccountKeeper.NewAccountWithAddress(ctx, addr2) app.AccountKeeper.SetAccount(ctx, acc2) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, addr2, balances)) @@ -411,8 +411,8 @@ func (suite *IntegrationTestSuite) TestValidateBalance() { ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) suite.Require().Error(app.BankKeeper.ValidateBalance(ctx, addr1)) @@ -433,7 +433,7 @@ func (suite *IntegrationTestSuite) TestValidateBalance() { func (suite *IntegrationTestSuite) TestBalance() { app, ctx := suite.app, suite.ctx - addr := sdk.AccAddress([]byte("addr1")) + addr := sdk.AccAddress([]byte("addr1_______________")) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) app.AccountKeeper.SetAccount(ctx, acc) @@ -504,7 +504,7 @@ func (suite *IntegrationTestSuite) TestSendEnabled() { func (suite *IntegrationTestSuite) TestHasBalance() { app, ctx := suite.app, suite.ctx - addr := sdk.AccAddress([]byte("addr1")) + addr := sdk.AccAddress([]byte("addr1_______________")) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) app.AccountKeeper.SetAccount(ctx, acc) @@ -520,8 +520,8 @@ func (suite *IntegrationTestSuite) TestHasBalance() { func (suite *IntegrationTestSuite) TestMsgSendEvents() { app, ctx := suite.app, suite.ctx - addr := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) app.AccountKeeper.SetAccount(ctx, acc) @@ -589,12 +589,12 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { newCoins := sdk.NewCoins(sdk.NewInt64Coin(fooDenom, 50)) newCoins2 := sdk.NewCoins(sdk.NewInt64Coin(barDenom, 100)) inputs := []types.Input{ - {Address: addr, Coins: newCoins}, - {Address: addr2, Coins: newCoins2}, + {Address: addr.String(), Coins: newCoins}, + {Address: addr2.String(), Coins: newCoins2}, } outputs := []types.Output{ - {Address: addr3, Coins: newCoins}, - {Address: addr4, Coins: newCoins2}, + {Address: addr3.String(), Coins: newCoins}, + {Address: addr4.String(), Coins: newCoins2}, } suite.Require().Error(app.BankKeeper.InputOutputCoins(ctx, inputs, outputs)) @@ -679,9 +679,9 @@ func (suite *IntegrationTestSuite) TestSpendableCoins() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) delCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) - addrModule := sdk.AccAddress([]byte("moduleAcc")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) + addrModule := sdk.AccAddress([]byte("moduleAcc___________")) macc := app.AccountKeeper.NewAccountWithAddress(ctx, addrModule) bacc := authtypes.NewBaseAccountWithAddress(addr1) @@ -710,8 +710,8 @@ func (suite *IntegrationTestSuite) TestVestingAccountSend() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) bacc := authtypes.NewBaseAccountWithAddress(addr1) vacc := vesting.NewContinuousVestingAccount(bacc, origCoins, now.Unix(), endTime.Unix()) @@ -738,8 +738,8 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountSend() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) periods := vesting.Periods{ vesting.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin("stake", 50)}}, vesting.Period{Length: int64(6 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin("stake", 25)}}, @@ -773,8 +773,8 @@ func (suite *IntegrationTestSuite) TestVestingAccountReceive() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) bacc := authtypes.NewBaseAccountWithAddress(addr1) vacc := vesting.NewContinuousVestingAccount(bacc, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) @@ -806,8 +806,8 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) bacc := authtypes.NewBaseAccountWithAddress(addr1) periods := vesting.Periods{ @@ -846,9 +846,9 @@ func (suite *IntegrationTestSuite) TestDelegateCoins() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) delCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) - addrModule := sdk.AccAddress([]byte("moduleAcc")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) + addrModule := sdk.AccAddress([]byte("moduleAcc___________")) macc := app.AccountKeeper.NewAccountWithAddress(ctx, addrModule) // we don't need to define an actual module account bc we just need the address for testing acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr2) @@ -879,8 +879,8 @@ func (suite *IntegrationTestSuite) TestDelegateCoins_Invalid() { origCoins := sdk.NewCoins(newFooCoin(100)) delCoins := sdk.NewCoins(newFooCoin(50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addrModule := sdk.AccAddress([]byte("moduleAcc")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addrModule := sdk.AccAddress([]byte("moduleAcc___________")) macc := app.AccountKeeper.NewAccountWithAddress(ctx, addrModule) // we don't need to define an actual module account bc we just need the address for testing acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) @@ -906,9 +906,9 @@ func (suite *IntegrationTestSuite) TestUndelegateCoins() { origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) delCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addr2 := sdk.AccAddress([]byte("addr2")) - addrModule := sdk.AccAddress([]byte("moduleAcc")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addr2 := sdk.AccAddress([]byte("addr2_______________")) + addrModule := sdk.AccAddress([]byte("moduleAcc___________")) bacc := authtypes.NewBaseAccountWithAddress(addr1) macc := app.AccountKeeper.NewAccountWithAddress(ctx, addrModule) // we don't need to define an actual module account bc we just need the address for testing @@ -956,8 +956,8 @@ func (suite *IntegrationTestSuite) TestUndelegateCoins_Invalid() { origCoins := sdk.NewCoins(newFooCoin(100)) delCoins := sdk.NewCoins(newFooCoin(50)) - addr1 := sdk.AccAddress([]byte("addr1")) - addrModule := sdk.AccAddress([]byte("moduleAcc")) + addr1 := sdk.AccAddress([]byte("addr1_______________")) + addrModule := sdk.AccAddress([]byte("moduleAcc___________")) macc := app.AccountKeeper.NewAccountWithAddress(ctx, addrModule) // we don't need to define an actual module account bc we just need the address for testing acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index 88bfac373b..b4a6148c7f 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -39,7 +39,12 @@ func queryBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerie return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - balance := k.GetBalance(ctx, params.Address, params.Denom) + address, err := sdk.AccAddressFromBech32(params.Address) + if err != nil { + return nil, err + } + + balance := k.GetBalance(ctx, address, params.Denom) bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, balance) if err != nil { @@ -56,7 +61,12 @@ func queryAllBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQue return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - balances := k.GetAllBalances(ctx, params.Address) + address, err := sdk.AccAddressFromBech32(params.Address) + if err != nil { + return nil, err + } + + balances := k.GetAllBalances(ctx, address) bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, balances) if err != nil { diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index 900e72682b..c1000b7d30 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -85,7 +85,12 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input, } for _, in := range inputs { - err := k.SubtractCoins(ctx, in.Address, in.Coins) + inAddress, err := sdk.AccAddressFromBech32(in.Address) + if err != nil { + return err + } + + err = k.SubtractCoins(ctx, inAddress, in.Coins) if err != nil { return err } @@ -93,13 +98,17 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input, ctx.EventManager().EmitEvent( sdk.NewEvent( sdk.EventTypeMessage, - sdk.NewAttribute(types.AttributeKeySender, in.Address.String()), + sdk.NewAttribute(types.AttributeKeySender, in.Address), ), ) } for _, out := range outputs { - err := k.AddCoins(ctx, out.Address, out.Coins) + outAddress, err := sdk.AccAddressFromBech32(out.Address) + if err != nil { + return err + } + err = k.AddCoins(ctx, outAddress, out.Coins) if err != nil { return err } @@ -107,7 +116,7 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input, ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeTransfer, - sdk.NewAttribute(types.AttributeKeyRecipient, out.Address.String()), + sdk.NewAttribute(types.AttributeKeyRecipient, out.Address), sdk.NewAttribute(sdk.AttributeKeyAmount, out.Coins.String()), ), ) @@ -116,10 +125,10 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input, // // NOTE: This should ultimately be removed in favor a more flexible approach // such as delegated fee messages. - acc := k.ak.GetAccount(ctx, out.Address) + acc := k.ak.GetAccount(ctx, outAddress) if acc == nil { defer telemetry.IncrCounter(1, "new", "account") - k.ak.SetAccount(ctx, k.ak.NewAccountWithAddress(ctx, out.Address)) + k.ak.SetAccount(ctx, k.ak.NewAccountWithAddress(ctx, outAddress)) } } diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index 727c2b6995..2c4c4239bc 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -83,7 +83,7 @@ func (k BaseViewKeeper) GetAccountsBalances(ctx sdk.Context) []types.Balance { } accountBalance := types.Balance{ - Address: addr, + Address: addr.String(), Coins: sdk.NewCoins(balance), } balances = append(balances, accountBalance) diff --git a/x/bank/simulation/genesis.go b/x/bank/simulation/genesis.go index 2d6384d06f..9031d03364 100644 --- a/x/bank/simulation/genesis.go +++ b/x/bank/simulation/genesis.go @@ -42,7 +42,7 @@ func RandomGenesisBalances(simState *module.SimulationState) []types.Balance { for _, acc := range simState.Accounts { genesisBalances = append(genesisBalances, types.Balance{ - Address: acc.Address, + Address: acc.Address.String(), Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(simState.InitialStake))), }) } diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 30f3859fc7..286dcc3fdb 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -93,7 +93,12 @@ func sendMsgSend( err error ) - account := ak.GetAccount(ctx, msg.FromAddress) + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + return err + } + + account := ak.GetAccount(ctx, from) spendable := bk.SpendableCoins(ctx, account.GetAddress()) coins, hasNeg := spendable.SafeSub(msg.Amount) @@ -229,7 +234,11 @@ func sendMsgMultiSend( sequenceNumbers := make([]uint64, len(msg.Inputs)) for i := 0; i < len(msg.Inputs); i++ { - acc := ak.GetAccount(ctx, msg.Inputs[i].Address) + addr, err := sdk.AccAddressFromBech32(msg.Inputs[i].Address) + if err != nil { + panic(err) + } + acc := ak.GetAccount(ctx, addr) accountNumbers[i] = acc.GetAccountNumber() sequenceNumbers[i] = acc.GetSequence() } @@ -239,8 +248,13 @@ func sendMsgMultiSend( err error ) + addr, err := sdk.AccAddressFromBech32(msg.Inputs[0].Address) + if err != nil { + panic(err) + } + // feePayer is the first signer, i.e. first input address - feePayer := ak.GetAccount(ctx, msg.Inputs[0].Address) + feePayer := ak.GetAccount(ctx, addr) spendable := bk.SpendableCoins(ctx, feePayer.GetAddress()) coins, hasNeg := spendable.SafeSub(msg.Inputs[0].Coins) diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 3f42feaf0f..144dc5dd34 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -83,8 +83,8 @@ func (suite *SimTestSuite) TestSimulateMsgSend() { suite.Require().True(operationMsg.OK) suite.Require().Equal("65337742stake", msg.Amount.String()) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.FromAddress.String()) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.ToAddress.String()) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.FromAddress) + suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.ToAddress) suite.Require().Equal(types.TypeMsgSend, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -111,11 +111,11 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { suite.Require().True(operationMsg.OK) suite.Require().Len(msg.Inputs, 3) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Inputs[1].GetAddress().String()) - suite.Require().Equal("185121068stake", msg.Inputs[1].GetCoins().String()) + suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Inputs[1].Address) + suite.Require().Equal("185121068stake", msg.Inputs[1].Coins.String()) suite.Require().Len(msg.Outputs, 2) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Outputs[1].GetAddress().String()) - suite.Require().Equal("260469617stake", msg.Outputs[1].GetCoins().String()) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Outputs[1].Address) + suite.Require().Equal("260469617stake", msg.Outputs[1].Coins.String()) suite.Require().Equal(types.TypeMsgMultiSend, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) diff --git a/x/bank/types/bank.pb.go b/x/bank/types/bank.pb.go index 5f111b57b4..ee27ea2cab 100644 --- a/x/bank/types/bank.pb.go +++ b/x/bank/types/bank.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -79,7 +78,8 @@ func (m *Params) GetDefaultSendEnabled() bool { return false } -// SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). +// SendEnabled maps coin denom to a send_enabled status (whether a denom is +// sendable). type SendEnabled struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` @@ -133,8 +133,8 @@ func (m *SendEnabled) GetEnabled() bool { // Input models transaction input. type Input struct { - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` - Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` } func (m *Input) Reset() { *m = Input{} } @@ -170,24 +170,10 @@ func (m *Input) XXX_DiscardUnknown() { var xxx_messageInfo_Input proto.InternalMessageInfo -func (m *Input) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Coins - } - return nil -} - // Output models transaction outputs. type Output struct { - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` - Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` } func (m *Output) Reset() { *m = Output{} } @@ -223,20 +209,6 @@ func (m *Output) XXX_DiscardUnknown() { var xxx_messageInfo_Output proto.InternalMessageInfo -func (m *Output) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Coins - } - return nil -} - // Supply represents a struct that passively keeps track of the total supply // amounts in the network. type Supply struct { @@ -431,44 +403,43 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/bank.proto", fileDescriptor_dd052eee12edf988) } var fileDescriptor_dd052eee12edf988 = []byte{ - // 587 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, - 0x14, 0xf7, 0x35, 0x69, 0x9a, 0x5e, 0xfa, 0x5d, 0xee, 0xdb, 0xc1, 0xad, 0x84, 0x6d, 0x2c, 0x21, - 0xa5, 0x88, 0x38, 0x04, 0xc4, 0x92, 0x05, 0x35, 0xa5, 0x42, 0x15, 0x42, 0x20, 0x57, 0x08, 0x09, - 0x86, 0xe8, 0xe2, 0xbb, 0x06, 0xab, 0xf6, 0x9d, 0x95, 0x3b, 0xa3, 0xe6, 0x3f, 0x60, 0x64, 0x44, - 0x62, 0xc9, 0xcc, 0x88, 0x58, 0x61, 0xee, 0x58, 0xc1, 0xc2, 0x14, 0x50, 0xb2, 0x30, 0x77, 0x64, - 0x42, 0xbe, 0xb3, 0x93, 0x54, 0x0a, 0xa8, 0x03, 0x0b, 0x53, 0xde, 0x8f, 0xcf, 0xfb, 0x7c, 0x5e, - 0xde, 0x7b, 0x67, 0x68, 0x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0, 0xc2, 0x2c, 0x39, 0xa5, 0xfa, 0xba, 0x5f, 0xb8, 0xee, 0x5b, 0x00, 0xab, 0x0f, 0xa9, 0xc4, - 0x04, 0x4b, 0x8c, 0x1c, 0x58, 0x23, 0x54, 0x04, 0x83, 0x30, 0x91, 0x21, 0x67, 0x39, 0xfd, 0x62, - 0x08, 0xdd, 0xcd, 0x10, 0x8c, 0xc7, 0xdd, 0x94, 0x85, 0xb2, 0xd8, 0x95, 0xb5, 0xf4, 0x41, 0xcf, - 0xfa, 0xf5, 0x21, 0x29, 0x4c, 0x81, 0x10, 0x2c, 0x67, 0xd3, 0x35, 0x4b, 0x8a, 0x5b, 0xd9, 0x59, - 0x77, 0x24, 0x14, 0x49, 0x84, 0x87, 0x66, 0x59, 0x85, 0x0b, 0xb7, 0xb3, 0x77, 0x3a, 0xb1, 0xc0, - 0xd9, 0xc4, 0x02, 0xdf, 0x27, 0x16, 0x78, 0x3d, 0xb5, 0x8c, 0xb3, 0xa9, 0x65, 0x7c, 0x9d, 0x5a, - 0xc6, 0xb3, 0x9d, 0xcb, 0x8c, 0x51, 0xed, 0xa3, 0x57, 0x51, 0xdf, 0xa5, 0xdb, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xeb, 0x92, 0xb2, 0x14, 0x1f, 0x05, 0x00, 0x00, + // 566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xbf, 0x6f, 0x13, 0x31, + 0x14, 0x3e, 0x37, 0x4d, 0x48, 0x1d, 0x58, 0x4c, 0x86, 0x6b, 0x24, 0xee, 0x8e, 0x93, 0x90, 0x52, + 0x44, 0x2f, 0x14, 0xc4, 0x92, 0x05, 0x29, 0xa5, 0x42, 0x1d, 0x10, 0xe8, 0x2a, 0x84, 0x04, 0x43, + 0xe4, 0xc4, 0x6e, 0xb0, 0x7a, 0x67, 0x9f, 0x62, 0x1f, 0x6a,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ca, 0x99, 0xfa, 0xcd, 0x7a, 0x34, 0x60, 0x55, 0x97, 0x71, + 0xca, 0x95, 0xd9, 0x8f, 0x2b, 0xf1, 0x3c, 0x36, 0xd6, 0x27, 0x0c, 0x4b, 0x2a, 0xdd, 0x52, 0x50, + 0x32, 0xd6, 0xdb, 0x30, 0xfc, 0x00, 0x60, 0xf5, 0x11, 0x55, 0x98, 0x60, 0x85, 0x51, 0x00, 0x6b, + 0x84, 0xca, 0xfe, 0x90, 0x65, 0x8a, 0x09, 0x5e, 0xd0, 0x2f, 0x5f, 0xa1, 0xfb, 0x1a, 0xc1, 0x45, + 0xda, 0xcd, 0x39, 0x53, 0xb3, 0x79, 0x79, 0x2b, 0x9f, 0xdc, 0x5c, 0x6f, 0x0c, 0xc9, 0xec, 0x28, + 0x11, 0x82, 0xeb, 0xda, 0x5d, 0xb7, 0x64, 0xb8, 0xcd, 0x59, 0xab, 0x23, 0x4c, 0x66, 0x09, 0x1e, + 0xb9, 0xeb, 0x76, 0x31, 0x8a, 0xb0, 0xb3, 0x7b, 0x3a, 0xf1, 0xc0, 0xd9, 0xc4, 0x03, 0x3f, 0x26, + 0x1e, 0x78, 0x37, 0xf5, 0x9c, 0xb3, 0xa9, 0xe7, 0x7c, 0x9b, 0x7a, 0xce, 0xf3, 0xad, 0xbf, 0xb1, + 0xd1, 0xcc, 0xa3, 0x57, 0x31, 0x7f, 0x8e, 0xbb, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x72, + 0xf6, 0xc6, 0xc1, 0x04, 0x00, 0x00, } func (this *SendEnabled) Equal(that interface{}) bool { @@ -498,70 +469,6 @@ func (this *SendEnabled) Equal(that interface{}) bool { } return true } -func (this *Input) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Input) - if !ok { - that2, ok := that.(Input) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Address, that1.Address) { - return false - } - if len(this.Coins) != len(that1.Coins) { - return false - } - for i := range this.Coins { - if !this.Coins[i].Equal(&that1.Coins[i]) { - return false - } - } - return true -} -func (this *Output) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Output) - if !ok { - that2, ok := that.(Output) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Address, that1.Address) { - return false - } - if len(this.Coins) != len(that1.Coins) { - return false - } - for i := range this.Coins { - if !this.Coins[i].Equal(&that1.Coins[i]) { - return false - } - } - return true -} func (this *Supply) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1303,7 +1210,7 @@ func (m *Input) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowBank @@ -1313,25 +1220,23 @@ func (m *Input) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthBank } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthBank } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1424,7 +1329,7 @@ func (m *Output) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowBank @@ -1434,25 +1339,23 @@ func (m *Output) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthBank } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthBank } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/bank/types/genesis.go b/x/bank/types/genesis.go index cc70b8c572..ccf35be862 100644 --- a/x/bank/types/genesis.go +++ b/x/bank/types/genesis.go @@ -14,7 +14,8 @@ var _ exported.GenesisBalance = (*Balance)(nil) // GetAddress returns the account address of the Balance object. func (b Balance) GetAddress() sdk.AccAddress { - return b.Address + addr1, _ := sdk.AccAddressFromBech32(b.Address) + return addr1 } // GetAddress returns the account coins of the Balance object. @@ -25,7 +26,9 @@ func (b Balance) GetCoins() sdk.Coins { // SanitizeGenesisAccounts sorts addresses and coin sets. func SanitizeGenesisBalances(balances []Balance) []Balance { sort.Slice(balances, func(i, j int) bool { - return bytes.Compare(balances[i].Address.Bytes(), balances[j].Address.Bytes()) < 0 + addr1, _ := sdk.AccAddressFromBech32(balances[i].Address) + addr2, _ := sdk.AccAddressFromBech32(balances[j].Address) + return bytes.Compare(addr1.Bytes(), addr2.Bytes()) < 0 }) for _, balance := range balances { diff --git a/x/bank/types/genesis.pb.go b/x/bank/types/genesis.pb.go index bc5e2a5133..a4b6f8b185 100644 --- a/x/bank/types/genesis.pb.go +++ b/x/bank/types/genesis.pb.go @@ -102,7 +102,7 @@ func (m *GenesisState) GetDenomMetadata() []Metadata { // genesis state. type Balance struct { // address is the address of the balance holder. - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // coins defines the different coins this balance holds. Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` } @@ -148,32 +148,31 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/genesis.proto", fileDescriptor_8f007de11b420c6e) } var fileDescriptor_8f007de11b420c6e = []byte{ - // 397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0xcc, 0xcb, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, - 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, - 0x28, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, - 0x83, 0x58, 0x10, 0xa5, 0x52, 0x72, 0x70, 0xd3, 0x8a, 0x53, 0xe1, 0xa6, 0x25, 0xe7, 0x67, 0xe6, - 0x61, 0xc8, 0x23, 0xd9, 0x06, 0x36, 0x17, 0x2c, 0xaf, 0x74, 0x99, 0x89, 0x8b, 0xc7, 0x1d, 0x62, - 0x79, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x25, 0x17, 0x5b, 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1, - 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xb4, 0x1e, 0x16, 0xc7, 0xe8, 0x05, 0x80, 0x95, 0x38, - 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0xd5, 0x20, 0x64, 0xc7, 0xc5, 0x91, 0x94, 0x98, 0x93, - 0x98, 0x97, 0x9c, 0x5a, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0x83, 0x55, 0xb3, 0x13, - 0x44, 0x11, 0x54, 0x37, 0x5c, 0x8f, 0x50, 0x32, 0x17, 0x5b, 0x71, 0x69, 0x41, 0x41, 0x4e, 0xa5, - 0x04, 0x33, 0x58, 0xb7, 0x24, 0x42, 0x77, 0x71, 0x2a, 0x5c, 0xb7, 0x73, 0x7e, 0x66, 0x9e, 0x93, - 0x01, 0x48, 0xeb, 0xaa, 0xfb, 0xf2, 0x1a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, - 0xb9, 0xfa, 0x50, 0x9f, 0x42, 0x28, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, - 0xb0, 0x86, 0xe2, 0x20, 0xa8, 0xd1, 0x42, 0xc9, 0x5c, 0x7c, 0x29, 0xa9, 0x79, 0xf9, 0xb9, 0xf1, - 0xb9, 0xa9, 0x25, 0x89, 0x29, 0x89, 0x25, 0x89, 0x12, 0x2c, 0x60, 0xcb, 0x64, 0xb1, 0x3a, 0xd5, - 0x17, 0xaa, 0xc8, 0x49, 0x16, 0x64, 0xe1, 0xa7, 0x7b, 0xf2, 0xa2, 0x95, 0x89, 0xb9, 0x39, 0x56, - 0x4a, 0xa8, 0x46, 0x28, 0x05, 0xf1, 0x82, 0x05, 0x60, 0xaa, 0x95, 0xf6, 0x33, 0x72, 0xb1, 0x43, - 0x7d, 0x29, 0xe4, 0xcd, 0xc5, 0x9e, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x0c, 0x09, 0x51, 0x1e, 0x27, - 0xc3, 0x5f, 0xf7, 0xe4, 0x75, 0x89, 0x70, 0xb7, 0x63, 0x72, 0xb2, 0x23, 0x44, 0x63, 0x10, 0xcc, - 0x04, 0xa1, 0x44, 0x2e, 0x56, 0x50, 0xe4, 0xc2, 0xc2, 0x97, 0xaa, 0x21, 0x04, 0x31, 0xd9, 0x8a, - 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, - 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, - 0x44, 0x69, 0xe2, 0x35, 0xb0, 0x02, 0x92, 0xd2, 0xc0, 0xe6, 0x26, 0xb1, 0x81, 0xd3, 0x98, 0x31, - 0x20, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x47, 0x3e, 0x7f, 0xf3, 0x02, 0x00, 0x00, + // 383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x3f, 0x4f, 0xc2, 0x40, + 0x18, 0x87, 0x5b, 0x40, 0xc0, 0x43, 0x1d, 0xaa, 0x26, 0x15, 0xa5, 0xc5, 0x4e, 0x38, 0xd8, 0x0a, + 0x4e, 0x32, 0x38, 0x94, 0xc1, 0xc9, 0xc4, 0xd4, 0xcd, 0xc5, 0x5c, 0xdb, 0x4b, 0x6d, 0xa0, 0xbd, + 0x86, 0x3b, 0x8c, 0x7c, 0x03, 0x47, 0x3e, 0x02, 0xb3, 0x9f, 0x84, 0x91, 0xc4, 0xc5, 0x09, 0x0d, + 0x2c, 0xce, 0x7e, 0x02, 0xd3, 0xbb, 0xa3, 0x6a, 0x24, 0x4e, 0x4e, 0xfd, 0xf3, 0xfe, 0x9e, 0xe7, + 0xbd, 0xf7, 0xee, 0xc0, 0xa1, 0x87, 0x49, 0x84, 0x89, 0xe5, 0xc2, 0xb8, 0x6b, 0xdd, 0x37, 0x5d, + 0x44, 0x61, 0xd3, 0x0a, 0x50, 0x8c, 0x48, 0x48, 0xcc, 0xa4, 0x8f, 0x29, 0x56, 0xb6, 0x79, 0xc4, + 0x4c, 0x23, 0xa6, 0x88, 0x54, 0x77, 0x02, 0x1c, 0x60, 0x56, 0xb7, 0xd2, 0x37, 0x1e, 0xad, 0x6a, + 0x99, 0x8d, 0xa0, 0xcc, 0xe6, 0xe1, 0x30, 0xfe, 0x55, 0xff, 0xd6, 0x8d, 0x79, 0x59, 0xdd, 0x78, + 0xce, 0x81, 0x8d, 0x0b, 0xde, 0xfc, 0x9a, 0x42, 0x8a, 0x94, 0x33, 0x50, 0x4c, 0x60, 0x1f, 0x46, + 0x44, 0x95, 0xeb, 0x72, 0xa3, 0xd2, 0xda, 0x37, 0x57, 0x2c, 0xc6, 0xbc, 0x62, 0x11, 0xbb, 0x30, + 0x99, 0xe9, 0x92, 0x23, 0x00, 0xe5, 0x1c, 0x94, 0x5d, 0xd8, 0x83, 0xb1, 0x87, 0x88, 0x9a, 0xab, + 0xe7, 0x1b, 0x95, 0xd6, 0xc1, 0x4a, 0xd8, 0xe6, 0x21, 0x41, 0x67, 0x8c, 0xe2, 0x81, 0x22, 0x19, + 0x24, 0x49, 0x6f, 0xa8, 0xe6, 0x19, 0xbd, 0xf7, 0x45, 0x13, 0x94, 0xd1, 0x1d, 0x1c, 0xc6, 0xf6, + 0x49, 0x8a, 0x3e, 0xbd, 0xea, 0x8d, 0x20, 0xa4, 0x77, 0x03, 0xd7, 0xf4, 0x70, 0x64, 0x89, 0x49, + 0xf9, 0xe3, 0x98, 0xf8, 0x5d, 0x8b, 0x0e, 0x13, 0x44, 0x18, 0x40, 0x1c, 0xa1, 0x56, 0x3c, 0xb0, + 0xe5, 0xa3, 0x18, 0x47, 0xb7, 0x11, 0xa2, 0xd0, 0x87, 0x14, 0xaa, 0x05, 0xd6, 0xac, 0xb6, 0x72, + 0xa9, 0x97, 0x22, 0x64, 0xd7, 0xd2, 0x86, 0x1f, 0x33, 0x7d, 0x77, 0x08, 0xa3, 0x5e, 0xdb, 0xf8, + 0xa9, 0x30, 0x9c, 0x4d, 0xf6, 0x63, 0x99, 0x36, 0x46, 0x32, 0x28, 0x89, 0x29, 0x15, 0x15, 0x94, + 0xa0, 0xef, 0xf7, 0x11, 0xe1, 0x3b, 0xba, 0xee, 0x2c, 0x3f, 0x15, 0x08, 0xd6, 0xd2, 0x93, 0x5a, + 0x6e, 0xd6, 0xbf, 0x8e, 0xcb, 0xcd, 0xed, 0xf2, 0xe3, 0x58, 0x97, 0xde, 0xc7, 0xba, 0x64, 0x77, + 0x26, 0x73, 0x4d, 0x9e, 0xce, 0x35, 0xf9, 0x6d, 0xae, 0xc9, 0xa3, 0x85, 0x26, 0x4d, 0x17, 0x9a, + 0xf4, 0xb2, 0xd0, 0xa4, 0x9b, 0xa3, 0x3f, 0xa5, 0x0f, 0xfc, 0xea, 0x30, 0xb7, 0x5b, 0x64, 0x97, + 0xe6, 0xf4, 0x33, 0x00, 0x00, 0xff, 0xff, 0x15, 0x28, 0xf0, 0x44, 0xc4, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -581,7 +580,7 @@ func (m *Balance) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -591,25 +590,23 @@ func (m *Balance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/bank/types/msgs.go b/x/bank/types/msgs.go index 6fada6e0a3..22fdc30b38 100644 --- a/x/bank/types/msgs.go +++ b/x/bank/types/msgs.go @@ -14,8 +14,9 @@ const ( var _ sdk.Msg = &MsgSend{} // NewMsgSend - construct a msg to send coins from one account to another. +//nolint:interfacer func NewMsgSend(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins) *MsgSend { - return &MsgSend{FromAddress: fromAddr, ToAddress: toAddr, Amount: amount} + return &MsgSend{FromAddress: fromAddr.String(), ToAddress: toAddr.String(), Amount: amount} } // Route Implements Msg. @@ -26,11 +27,13 @@ func (msg MsgSend) Type() string { return TypeMsgSend } // ValidateBasic Implements Msg. func (msg MsgSend) ValidateBasic() error { - if err := sdk.VerifyAddressFormat(msg.FromAddress); err != nil { + _, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) } - if err := sdk.VerifyAddressFormat(msg.ToAddress); err != nil { + _, err = sdk.AccAddressFromBech32(msg.ToAddress) + if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid recipient address (%s)", err) } @@ -52,7 +55,11 @@ func (msg MsgSend) GetSignBytes() []byte { // GetSigners Implements Msg. func (msg MsgSend) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.FromAddress} + from, err := sdk.AccAddressFromBech32(msg.FromAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{from} } var _ sdk.Msg = &MsgMultiSend{} @@ -92,7 +99,8 @@ func (msg MsgMultiSend) GetSignBytes() []byte { func (msg MsgMultiSend) GetSigners() []sdk.AccAddress { addrs := make([]sdk.AccAddress, len(msg.Inputs)) for i, in := range msg.Inputs { - addrs[i] = in.Address + addr, _ := sdk.AccAddressFromBech32(in.Address) + addrs[i] = addr } return addrs @@ -100,8 +108,9 @@ func (msg MsgMultiSend) GetSigners() []sdk.AccAddress { // ValidateBasic - validate transaction input func (in Input) ValidateBasic() error { - if err := sdk.VerifyAddressFormat(in.Address); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid input address (%s)", err) + _, err := sdk.AccAddressFromBech32(in.Address) + if err != nil { + return err } if !in.Coins.IsValid() { @@ -116,16 +125,18 @@ func (in Input) ValidateBasic() error { } // NewInput - create a transaction input, used with MsgMultiSend +//nolint:interfacer func NewInput(addr sdk.AccAddress, coins sdk.Coins) Input { return Input{ - Address: addr, + Address: addr.String(), Coins: coins, } } // ValidateBasic - validate transaction output func (out Output) ValidateBasic() error { - if err := sdk.VerifyAddressFormat(out.Address); err != nil { + _, err := sdk.AccAddressFromBech32(out.Address) + if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid output address (%s)", err) } @@ -141,9 +152,10 @@ func (out Output) ValidateBasic() error { } // NewOutput - create a transaction output, used with MsgMultiSend +//nolint:interfacer func NewOutput(addr sdk.AccAddress, coins sdk.Coins) Output { return Output{ - Address: addr, + Address: addr.String(), Coins: coins, } } diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index ff11c851be..96132150ad 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -38,9 +38,9 @@ func TestMsgSendValidation(t *testing.T) { {"", NewMsgSend(addr1, addr2, atom123eth123)}, // valid send with multiple coins {": invalid coins", NewMsgSend(addr1, addr2, atom0)}, // non positive coin {"123atom,0eth: invalid coins", NewMsgSend(addr1, addr2, atom123eth0)}, // non positive coin in multicoins - {"Invalid sender address (incorrect address length (expected: 20, actual: 0)): invalid address", NewMsgSend(addrEmpty, addr2, atom123)}, + {"Invalid sender address (empty address string is not allowed): invalid address", NewMsgSend(addrEmpty, addr2, atom123)}, {"Invalid sender address (incorrect address length (expected: 20, actual: 33)): invalid address", NewMsgSend(addrTooLong, addr2, atom123)}, - {"Invalid recipient address (incorrect address length (expected: 20, actual: 0)): invalid address", NewMsgSend(addr1, addrEmpty, atom123)}, + {"Invalid recipient address (empty address string is not allowed): invalid address", NewMsgSend(addr1, addrEmpty, atom123)}, {"Invalid recipient address (incorrect address length (expected: 20, actual: 33)): invalid address", NewMsgSend(addr1, addrTooLong, atom123)}, } @@ -66,10 +66,10 @@ func TestMsgSendGetSignBytes(t *testing.T) { } func TestMsgSendGetSigners(t *testing.T) { - var msg = NewMsgSend(sdk.AccAddress([]byte("input1")), sdk.AccAddress{}, sdk.NewCoins()) + var msg = NewMsgSend(sdk.AccAddress([]byte("input111111111111111")), sdk.AccAddress{}, sdk.NewCoins()) res := msg.GetSigners() // TODO: fix this ! - require.Equal(t, fmt.Sprintf("%v", res), "[696E70757431]") + require.Equal(t, fmt.Sprintf("%v", res), "[696E707574313131313131313131313131313131]") } func TestMsgMultiSendRoute(t *testing.T) { @@ -110,8 +110,8 @@ func TestInputValidation(t *testing.T) { {"", NewInput(addr2, someCoins)}, {"", NewInput(addr2, multiCoins)}, - {"Invalid input address (incorrect address length (expected: 20, actual: 0)): invalid address", NewInput(addrEmpty, someCoins)}, - {"Invalid input address (incorrect address length (expected: 20, actual: 33)): invalid address", NewInput(addrTooLong, someCoins)}, + {"empty address string is not allowed", NewInput(addrEmpty, someCoins)}, + {"incorrect address length (expected: 20, actual: 33)", NewInput(addrTooLong, someCoins)}, {": invalid coins", NewInput(addr1, emptyCoins)}, // invalid coins {": invalid coins", NewInput(addr1, emptyCoins2)}, // invalid coins {"10eth,0atom: invalid coins", NewInput(addr1, someEmptyCoins)}, // invalid coins @@ -151,7 +151,7 @@ func TestOutputValidation(t *testing.T) { {"", NewOutput(addr2, someCoins)}, {"", NewOutput(addr2, multiCoins)}, - {"Invalid output address (incorrect address length (expected: 20, actual: 0)): invalid address", NewOutput(addrEmpty, someCoins)}, + {"Invalid output address (empty address string is not allowed): invalid address", NewOutput(addrEmpty, someCoins)}, {"Invalid output address (incorrect address length (expected: 20, actual: 33)): invalid address", NewOutput(addrTooLong, someCoins)}, {": invalid coins", NewOutput(addr1, emptyCoins)}, // invalid coins {": invalid coins", NewOutput(addr1, emptyCoins2)}, // invalid coins @@ -197,7 +197,7 @@ func TestMsgMultiSendValidation(t *testing.T) { Outputs: []Output{output1}}}, {false, MsgMultiSend{ Inputs: []Input{input1}, - Outputs: []Output{{emptyAddr, atom123}}}, // invalid output + Outputs: []Output{{emptyAddr.String(), atom123}}}, // invalid output }, {false, MsgMultiSend{ Inputs: []Input{input1}, @@ -240,14 +240,15 @@ func TestMsgMultiSendGetSignBytes(t *testing.T) { func TestMsgMultiSendGetSigners(t *testing.T) { var msg = MsgMultiSend{ Inputs: []Input{ - NewInput(sdk.AccAddress([]byte("input1")), nil), - NewInput(sdk.AccAddress([]byte("input2")), nil), - NewInput(sdk.AccAddress([]byte("input3")), nil), + NewInput(sdk.AccAddress([]byte("input111111111111111")), nil), + NewInput(sdk.AccAddress([]byte("input222222222222222")), nil), + NewInput(sdk.AccAddress([]byte("input333333333333333")), nil), }, } + res := msg.GetSigners() // TODO: fix this ! - require.Equal(t, fmt.Sprintf("%v", res), "[696E70757431 696E70757432 696E70757433]") + require.Equal(t, "[696E707574313131313131313131313131313131 696E707574323232323232323232323232323232 696E707574333333333333333333333333333333]", fmt.Sprintf("%v", res)) } /* diff --git a/x/bank/types/querier.go b/x/bank/types/querier.go index 62466564cd..1ef0093386 100644 --- a/x/bank/types/querier.go +++ b/x/bank/types/querier.go @@ -14,13 +14,15 @@ const ( ) // NewQueryBalanceRequest creates a new instance of QueryBalanceRequest. +//nolint:interfacer func NewQueryBalanceRequest(addr sdk.AccAddress, denom string) *QueryBalanceRequest { - return &QueryBalanceRequest{Address: addr, Denom: denom} + return &QueryBalanceRequest{Address: addr.String(), Denom: denom} } // NewQueryAllBalancesRequest creates a new instance of QueryAllBalancesRequest. +//nolint:interfacer func NewQueryAllBalancesRequest(addr sdk.AccAddress, req *query.PageRequest) *QueryAllBalancesRequest { - return &QueryAllBalancesRequest{Address: addr, Pagination: req} + return &QueryAllBalancesRequest{Address: addr.String(), Pagination: req} } // QueryTotalSupplyParams defines the params for the following queries: diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index 38f0cd42c9..0af6dac36d 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -35,7 +35,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryBalanceRequest is the request type for the Query/Balance RPC method. type QueryBalanceRequest struct { // address is the address to query balances for. - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // denom is the coin denom to query balances for. Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } @@ -73,20 +73,6 @@ func (m *QueryBalanceRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo -func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *QueryBalanceRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - // QueryBalanceResponse is the response type for the Query/Balance RPC method. type QueryBalanceResponse struct { // balance is the balance of the coin. @@ -136,7 +122,7 @@ func (m *QueryBalanceResponse) GetBalance() *types.Coin { // QueryBalanceRequest is the request type for the Query/AllBalances RPC method. type QueryAllBalancesRequest struct { // address is the address to query balances for. - Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -174,21 +160,8 @@ func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo -func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *QueryAllBalancesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. type QueryAllBalancesResponse struct { // balances is the balances of all the coins. Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` @@ -243,7 +216,8 @@ func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse { return nil } -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC method. +// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +// method. type QueryTotalSupplyRequest struct { } @@ -280,7 +254,8 @@ func (m *QueryTotalSupplyRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTotalSupplyRequest proto.InternalMessageInfo -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method type QueryTotalSupplyResponse struct { // supply is the supply of the coins Supply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=supply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"supply"` @@ -516,50 +491,50 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) } var fileDescriptor_9c6fc1939682df13 = []byte{ - // 680 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x53, 0xd3, 0x40, - 0x18, 0xed, 0xa2, 0x14, 0xdc, 0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0x7a, 0x9e, 0xba, 0x8c, 0xec, 0x1b, 0x8b, 0x42, 0xdd, 0x6d, 0x34, - 0x9f, 0xa9, 0x4e, 0x66, 0x17, 0xbd, 0x03, 0x70, 0x3a, 0x4e, 0x22, 0xca, 0x39, 0xa0, 0x73, 0xd9, - 0xd6, 0x56, 0x8a, 0x40, 0x95, 0x90, 0x7b, 0x42, 0xc8, 0x1d, 0xb4, 0x98, 0x23, 0x24, 0x39, 0xc0, - 0x37, 0x00, 0x96, 0x65, 0xfa, 0xd0, 0xd2, 0xc5, 0x3d, 0x86, 0xa2, 0xae, 0xd5, 0xc7, 0x03, 0x0b, - 0xcd, 0x44, 0xe6, 0xbc, 0xb9, 0x7d, 0x7c, 0xa6, 0x83, 0x93, 0x33, 0x1d, 0xfc, 0x3a, 0xd3, 0xc1, - 0x87, 0x81, 0x5e, 0x3a, 0x19, 0xe8, 0xa5, 0x1f, 0x03, 0xbd, 0xf4, 0x7c, 0x39, 0xf7, 0x6d, 0xd8, - 0x97, 0x6c, 0xe2, 0x89, 0x68, 0x97, 0xc5, 0xcf, 0xdf, 0xc6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xda, 0x1b, 0x35, 0x7f, 0xd6, 0x07, 0x00, 0x00, + // 675 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xf6, 0x15, 0x9a, 0x96, 0xcb, 0x76, 0x0d, 0x22, 0x75, 0xc1, 0x41, 0xae, 0xa0, 0x49, 0x69, + 0x7d, 0x24, 0x1d, 0x2a, 0xd8, 0x48, 0x25, 0x18, 0x18, 0x1a, 0x0c, 0x13, 0xdb, 0x25, 0x39, 0x8c, + 0x55, 0xc7, 0xe7, 0xe6, 0x1c, 0x44, 0x54, 0x55, 0x20, 0x24, 0x24, 0x26, 0x40, 0x62, 0x60, 0x60, + 0xe9, 0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0xdd, 0x63, 0xcc, 0xea, 0x7a, 0x79, 0x7a, 0xe2, 0x4c, 0x33, 0x91, 0x3e, 0xaf, + 0xef, 0x1c, 0x0f, 0x0c, 0x70, 0x32, 0x30, 0xc0, 0xcf, 0x81, 0x01, 0xde, 0x0f, 0x0d, 0xed, 0x64, + 0x68, 0x68, 0xdf, 0x86, 0x86, 0xf6, 0xb8, 0x92, 0xf9, 0x36, 0x3c, 0x97, 0x68, 0xe2, 0x89, 0x68, + 0xe6, 0xc4, 0x9f, 0xd5, 0xd6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x31, 0x99, 0x37, 0x9b, 0x84, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1322,7 +1297,7 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1332,25 +1307,23 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1530,7 +1503,7 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1540,25 +1513,23 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/bank/types/query.pb.gw.go b/x/bank/types/query.pb.gw.go index ca9c1ddbfa..b1c6372ab7 100644 --- a/x/bank/types/query.pb.gw.go +++ b/x/bank/types/query.pb.gw.go @@ -47,7 +47,7 @@ func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) @@ -85,7 +85,7 @@ func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) @@ -127,7 +127,7 @@ func request_Query_AllBalances_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) @@ -161,7 +161,7 @@ func local_request_Query_AllBalances_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") } - protoReq.Address, err = runtime.Bytes(val) + protoReq.Address, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) diff --git a/x/bank/types/tx.pb.go b/x/bank/types/tx.pb.go index d654e508ce..e91fe4547b 100644 --- a/x/bank/types/tx.pb.go +++ b/x/bank/types/tx.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -28,9 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgSend represents a message to send coins from one account to another. type MsgSend struct { - FromAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"from_address,omitempty" yaml:"from_address"` - ToAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"to_address,omitempty" yaml:"to_address"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *MsgSend) Reset() { *m = MsgSend{} } @@ -66,27 +65,6 @@ func (m *MsgSend) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSend proto.InternalMessageInfo -func (m *MsgSend) GetFromAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.FromAddress - } - return nil -} - -func (m *MsgSend) GetToAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Amount - } - return nil -} - // MsgMultiSend represents an arbitrary multi-in, multi-out send message. type MsgMultiSend struct { Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` @@ -148,105 +126,33 @@ func init() { func init() { proto.RegisterFile("cosmos/bank/v1beta1/tx.proto", fileDescriptor_1d8cb1613481f5b7) } var fileDescriptor_1d8cb1613481f5b7 = []byte{ - // 383 bytes of a gzipped FileDescriptorProto + // 374 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0xcc, 0xcb, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xea, 0x81, 0x64, 0xf5, 0xa0, 0xb2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x79, 0x7d, 0x10, 0x0b, 0xa2, 0x54, 0x4a, 0x0e, 0x6e, 0x50, 0x71, 0x2a, 0xdc, 0xa0, 0xe4, 0xfc, 0xcc, 0x3c, 0x0c, 0x79, 0x24, 0x8b, 0xc0, - 0xe6, 0x82, 0xe5, 0x95, 0x4e, 0x30, 0x71, 0xb1, 0xfb, 0x16, 0xa7, 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+ 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x9a, 0x78, 0xfd, 0x58, 0x01, 0x89, + 0x4c, 0xb0, 0x57, 0x93, 0xd8, 0xc0, 0xd1, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x84, + 0x52, 0xaa, 0x51, 0x02, 0x00, 0x00, } -func (this *MsgSend) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgSend) - if !ok { - that2, ok := that.(MsgSend) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.FromAddress, that1.FromAddress) { - return false - } - if !bytes.Equal(this.ToAddress, that1.ToAddress) { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - return true -} -func (this *MsgMultiSend) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgMultiSend) - if !ok { - that2, ok := that.(MsgMultiSend) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Inputs) != len(that1.Inputs) { - return false - } - for i := range this.Inputs { - if !this.Inputs[i].Equal(&that1.Inputs[i]) { - return false - } - } - if len(this.Outputs) != len(that1.Outputs) { - return false - } - for i := range this.Outputs { - if !this.Outputs[i].Equal(&that1.Outputs[i]) { - return false - } - } - return true -} func (m *MsgSend) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -443,7 +349,7 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -453,31 +359,29 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } + m.FromAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -487,25 +391,23 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } + m.ToAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/capability/types/capability.pb.go b/x/capability/types/capability.pb.go index a38ff08af4..2fb8308714 100644 --- a/x/capability/types/capability.pb.go +++ b/x/capability/types/capability.pb.go @@ -23,8 +23,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Capability defines an implementation of an object capability. The index provided to -// a Capability must be globally unique. +// Capability defines an implementation of an object capability. The index +// provided to a Capability must be globally unique. type Capability struct { Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty" yaml:"index"` } diff --git a/x/crisis/handler.go b/x/crisis/handler.go index 83c7fd7ac4..eee27a95c1 100644 --- a/x/crisis/handler.go +++ b/x/crisis/handler.go @@ -27,7 +27,11 @@ func NewHandler(k keeper.Keeper) sdk.Handler { func handleMsgVerifyInvariant(ctx sdk.Context, msg *types.MsgVerifyInvariant, k keeper.Keeper) (*sdk.Result, error) { constantFee := sdk.NewCoins(k.GetConstantFee(ctx)) - if err := k.SendCoinsFromAccountToFeeCollector(ctx, msg.Sender, constantFee); err != nil { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + if err := k.SendCoinsFromAccountToFeeCollector(ctx, sender, constantFee); err != nil { return nil, err } @@ -80,7 +84,7 @@ func handleMsgVerifyInvariant(ctx sdk.Context, msg *types.MsgVerifyInvariant, k sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCrisis), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), ), }) diff --git a/x/crisis/types/msgs.go b/x/crisis/types/msgs.go index 3487d229d2..6161a1d4b7 100644 --- a/x/crisis/types/msgs.go +++ b/x/crisis/types/msgs.go @@ -8,9 +8,10 @@ import ( var _ sdk.Msg = &MsgVerifyInvariant{} // NewMsgVerifyInvariant creates a new MsgVerifyInvariant object +//nolint:interfacer func NewMsgVerifyInvariant(sender sdk.AccAddress, invModeName, invRoute string) *MsgVerifyInvariant { return &MsgVerifyInvariant{ - Sender: sender, + Sender: sender.String(), InvariantModuleName: invModeName, InvariantRoute: invRoute, } @@ -20,7 +21,10 @@ func (msg MsgVerifyInvariant) Route() string { return ModuleName } func (msg MsgVerifyInvariant) Type() string { return "verify_invariant" } // get the bytes for the message signer to sign on -func (msg MsgVerifyInvariant) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.Sender} } +func (msg MsgVerifyInvariant) GetSigners() []sdk.AccAddress { + sender, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{sender} +} // GetSignBytes gets the sign bytes for the msg MsgVerifyInvariant func (msg MsgVerifyInvariant) GetSignBytes() []byte { @@ -30,7 +34,7 @@ func (msg MsgVerifyInvariant) GetSignBytes() []byte { // quick validity check func (msg MsgVerifyInvariant) ValidateBasic() error { - if msg.Sender.Empty() { + if msg.Sender == "" { return ErrNoSender } return nil diff --git a/x/crisis/types/tx.pb.go b/x/crisis/types/tx.pb.go index 3f59c10484..64102a50d0 100644 --- a/x/crisis/types/tx.pb.go +++ b/x/crisis/types/tx.pb.go @@ -4,9 +4,7 @@ package types import ( - bytes "bytes" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -27,9 +25,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgVerifyInvariant represents a message to verify a particular invariance. type MsgVerifyInvariant struct { - Sender github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"` - InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty" yaml:"invariant_module_name"` - InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty" yaml:"invariant_route"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty" yaml:"invariant_module_name"` + InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty" yaml:"invariant_route"` } func (m *MsgVerifyInvariant) Reset() { *m = MsgVerifyInvariant{} } @@ -65,27 +63,6 @@ func (m *MsgVerifyInvariant) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVerifyInvariant proto.InternalMessageInfo -func (m *MsgVerifyInvariant) GetSender() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Sender - } - return nil -} - -func (m *MsgVerifyInvariant) GetInvariantModuleName() string { - if m != nil { - return m.InvariantModuleName - } - return "" -} - -func (m *MsgVerifyInvariant) GetInvariantRoute() string { - if m != nil { - return m.InvariantRoute - } - return "" -} - func init() { proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos.crisis.v1beta1.MsgVerifyInvariant") } @@ -93,58 +70,27 @@ func init() { func init() { proto.RegisterFile("cosmos/crisis/v1beta1/tx.proto", fileDescriptor_61276163172fe867) } var fileDescriptor_61276163172fe867 = []byte{ - // 296 bytes of a gzipped FileDescriptorProto + // 276 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xca, 0x2c, 0xce, 0x2c, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0xc8, 0xeb, 0x41, 0xe4, 0xf5, 0xa0, 0xf2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x15, 0xfa, 0x20, 0x16, 0x44, - 0xb1, 0x52, 0x03, 0x13, 0x97, 0x90, 0x6f, 0x71, 0x7a, 0x58, 0x6a, 0x51, 0x66, 0x5a, 0xa5, 0x67, - 0x5e, 0x59, 0x62, 0x51, 0x66, 0x62, 0x5e, 0x89, 0x90, 0x27, 0x17, 0x5b, 0x71, 0x6a, 0x5e, 0x4a, - 0x6a, 0x91, 0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93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x61, + 0xa1, 0x08, 0xa6, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x60, 0x41, 0x5a, 0x52, 0x59, 0x90, 0x5a, + 0x9c, 0xc4, 0x06, 0x0e, 0x21, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x29, 0x57, 0x7a, 0x12, + 0x70, 0x01, 0x00, 0x00, } -func (this *MsgVerifyInvariant) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgVerifyInvariant) - if !ok { - that2, ok := that.(MsgVerifyInvariant) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Sender, that1.Sender) { - return false - } - if this.InvariantModuleName != that1.InvariantModuleName { - return false - } - if this.InvariantRoute != that1.InvariantRoute { - return false - } - return true -} func (m *MsgVerifyInvariant) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -260,7 +206,7 @@ func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -270,25 +216,23 @@ func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Sender = append(m.Sender[:0], dAtA[iNdEx:postIndex]...) - if m.Sender == nil { - m.Sender = []byte{} - } + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/distribution/client/cli/query.go b/x/distribution/client/cli/query.go index 19f12fa163..3007bb0c0f 100644 --- a/x/distribution/client/cli/query.go +++ b/x/distribution/client/cli/query.go @@ -97,7 +97,7 @@ $ %s query distribution validator-outstanding-rewards %s1lwjmdnks33xwnmfayc64ycp res, err := queryClient.ValidatorOutstandingRewards( context.Background(), - &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: validatorAddr}, + &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: validatorAddr.String()}, ) if err != nil { return err @@ -143,7 +143,7 @@ $ %s query distribution commission %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj res, err := queryClient.ValidatorCommission( context.Background(), - &types.QueryValidatorCommissionRequest{ValidatorAddress: validatorAddr}, + &types.QueryValidatorCommissionRequest{ValidatorAddress: validatorAddr.String()}, ) if err != nil { return err @@ -205,7 +205,7 @@ $ %s query distribution slashes %svaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj res, err := queryClient.ValidatorSlashes( context.Background(), &types.QueryValidatorSlashesRequest{ - ValidatorAddress: validatorAddr, + ValidatorAddress: validatorAddr.String(), StartingHeight: startHeight, EndingHeight: endHeight, Pagination: pageReq, @@ -265,7 +265,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh res, err := queryClient.DelegationRewards( context.Background(), - &types.QueryDelegationRewardsRequest{DelegatorAddress: delegatorAddr, ValidatorAddress: validatorAddr}, + &types.QueryDelegationRewardsRequest{DelegatorAddress: delegatorAddr.String(), ValidatorAddress: validatorAddr.String()}, ) if err != nil { return err @@ -276,7 +276,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh res, err := queryClient.DelegationTotalRewards( context.Background(), - &types.QueryDelegationTotalRewardsRequest{DelegatorAddress: delegatorAddr}, + &types.QueryDelegationTotalRewardsRequest{DelegatorAddress: delegatorAddr.String()}, ) if err != nil { return err diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 1a29d5f502..67635e5782 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -159,7 +159,7 @@ $ %s tx distribution withdraw-all-rewards --from mykey } queryClient := types.NewQueryClient(clientCtx) - delValsRes, err := queryClient.DelegatorValidators(context.Background(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr}) + delValsRes, err := queryClient.DelegatorValidators(context.Background(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr.String()}) if err != nil { return err } @@ -168,7 +168,12 @@ $ %s tx distribution withdraw-all-rewards --from mykey // build multi-message transaction msgs := make([]sdk.Msg, 0, len(validators)) for _, valAddr := range validators { - msg := types.NewMsgWithdrawDelegatorReward(delAddr, valAddr) + val, err := sdk.ValAddressFromBech32(valAddr) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawDelegatorReward(delAddr, val) if err := msg.ValidateBasic(); err != nil { return err } @@ -321,7 +326,11 @@ Where proposal.json contains: } from := clientCtx.GetFromAddress() - content := types.NewCommunityPoolSpendProposal(proposal.Title, proposal.Description, proposal.Recipient, amount) + recpAddr, err := sdk.AccAddressFromBech32(proposal.Recipient) + if err != nil { + return err + } + content := types.NewCommunityPoolSpendProposal(proposal.Title, proposal.Description, recpAddr, amount) msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) if err != nil { diff --git a/x/distribution/client/cli/tx_test.go b/x/distribution/client/cli/tx_test.go index 45c47b3bc8..550943e1c4 100644 --- a/x/distribution/client/cli/tx_test.go +++ b/x/distribution/client/cli/tx_test.go @@ -81,12 +81,9 @@ func TestParseProposal(t *testing.T) { proposal, err := ParseCommunityPoolSpendProposalWithDeposit(encodingConfig.Marshaler, okJSON.Name()) require.NoError(t, err) - addr, err := sdk.AccAddressFromBech32("cosmos1s5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq") - require.NoError(t, err) - require.Equal(t, "Community Pool Spend", proposal.Title) require.Equal(t, "Pay me some Atoms!", proposal.Description) - require.Equal(t, addr, proposal.Recipient) + require.Equal(t, "cosmos1s5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq", proposal.Recipient) require.Equal(t, "1000stake", proposal.Deposit) require.Equal(t, "1000stake", proposal.Amount) } diff --git a/x/distribution/client/rest/grpc_query_test.go b/x/distribution/client/rest/grpc_query_test.go index 336b032f90..639c7cb7d8 100644 --- a/x/distribution/client/rest/grpc_query_test.go +++ b/x/distribution/client/rest/grpc_query_test.go @@ -1,7 +1,6 @@ package rest_test import ( - "encoding/base64" "fmt" "testing" @@ -72,10 +71,6 @@ func (s *IntegrationTestSuite) TestQueryOutstandingRewardsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddrBase64 := base64.URLEncoding.EncodeToString(val.ValAddress) - rewards, err := sdk.ParseDecCoins("19.6stake") s.Require().NoError(err) @@ -91,13 +86,13 @@ func (s *IntegrationTestSuite) TestQueryOutstandingRewardsGRPC() { "gRPC request params with wrong validator address", fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/outstanding_rewards", baseURL, "wrongAddress"), map[string]string{}, - false, + true, &types.QueryValidatorOutstandingRewardsResponse{}, &types.QueryValidatorOutstandingRewardsResponse{}, }, { "gRPC request params valid address", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/outstanding_rewards", baseURL, valAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/outstanding_rewards", baseURL, val.ValAddress.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "2", }, @@ -130,10 +125,6 @@ func (s *IntegrationTestSuite) TestQueryValidatorCommissionGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddrBase64 := base64.URLEncoding.EncodeToString(val.ValAddress) - commission, err := sdk.ParseDecCoins("9.8stake") s.Require().NoError(err) @@ -149,13 +140,13 @@ func (s *IntegrationTestSuite) TestQueryValidatorCommissionGRPC() { "gRPC request params with wrong validator address", fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/commission", baseURL, "wrongAddress"), map[string]string{}, - false, + true, &types.QueryValidatorCommissionResponse{}, &types.QueryValidatorCommissionResponse{}, }, { "gRPC request params valid address", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/commission", baseURL, valAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/commission", baseURL, val.ValAddress.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "2", }, @@ -174,7 +165,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorCommissionGRPC() { resp, err := testutil.GetRequestWithHeaders(tc.url, tc.headers) s.Run(tc.name, func() { if tc.expErr { - s.Require().Error(err) + s.Require().Error(val.ClientCtx.JSONMarshaler.UnmarshalJSON(resp, tc.respType)) } else { s.Require().NoError(err) s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(resp, tc.respType)) @@ -188,10 +179,6 @@ func (s *IntegrationTestSuite) TestQuerySlashesGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -208,21 +195,21 @@ func (s *IntegrationTestSuite) TestQuerySlashesGRPC() { }, { "invalid start height", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, valAddressBase64, "-1", "3"), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, val.ValAddress.String(), "-1", "3"), true, &types.QueryValidatorSlashesResponse{}, nil, }, { "invalid start height", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, valAddressBase64, "1", "-3"), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, val.ValAddress.String(), "1", "-3"), true, &types.QueryValidatorSlashesResponse{}, nil, }, { "valid request get slashes", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, valAddressBase64, "1", "3"), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s/slashes?starting_height=%s&ending_height=%s", baseURL, val.ValAddress.String(), "1", "3"), false, &types.QueryValidatorSlashesResponse{}, &types.QueryValidatorSlashesResponse{ @@ -251,11 +238,6 @@ func (s *IntegrationTestSuite) TestQueryDelegatorRewardsGRPC() { val := s.network.Validators[0] baseUrl := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddrBase64 := base64.URLEncoding.EncodeToString(val.Address) - valAddrBase64 := base64.URLEncoding.EncodeToString(val.ValAddress) - rewards, err := sdk.ParseDecCoins("9.8stake") s.Require().NoError(err) @@ -277,7 +259,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorRewardsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards", baseUrl, delAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards", baseUrl, val.Address.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "2", }, @@ -292,7 +274,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorRewardsGRPC() { }, { "wrong validator address(specific validator rewards)", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards/%s", baseUrl, delAddrBase64, "wrongValAddress"), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards/%s", baseUrl, val.Address.String(), "wrongValAddress"), map[string]string{}, true, &types.QueryDelegationTotalRewardsResponse{}, @@ -300,7 +282,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorRewardsGRPC() { }, { "valid request(specific validator rewards)", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards/%s", baseUrl, delAddrBase64, valAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/rewards/%s", baseUrl, val.Address.String(), val.ValAddress.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "2", }, @@ -332,10 +314,6 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorsGRPC() { val := s.network.Validators[0] baseUrl := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddrBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -359,11 +337,11 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/validators", baseUrl, delAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/validators", baseUrl, val.Address.String()), false, &types.QueryDelegatorValidatorsResponse{}, &types.QueryDelegatorValidatorsResponse{ - Validators: []sdk.ValAddress{val.ValAddress}, + Validators: []string{val.ValAddress.String()}, }, }, } @@ -388,10 +366,6 @@ func (s *IntegrationTestSuite) TestQueryWithdrawAddressGRPC() { val := s.network.Validators[0] baseUrl := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddrBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -415,11 +389,11 @@ func (s *IntegrationTestSuite) TestQueryWithdrawAddressGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/withdraw_address", baseUrl, delAddrBase64), + fmt.Sprintf("%s/cosmos/distribution/v1beta1/delegators/%s/withdraw_address", baseUrl, val.Address.String()), false, &types.QueryDelegatorWithdrawAddressResponse{}, &types.QueryDelegatorWithdrawAddressResponse{ - WithdrawAddress: val.Address, + WithdrawAddress: val.Address.String(), }, }, } diff --git a/x/distribution/handler.go b/x/distribution/handler.go index 0f9417e770..36274544b2 100644 --- a/x/distribution/handler.go +++ b/x/distribution/handler.go @@ -37,7 +37,15 @@ func NewHandler(k keeper.Keeper) sdk.Handler { // These functions assume everything has been authenticated (ValidateBasic passed, and signatures checked) func handleMsgModifyWithdrawAddress(ctx sdk.Context, msg *types.MsgSetWithdrawAddress, k keeper.Keeper) (*sdk.Result, error) { - err := k.SetWithdrawAddr(ctx, msg.DelegatorAddress, msg.WithdrawAddress) + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + withdrawAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + err = k.SetWithdrawAddr(ctx, delegatorAddress, withdrawAddress) if err != nil { return nil, err } @@ -46,7 +54,7 @@ func handleMsgModifyWithdrawAddress(ctx sdk.Context, msg *types.MsgSetWithdrawAd sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), ) @@ -54,7 +62,15 @@ func handleMsgModifyWithdrawAddress(ctx sdk.Context, msg *types.MsgSetWithdrawAd } func handleMsgWithdrawDelegatorReward(ctx sdk.Context, msg *types.MsgWithdrawDelegatorReward, k keeper.Keeper) (*sdk.Result, error) { - amount, err := k.WithdrawDelegationRewards(ctx, msg.DelegatorAddress, msg.ValidatorAddress) + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + amount, err := k.WithdrawDelegationRewards(ctx, delegatorAddress, valAddr) if err != nil { return nil, err } @@ -73,7 +89,7 @@ func handleMsgWithdrawDelegatorReward(ctx sdk.Context, msg *types.MsgWithdrawDel sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), ) @@ -81,7 +97,11 @@ func handleMsgWithdrawDelegatorReward(ctx sdk.Context, msg *types.MsgWithdrawDel } func handleMsgWithdrawValidatorCommission(ctx sdk.Context, msg *types.MsgWithdrawValidatorCommission, k keeper.Keeper) (*sdk.Result, error) { - amount, err := k.WithdrawValidatorCommission(ctx, msg.ValidatorAddress) + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + amount, err := k.WithdrawValidatorCommission(ctx, valAddr) if err != nil { return nil, err } @@ -100,7 +120,7 @@ func handleMsgWithdrawValidatorCommission(ctx sdk.Context, msg *types.MsgWithdra sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddress), ), ) @@ -108,7 +128,11 @@ func handleMsgWithdrawValidatorCommission(ctx sdk.Context, msg *types.MsgWithdra } func handleMsgFundCommunityPool(ctx sdk.Context, msg *types.MsgFundCommunityPool, k keeper.Keeper) (*sdk.Result, error) { - if err := k.FundCommunityPool(ctx, msg.Amount, msg.Depositor); err != nil { + depositer, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return nil, err + } + if err := k.FundCommunityPool(ctx, msg.Amount, depositer); err != nil { return nil, err } @@ -116,7 +140,7 @@ func handleMsgFundCommunityPool(ctx sdk.Context, msg *types.MsgFundCommunityPool sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Depositor.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Depositor), ), ) diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index 54c70c9f66..27cc23c764 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -15,29 +15,75 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { k.SetParams(ctx, data.Params) for _, dwi := range data.DelegatorWithdrawInfos { - k.SetDelegatorWithdrawAddr(ctx, dwi.DelegatorAddress, dwi.WithdrawAddress) + delegatorAddress, err := sdk.AccAddressFromBech32(dwi.DelegatorAddress) + if err != nil { + panic(err) + } + withdrawAddress, err := sdk.AccAddressFromBech32(dwi.WithdrawAddress) + if err != nil { + panic(err) + } + + k.SetDelegatorWithdrawAddr(ctx, delegatorAddress, withdrawAddress) } - k.SetPreviousProposerConsAddr(ctx, data.PreviousProposer) + var previousProposer sdk.ConsAddress + if data.PreviousProposer != "" { + var err error + previousProposer, err = sdk.ConsAddressFromBech32(data.PreviousProposer) + if err != nil { + panic(err) + } + } + + k.SetPreviousProposerConsAddr(ctx, previousProposer) for _, rew := range data.OutstandingRewards { - k.SetValidatorOutstandingRewards(ctx, rew.ValidatorAddress, types.ValidatorOutstandingRewards{Rewards: rew.OutstandingRewards}) + valAddr, err := sdk.ValAddressFromBech32(rew.ValidatorAddress) + if err != nil { + panic(err) + } + k.SetValidatorOutstandingRewards(ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: rew.OutstandingRewards}) moduleHoldings = moduleHoldings.Add(rew.OutstandingRewards...) } for _, acc := range data.ValidatorAccumulatedCommissions { - k.SetValidatorAccumulatedCommission(ctx, acc.ValidatorAddress, acc.Accumulated) + valAddr, err := sdk.ValAddressFromBech32(acc.ValidatorAddress) + if err != nil { + panic(err) + } + k.SetValidatorAccumulatedCommission(ctx, valAddr, acc.Accumulated) } for _, his := range data.ValidatorHistoricalRewards { - k.SetValidatorHistoricalRewards(ctx, his.ValidatorAddress, his.Period, his.Rewards) + valAddr, err := sdk.ValAddressFromBech32(his.ValidatorAddress) + if err != nil { + panic(err) + } + k.SetValidatorHistoricalRewards(ctx, valAddr, his.Period, his.Rewards) } for _, cur := range data.ValidatorCurrentRewards { - k.SetValidatorCurrentRewards(ctx, cur.ValidatorAddress, cur.Rewards) + valAddr, err := sdk.ValAddressFromBech32(cur.ValidatorAddress) + if err != nil { + panic(err) + } + k.SetValidatorCurrentRewards(ctx, valAddr, cur.Rewards) } for _, del := range data.DelegatorStartingInfos { - k.SetDelegatorStartingInfo(ctx, del.ValidatorAddress, del.DelegatorAddress, del.StartingInfo) + valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + if err != nil { + panic(err) + } + delegatorAddress, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + if err != nil { + panic(err) + } + k.SetDelegatorStartingInfo(ctx, valAddr, delegatorAddress, del.StartingInfo) } for _, evt := range data.ValidatorSlashEvents { - k.SetValidatorSlashEvent(ctx, evt.ValidatorAddress, evt.Height, evt.Period, evt.Event) + valAddr, err := sdk.ValAddressFromBech32(evt.ValidatorAddress) + if err != nil { + panic(err) + } + k.SetValidatorSlashEvent(ctx, valAddr, evt.Height, evt.Period, evt.Event) } moduleHoldings = moduleHoldings.Add(data.FeePool.CommunityPool...) @@ -67,8 +113,8 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { dwi := make([]types.DelegatorWithdrawInfo, 0) k.IterateDelegatorWithdrawAddrs(ctx, func(del sdk.AccAddress, addr sdk.AccAddress) (stop bool) { dwi = append(dwi, types.DelegatorWithdrawInfo{ - DelegatorAddress: del, - WithdrawAddress: addr, + DelegatorAddress: del.String(), + WithdrawAddress: addr.String(), }) return false }) @@ -79,7 +125,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateValidatorOutstandingRewards(ctx, func(addr sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { outstanding = append(outstanding, types.ValidatorOutstandingRewardsRecord{ - ValidatorAddress: addr, + ValidatorAddress: addr.String(), OutstandingRewards: rewards.Rewards, }) return false @@ -90,7 +136,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateValidatorAccumulatedCommissions(ctx, func(addr sdk.ValAddress, commission types.ValidatorAccumulatedCommission) (stop bool) { acc = append(acc, types.ValidatorAccumulatedCommissionRecord{ - ValidatorAddress: addr, + ValidatorAddress: addr.String(), Accumulated: commission, }) return false @@ -101,7 +147,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateValidatorHistoricalRewards(ctx, func(val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards) (stop bool) { his = append(his, types.ValidatorHistoricalRewardsRecord{ - ValidatorAddress: val, + ValidatorAddress: val.String(), Period: period, Rewards: rewards, }) @@ -113,7 +159,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateValidatorCurrentRewards(ctx, func(val sdk.ValAddress, rewards types.ValidatorCurrentRewards) (stop bool) { cur = append(cur, types.ValidatorCurrentRewardsRecord{ - ValidatorAddress: val, + ValidatorAddress: val.String(), Rewards: rewards, }) return false @@ -124,8 +170,8 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateDelegatorStartingInfos(ctx, func(val sdk.ValAddress, del sdk.AccAddress, info types.DelegatorStartingInfo) (stop bool) { dels = append(dels, types.DelegatorStartingInfoRecord{ - ValidatorAddress: val, - DelegatorAddress: del, + ValidatorAddress: val.String(), + DelegatorAddress: del.String(), StartingInfo: info, }) return false @@ -136,7 +182,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.IterateValidatorSlashEvents(ctx, func(val sdk.ValAddress, height uint64, event types.ValidatorSlashEvent) (stop bool) { slashes = append(slashes, types.ValidatorSlashEventRecord{ - ValidatorAddress: val, + ValidatorAddress: val.String(), Height: height, Period: event.ValidatorPeriod, Event: event, diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index 2ccb5a1b10..01817535e8 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -31,12 +31,17 @@ func (k Keeper) ValidatorOutstandingRewards(c context.Context, req *types.QueryV return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.ValidatorAddress.Empty() { + if req.ValidatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty validator address") } ctx := sdk.UnwrapSDKContext(c) - rewards := k.GetValidatorOutstandingRewards(ctx, req.ValidatorAddress) + + valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + rewards := k.GetValidatorOutstandingRewards(ctx, valAdr) return &types.QueryValidatorOutstandingRewardsResponse{Rewards: rewards}, nil } @@ -47,12 +52,17 @@ func (k Keeper) ValidatorCommission(c context.Context, req *types.QueryValidator return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.ValidatorAddress.Empty() { + if req.ValidatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty validator address") } ctx := sdk.UnwrapSDKContext(c) - commission := k.GetValidatorAccumulatedCommission(ctx, req.ValidatorAddress) + + valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + commission := k.GetValidatorAccumulatedCommission(ctx, valAdr) return &types.QueryValidatorCommissionResponse{Commission: commission}, nil } @@ -63,7 +73,7 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.ValidatorAddress.Empty() { + if req.ValidatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty validator address") } @@ -74,7 +84,11 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla ctx := sdk.UnwrapSDKContext(c) events := make([]types.ValidatorSlashEvent, 0) store := ctx.KVStore(k.storeKey) - slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(req.ValidatorAddress)) + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid validator address") + } + slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(valAddr)) pageRes, err := query.FilteredPaginate(slashesStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { var result types.ValidatorSlashEvent @@ -95,7 +109,7 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla }) if err != nil { - return &types.QueryValidatorSlashesResponse{}, err + return nil, err } return &types.QueryValidatorSlashesResponse{Slashes: events, Pagination: pageRes}, nil @@ -107,22 +121,31 @@ func (k Keeper) DelegationRewards(c context.Context, req *types.QueryDelegationR return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.DelegatorAddress.Empty() { + if req.DelegatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty delegator address") } - if req.ValidatorAddress.Empty() { + if req.ValidatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty validator address") } ctx := sdk.UnwrapSDKContext(c) - val := k.stakingKeeper.Validator(ctx, req.ValidatorAddress) - if val == nil { - return nil, sdkerrors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress.String()) + valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err } - del := k.stakingKeeper.Delegation(ctx, req.DelegatorAddress, req.ValidatorAddress) + val := k.stakingKeeper.Validator(ctx, valAdr) + if val == nil { + return nil, sdkerrors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) + } + + delAdr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + del := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) if del == nil { return nil, types.ErrNoDelegationExists } @@ -139,7 +162,7 @@ func (k Keeper) DelegationTotalRewards(c context.Context, req *types.QueryDelega return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.DelegatorAddress.Empty() { + if req.DelegatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty delegator address") } @@ -148,8 +171,13 @@ func (k Keeper) DelegationTotalRewards(c context.Context, req *types.QueryDelega total := sdk.DecCoins{} var delRewards []types.DelegationDelegatorReward + delAdr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + k.stakingKeeper.IterateDelegations( - ctx, req.DelegatorAddress, + ctx, delAdr, func(_ int64, del exported.DelegationI) (stop bool) { valAddr := del.GetValidatorAddr() val := k.stakingKeeper.Validator(ctx, valAddr) @@ -171,18 +199,21 @@ func (k Keeper) DelegatorValidators(c context.Context, req *types.QueryDelegator return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.DelegatorAddress.Empty() { + if req.DelegatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty delegator address") } ctx := sdk.UnwrapSDKContext(c) - - var validators []sdk.ValAddress + delAdr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + var validators []string k.stakingKeeper.IterateDelegations( - ctx, req.DelegatorAddress, + ctx, delAdr, func(_ int64, del exported.DelegationI) (stop bool) { - validators = append(validators, del.GetValidatorAddr()) + validators = append(validators, del.GetValidatorAddr().String()) return false }, ) @@ -196,14 +227,18 @@ func (k Keeper) DelegatorWithdrawAddress(c context.Context, req *types.QueryDele return nil, status.Error(codes.InvalidArgument, "invalid request") } - if req.DelegatorAddress.Empty() { + if req.DelegatorAddress == "" { return nil, status.Error(codes.InvalidArgument, "empty delegator address") } + delAdr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } ctx := sdk.UnwrapSDKContext(c) - withdrawAddr := k.GetDelegatorWithdrawAddr(ctx, req.DelegatorAddress) + withdrawAddr := k.GetDelegatorWithdrawAddr(ctx, delAdr) - return &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawAddr}, nil + return &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawAddr.String()}, nil } // CommunityPool queries the community pool coins diff --git a/x/distribution/keeper/grpc_query_test.go b/x/distribution/keeper/grpc_query_test.go index f6d4406f1a..92a9f3abb4 100644 --- a/x/distribution/keeper/grpc_query_test.go +++ b/x/distribution/keeper/grpc_query_test.go @@ -128,7 +128,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorOutstandingRewards() { }, { "valid request", func() { - req = &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: valAddrs[0]} + req = &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: valAddrs[0].String()} }, true, }, @@ -175,7 +175,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorCommission() { { "valid request", func() { - req = &types.QueryValidatorCommissionRequest{ValidatorAddress: valAddrs[0]} + req = &types.QueryValidatorCommissionRequest{ValidatorAddress: valAddrs[0].String()} }, true, }, @@ -235,7 +235,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() { "Ending height lesser than start height request", func() { req = &types.QueryValidatorSlashesRequest{ - ValidatorAddress: valAddrs[1], + ValidatorAddress: valAddrs[1].String(), StartingHeight: 10, EndingHeight: 1, } @@ -247,7 +247,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() { "no slash event validator request", func() { req = &types.QueryValidatorSlashesRequest{ - ValidatorAddress: valAddrs[1], + ValidatorAddress: valAddrs[1].String(), StartingHeight: 1, EndingHeight: 10, } @@ -264,7 +264,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() { } req = &types.QueryValidatorSlashesRequest{ - ValidatorAddress: valAddrs[0], + ValidatorAddress: valAddrs[0].String(), StartingHeight: 1, EndingHeight: 10, Pagination: pageReq, @@ -285,7 +285,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() { } req = &types.QueryValidatorSlashesRequest{ - ValidatorAddress: valAddrs[0], + ValidatorAddress: valAddrs[0].String(), StartingHeight: 1, EndingHeight: 10, Pagination: pageReq, @@ -306,7 +306,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() { } req = &types.QueryValidatorSlashesRequest{ - ValidatorAddress: valAddrs[0], + ValidatorAddress: valAddrs[0].String(), StartingHeight: 1, EndingHeight: 10, Pagination: pageReq, @@ -385,8 +385,8 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "empty delegator request", func() { req = &types.QueryDelegationRewardsRequest{ - DelegatorAddress: nil, - ValidatorAddress: valAddrs[0], + DelegatorAddress: "", + ValidatorAddress: valAddrs[0].String(), } }, false, @@ -395,8 +395,8 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "empty validator request", func() { req = &types.QueryDelegationRewardsRequest{ - DelegatorAddress: addrs[1], - ValidatorAddress: nil, + DelegatorAddress: addrs[1].String(), + ValidatorAddress: "", } }, false, @@ -405,8 +405,8 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "request with wrong delegator and validator", func() { req = &types.QueryDelegationRewardsRequest{ - DelegatorAddress: addrs[1], - ValidatorAddress: valAddrs[1], + DelegatorAddress: addrs[1].String(), + ValidatorAddress: valAddrs[1].String(), } }, false, @@ -415,8 +415,8 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "valid request", func() { req = &types.QueryDelegationRewardsRequest{ - DelegatorAddress: addrs[0], - ValidatorAddress: valAddrs[0], + DelegatorAddress: addrs[0].String(), + ValidatorAddress: valAddrs[0].String(), } expRes = &types.QueryDelegationRewardsResponse{ @@ -465,7 +465,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "valid total delegation rewards", func() { totalRewardsReq = &types.QueryDelegationTotalRewardsRequest{ - DelegatorAddress: addrs[0], + DelegatorAddress: addrs[0].String(), } expectedDelReward := types.NewDelegationDelegatorReward(valAddrs[0], @@ -519,7 +519,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "request no delegations address", func() { delegatorValidatorsReq = &types.QueryDelegatorValidatorsRequest{ - DelegatorAddress: addrs[1], + DelegatorAddress: addrs[1].String(), } expDelegatorValidatorsRes = &types.QueryDelegatorValidatorsResponse{} @@ -530,10 +530,10 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { "valid request", func() { delegatorValidatorsReq = &types.QueryDelegatorValidatorsRequest{ - DelegatorAddress: addrs[0], + DelegatorAddress: addrs[0].String(), } expDelegatorValidatorsRes = &types.QueryDelegatorValidatorsResponse{ - Validators: valAddrs[:1], + Validators: []string{valAddrs[0].String()}, } }, true, @@ -548,7 +548,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { if testCase.expPass { suite.Require().NoError(err) - suite.Require().Equal(validators, expDelegatorValidatorsRes) + suite.Require().Equal(expDelegatorValidatorsRes, validators) } else { suite.Require().Error(err) suite.Require().Nil(validators) @@ -580,7 +580,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegatorWithdrawAddress() { { "valid request", func() { - req = &types.QueryDelegatorWithdrawAddressRequest{DelegatorAddress: addrs[0]} + req = &types.QueryDelegatorWithdrawAddressRequest{DelegatorAddress: addrs[0].String()} }, true, }, @@ -594,7 +594,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegatorWithdrawAddress() { if testCase.expPass { suite.Require().NoError(err) - suite.Require().Equal(withdrawAddress.WithdrawAddress, addrs[1]) + suite.Require().Equal(withdrawAddress.WithdrawAddress, addrs[1].String()) } else { suite.Require().Error(err) suite.Require().Nil(withdrawAddress) diff --git a/x/distribution/keeper/proposal_handler.go b/x/distribution/keeper/proposal_handler.go index f3ed02b733..9f9c4ec9e4 100644 --- a/x/distribution/keeper/proposal_handler.go +++ b/x/distribution/keeper/proposal_handler.go @@ -10,11 +10,14 @@ import ( // HandleCommunityPoolSpendProposal is a handler for executing a passed community spend proposal func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p *types.CommunityPoolSpendProposal) error { - if k.blockedAddrs[p.Recipient.String()] { + if k.blockedAddrs[p.Recipient] { return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive external funds", p.Recipient) } - - err := k.DistributeFromFeePool(ctx, p.Amount, p.Recipient) + recipient, addrErr := sdk.AccAddressFromBech32(p.Recipient) + if addrErr != nil { + return addrErr + } + err := k.DistributeFromFeePool(ctx, p.Amount, recipient) if err != nil { return err } diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index b1c1dade01..6c6903fbf8 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -75,8 +75,8 @@ func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.GetDelegatorAddress().String()) - suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.GetWithdrawAddress().String()) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) + suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.WithdrawAddress) suite.Require().Equal(types.TypeMsgSetWithdrawAddress, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -98,11 +98,11 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { delTokens := sdk.TokensFromConsensusPower(2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] - delegation := stakingtypes.NewDelegation(delegator.Address, validator0.OperatorAddress, issuedShares) + delegation := stakingtypes.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) suite.app.StakingKeeper.SetDelegation(suite.ctx, delegation) - suite.app.DistrKeeper.SetDelegatorStartingInfo(suite.ctx, validator0.OperatorAddress, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) + suite.app.DistrKeeper.SetDelegatorStartingInfo(suite.ctx, validator0.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) - suite.setupValidatorRewards(validator0.OperatorAddress) + suite.setupValidatorRewards(validator0.GetOperator()) // begin a new block suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) @@ -116,12 +116,11 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmosvaloper1l4s054098kk9hmr5753c6k3m2kw65h686d3mhr", msg.GetValidatorAddress().String()) - suite.Require().Equal("cosmos1d6u7zhjwmsucs678d7qn95uqajd4ucl9jcjt26", msg.GetDelegatorAddress().String()) + suite.Require().Equal("cosmosvaloper1l4s054098kk9hmr5753c6k3m2kw65h686d3mhr", msg.ValidatorAddress) + suite.Require().Equal("cosmos1d6u7zhjwmsucs678d7qn95uqajd4ucl9jcjt26", msg.DelegatorAddress) suite.Require().Equal(types.TypeMsgWithdrawDelegatorReward, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) - } // TestSimulateMsgWithdrawValidatorCommission tests the normal scenario of a valid message @@ -157,10 +156,10 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName sdk.NewDecCoinFromDec("stake", sdk.NewDec(1).Quo(sdk.NewDec(1))), ) - suite.app.DistrKeeper.SetValidatorOutstandingRewards(suite.ctx, validator0.OperatorAddress, types.ValidatorOutstandingRewards{Rewards: valCommission}) + suite.app.DistrKeeper.SetValidatorOutstandingRewards(suite.ctx, validator0.GetOperator(), types.ValidatorOutstandingRewards{Rewards: valCommission}) // setup validator accumulated commission - suite.app.DistrKeeper.SetValidatorAccumulatedCommission(suite.ctx, validator0.OperatorAddress, types.ValidatorAccumulatedCommission{Commission: valCommission}) + suite.app.DistrKeeper.SetValidatorAccumulatedCommission(suite.ctx, validator0.GetOperator(), types.ValidatorAccumulatedCommission{Commission: valCommission}) // begin a new block suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) @@ -174,7 +173,7 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.GetValidatorAddress().String()) + suite.Require().Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) suite.Require().Equal(types.TypeMsgWithdrawValidatorCommission, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) @@ -200,8 +199,8 @@ func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) suite.Require().True(operationMsg.OK) - suite.Require().Equal("4896096stake", msg.GetAmount().String()) - suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor.String()) + suite.Require().Equal("4896096stake", msg.Amount.String()) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) suite.Require().Equal(types.TypeMsgFundCommunityPool, msg.Type()) suite.Require().Equal(types.ModuleName, msg.Route()) suite.Require().Len(futureOperations, 0) diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index 2490e03bdd..44e51876d7 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -80,9 +79,10 @@ 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) +// 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"` @@ -425,10 +425,10 @@ func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins // together with how many coins are proposed to be spent, and to which // recipient account. type CommunityPoolSpendProposal 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"` - Recipient github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=recipient,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"recipient,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *CommunityPoolSpendProposal) Reset() { *m = CommunityPoolSpendProposal{} } @@ -463,12 +463,11 @@ func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown() { var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo -// DelegatorStartingInfo represents the starting info for a delegator reward period. -// It tracks the previous validator period, the delegation's amount -// of staking token, and the creation height (to check later on -// if any slashes have occurred). -// NOTE: Even though validators are slashed to whole staking tokens, the -// delegators within the validator may be left with less than a full token, +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, // thus sdk.Dec is used. type DelegatorStartingInfo struct { PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty" yaml:"previous_period"` @@ -526,8 +525,8 @@ func (m *DelegatorStartingInfo) GetHeight() uint64 { // DelegationDelegatorReward represents the properties // of a delegator's delegation reward. type DelegationDelegatorReward struct { - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - Reward github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=reward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Reward github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=reward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward"` } func (m *DelegationDelegatorReward) Reset() { *m = DelegationDelegatorReward{} } @@ -563,27 +562,14 @@ func (m *DelegationDelegatorReward) XXX_DiscardUnknown() { var xxx_messageInfo_DelegationDelegatorReward proto.InternalMessageInfo -func (m *DelegationDelegatorReward) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *DelegationDelegatorReward) GetReward() github_com_cosmos_cosmos_sdk_types.DecCoins { - if m != nil { - return m.Reward - } - return nil -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit type CommunityPoolSpendProposalWithDeposit struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` - Recipient github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=recipient,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"recipient,omitempty" yaml:"recipient"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` - Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty" yaml:"deposit"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty" yaml:"recipient"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty" yaml:"deposit"` } func (m *CommunityPoolSpendProposalWithDeposit) Reset() { *m = CommunityPoolSpendProposalWithDeposit{} } @@ -619,41 +605,6 @@ func (m *CommunityPoolSpendProposalWithDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_CommunityPoolSpendProposalWithDeposit proto.InternalMessageInfo -func (m *CommunityPoolSpendProposalWithDeposit) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *CommunityPoolSpendProposalWithDeposit) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *CommunityPoolSpendProposalWithDeposit) GetRecipient() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Recipient - } - return nil -} - -func (m *CommunityPoolSpendProposalWithDeposit) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *CommunityPoolSpendProposalWithDeposit) GetDeposit() string { - if m != nil { - return m.Deposit - } - return "" -} - func init() { proto.RegisterType((*Params)(nil), "cosmos.distribution.v1beta1.Params") proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewards") @@ -674,77 +625,76 @@ func init() { } var fileDescriptor_cd78a31ea281a992 = []byte{ - // 1114 bytes of a gzipped FileDescriptorProto + // 1102 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xa6, 0xae, 0xdb, 0x4e, 0xd3, 0xb4, 0x9d, 0x38, 0x89, 0x9b, 0x14, 0x6f, 0x34, 0x52, - 0xab, 0x20, 0x88, 0xd3, 0xd0, 0x0b, 0xca, 0x01, 0x29, 0xeb, 0x24, 0x02, 0x44, 0x49, 0xb4, 0x0d, - 0x45, 0xe2, 0x62, 0x8d, 0x77, 0x27, 0xf6, 0x28, 0xeb, 0x1d, 0x33, 0x33, 0x76, 0x12, 0x24, 0x84, - 0xd4, 0x13, 0x17, 0x04, 0x08, 0x0e, 0x1c, 0x00, 0xf5, 0xc8, 0xaf, 0xff, 0x83, 0x1e, 0x7b, 0x03, - 0x71, 0x58, 0x50, 0x72, 0xe3, 0xe8, 0x1b, 0x9c, 0xd0, 0xce, 0xcc, 0xee, 0xda, 0xae, 0xa9, 0x6c, - 0x50, 0x4f, 0xf6, 0x7e, 0xf3, 0xf6, 0x7b, 0xdf, 0x7c, 0x6f, 0xde, 0x9b, 0x05, 0x15, 0x8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0xfd, 0x95, 0x11, 0x9c, 0xce, 0x2d, 0xe3, 0xf3, 0x0b, 0xc3, 0x3b, 0xed, 0x67, 0x47, 0x6e, - 0xb1, 0x3b, 0x42, 0x8f, 0x19, 0x21, 0xdf, 0x58, 0xe0, 0xc2, 0x0e, 0x21, 0x7b, 0x8c, 0x05, 0xf0, - 0x73, 0x0b, 0xcc, 0x64, 0x13, 0xbd, 0xcd, 0x58, 0x30, 0x56, 0xb5, 0xdf, 0x32, 0x2a, 0xe6, 0x86, - 0xef, 0x84, 0x98, 0x61, 0xe2, 0xa2, 0x67, 0x17, 0x54, 0xac, 0x09, 0x7d, 0x39, 0x05, 0x16, 0xab, - 0xfd, 0xc8, 0xfd, 0x36, 0x09, 0x7d, 0x3d, 0x63, 0x71, 0x00, 0x8b, 0xe0, 0xbc, 0xa4, 0x32, 0x20, - 0xfa, 0x22, 0x73, 0xf5, 0x03, 0x5c, 0x06, 0x97, 0x7d, 0x22, 0x3c, 0x4e, 0xdb, 0x59, 0x49, 0xdd, - 0x7e, 0x08, 0xee, 0x82, 0x4b, 0x9c, 0x78, 0xb4, 0x4d, 0x49, 0x28, 0xd5, 0x6d, 0x30, 0xed, 0xac, - 0xff, 0x1d, 0xd9, 0xab, 0x63, 0x28, 0xdd, 0xf4, 0xbc, 0x78, 0x12, 0x13, 0x21, 0xdc, 0x8c, 0x03, - 0x7a, 0xa0, 0x80, 0x5b, 0x6a, 0x68, 0xe5, 0x95, 0x65, 0x37, 0x46, 0x5a, 0xa6, 0xfc, 0xba, 0x63, - 0xba, 0x75, 0x65, 0x8c, 0x64, 0xda, 0x13, 0x43, 0xbd, 0x71, 0xf1, 0xe3, 0x47, 0x76, 0x4e, 0x95, - 0xed, 0x2f, 0x0b, 0xcc, 0x6d, 0x91, 0x80, 0x34, 0x54, 0x55, 0x25, 0xe6, 0x92, 0x86, 0x8d, 0x37, - 0xc2, 0x03, 0x35, 0x46, 0xdb, 0x9c, 0x74, 0x29, 0x8b, 0x6f, 0xa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0b, 0x1a, 0xc7, 0xb1, 0xa4, 0xd1, + 0xab, 0x70, 0xd2, 0xd5, 0xb9, 0x14, 0x26, 0x22, 0x5b, 0x94, 0x2e, 0x01, 0x73, 0x80, 0xed, 0xd8, + 0x24, 0x2d, 0x51, 0xf9, 0xe1, 0xf7, 0x17, 0x45, 0xf0, 0xf8, 0xa2, 0x08, 0x9e, 0x5c, 0x14, 0xc1, + 0x9f, 0x17, 0x45, 0xf0, 0xc5, 0x65, 0x31, 0xf3, 0xe4, 0xb2, 0x98, 0xf9, 0xf5, 0xb2, 0x98, 0xf9, + 0x60, 0xeb, 0x99, 0xf5, 0x3f, 0xed, 0xff, 0xb4, 0x8e, 0xda, 0x51, 0xcb, 0x45, 0x5f, 0xbe, 0xf7, + 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x45, 0x1d, 0xb8, 0x42, 0x7e, 0x0b, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -987,44 +937,6 @@ func (this *FeePool) Equal(that interface{}) bool { } return true } -func (this *CommunityPoolSpendProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommunityPoolSpendProposal) - if !ok { - that2, ok := that.(CommunityPoolSpendProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if !bytes.Equal(this.Recipient, that1.Recipient) { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - return true -} func (this *DelegatorStartingInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1074,7 +986,7 @@ func (this *DelegationDelegatorReward) Equal(that interface{}) bool { } else if this == nil { return false } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { + if this.ValidatorAddress != that1.ValidatorAddress { return false } if len(this.Reward) != len(that1.Reward) { @@ -1112,7 +1024,7 @@ func (this *CommunityPoolSpendProposalWithDeposit) Equal(that interface{}) bool if this.Description != that1.Description { return false } - if !bytes.Equal(this.Recipient, that1.Recipient) { + if this.Recipient != that1.Recipient { return false } if this.Amount != that1.Amount { @@ -2834,7 +2746,7 @@ func (m *CommunityPoolSpendProposal) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDistribution @@ -2844,25 +2756,23 @@ func (m *CommunityPoolSpendProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDistribution } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthDistribution } if postIndex > l { return io.ErrUnexpectedEOF } - m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...) - if m.Recipient == nil { - m.Recipient = []byte{} - } + m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -3080,7 +2990,7 @@ func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDistribution @@ -3090,25 +3000,23 @@ func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDistribution } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthDistribution } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -3265,7 +3173,7 @@ func (m *CommunityPoolSpendProposalWithDeposit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDistribution @@ -3275,25 +3183,23 @@ func (m *CommunityPoolSpendProposalWithDeposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDistribution } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthDistribution } if postIndex > l { return io.ErrUnexpectedEOF } - m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...) - if m.Recipient == nil { - m.Recipient = []byte{} - } + m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/distribution/types/genesis.go b/x/distribution/types/genesis.go index b7e6aaa628..3aa251bba9 100644 --- a/x/distribution/types/genesis.go +++ b/x/distribution/types/genesis.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +//nolint:interfacer func NewGenesisState( params Params, fp FeePool, dwis []DelegatorWithdrawInfo, pp sdk.ConsAddress, r []ValidatorOutstandingRewardsRecord, acc []ValidatorAccumulatedCommissionRecord, historical []ValidatorHistoricalRewardsRecord, @@ -14,7 +15,7 @@ func NewGenesisState( Params: params, FeePool: fp, DelegatorWithdrawInfos: dwis, - PreviousProposer: pp, + PreviousProposer: pp.String(), OutstandingRewards: r, ValidatorAccumulatedCommissions: acc, ValidatorHistoricalRewards: historical, @@ -30,7 +31,7 @@ func DefaultGenesisState() *GenesisState { FeePool: InitialFeePool(), Params: DefaultParams(), DelegatorWithdrawInfos: []DelegatorWithdrawInfo{}, - PreviousProposer: nil, + PreviousProposer: "", OutstandingRewards: []ValidatorOutstandingRewardsRecord{}, ValidatorAccumulatedCommissions: []ValidatorAccumulatedCommissionRecord{}, ValidatorHistoricalRewards: []ValidatorHistoricalRewardsRecord{}, diff --git a/x/distribution/types/genesis.pb.go b/x/distribution/types/genesis.pb.go index e73cecfcaf..fbeea0fd0f 100644 --- a/x/distribution/types/genesis.pb.go +++ b/x/distribution/types/genesis.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -26,13 +25,14 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// DelegatorWithdrawInfo is the address for where distributions rewards are withdrawn to by default -// this struct is only used at genesis to feed in default withdraw addresses. +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. type DelegatorWithdrawInfo struct { // delegator_address is the address of the delegator. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` // withdraw_address is the address to withdraw the delegation rewards to. - WithdrawAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"withdraw_address,omitempty" yaml:"withdraw_address"` + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty" yaml:"withdraw_address"` } func (m *DelegatorWithdrawInfo) Reset() { *m = DelegatorWithdrawInfo{} } @@ -68,24 +68,10 @@ func (m *DelegatorWithdrawInfo) XXX_DiscardUnknown() { var xxx_messageInfo_DelegatorWithdrawInfo proto.InternalMessageInfo -func (m *DelegatorWithdrawInfo) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *DelegatorWithdrawInfo) GetWithdrawAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.WithdrawAddress - } - return nil -} - // ValidatorOutstandingRewardsRecord is used for import/export via genesis json. type ValidatorOutstandingRewardsRecord struct { // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // outstanding_rewards represents the oustanding rewards of a validator. OutstandingRewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=outstanding_rewards,json=outstandingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"outstanding_rewards" yaml:"outstanding_rewards"` } @@ -123,24 +109,11 @@ func (m *ValidatorOutstandingRewardsRecord) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorOutstandingRewardsRecord proto.InternalMessageInfo -func (m *ValidatorOutstandingRewardsRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *ValidatorOutstandingRewardsRecord) GetOutstandingRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { - if m != nil { - return m.OutstandingRewards - } - return nil -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis json. +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. type ValidatorAccumulatedCommissionRecord struct { // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // accumulated is the accumulated commission of a validator. Accumulated ValidatorAccumulatedCommission `protobuf:"bytes,2,opt,name=accumulated,proto3" json:"accumulated" yaml:"accumulated"` } @@ -178,24 +151,11 @@ func (m *ValidatorAccumulatedCommissionRecord) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorAccumulatedCommissionRecord proto.InternalMessageInfo -func (m *ValidatorAccumulatedCommissionRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *ValidatorAccumulatedCommissionRecord) GetAccumulated() ValidatorAccumulatedCommission { - if m != nil { - return m.Accumulated - } - return ValidatorAccumulatedCommission{} -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis json. +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. type ValidatorHistoricalRewardsRecord struct { // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // period defines the period the historical rewards apply to. Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` // rewards defines the historical rewards of a validator. @@ -235,31 +195,10 @@ func (m *ValidatorHistoricalRewardsRecord) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorHistoricalRewardsRecord proto.InternalMessageInfo -func (m *ValidatorHistoricalRewardsRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *ValidatorHistoricalRewardsRecord) GetPeriod() uint64 { - if m != nil { - return m.Period - } - return 0 -} - -func (m *ValidatorHistoricalRewardsRecord) GetRewards() ValidatorHistoricalRewards { - if m != nil { - return m.Rewards - } - return ValidatorHistoricalRewards{} -} - // ValidatorCurrentRewardsRecord is used for import / export via genesis json. type ValidatorCurrentRewardsRecord struct { // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // rewards defines the current rewards of a validator. Rewards ValidatorCurrentRewards `protobuf:"bytes,2,opt,name=rewards,proto3" json:"rewards" yaml:"rewards"` } @@ -297,26 +236,12 @@ func (m *ValidatorCurrentRewardsRecord) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorCurrentRewardsRecord proto.InternalMessageInfo -func (m *ValidatorCurrentRewardsRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *ValidatorCurrentRewardsRecord) GetRewards() ValidatorCurrentRewards { - if m != nil { - return m.Rewards - } - return ValidatorCurrentRewards{} -} - // DelegatorStartingInfoRecord used for import / export via genesis json. type DelegatorStartingInfoRecord struct { // delegator_address is the address of the delegator. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // starting_info defines the starting info of a delegator. StartingInfo DelegatorStartingInfo `protobuf:"bytes,3,opt,name=starting_info,json=startingInfo,proto3" json:"starting_info" yaml:"starting_info"` } @@ -354,31 +279,10 @@ func (m *DelegatorStartingInfoRecord) XXX_DiscardUnknown() { var xxx_messageInfo_DelegatorStartingInfoRecord proto.InternalMessageInfo -func (m *DelegatorStartingInfoRecord) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *DelegatorStartingInfoRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *DelegatorStartingInfoRecord) GetStartingInfo() DelegatorStartingInfo { - if m != nil { - return m.StartingInfo - } - return DelegatorStartingInfo{} -} - // ValidatorSlashEventRecord is used for import / export via genesis json. type ValidatorSlashEventRecord struct { // validator_address is the address of the validator. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // height defines the block height at which the slash event occured. Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // period is the period of the slash event. @@ -420,34 +324,6 @@ func (m *ValidatorSlashEventRecord) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorSlashEventRecord proto.InternalMessageInfo -func (m *ValidatorSlashEventRecord) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *ValidatorSlashEventRecord) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ValidatorSlashEventRecord) GetPeriod() uint64 { - if m != nil { - return m.Period - } - return 0 -} - -func (m *ValidatorSlashEventRecord) GetEvent() ValidatorSlashEvent { - if m != nil { - return m.Event - } - return ValidatorSlashEvent{} -} - // GenesisState defines the distribution module's genesis state. type GenesisState struct { // params defines all the paramaters of the module. @@ -457,7 +333,7 @@ type GenesisState struct { // fee_pool defines the delegator withdraw infos at genesis. DelegatorWithdrawInfos []DelegatorWithdrawInfo `protobuf:"bytes,3,rep,name=delegator_withdraw_infos,json=delegatorWithdrawInfos,proto3" json:"delegator_withdraw_infos" yaml:"delegator_withdraw_infos"` // fee_pool defines the previous proposer at genesis. - PreviousProposer github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,4,opt,name=previous_proposer,json=previousProposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"previous_proposer,omitempty" yaml:"previous_proposer"` + PreviousProposer string `protobuf:"bytes,4,opt,name=previous_proposer,json=previousProposer,proto3" json:"previous_proposer,omitempty" yaml:"previous_proposer"` // fee_pool defines the outstanding rewards of all validators at genesis. OutstandingRewards []ValidatorOutstandingRewardsRecord `protobuf:"bytes,5,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards" yaml:"outstanding_rewards"` // fee_pool defines the accumulated commisions of all validators at genesis. @@ -505,76 +381,6 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetFeePool() FeePool { - if m != nil { - return m.FeePool - } - return FeePool{} -} - -func (m *GenesisState) GetDelegatorWithdrawInfos() []DelegatorWithdrawInfo { - if m != nil { - return m.DelegatorWithdrawInfos - } - return nil -} - -func (m *GenesisState) GetPreviousProposer() github_com_cosmos_cosmos_sdk_types.ConsAddress { - if m != nil { - return m.PreviousProposer - } - return nil -} - -func (m *GenesisState) GetOutstandingRewards() []ValidatorOutstandingRewardsRecord { - if m != nil { - return m.OutstandingRewards - } - return nil -} - -func (m *GenesisState) GetValidatorAccumulatedCommissions() []ValidatorAccumulatedCommissionRecord { - if m != nil { - return m.ValidatorAccumulatedCommissions - } - return nil -} - -func (m *GenesisState) GetValidatorHistoricalRewards() []ValidatorHistoricalRewardsRecord { - if m != nil { - return m.ValidatorHistoricalRewards - } - return nil -} - -func (m *GenesisState) GetValidatorCurrentRewards() []ValidatorCurrentRewardsRecord { - if m != nil { - return m.ValidatorCurrentRewards - } - return nil -} - -func (m *GenesisState) GetDelegatorStartingInfos() []DelegatorStartingInfoRecord { - if m != nil { - return m.DelegatorStartingInfos - } - return nil -} - -func (m *GenesisState) GetValidatorSlashEvents() []ValidatorSlashEventRecord { - if m != nil { - return m.ValidatorSlashEvents - } - return nil -} - func init() { proto.RegisterType((*DelegatorWithdrawInfo)(nil), "cosmos.distribution.v1beta1.DelegatorWithdrawInfo") proto.RegisterType((*ValidatorOutstandingRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord") @@ -591,367 +397,73 @@ func init() { } var fileDescriptor_76eed0f9489db580 = []byte{ - // 1044 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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0c, 0x64, 0x7d, 0x9b, 0x2b, 0xdf, 0x5c, 0x43, 0xe7, - 0xe5, 0xa7, 0xa4, 0xc2, 0x57, 0x9e, 0xfc, 0xa2, 0xd0, 0xfa, 0xa6, 0x16, 0x71, 0x9e, 0x27, 0x5b, - 0xc4, 0x59, 0x14, 0x1e, 0xd5, 0xd1, 0x72, 0xba, 0x2b, 0x1e, 0x75, 0xd4, 0x86, 0xec, 0x9a, 0xbc, - 0x0c, 0xa4, 0xb6, 0x97, 0x9e, 0xb4, 0x17, 0x6b, 0x65, 0xcf, 0x6a, 0x65, 0x57, 0x47, 0x9d, 0xcb, - 0x72, 0x40, 0x77, 0x69, 0x30, 0x8e, 0xc0, 0x9d, 0x7b, 0x3f, 0x1d, 0x54, 0x8d, 0x87, 0x07, 0x55, - 0xe3, 0xd1, 0x41, 0xd5, 0xf8, 0xeb, 0xa0, 0x6a, 0x7c, 0x75, 0x58, 0x5d, 0x78, 0x74, 0x58, 0x5d, - 0xf8, 0xe3, 0xb0, 0xba, 0xf0, 0xf1, 0xc6, 0xcc, 0xee, 0xf1, 0x59, 0xfe, 0x63, 0x53, 0x36, 0x93, - 0xe6, 0xa2, 0xfc, 0xbc, 0x7c, 0xe1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x59, 0x32, 0x1e, 0xb6, - 0x0e, 0x0f, 0x00, 0x00, + // 1022 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x1c, 0xf5, 0x3a, 0x6d, 0x92, 0x8e, 0x53, 0x1a, 0x96, 0x34, 0x71, 0x9d, 0xd4, 0x9b, 0x4e, 0x8b, + 0x08, 0xaa, 0x58, 0x37, 0x01, 0x01, 0x0a, 0x02, 0x29, 0x9b, 0x52, 0xe8, 0xa9, 0x61, 0x22, 0x01, + 0x42, 0x48, 0xd6, 0x7a, 0x77, 0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a2, 0x5e, 0x50, 0x9f, 0x52, 0x3d, + 0x32, 0x93, 0xe9, 0x91, 0x2f, 0xc1, 0x55, 0x1c, 0x2a, 0x29, 0x5e, 0x91, 0x8e, 0x3c, 0x98, 0xae, + 0x7e, 0x92, 0x0c, 0x9c, 0x25, 0xed, 0xc7, 0x82, 0x12, 0x29, 0xc1, 0x20, 0x52, 0xa0, 0x29, 0x03, + 0xbe, 0x29, 0x80, 0x85, 0x8f, 0xd4, 0xda, 0xdd, 0x17, 0xae, 0xc0, 0x26, 0x02, 0xb3, 0x1d, 0x97, + 0xb9, 0x6d, 0x95, 0x68, 0x61, 0xeb, 0xee, 0x44, 0xe6, 0x3d, 0x19, 0xea, 0xdc, 0xd4, 0x64, 0xd7, + 0x15, 0x99, 0x02, 0x80, 0x48, 0x23, 0x99, 0x9f, 0x83, 0xf9, 0x3a, 0xc6, 0xd5, 0x0e, 0xa5, 0x2d, + 0xdd, 0x0f, 0xf7, 0x26, 0xa2, 0x3e, 0xc2, 0x78, 0x8f, 0xd2, 0x96, 0xb3, 0xa2, 0x61, 0x6f, 0x28, + 0xd8, 0x08, 0x03, 0xa2, 0xb9, 0xba, 0x8a, 0x30, 0x7f, 0x30, 0x40, 0x31, 0x29, 0xda, 0x78, 0x49, + 0x86, 0x97, 0x1e, 0x0e, 0x97, 0x99, 0xe9, 0x8b, 0x29, 0xbd, 0xdd, 0x9d, 0xd7, 0x34, 0xb1, 0x35, + 0xd8, 0x16, 0x59, 0x06, 0x88, 0x96, 0xfd, 0x51, 0xcf, 0xcb, 0x1e, 0xe9, 0x30, 0xdc, 0x23, 0xb4, + 0xcb, 0xab, 0x1d, 0x46, 0x3b, 0x94, 0x63, 0x26, 0xaf, 0x32, 0x53, 0x39, 0x43, 0x21, 0x10, 0x2d, + 0x46, 0x67, 0x7b, 0xfa, 0xc8, 0xfc, 0x7e, 0xcc, 0x6e, 0xbd, 0x2a, 0xb3, 0xfb, 0x60, 0xba, 0xc2, + 0x18, 0xf7, 0x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, 0x78, 0xde, 0x2f, 0x1b, 0x2f, 0xfa, 0x65, 0xe3, 0x8f, + 0x7e, 0xd9, 0xf8, 0xee, 0xa4, 0x9c, 0x7b, 0x71, 0x52, 0xce, 0xfd, 0x7a, 0x52, 0xce, 0x7d, 0xb1, + 0x39, 0xf1, 0xfd, 0xf7, 0xeb, 0xec, 0x2f, 0x1a, 0xf9, 0x3a, 0x5c, 0x9b, 0x95, 0xbf, 0x61, 0xde, + 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x47, 0x6c, 0x1c, 0x49, 0x73, 0x0d, 0x00, 0x00, } -func (this *DelegatorWithdrawInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DelegatorWithdrawInfo) - if !ok { - that2, ok := that.(DelegatorWithdrawInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.WithdrawAddress, that1.WithdrawAddress) { - return false - } - return true -} -func (this *ValidatorOutstandingRewardsRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorOutstandingRewardsRecord) - if !ok { - that2, ok := that.(ValidatorOutstandingRewardsRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if len(this.OutstandingRewards) != len(that1.OutstandingRewards) { - return false - } - for i := range this.OutstandingRewards { - if !this.OutstandingRewards[i].Equal(&that1.OutstandingRewards[i]) { - return false - } - } - return true -} -func (this *ValidatorAccumulatedCommissionRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorAccumulatedCommissionRecord) - if !ok { - that2, ok := that.(ValidatorAccumulatedCommissionRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Accumulated.Equal(&that1.Accumulated) { - return false - } - return true -} -func (this *ValidatorHistoricalRewardsRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorHistoricalRewardsRecord) - if !ok { - that2, ok := that.(ValidatorHistoricalRewardsRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if this.Period != that1.Period { - return false - } - if !this.Rewards.Equal(&that1.Rewards) { - return false - } - return true -} -func (this *ValidatorCurrentRewardsRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorCurrentRewardsRecord) - if !ok { - that2, ok := that.(ValidatorCurrentRewardsRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Rewards.Equal(&that1.Rewards) { - return false - } - return true -} -func (this *DelegatorStartingInfoRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DelegatorStartingInfoRecord) - if !ok { - that2, ok := that.(DelegatorStartingInfoRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.StartingInfo.Equal(&that1.StartingInfo) { - return false - } - return true -} -func (this *ValidatorSlashEventRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorSlashEventRecord) - if !ok { - that2, ok := that.(ValidatorSlashEventRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if this.Height != that1.Height { - return false - } - if this.Period != that1.Period { - return false - } - if !this.Event.Equal(&that1.Event) { - return false - } - return true -} -func (this *GenesisState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GenesisState) - if !ok { - that2, ok := that.(GenesisState) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Params.Equal(&that1.Params) { - return false - } - if !this.FeePool.Equal(&that1.FeePool) { - return false - } - if len(this.DelegatorWithdrawInfos) != len(that1.DelegatorWithdrawInfos) { - return false - } - for i := range this.DelegatorWithdrawInfos { - if !this.DelegatorWithdrawInfos[i].Equal(&that1.DelegatorWithdrawInfos[i]) { - return false - } - } - if !bytes.Equal(this.PreviousProposer, that1.PreviousProposer) { - return false - } - if len(this.OutstandingRewards) != len(that1.OutstandingRewards) { - return false - } - for i := range this.OutstandingRewards { - if !this.OutstandingRewards[i].Equal(&that1.OutstandingRewards[i]) { - return false - } - } - if len(this.ValidatorAccumulatedCommissions) != len(that1.ValidatorAccumulatedCommissions) { - return false - } - for i := range this.ValidatorAccumulatedCommissions { - if !this.ValidatorAccumulatedCommissions[i].Equal(&that1.ValidatorAccumulatedCommissions[i]) { - return false - } - } - if len(this.ValidatorHistoricalRewards) != len(that1.ValidatorHistoricalRewards) { - return false - } - for i := range this.ValidatorHistoricalRewards { - if !this.ValidatorHistoricalRewards[i].Equal(&that1.ValidatorHistoricalRewards[i]) { - return false - } - } - if len(this.ValidatorCurrentRewards) != len(that1.ValidatorCurrentRewards) { - return false - } - for i := range this.ValidatorCurrentRewards { - if !this.ValidatorCurrentRewards[i].Equal(&that1.ValidatorCurrentRewards[i]) { - return false - } - } - if len(this.DelegatorStartingInfos) != len(that1.DelegatorStartingInfos) { - return false - } - for i := range this.DelegatorStartingInfos { - if !this.DelegatorStartingInfos[i].Equal(&that1.DelegatorStartingInfos[i]) { - return false - } - } - if len(this.ValidatorSlashEvents) != len(that1.ValidatorSlashEvents) { - return false - } - for i := range this.ValidatorSlashEvents { - if !this.ValidatorSlashEvents[i].Equal(&that1.ValidatorSlashEvents[i]) { - return false - } - } - return true -} func (m *DelegatorWithdrawInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1636,7 +1148,7 @@ func (m *DelegatorWithdrawInfo) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1646,31 +1158,29 @@ func (m *DelegatorWithdrawInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1680,25 +1190,23 @@ func (m *DelegatorWithdrawInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.WithdrawAddress = append(m.WithdrawAddress[:0], dAtA[iNdEx:postIndex]...) - if m.WithdrawAddress == nil { - m.WithdrawAddress = []byte{} - } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1757,7 +1265,7 @@ func (m *ValidatorOutstandingRewardsRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1767,25 +1275,23 @@ func (m *ValidatorOutstandingRewardsRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1878,7 +1384,7 @@ func (m *ValidatorAccumulatedCommissionRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1888,25 +1394,23 @@ func (m *ValidatorAccumulatedCommissionRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1998,7 +1502,7 @@ func (m *ValidatorHistoricalRewardsRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2008,25 +1512,23 @@ func (m *ValidatorHistoricalRewardsRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -2137,7 +1639,7 @@ func (m *ValidatorCurrentRewardsRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2147,25 +1649,23 @@ func (m *ValidatorCurrentRewardsRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -2257,7 +1757,7 @@ func (m *DelegatorStartingInfoRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2267,31 +1767,29 @@ func (m *DelegatorStartingInfoRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2301,25 +1799,23 @@ func (m *DelegatorStartingInfoRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2411,7 +1907,7 @@ func (m *ValidatorSlashEventRecord) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2421,25 +1917,23 @@ func (m *ValidatorSlashEventRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -2669,7 +2163,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PreviousProposer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2679,25 +2173,23 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviousProposer = append(m.PreviousProposer[:0], dAtA[iNdEx:postIndex]...) - if m.PreviousProposer == nil { - m.PreviousProposer = []byte{} - } + m.PreviousProposer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { diff --git a/x/distribution/types/msg.go b/x/distribution/types/msg.go index 1ba548a7b0..8dc72081e9 100644 --- a/x/distribution/types/msg.go +++ b/x/distribution/types/msg.go @@ -19,8 +19,8 @@ var _, _, _ sdk.Msg = &MsgSetWithdrawAddress{}, &MsgWithdrawDelegatorReward{}, & func NewMsgSetWithdrawAddress(delAddr, withdrawAddr sdk.AccAddress) *MsgSetWithdrawAddress { return &MsgSetWithdrawAddress{ - DelegatorAddress: delAddr, - WithdrawAddress: withdrawAddr, + DelegatorAddress: delAddr.String(), + WithdrawAddress: withdrawAddr.String(), } } @@ -29,7 +29,11 @@ func (msg MsgSetWithdrawAddress) Type() string { return TypeMsgSetWithdrawAddre // Return address that must sign over msg.GetSignBytes() func (msg MsgSetWithdrawAddress) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.AccAddress(msg.DelegatorAddress)} + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delAddr} } // get the bytes for the message signer to sign on @@ -40,10 +44,10 @@ func (msg MsgSetWithdrawAddress) GetSignBytes() []byte { // quick validity check func (msg MsgSetWithdrawAddress) ValidateBasic() error { - if msg.DelegatorAddress.Empty() { + if msg.DelegatorAddress == "" { return ErrEmptyDelegatorAddr } - if msg.WithdrawAddress.Empty() { + if msg.WithdrawAddress == "" { return ErrEmptyWithdrawAddr } @@ -52,8 +56,8 @@ func (msg MsgSetWithdrawAddress) ValidateBasic() error { func NewMsgWithdrawDelegatorReward(delAddr sdk.AccAddress, valAddr sdk.ValAddress) *MsgWithdrawDelegatorReward { return &MsgWithdrawDelegatorReward{ - DelegatorAddress: delAddr, - ValidatorAddress: valAddr, + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), } } @@ -62,7 +66,11 @@ func (msg MsgWithdrawDelegatorReward) Type() string { return TypeMsgWithdrawDel // Return address that must sign over msg.GetSignBytes() func (msg MsgWithdrawDelegatorReward) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.AccAddress(msg.DelegatorAddress)} + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delAddr} } // get the bytes for the message signer to sign on @@ -73,10 +81,10 @@ func (msg MsgWithdrawDelegatorReward) GetSignBytes() []byte { // quick validity check func (msg MsgWithdrawDelegatorReward) ValidateBasic() error { - if msg.DelegatorAddress.Empty() { + if msg.DelegatorAddress == "" { return ErrEmptyDelegatorAddr } - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } return nil @@ -84,7 +92,7 @@ func (msg MsgWithdrawDelegatorReward) ValidateBasic() error { func NewMsgWithdrawValidatorCommission(valAddr sdk.ValAddress) *MsgWithdrawValidatorCommission { return &MsgWithdrawValidatorCommission{ - ValidatorAddress: valAddr, + ValidatorAddress: valAddr.String(), } } @@ -93,7 +101,11 @@ func (msg MsgWithdrawValidatorCommission) Type() string { return TypeMsgWithdra // Return address that must sign over msg.GetSignBytes() func (msg MsgWithdrawValidatorCommission) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.AccAddress(msg.ValidatorAddress.Bytes())} + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{valAddr.Bytes()} } // get the bytes for the message signer to sign on @@ -104,7 +116,7 @@ func (msg MsgWithdrawValidatorCommission) GetSignBytes() []byte { // quick validity check func (msg MsgWithdrawValidatorCommission) ValidateBasic() error { - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } return nil @@ -115,7 +127,7 @@ func (msg MsgWithdrawValidatorCommission) ValidateBasic() error { func NewMsgFundCommunityPool(amount sdk.Coins, depositor sdk.AccAddress) *MsgFundCommunityPool { return &MsgFundCommunityPool{ Amount: amount, - Depositor: depositor, + Depositor: depositor.String(), } } @@ -128,7 +140,11 @@ func (msg MsgFundCommunityPool) Type() string { return TypeMsgFundCommunityPool // GetSigners returns the signer addresses that are expected to sign the result // of GetSignBytes. func (msg MsgFundCommunityPool) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Depositor} + depoAddr, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + panic(err) + } + return []sdk.AccAddress{depoAddr} } // GetSignBytes returns the raw bytes for a MsgFundCommunityPool message that @@ -143,8 +159,8 @@ func (msg MsgFundCommunityPool) ValidateBasic() error { if !msg.Amount.IsValid() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) } - if msg.Depositor.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Depositor.String()) + if msg.Depositor == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Depositor) } return nil diff --git a/x/distribution/types/proposal.go b/x/distribution/types/proposal.go index 978b2973d4..1a0d0a886e 100644 --- a/x/distribution/types/proposal.go +++ b/x/distribution/types/proposal.go @@ -22,8 +22,9 @@ func init() { } // NewCommunityPoolSpendProposal creates a new community pool spned proposal. +//nolint:interfacer func NewCommunityPoolSpendProposal(title, description string, recipient sdk.AccAddress, amount sdk.Coins) *CommunityPoolSpendProposal { - return &CommunityPoolSpendProposal{title, description, recipient, amount} + return &CommunityPoolSpendProposal{title, description, recipient.String(), amount} } // GetTitle returns the title of a community pool spend proposal. @@ -47,7 +48,7 @@ func (csp *CommunityPoolSpendProposal) ValidateBasic() error { if !csp.Amount.IsValid() { return ErrInvalidProposalAmount } - if csp.Recipient.Empty() { + if csp.Recipient == "" { return ErrEmptyProposalRecipient } diff --git a/x/distribution/types/query.go b/x/distribution/types/query.go index 54155aac53..caaf2b7860 100644 --- a/x/distribution/types/query.go +++ b/x/distribution/types/query.go @@ -33,7 +33,8 @@ func (res QueryDelegatorTotalRewardsResponse) String() string { } // NewDelegationDelegatorReward constructs a DelegationDelegatorReward. +//nolint:interfacer func NewDelegationDelegatorReward(valAddr sdk.ValAddress, reward sdk.DecCoins) DelegationDelegatorReward { - return DelegationDelegatorReward{ValidatorAddress: valAddr, Reward: reward} + return DelegationDelegatorReward{ValidatorAddress: valAddr.String(), Reward: reward} } diff --git a/x/distribution/types/query.pb.go b/x/distribution/types/query.pb.go index 0e04613b70..e527c0045d 100644 --- a/x/distribution/types/query.pb.go +++ b/x/distribution/types/query.pb.go @@ -115,10 +115,11 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QueryValidatorOutstandingRewardsRequest is the request type for the Query/ValidatorOutstandingRewards RPC method. +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. type QueryValidatorOutstandingRewardsRequest struct { // validator_address defines the validator address to query for. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (m *QueryValidatorOutstandingRewardsRequest) Reset() { @@ -156,14 +157,15 @@ func (m *QueryValidatorOutstandingRewardsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorOutstandingRewardsRequest proto.InternalMessageInfo -func (m *QueryValidatorOutstandingRewardsRequest) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *QueryValidatorOutstandingRewardsRequest) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } - return nil + return "" } -// QueryValidatorOutstandingRewardsResponse is the response type for the Query/ValidatorOutstandingRewards RPC method. +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. type QueryValidatorOutstandingRewardsResponse struct { Rewards ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"` } @@ -210,10 +212,11 @@ func (m *QueryValidatorOutstandingRewardsResponse) GetRewards() ValidatorOutstan return ValidatorOutstandingRewards{} } -// QueryValidatorCommissionRequest is the request type for the Query/ValidatorCommission RPC method +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method type QueryValidatorCommissionRequest struct { // validator_address defines the validator address to query for. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (m *QueryValidatorCommissionRequest) Reset() { *m = QueryValidatorCommissionRequest{} } @@ -249,14 +252,15 @@ func (m *QueryValidatorCommissionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorCommissionRequest proto.InternalMessageInfo -func (m *QueryValidatorCommissionRequest) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *QueryValidatorCommissionRequest) GetValidatorAddress() string { if m != nil { return m.ValidatorAddress } - return nil + return "" } -// QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method type QueryValidatorCommissionResponse struct { // commission defines the commision the validator received. Commission ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission"` @@ -302,10 +306,11 @@ func (m *QueryValidatorCommissionResponse) GetCommission() ValidatorAccumulatedC return ValidatorAccumulatedCommission{} } -// QueryValidatorSlashesRequest is the request type for the Query/ValidatorSlashes RPC method +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method type QueryValidatorSlashesRequest struct { // validator_address defines the validator address to query for. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // starting_height defines the optional starting height to query the slashes. StartingHeight uint64 `protobuf:"varint,2,opt,name=starting_height,json=startingHeight,proto3" json:"starting_height,omitempty"` // starting_height defines the optional ending height to query the slashes. @@ -347,35 +352,8 @@ func (m *QueryValidatorSlashesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorSlashesRequest proto.InternalMessageInfo -func (m *QueryValidatorSlashesRequest) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *QueryValidatorSlashesRequest) GetStartingHeight() uint64 { - if m != nil { - return m.StartingHeight - } - return 0 -} - -func (m *QueryValidatorSlashesRequest) GetEndingHeight() uint64 { - if m != nil { - return m.EndingHeight - } - return 0 -} - -func (m *QueryValidatorSlashesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. type QueryValidatorSlashesResponse struct { // slashes defines the slashes the validator received. Slashes []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"` @@ -430,12 +408,13 @@ func (m *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse { return nil } -// QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method. +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. type QueryDelegationRewardsRequest struct { // delegator_address defines the delegator address to query for. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` // validator_address defines the validator address to query for. - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } func (m *QueryDelegationRewardsRequest) Reset() { *m = QueryDelegationRewardsRequest{} } @@ -471,21 +450,8 @@ func (m *QueryDelegationRewardsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegationRewardsRequest proto.InternalMessageInfo -func (m *QueryDelegationRewardsRequest) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *QueryDelegationRewardsRequest) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -// QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. type QueryDelegationRewardsResponse struct { // rewards defines the rewards accrued by a delegation. Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` @@ -531,10 +497,11 @@ func (m *QueryDelegationRewardsResponse) GetRewards() github_com_cosmos_cosmos_s return nil } -// QueryDelegationTotalRewardsRequest is the request type for the Query/DelegationTotalRewards RPC method. +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. type QueryDelegationTotalRewardsRequest struct { // delegator_address defines the delegator address to query for. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` } func (m *QueryDelegationTotalRewardsRequest) Reset() { *m = QueryDelegationTotalRewardsRequest{} } @@ -570,14 +537,8 @@ func (m *QueryDelegationTotalRewardsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegationTotalRewardsRequest proto.InternalMessageInfo -func (m *QueryDelegationTotalRewardsRequest) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -// QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. type QueryDelegationTotalRewardsResponse struct { // rewards defines all the rewards accrued by a delegator. Rewards []DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards"` @@ -632,10 +593,11 @@ func (m *QueryDelegationTotalRewardsResponse) GetTotal() github_com_cosmos_cosmo return nil } -// QueryDelegatorValidatorsRequest is the request type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsRequest struct { // delegator_address defines the delegator address to query for. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` } func (m *QueryDelegatorValidatorsRequest) Reset() { *m = QueryDelegatorValidatorsRequest{} } @@ -671,17 +633,11 @@ func (m *QueryDelegatorValidatorsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorValidatorsRequest proto.InternalMessageInfo -func (m *QueryDelegatorValidatorsRequest) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -// QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsResponse struct { // validators defines the validators a delegator is delegating for. - Validators []github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,rep,name=validators,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validators,omitempty"` + Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` } func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } @@ -717,17 +673,11 @@ func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo -func (m *QueryDelegatorValidatorsResponse) GetValidators() []github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.Validators - } - return nil -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the Query/DelegatorWithdrawAddress RPC method. +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. type QueryDelegatorWithdrawAddressRequest struct { // delegator_address defines the delegator address to query for. - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` } func (m *QueryDelegatorWithdrawAddressRequest) Reset() { *m = QueryDelegatorWithdrawAddressRequest{} } @@ -763,17 +713,11 @@ func (m *QueryDelegatorWithdrawAddressRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorWithdrawAddressRequest proto.InternalMessageInfo -func (m *QueryDelegatorWithdrawAddressRequest) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. type QueryDelegatorWithdrawAddressResponse struct { // withdraw_address defines the delegator address to query for. - WithdrawAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"withdraw_address,omitempty"` + WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` } func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDelegatorWithdrawAddressResponse{} } @@ -809,14 +753,8 @@ func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorWithdrawAddressResponse proto.InternalMessageInfo -func (m *QueryDelegatorWithdrawAddressResponse) GetWithdrawAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.WithdrawAddress - } - return nil -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC method. +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. type QueryCommunityPoolRequest struct { } @@ -853,7 +791,8 @@ func (m *QueryCommunityPoolRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCommunityPoolRequest proto.InternalMessageInfo -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method. +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. type QueryCommunityPoolResponse struct { // pool defines community pool's coins. Pool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=pool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pool"` @@ -925,77 +864,76 @@ func init() { } var fileDescriptor_5efd02cbc06efdc9 = []byte{ - // 1111 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xb8, 0x69, 0x2a, 0xbd, 0xb6, 0x24, 0x9d, 0x56, 0xc8, 0x6c, 0x82, 0x13, 0x6d, 0x28, - 0x89, 0x88, 0xe2, 0x6d, 0x12, 0xa9, 0xfc, 0x28, 0x08, 0xe2, 0x24, 0xa5, 0x52, 0x51, 0x9b, 0x98, - 0x2a, 0x29, 0x08, 0x61, 0x8d, 0x77, 0x47, 0xeb, 0x55, 0xed, 0x1d, 0x77, 0x67, 0x9c, 0x10, 0x55, - 0x3d, 0x40, 0x5b, 0x24, 0x0e, 0x48, 0x48, 0x70, 0xe0, 0x6f, 0xe0, 0xce, 0x85, 0xbf, 0xa0, 0xc7, - 0x4a, 0x48, 0xa8, 0xa7, 0x16, 0x25, 0x08, 0x71, 0xe1, 0x8c, 0xc4, 0x09, 0x79, 0x76, 0xd6, 0xeb, - 0xb5, 0xd7, 0xeb, 0x5f, 0xd4, 0xa7, 0x58, 0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cd, 0x37, 0xf0, 0x47, 0xc3, 0x68, 0x6e, 0xf5, 0x03, 0xf8, - 0x67, 0x04, 0x67, 0x23, 0x6f, 0x34, 0xbe, 0xdc, 0x9d, 0x6b, 0xdc, 0x93, 0xaf, 0xbd, 0xd9, 0x77, - 0x9e, 0x12, 0xb6, 0x26, 0x85, 0x2d, 0xe3, 0xa5, 0x44, 0x61, 0x66, 0x90, 0x5b, 0xa8, 0x3f, 0xed, - 0xb9, 0xeb, 0x8f, 0x8f, 0x32, 0xe8, 0xc9, 0x51, 0x06, 0xfd, 0x7e, 0x94, 0x41, 0xdf, 0x1d, 0x67, - 0xc6, 0x9e, 0x1c, 0x67, 0xc6, 0x9e, 0x1e, 0x67, 0xc6, 0x3e, 0x5d, 0x49, 0xf4, 0x09, 0x5f, 0x44, - 0xd1, 0xa5, 0x6d, 0x28, 0x4e, 0xc8, 0x7f, 0x11, 0xad, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x5f, - 0xcd, 0x9d, 0x50, 0x1a, 0x13, 0x00, 0x00, + // 1101 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x3d, 0x6e, 0xda, 0xd2, 0x57, 0x4a, 0xd2, 0x69, 0x85, 0xcc, 0x26, 0xd8, 0xd1, 0x86, + 0x92, 0x40, 0x54, 0x6f, 0x93, 0x48, 0x05, 0x5a, 0x10, 0xe4, 0x57, 0xa9, 0xd4, 0x2a, 0x4d, 0x4d, + 0x95, 0x84, 0x5f, 0x8a, 0x26, 0xde, 0xd1, 0x7a, 0x55, 0x7b, 0xc7, 0xdd, 0x19, 0x27, 0x44, 0x55, + 0x2f, 0x04, 0x24, 0x2e, 0x48, 0x48, 0x5c, 0x7a, 0xcc, 0x99, 0x3b, 0x17, 0xfe, 0x82, 0x1e, 0x2b, + 0x21, 0xa1, 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x24, 0x5e, 0xec, + 0x23, 0xd6, 0xf8, 0x06, 0x6e, 0x2c, 0x0d, 0x23, 0xa1, 0x99, 0xef, 0x49, 0xe6, 0x35, 0x7c, 0x7b, + 0x18, 0xe6, 0xd6, 0x36, 0x8f, 0x7f, 0x46, 0x70, 0x2e, 0xd2, 0xa3, 0xf1, 0xd5, 0xee, 0xb1, 0xc6, + 0xb5, 0x7c, 0xe3, 0x9d, 0xbe, 0xfd, 0x34, 0xd8, 0x82, 0x04, 0xbb, 0x8c, 0x67, 0x13, 0xc1, 0x8a, + 0x81, 0xef, 0x76, 0xbd, 0xb5, 0x2f, 0xdd, 0x7a, 0x72, 0x94, 0x45, 0x4f, 0x8f, 0xb2, 0xe8, 0xcf, + 0xa3, 0x2c, 0xfa, 0xe1, 0x38, 0x9b, 0x7a, 0x7a, 0x9c, 0x4d, 0x3d, 0x3b, 0xce, 0xa6, 0x3e, 0x9b, + 0x4b, 0x9c, 0x13, 0xbe, 0x8a, 0xaa, 0xcb, 0xb1, 0x61, 0xe7, 0x94, 0xfc, 0x27, 0xc3, 0xc2, 0xff, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x68, 0x0b, 0x91, 0xae, 0x5c, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1020,7 +958,8 @@ type QueryClient interface { ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) // DelegationRewards queries the total rewards accrued by a delegation. DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) - // DelegationTotalRewards queries the total rewards accrued by a each validator. + // DelegationTotalRewards queries the total rewards accrued by a each + // validator. DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) // DelegatorValidators queries the validators of a delegator. DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) @@ -1131,7 +1070,8 @@ type QueryServer interface { ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) // DelegationRewards queries the total rewards accrued by a delegation. DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) - // DelegationTotalRewards queries the total rewards accrued by a each validator. + // DelegationTotalRewards queries the total rewards accrued by a each + // validator. DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) // DelegatorValidators queries the validators of a delegator. DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) @@ -2211,8 +2151,8 @@ func (m *QueryDelegatorValidatorsResponse) Size() (n int) { var l int _ = l if len(m.Validators) > 0 { - for _, b := range m.Validators { - l = len(b) + for _, s := range m.Validators { + l = len(s) n += 1 + l + sovQuery(uint64(l)) } } @@ -2447,7 +2387,7 @@ func (m *QueryValidatorOutstandingRewardsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2457,25 +2397,23 @@ func (m *QueryValidatorOutstandingRewardsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2620,7 +2558,7 @@ func (m *QueryValidatorCommissionRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2630,25 +2568,23 @@ func (m *QueryValidatorCommissionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2793,7 +2729,7 @@ func (m *QueryValidatorSlashesRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2803,25 +2739,23 @@ func (m *QueryValidatorSlashesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -3077,7 +3011,7 @@ func (m *QueryDelegationRewardsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3087,31 +3021,29 @@ func (m *QueryDelegationRewardsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3121,25 +3053,23 @@ func (m *QueryDelegationRewardsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3285,7 +3215,7 @@ func (m *QueryDelegationTotalRewardsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3295,25 +3225,23 @@ func (m *QueryDelegationTotalRewardsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3493,7 +3421,7 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3503,25 +3431,23 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3580,7 +3506,7 @@ func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3590,23 +3516,23 @@ func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Validators = append(m.Validators, make([]byte, postIndex-iNdEx)) - copy(m.Validators[len(m.Validators)-1], dAtA[iNdEx:postIndex]) + m.Validators = append(m.Validators, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3665,7 +3591,7 @@ func (m *QueryDelegatorWithdrawAddressRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3675,25 +3601,23 @@ func (m *QueryDelegatorWithdrawAddressRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3752,7 +3676,7 @@ func (m *QueryDelegatorWithdrawAddressResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3762,25 +3686,23 @@ func (m *QueryDelegatorWithdrawAddressResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.WithdrawAddress = append(m.WithdrawAddress[:0], dAtA[iNdEx:postIndex]...) - if m.WithdrawAddress == nil { - m.WithdrawAddress = []byte{} - } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/distribution/types/query.pb.gw.go b/x/distribution/types/query.pb.gw.go index 890e51e40d..7bbe7b7a29 100644 --- a/x/distribution/types/query.pb.gw.go +++ b/x/distribution/types/query.pb.gw.go @@ -65,7 +65,7 @@ func request_Query_ValidatorOutstandingRewards_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -92,7 +92,7 @@ func local_request_Query_ValidatorOutstandingRewards_0(ctx context.Context, mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -119,7 +119,7 @@ func request_Query_ValidatorCommission_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -146,7 +146,7 @@ func local_request_Query_ValidatorCommission_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -177,7 +177,7 @@ func request_Query_ValidatorSlashes_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -211,7 +211,7 @@ func local_request_Query_ValidatorSlashes_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -245,7 +245,7 @@ func request_Query_DelegationRewards_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -256,7 +256,7 @@ func request_Query_DelegationRewards_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -283,7 +283,7 @@ func local_request_Query_DelegationRewards_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -294,7 +294,7 @@ func local_request_Query_DelegationRewards_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") } - protoReq.ValidatorAddress, err = runtime.Bytes(val) + protoReq.ValidatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) @@ -321,7 +321,7 @@ func request_Query_DelegationTotalRewards_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -348,7 +348,7 @@ func local_request_Query_DelegationTotalRewards_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -375,7 +375,7 @@ func request_Query_DelegatorValidators_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -402,7 +402,7 @@ func local_request_Query_DelegatorValidators_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -429,7 +429,7 @@ func request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) @@ -456,7 +456,7 @@ func local_request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") } - protoReq.DelegatorAddress, err = runtime.Bytes(val) + protoReq.DelegatorAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) diff --git a/x/distribution/types/tx.pb.go b/x/distribution/types/tx.pb.go index f172166a67..38261f340a 100644 --- a/x/distribution/types/tx.pb.go +++ b/x/distribution/types/tx.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -29,8 +28,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgSetWithdrawAddress sets the withdraw address for // a delegator (or validator self-delegation). type MsgSetWithdrawAddress struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - WithdrawAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"withdraw_address,omitempty" yaml:"withdraw_address"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty" yaml:"withdraw_address"` } func (m *MsgSetWithdrawAddress) Reset() { *m = MsgSetWithdrawAddress{} } @@ -66,25 +65,11 @@ func (m *MsgSetWithdrawAddress) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetWithdrawAddress proto.InternalMessageInfo -func (m *MsgSetWithdrawAddress) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgSetWithdrawAddress) GetWithdrawAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.WithdrawAddress - } - return nil -} - // MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator // from a single validator. type MsgWithdrawDelegatorReward struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + 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 *MsgWithdrawDelegatorReward) Reset() { *m = MsgWithdrawDelegatorReward{} } @@ -120,23 +105,10 @@ func (m *MsgWithdrawDelegatorReward) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawDelegatorReward proto.InternalMessageInfo -func (m *MsgWithdrawDelegatorReward) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgWithdrawDelegatorReward) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator address. +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. type MsgWithdrawValidatorCommission struct { - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` } func (m *MsgWithdrawValidatorCommission) Reset() { *m = MsgWithdrawValidatorCommission{} } @@ -172,18 +144,11 @@ func (m *MsgWithdrawValidatorCommission) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawValidatorCommission proto.InternalMessageInfo -func (m *MsgWithdrawValidatorCommission) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - // MsgFundCommunityPool allows an account to directly // fund the community pool. type MsgFundCommunityPool struct { - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` - Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` } func (m *MsgFundCommunityPool) Reset() { *m = MsgFundCommunityPool{} } @@ -219,20 +184,6 @@ func (m *MsgFundCommunityPool) XXX_DiscardUnknown() { var xxx_messageInfo_MsgFundCommunityPool proto.InternalMessageInfo -func (m *MsgFundCommunityPool) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Amount - } - return nil -} - -func (m *MsgFundCommunityPool) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Depositor - } - return nil -} - func init() { proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos.distribution.v1beta1.MsgSetWithdrawAddress") proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward") @@ -245,148 +196,37 @@ func init() { } var fileDescriptor_ed4f433d965e58ca = []byte{ - // 449 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x94, 0xb1, 0x6e, 0xd4, 0x30, - 0x1c, 0xc6, 0xe3, 0x20, 0x55, 0xc2, 0x20, 0xd1, 0x46, 0x45, 0x1c, 0x87, 0xe4, 0x54, 0x11, 0xc3, - 0x2d, 0x4d, 0x08, 0x6c, 0x6c, 0xbd, 0x22, 0x26, 0xa2, 0xa2, 0x43, 0x2a, 0x12, 0x0b, 0x72, 0x62, - 0x2b, 0xb5, 0x48, 0xf2, 0x3f, 0xc5, 0x4e, 0xd3, 0xeb, 0x33, 0x30, 0x30, 0x30, 0xf2, 0x00, 0x88, - 0x27, 0xe9, 0xc0, 0xd0, 0x91, 0x29, 0xa0, 0xdc, 0x1b, 0x74, 0x64, 0x42, 0x49, 0x9c, 0xd0, 0x6b, - 0x11, 0x2a, 0x0c, 0x30, 0x25, 0x8a, 0x3f, 0x7f, 0xbf, 0x2f, 0x7f, 0xeb, 0x33, 0xbe, 0x1f, 0x81, - 0x4c, 0x41, 0x7a, 0x4c, 0x48, 0x95, 0x8b, 0xb0, 0x50, 0x02, 0x32, 0xef, 0xd0, 0x0f, 0xb9, 0xa2, - 0xbe, 0xa7, 0x8e, 0xdc, 0x79, 0x0e, 0x0a, 0xac, 0x7b, 0x9d, 0xca, 0x3d, 0xaf, 0x72, 0xb5, 0x6a, - 0xbc, 0x19, 0x43, 0x0c, 0xad, 0xce, 0x6b, 0xde, 0xba, 0x2d, 0x63, 0xa2, 0x8d, 0x43, 0x2a, 0xf9, - 0x60, 0x18, 0x81, 0xc8, 0xba, 0x75,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x45, 0x26, 0xd4, 0xe2, 0x39, 0x40, - 0x62, 0x45, 0x78, 0x8d, 0xa6, 0x50, 0x64, 0x6a, 0x84, 0xb6, 0xae, 0x4d, 0x6e, 0x3c, 0xbc, 0xeb, - 0xea, 0x06, 0x35, 0x75, 0xe8, 0x9b, 0xe3, 0xee, 0x82, 0xc8, 0xa6, 0x0f, 0x4e, 0x2a, 0xdb, 0xf8, - 0xf4, 0xd5, 0x9e, 0x5c, 0x21, 0x4c, 0xb3, 0x41, 0xce, 0xb4, 0xb5, 0xb5, 0x87, 0xaf, 0x33, 0x3e, - 0x07, 0x29, 0x14, 0xe4, 0xfa, 0x40, 0xfc, 0x3f, 0x3f, 0xf0, 0x9f, 0x1e, 0xd3, 0xbd, 0x8f, 0x35, - 0x41, 0x27, 0x35, 0x41, 0xa7, 0x35, 0x41, 0xdf, 0x6a, 0x82, 0xde, 0x2d, 0x89, 0x71, 0xba, 0x24, - 0xc6, 0x97, 0x25, 0x31, 0x5e, 0xf9, 0xbf, 0xf5, 0x3d, 0x5a, 0xbd, 0x42, 0x5a, 0x4c, 0xb8, 0xd6, - 0x76, 0xfd, 0xd1, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x95, 0x71, 0x58, 0x66, 0x04, 0x00, - 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xbd, 0x8e, 0xd3, 0x40, + 0x1c, 0xc4, 0xbd, 0x87, 0x74, 0xe2, 0x96, 0x82, 0x9c, 0x75, 0x88, 0x90, 0x3b, 0xad, 0x4f, 0x16, + 0x45, 0x1a, 0x6c, 0x02, 0xdd, 0x75, 0xe4, 0xd0, 0x49, 0x29, 0x22, 0x90, 0x91, 0x40, 0xa2, 0x41, + 0x6b, 0xef, 0xca, 0x59, 0x61, 0xfb, 0x1f, 0x79, 0xd7, 0x71, 0xf2, 0x06, 0x94, 0x3c,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0xff, 0xff, 0x89, 0x6e, 0x9f, 0xc2, + 0x65, 0x03, 0x00, 0x00, } -func (this *MsgSetWithdrawAddress) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgSetWithdrawAddress) - if !ok { - that2, ok := that.(MsgSetWithdrawAddress) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.WithdrawAddress, that1.WithdrawAddress) { - return false - } - return true -} -func (this *MsgWithdrawDelegatorReward) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgWithdrawDelegatorReward) - if !ok { - that2, ok := that.(MsgWithdrawDelegatorReward) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - return true -} -func (this *MsgWithdrawValidatorCommission) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgWithdrawValidatorCommission) - if !ok { - that2, ok := that.(MsgWithdrawValidatorCommission) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - return true -} -func (this *MsgFundCommunityPool) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgFundCommunityPool) - if !ok { - that2, ok := that.(MsgFundCommunityPool) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - if !bytes.Equal(this.Depositor, that1.Depositor) { - return false - } - return true -} func (m *MsgSetWithdrawAddress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -651,7 +491,7 @@ func (m *MsgSetWithdrawAddress) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -661,31 +501,29 @@ func (m *MsgSetWithdrawAddress) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -695,25 +533,23 @@ func (m *MsgSetWithdrawAddress) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.WithdrawAddress = append(m.WithdrawAddress[:0], dAtA[iNdEx:postIndex]...) - if m.WithdrawAddress == nil { - m.WithdrawAddress = []byte{} - } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -772,7 +608,7 @@ func (m *MsgWithdrawDelegatorReward) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -782,31 +618,29 @@ func (m *MsgWithdrawDelegatorReward) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -816,25 +650,23 @@ func (m *MsgWithdrawDelegatorReward) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -893,7 +725,7 @@ func (m *MsgWithdrawValidatorCommission) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -903,25 +735,23 @@ func (m *MsgWithdrawValidatorCommission) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1014,7 +844,7 @@ func (m *MsgFundCommunityPool) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1024,25 +854,23 @@ func (m *MsgFundCommunityPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) - if m.Depositor == nil { - m.Depositor = []byte{} - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/evidence/genesis_test.go b/x/evidence/genesis_test.go index bbe8a529e9..3ae8eee03c 100644 --- a/x/evidence/genesis_test.go +++ b/x/evidence/genesis_test.go @@ -54,7 +54,7 @@ func (suite *GenesisTestSuite) TestInitGenesis() { Height: int64(i + 1), Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), } } genesisState = types.NewGenesisState(testEvidence) @@ -75,7 +75,7 @@ func (suite *GenesisTestSuite) TestInitGenesis() { testEvidence[i] = &types.Equivocation{ Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), } } genesisState = types.NewGenesisState(testEvidence) @@ -124,7 +124,7 @@ func (suite *GenesisTestSuite) TestExportGenesis() { Height: 1, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), }) }, true, diff --git a/x/evidence/handler_test.go b/x/evidence/handler_test.go index e30950bf78..4011483688 100644 --- a/x/evidence/handler_test.go +++ b/x/evidence/handler_test.go @@ -69,7 +69,7 @@ func (suite *HandlerTestSuite) SetupTest() { func (suite *HandlerTestSuite) TestMsgSubmitEvidence() { pk := ed25519.GenPrivKey() - s := sdk.AccAddress("test") + s := sdk.AccAddress("test________________") testCases := []struct { msg sdk.Msg @@ -82,7 +82,7 @@ func (suite *HandlerTestSuite) TestMsgSubmitEvidence() { Height: 11, Time: time.Now().UTC(), Power: 100, - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), }, s, ), @@ -95,7 +95,7 @@ func (suite *HandlerTestSuite) TestMsgSubmitEvidence() { Height: 10, Time: time.Now().UTC(), Power: 100, - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), }, s, ), diff --git a/x/evidence/keeper/infraction_test.go b/x/evidence/keeper/infraction_test.go index 817ffed03d..88f275c82d 100644 --- a/x/evidence/keeper/infraction_test.go +++ b/x/evidence/keeper/infraction_test.go @@ -50,7 +50,7 @@ func (suite *KeeperTestSuite) TestHandleDoubleSign() { Height: 0, Time: time.Unix(0, 0), Power: power, - ConsensusAddress: sdk.ConsAddress(val.Address()), + ConsensusAddress: sdk.ConsAddress(val.Address()).String(), } suite.app.EvidenceKeeper.HandleEquivocationEvidence(ctx, evidence) @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) TestHandleDoubleSign_TooOld() { Height: 0, Time: ctx.BlockTime(), Power: power, - ConsensusAddress: sdk.ConsAddress(val.Address()), + ConsensusAddress: sdk.ConsAddress(val.Address()).String(), } cp := suite.app.BaseApp.GetConsensusParams(ctx) diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 3bc26cda9a..0017f12f25 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -115,7 +115,7 @@ func (suite *KeeperTestSuite) populateEvidence(ctx sdk.Context, numEvidence int) Height: 11, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()), + ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } suite.Nil(suite.app.EvidenceKeeper.SubmitEvidence(ctx, evidence[i])) @@ -144,7 +144,7 @@ func (suite *KeeperTestSuite) TestSubmitValidEvidence() { Height: 1, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()), + ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } suite.Nil(suite.app.EvidenceKeeper.SubmitEvidence(ctx, e)) @@ -162,7 +162,7 @@ func (suite *KeeperTestSuite) TestSubmitValidEvidence_Duplicate() { Height: 1, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()), + ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } suite.Nil(suite.app.EvidenceKeeper.SubmitEvidence(ctx, e)) @@ -180,7 +180,7 @@ func (suite *KeeperTestSuite) TestSubmitInvalidEvidence() { Height: 0, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()), + ConsensusAddress: sdk.ConsAddress(pk.PubKey().Address().Bytes()).String(), } suite.Error(suite.app.EvidenceKeeper.SubmitEvidence(ctx, e)) diff --git a/x/evidence/simulation/decoder_test.go b/x/evidence/simulation/decoder_test.go index 4fca070999..a63beae501 100644 --- a/x/evidence/simulation/decoder_test.go +++ b/x/evidence/simulation/decoder_test.go @@ -25,7 +25,7 @@ func TestDecodeStore(t *testing.T) { Height: 10, Time: time.Now().UTC(), Power: 1000, - ConsensusAddress: sdk.ConsAddress(delPk1.Address()), + ConsensusAddress: sdk.ConsAddress(delPk1.Address()).String(), } evBz, err := app.EvidenceKeeper.MarshalEvidence(ev) diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index fe2abfae07..8558623baa 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -7,7 +7,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" tmbytes "github.com/tendermint/tendermint/libs/bytes" - yaml "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/evidence/exported" @@ -52,7 +52,7 @@ func (e *Equivocation) ValidateBasic() error { if e.Power < 1 { return fmt.Errorf("invalid equivocation validator power: %d", e.Power) } - if e.ConsensusAddress.Empty() { + if e.ConsensusAddress == "" { return fmt.Errorf("invalid equivocation validator consensus address: %s", e.ConsensusAddress) } @@ -62,7 +62,8 @@ func (e *Equivocation) ValidateBasic() error { // GetConsensusAddress returns the validator's consensus address at time of the // Equivocation infraction. func (e Equivocation) GetConsensusAddress() sdk.ConsAddress { - return e.ConsensusAddress + addr, _ := sdk.ConsAddressFromBech32(e.ConsensusAddress) + return addr } // GetHeight returns the height at time of the Equivocation infraction. @@ -87,10 +88,15 @@ 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.Evidence) exported.Evidence { + consAddr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixConsAddr, e.Validator.Address) + if err != nil { + panic(err) + } + return &Equivocation{ Height: e.Height, Power: e.Validator.Power, - ConsensusAddress: sdk.ConsAddress(e.Validator.Address), + ConsensusAddress: consAddr, Time: e.Time, } } diff --git a/x/evidence/types/evidence.pb.go b/x/evidence/types/evidence.pb.go index bc908746ea..430f6cce69 100644 --- a/x/evidence/types/evidence.pb.go +++ b/x/evidence/types/evidence.pb.go @@ -4,9 +4,7 @@ package types import ( - bytes "bytes" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -32,10 +30,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Equivocation implements the Evidence interface and defines evidence of double // signing misbehavior. type Equivocation struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Time time.Time `protobuf:"bytes,2,opt,name=time,proto3,stdtime" json:"time"` - Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` - ConsensusAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"consensus_address,omitempty" yaml:"consensus_address"` + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,2,opt,name=time,proto3,stdtime" json:"time"` + Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` + ConsensusAddress string `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty" yaml:"consensus_address"` } func (m *Equivocation) Reset() { *m = Equivocation{} } @@ -79,63 +77,30 @@ func init() { } var fileDescriptor_dd143e71a177f0dd = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, - 0x2d, 0x49, 0x34, 0x84, 0x0b, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x89, 0x43, 0xd4, 0xe9, - 0xc1, 0x85, 0xa1, 0xea, 0xa4, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x6a, 0xf4, 0x41, 0x2c, 0x88, - 0x72, 0x29, 0xf9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0xbf, - 0x24, 0x33, 0x37, 0xb5, 0xb8, 0x24, 0x31, 0xb7, 0x00, 0xa2, 0x40, 0xe9, 0x2f, 0x23, 0x17, 0x8f, - 0x6b, 0x61, 0x69, 0x66, 0x59, 0x7e, 0x72, 0x62, 0x49, 0x66, 0x7e, 0x9e, 0x90, 0x18, 0x17, 0x5b, - 0x46, 0x6a, 0x66, 0x7a, 0x46, 0x89, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x94, 0x27, 0x64, - 0xc1, 0xc5, 0x02, 0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16, 0xd8, 0xd2, 0x24, 0x36, 0x70, - 0x68, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x92, 0x83, 0xd6, 0xcd, 0x01, 0x00, 0x00, + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x3f, 0x4f, 0x02, 0x31, + 0x18, 0xc6, 0x5b, 0x41, 0xa2, 0x27, 0x83, 0x5e, 0x88, 0x5e, 0x88, 0x69, 0x09, 0x83, 0x61, 0xe1, + 0x1a, 0x74, 0x31, 0x6c, 0x92, 0x38, 0x18, 0x37, 0xe2, 0xe4, 0x62, 0xee, 0x4f, 0x2d, 0x8d, 0xdc, + 0xbd, 0x27, 0xed, 0xa1, 0x7c, 0x03, 0x47, 0x46, 0x47, 0x46, 0x3f, 0x0a, 0x9b, 0x8c, 0x4e, 0x68, + 0x8e, 0xc5, 0xd9, 0x4f, 0x60, 0xb8, 0x02, 0x0e, 0x4e, 0xed, 0xf3, 0xe4, 0xf7, 0xfe, 0x92, 0xf7, + 0xb5, 0x4e, 0x02, 0x50, 0x11, 0x28, 0xc6, 0x87, 0x32, 0xe4, 0x71, 0xc0, 0xd9, 0xb0, 0xe5, 0x73, + 0xed, 0xb5, 0x36, 0x85, 0x9b, 0x0c, 0x40, 0x83, 0x7d, 0x64, 0x38, 0x77, 0x53, 0xaf, 0xb8, 0x6a, + 0x45, 0x80, 0x80, 0x9c, 0x61, 0xcb, 0x9f, 0xc1, 0xab, 0x54, 0x00, 0x88, 0x3e, 0x67, 0x79, 0xf2, + 0xd3, 0x7b, 0xa6, 0x65, 0xc4, 0x95, 0xf6, 0xa2, 0xc4, 0x00, 0xf5, 0x77, 0x6c, 0x95, 0x2f, 0x1f, + 0x53, 0x39, 0x84, 0xc0, 0xd3, 0x12, 0x62, 0xfb, 0xd0, 0x2a, 0xf5, 0xb8, 0x14, 0x3d, 0xed, 0xe0, + 0x1a, 0x6e, 0x14, 0xba, 0xab, 0x64, 0x9f, 0x5b, 0xc5, 0xe5, 0xac, 0xb3, 0x55, 0xc3, 0x8d, 0xbd, + 0xd3, 0xaa, 0x6b, 0xc4, 0xee, 0x5a, 0xec, 0xde, 0xac, 0xc5, 0x9d, 0x9d, 0xe9, 0x9c, 0xa2, 0xf1, + 0x27, 0xc5, 0xdd, 0x7c, 0xc2, 0xae, 0x58, 0xdb, 0x09, 0x3c, 0xf1, 0x81, 0x53, 0xc8, 0x85, 0x26, + 0xd8, 0x57, 0xd6, 0x41, 0x00, 0xb1, 0xe2, 0xb1, 0x4a, 0xd5, 0x9d, 0x17, 0x86, 0x03, 0xae, 0x94, + 0x53, 0xac, 0xe1, 0xc6, 0x6e, 0xe7, 0xf8, 0x67, 0x4e, 0x9d, 0x91, 0x17, 0xf5, 0xdb, 0xf5, 0x7f, + 0x48, 0xbd, 0xbb, 0xbf, 0xe9, 0x2e, 0x4c, 0xd5, 0x2e, 0xbf, 0x4c, 0x28, 0x7a, 0x9d, 0x50, 0xf4, + 0x3d, 0xa1, 0xa8, 0x73, 0xfd, 0x96, 0x11, 0x3c, 0xcd, 0x08, 0x9e, 0x65, 0x04, 0x7f, 0x65, 0x04, + 0x8f, 0x17, 0x04, 0xcd, 0x16, 0x04, 0x7d, 0x2c, 0x08, 0xba, 0x6d, 0x0a, 0xa9, 0x7b, 0xa9, 0xef, + 0x06, 0x10, 0xb1, 0xd5, 0xc9, 0xcd, 0xd3, 0x54, 0xe1, 0x03, 0x7b, 0xfe, 0xbb, 0xbf, 0x1e, 0x25, + 0x5c, 0xf9, 0xa5, 0x7c, 0xbf, 0xb3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x33, 0x3a, 0x69, + 0x9f, 0x01, 0x00, 0x00, } -func (this *Equivocation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Equivocation) - if !ok { - that2, ok := that.(Equivocation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if !this.Time.Equal(that1.Time) { - return false - } - if this.Power != that1.Power { - return false - } - if !bytes.Equal(this.ConsensusAddress, that1.ConsensusAddress) { - return false - } - return true -} func (m *Equivocation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -326,7 +291,7 @@ func (m *Equivocation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvidence @@ -336,25 +301,23 @@ func (m *Equivocation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthEvidence } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthEvidence } if postIndex > l { return io.ErrUnexpectedEOF } - m.ConsensusAddress = append(m.ConsensusAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusAddress == nil { - m.ConsensusAddress = []byte{} - } + m.ConsensusAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/evidence/types/evidence_test.go b/x/evidence/types/evidence_test.go index 623af3a7cb..07b9352f57 100644 --- a/x/evidence/types/evidence_test.go +++ b/x/evidence/types/evidence_test.go @@ -12,27 +12,30 @@ import ( func TestEquivocation_Valid(t *testing.T) { n, _ := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z") + addr := sdk.ConsAddress("foo_________________") + e := types.Equivocation{ Height: 100, Time: n, Power: 1000000, - ConsensusAddress: sdk.ConsAddress("foo"), + ConsensusAddress: addr.String(), } require.Equal(t, e.GetTotalPower(), int64(0)) require.Equal(t, e.GetValidatorPower(), e.Power) require.Equal(t, e.GetTime(), e.Time) - require.Equal(t, e.GetConsensusAddress(), e.ConsensusAddress) + require.Equal(t, e.GetConsensusAddress().String(), e.ConsensusAddress) require.Equal(t, e.GetHeight(), e.Height) require.Equal(t, e.Type(), types.TypeEquivocation) require.Equal(t, e.Route(), types.RouteEquivocation) - require.Equal(t, e.Hash().String(), "16337536D55FB6DB93360AED8FDB9B615BFACAF0440C28C46B89F167D042154A") - require.Equal(t, e.String(), "height: 100\ntime: 2006-01-02T15:04:05Z\npower: 1000000\nconsensus_address: cosmosvalcons1vehk7pqt5u4\n") + require.Equal(t, e.Hash().String(), "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76") + require.Equal(t, e.String(), "height: 100\ntime: 2006-01-02T15:04:05Z\npower: 1000000\nconsensus_address: cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\n") require.NoError(t, e.ValidateBasic()) } func TestEquivocationValidateBasic(t *testing.T) { var zeroTime time.Time + addr := sdk.ConsAddress("foo_________________") n, _ := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z") testCases := []struct { @@ -40,11 +43,11 @@ func TestEquivocationValidateBasic(t *testing.T) { e types.Equivocation expectErr bool }{ - {"valid", types.Equivocation{100, n, 1000000, sdk.ConsAddress("foo")}, false}, - {"invalid time", types.Equivocation{100, zeroTime, 1000000, sdk.ConsAddress("foo")}, true}, - {"invalid height", types.Equivocation{0, n, 1000000, sdk.ConsAddress("foo")}, true}, - {"invalid power", types.Equivocation{100, n, 0, sdk.ConsAddress("foo")}, true}, - {"invalid address", types.Equivocation{100, n, 1000000, nil}, true}, + {"valid", types.Equivocation{100, n, 1000000, addr.String()}, false}, + {"invalid time", types.Equivocation{100, zeroTime, 1000000, addr.String()}, true}, + {"invalid height", types.Equivocation{0, n, 1000000, addr.String()}, true}, + {"invalid power", types.Equivocation{100, n, 0, addr.String()}, true}, + {"invalid address", types.Equivocation{100, n, 1000000, ""}, true}, } for _, tc := range testCases { diff --git a/x/evidence/types/genesis_test.go b/x/evidence/types/genesis_test.go index 051f21d909..d1cd030b96 100644 --- a/x/evidence/types/genesis_test.go +++ b/x/evidence/types/genesis_test.go @@ -78,7 +78,7 @@ func TestGenesisStateValidate(t *testing.T) { Height: int64(i + 1), Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), } } genesisState = types.NewGenesisState(testEvidence) @@ -94,7 +94,7 @@ func TestGenesisStateValidate(t *testing.T) { Height: int64(i), Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), } } genesisState = types.NewGenesisState(testEvidence) diff --git a/x/evidence/types/msgs.go b/x/evidence/types/msgs.go index c7ec4a8be1..74ffd0f500 100644 --- a/x/evidence/types/msgs.go +++ b/x/evidence/types/msgs.go @@ -23,6 +23,7 @@ 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) if !ok { @@ -32,7 +33,7 @@ func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEv if err != nil { return nil, err } - return &MsgSubmitEvidence{Submitter: s, Evidence: any}, nil + return &MsgSubmitEvidence{Submitter: s.String(), Evidence: any}, nil } // Route returns the MsgSubmitEvidence's route. @@ -43,8 +44,8 @@ func (m MsgSubmitEvidence) Type() string { return TypeMsgSubmitEvidence } // ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitEvidence. func (m MsgSubmitEvidence) ValidateBasic() error { - if m.Submitter.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Submitter.String()) + if m.Submitter == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Submitter) } evi := m.GetEvidence() @@ -66,7 +67,12 @@ func (m MsgSubmitEvidence) GetSignBytes() []byte { // GetSigners returns the single expected signer for a MsgSubmitEvidence. func (m MsgSubmitEvidence) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{m.Submitter} + accAddr, err := sdk.AccAddressFromBech32(m.Submitter) + if err != nil { + return nil + } + + return []sdk.AccAddress{accAddr} } func (m MsgSubmitEvidence) GetEvidence() exported.Evidence { @@ -78,7 +84,11 @@ func (m MsgSubmitEvidence) GetEvidence() exported.Evidence { } func (m MsgSubmitEvidence) GetSubmitter() sdk.AccAddress { - return m.Submitter + accAddr, err := sdk.AccAddressFromBech32(m.Submitter) + if err != nil { + return nil + } + return accAddr } func (m MsgSubmitEvidence) UnpackInterfaces(ctx types.AnyUnpacker) error { diff --git a/x/evidence/types/msgs_test.go b/x/evidence/types/msgs_test.go index 959ceb3ef8..8bcf061ff3 100644 --- a/x/evidence/types/msgs_test.go +++ b/x/evidence/types/msgs_test.go @@ -20,7 +20,7 @@ func testMsgSubmitEvidence(t *testing.T, e exported.Evidence, s sdk.AccAddress) func TestMsgSubmitEvidence(t *testing.T) { pk := ed25519.GenPrivKey() - submitter := sdk.AccAddress("test") + submitter := sdk.AccAddress("test________________") testCases := []struct { msg sdk.Msg @@ -32,7 +32,7 @@ func TestMsgSubmitEvidence(t *testing.T) { Height: 0, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), }, submitter), submitter, true, @@ -42,7 +42,7 @@ func TestMsgSubmitEvidence(t *testing.T) { Height: 10, Power: 100, Time: time.Now().UTC(), - ConsensusAddress: pk.PubKey().Address().Bytes(), + ConsensusAddress: pk.PubKey().Address().String(), }, submitter), submitter, false, diff --git a/x/evidence/types/query.pb.go b/x/evidence/types/query.pb.go index 36ebd6aa98..c88579655d 100644 --- a/x/evidence/types/query.pb.go +++ b/x/evidence/types/query.pb.go @@ -124,7 +124,8 @@ func (m *QueryEvidenceResponse) GetEvidence() *types.Any { return nil } -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC method. +// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC +// method. type QueryAllEvidenceRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -170,7 +171,8 @@ func (m *QueryAllEvidenceRequest) GetPagination() *query.PageRequest { return nil } -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. +// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +// method. type QueryAllEvidenceResponse struct { // evidence returns all evidences. Evidence []*types.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` diff --git a/x/evidence/types/tx.pb.go b/x/evidence/types/tx.pb.go index ce00fadb82..876bf30e64 100644 --- a/x/evidence/types/tx.pb.go +++ b/x/evidence/types/tx.pb.go @@ -4,10 +4,8 @@ package types import ( - bytes "bytes" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "github.com/regen-network/cosmos-proto" @@ -30,8 +28,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgSubmitEvidence represents a message that supports submitting arbitrary // Evidence of misbehavior such as equivocation or counterfactual signing. type MsgSubmitEvidence struct { - Submitter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=submitter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"submitter,omitempty"` - Evidence *types.Any `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` + Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"` + Evidence *types.Any `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` } func (m *MsgSubmitEvidence) Reset() { *m = MsgSubmitEvidence{} } @@ -74,54 +72,26 @@ func init() { func init() { proto.RegisterFile("cosmos/evidence/v1beta1/tx.proto", fileDescriptor_3e3242cb23c956e0) } var fileDescriptor_3e3242cb23c956e0 = []byte{ - // 275 bytes of a gzipped FileDescriptorProto + // 257 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, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 0xd2, 0x34, 0xfd, 0xc4, 0xbc, 0x4a, 0x98, 0x14, 0xc4, 0xa4, 0x78, 0x88, 0x1e, 0xa8, 0xb1, 0x60, 0x8e, - 0xd2, 0x2a, 0x46, 0x2e, 0x41, 0xdf, 0xe2, 0xf4, 0xe0, 0xd2, 0xa4, 0xdc, 0xcc, 0x12, 0x57, 0xa8, - 0x4d, 0x42, 0xfe, 0x5c, 0x9c, 0xc5, 0x60, 0x91, 0x92, 0xd4, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, - 0x1e, 0x27, 0xc3, 0x5f, 0xf7, 0xe4, 0x75, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, - 0x73, 0xa1, 0xa6, 0x40, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x3d, - 0xc7, 0xe4, 0x64, 0xc7, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0x20, 0x84, 0x19, 0x42, 0x76, 0x5c, - 0x1c, 0x30, 0x6f, 0x48, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe8, 0x41, 0xdc, 0xab, 0x07, - 0x73, 0xaf, 0x9e, 0x63, 0x5e, 0xa5, 0x13, 0xcf, 0xa9, 0x2d, 0xba, 0x1c, 0x30, 0x67, 0x04, 0xc1, - 0xf5, 0x58, 0xb1, 0x74, 0x2c, 0x90, 0x67, 0x70, 0xf2, 0x5e, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, - 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, - 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf0, 0xbb, 0xae, 0x02, 0x11, 0xd2, 0x60, 0x87, - 0x26, 0xb1, 0x81, 0x2d, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x20, 0xcf, 0x5a, 0x89, - 0x01, 0x00, 0x00, + 0x52, 0x35, 0x97, 0xa0, 0x6f, 0x71, 0x7a, 0x70, 0x69, 0x52, 0x6e, 0x66, 0x89, 0x2b, 0xd4, 0x22, + 0x21, 0x19, 0x2e, 0xce, 0x62, 0xb0, 0x48, 0x49, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, + 0x10, 0x42, 0x40, 0xc8, 0x8e, 0x8b, 0x03, 0xe6, 0x24, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, + 0x11, 0x3d, 0x88, 0xdd, 0x7a, 0x30, 0xbb, 0xf5, 0x1c, 0xf3, 0x2a, 0x9d, 0x78, 0x4e, 0x6d, 0xd1, + 0xe5, 0x80, 0x99, 0x19, 0x04, 0xd7, 0x63, 0xc5, 0xd1, 0xb1, 0x40, 0x9e, 0xe1, 0xc5, 0x02, 0x79, + 0x06, 0x27, 0xef, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 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, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x17, 0xea, 0x66, 0x28, + 0xa5, 0x5b, 0x9c, 0x92, 0xad, 0x5f, 0x81, 0x08, 0xb9, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, + 0xb0, 0xe5, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x60, 0x3b, 0xe2, 0x83, 0x59, 0x01, 0x00, + 0x00, } -func (this *MsgSubmitEvidence) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgSubmitEvidence) - if !ok { - that2, ok := that.(MsgSubmitEvidence) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Submitter, that1.Submitter) { - return false - } - if !this.Evidence.Equal(that1.Evidence) { - return false - } - return true -} func (m *MsgSubmitEvidence) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -231,7 +201,7 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Submitter", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -241,25 +211,23 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Submitter = append(m.Submitter[:0], dAtA[iNdEx:postIndex]...) - if m.Submitter == nil { - m.Submitter = []byte{} - } + m.Submitter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/genutil/collect.go b/x/genutil/collect.go index 24def89162..7f726b05f0 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -9,6 +9,7 @@ import ( "io/ioutil" "os" "path/filepath" + "runtime" "sort" "strings" @@ -141,16 +142,28 @@ func CollectTxs(cdc codec.JSONMarshaler, txJSONDecoder sdk.TxDecoder, moniker, g msg := msgs[0].(*stakingtypes.MsgCreateValidator) // validate delegator and validator addresses and funds against the accounts in the state - delAddr := msg.DelegatorAddress.String() - valAddr := sdk.AccAddress(msg.ValidatorAddress).String() + delAddr := msg.DelegatorAddress + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return appGenTxs, persistentPeers, err + } delBal, delOk := balancesMap[delAddr] if !delOk { + _, file, no, ok := runtime.Caller(1) + if ok { + fmt.Printf("CollectTxs-1, called from %s#%d\n", file, no) + } + return appGenTxs, persistentPeers, fmt.Errorf("account %s balance not in genesis state: %+v", delAddr, balancesMap) } - _, valOk := balancesMap[valAddr] + _, valOk := balancesMap[sdk.AccAddress(valAddr).String()] if !valOk { + _, file, no, ok := runtime.Caller(1) + if ok { + fmt.Printf("CollectTxs-2, called from %s#%d - %s\n", file, no, sdk.AccAddress(msg.ValidatorAddress).String()) + } return appGenTxs, persistentPeers, fmt.Errorf("account %s balance not in genesis state: %+v", valAddr, balancesMap) } diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index ee0ad78299..ed1a4f730d 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -114,21 +114,17 @@ $ %s query gov proposals --page=2 --limit=100 bechVoterAddr, _ := cmd.Flags().GetString(flagVoter) strProposalStatus, _ := cmd.Flags().GetString(flagStatus) - var depositorAddr sdk.AccAddress - var voterAddr sdk.AccAddress var proposalStatus types.ProposalStatus if len(bechDepositorAddr) != 0 { - depositorAddr1, err := sdk.AccAddressFromBech32(bechDepositorAddr) - depositorAddr = depositorAddr1 + _, err := sdk.AccAddressFromBech32(bechDepositorAddr) if err != nil { return err } } if len(bechVoterAddr) != 0 { - voterAddr1, err := sdk.AccAddressFromBech32(bechVoterAddr) - voterAddr = voterAddr1 + _, err := sdk.AccAddressFromBech32(bechVoterAddr) if err != nil { return err } @@ -158,8 +154,8 @@ $ %s query gov proposals --page=2 --limit=100 context.Background(), &types.QueryProposalsRequest{ ProposalStatus: proposalStatus, - Voter: voterAddr, - Depositor: depositorAddr, + Voter: bechVoterAddr, + Depositor: bechDepositorAddr, Pagination: pageReq, }, ) @@ -230,7 +226,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk res, err := queryClient.Vote( context.Background(), - &types.QueryVoteRequest{ProposalId: proposalID, Voter: voterAddr}, + &types.QueryVoteRequest{ProposalId: proposalID, Voter: args[1]}, ) if err != nil { return err @@ -388,7 +384,7 @@ $ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk res, err := queryClient.Deposit( context.Background(), - &types.QueryDepositRequest{ProposalId: proposalID, Depositor: depositorAddr}, + &types.QueryDepositRequest{ProposalId: proposalID, Depositor: args[1]}, ) if err != nil { return err diff --git a/x/gov/client/rest/grpc_query_test.go b/x/gov/client/rest/grpc_query_test.go index 7a39fbb275..23a282d5d3 100644 --- a/x/gov/client/rest/grpc_query_test.go +++ b/x/gov/client/rest/grpc_query_test.go @@ -3,7 +3,6 @@ package rest_test import ( - "encoding/base64" "fmt" "testing" @@ -151,8 +150,7 @@ func (s *IntegrationTestSuite) TestGetProposalsGRPC() { func (s *IntegrationTestSuite) TestGetProposalVoteGRPC() { val := s.network.Validators[0] - // TODO: need to pass bech32 string instead of base64 encoding string - voterAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) + voterAddressBase64 := val.Address.String() testCases := []struct { name string @@ -243,9 +241,6 @@ func (s *IntegrationTestSuite) TestGetProposalVotesGRPC() { func (s *IntegrationTestSuite) TestGetProposalDepositGRPC() { val := s.network.Validators[0] - // TODO: need to pass bech32 string instead of base64 encoding string - DepositerAddrBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -253,12 +248,12 @@ func (s *IntegrationTestSuite) TestGetProposalDepositGRPC() { }{ { "get deposit with empty proposal id", - fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "", DepositerAddrBase64), + fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "", val.Address.String()), true, }, { "get deposit of non existing proposal", - fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "10", DepositerAddrBase64), + fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "10", val.Address.String()), true, }, { @@ -268,7 +263,7 @@ func (s *IntegrationTestSuite) TestGetProposalDepositGRPC() { }, { "get deposit valid request", - fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "1", DepositerAddrBase64), + fmt.Sprintf("%s/cosmos/gov/v1beta1/proposals/%s/deposits/%s", val.APIAddress, "1", val.Address.String()), false, }, } diff --git a/x/gov/client/utils/query.go b/x/gov/client/utils/query.go index 9c62ac8658..e543f526b3 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -225,7 +225,7 @@ func QueryProposerByTxQuery(clientCtx client.Context, proposalID uint64) (Propos // there should only be a single proposal under the given conditions if msg.Type() == types.TypeMsgSubmitProposal { subMsg := msg.(*types.MsgSubmitProposal) - return NewProposer(proposalID, subMsg.Proposer.String()), nil + return NewProposer(proposalID, subMsg.Proposer), nil } } } diff --git a/x/gov/handler.go b/x/gov/handler.go index e914da6d12..5eacdaf10f 100644 --- a/x/gov/handler.go +++ b/x/gov/handler.go @@ -71,7 +71,11 @@ func handleMsgSubmitProposal(ctx sdk.Context, keeper keeper.Keeper, msg types.Ms } func handleMsgDeposit(ctx sdk.Context, keeper keeper.Keeper, msg *types.MsgDeposit) (*sdk.Result, error) { - votingStarted, err := keeper.AddDeposit(ctx, msg.ProposalId, msg.Depositor, msg.Amount) + accAddr, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return nil, err + } + votingStarted, err := keeper.AddDeposit(ctx, msg.ProposalId, accAddr, msg.Amount) if err != nil { return nil, err } @@ -88,7 +92,7 @@ func handleMsgDeposit(ctx sdk.Context, keeper keeper.Keeper, msg *types.MsgDepos sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Depositor.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Depositor), ), ) @@ -105,7 +109,11 @@ func handleMsgDeposit(ctx sdk.Context, keeper keeper.Keeper, msg *types.MsgDepos } func handleMsgVote(ctx sdk.Context, keeper keeper.Keeper, msg *types.MsgVote) (*sdk.Result, error) { - err := keeper.AddVote(ctx, msg.ProposalId, msg.Voter, msg.Option) + accAddr, accErr := sdk.AccAddressFromBech32(msg.Voter) + if accErr != nil { + return nil, accErr + } + err := keeper.AddVote(ctx, msg.ProposalId, accAddr, msg.Option) if err != nil { return nil, err } @@ -122,7 +130,7 @@ func handleMsgVote(ctx sdk.Context, keeper keeper.Keeper, msg *types.MsgVote) (* sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Voter.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Voter), ), ) diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index c556cf4696..507ac67937 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -25,7 +25,12 @@ func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAdd func (keeper Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) { store := ctx.KVStore(keeper.storeKey) bz := keeper.cdc.MustMarshalBinaryBare(&deposit) - store.Set(types.DepositKey(deposit.ProposalId, deposit.Depositor), bz) + depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) + if err != nil { + panic(err) + } + + store.Set(types.DepositKey(deposit.ProposalId, depositor), bz) } // GetAllDeposits returns all the deposits from the store @@ -58,7 +63,11 @@ func (keeper Keeper) DeleteDeposits(ctx sdk.Context, proposalID uint64) { panic(err) } - store.Delete(types.DepositKey(proposalID, deposit.Depositor)) + depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) + if err != nil { + panic(err) + } + store.Delete(types.DepositKey(proposalID, depositor)) return false }) } @@ -159,12 +168,17 @@ func (keeper Keeper) RefundDeposits(ctx sdk.Context, proposalID uint64) { store := ctx.KVStore(keeper.storeKey) keeper.IterateDeposits(ctx, proposalID, func(deposit types.Deposit) bool { - err := keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, deposit.Depositor, deposit.Amount) + depositor, err := sdk.AccAddressFromBech32(deposit.Depositor) if err != nil { panic(err) } - store.Delete(types.DepositKey(proposalID, deposit.Depositor)) + err = keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositor, deposit.Amount) + if err != nil { + panic(err) + } + + store.Delete(types.DepositKey(proposalID, depositor)) return false }) } diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index b9a231160e..dfa857dc57 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -44,7 +44,7 @@ func TestDeposits(t *testing.T) { deposit, found = app.GovKeeper.GetDeposit(ctx, proposalID, TestAddrs[0]) require.True(t, found) require.Equal(t, fourStake, deposit.Amount) - require.Equal(t, TestAddrs[0], deposit.Depositor) + require.Equal(t, TestAddrs[0].String(), deposit.Depositor) proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) require.Equal(t, fourStake, proposal.TotalDeposit) @@ -57,7 +57,7 @@ func TestDeposits(t *testing.T) { deposit, found = app.GovKeeper.GetDeposit(ctx, proposalID, TestAddrs[0]) require.True(t, found) require.Equal(t, fourStake.Add(fiveStake...), deposit.Amount) - require.Equal(t, TestAddrs[0], deposit.Depositor) + require.Equal(t, TestAddrs[0].String(), deposit.Depositor) proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) require.Equal(t, fourStake.Add(fiveStake...), proposal.TotalDeposit) @@ -69,7 +69,7 @@ func TestDeposits(t *testing.T) { require.True(t, votingStarted) deposit, found = app.GovKeeper.GetDeposit(ctx, proposalID, TestAddrs[1]) require.True(t, found) - require.Equal(t, TestAddrs[1], deposit.Depositor) + require.Equal(t, TestAddrs[1].String(), deposit.Depositor) require.Equal(t, fourStake, deposit.Amount) proposal, ok = app.GovKeeper.GetProposal(ctx, proposalID) require.True(t, ok) @@ -86,9 +86,9 @@ func TestDeposits(t *testing.T) { deposits := app.GovKeeper.GetAllDeposits(ctx) require.Len(t, deposits, 2) require.Equal(t, deposits, app.GovKeeper.GetDeposits(ctx, proposalID)) - require.Equal(t, TestAddrs[0], deposits[0].Depositor) + require.Equal(t, TestAddrs[0].String(), deposits[0].Depositor) require.Equal(t, fourStake.Add(fiveStake...), deposits[0].Amount) - require.Equal(t, TestAddrs[1], deposits[1].Depositor) + require.Equal(t, TestAddrs[1].String(), deposits[1].Depositor) require.Equal(t, fourStake, deposits[1].Amount) // Test Refund Deposits diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index e5bae0fb08..93a0e05937 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -57,12 +57,21 @@ func (q Keeper) Proposals(c context.Context, req *types.QueryProposalsRequest) ( // match voter address (if supplied) if len(req.Voter) > 0 { - _, matchVoter = q.GetVote(ctx, p.ProposalId, req.Voter) + voter, err := sdk.AccAddressFromBech32(req.Voter) + if err != nil { + return false, err + } + + _, matchVoter = q.GetVote(ctx, p.ProposalId, voter) } // match depositor (if supplied) if len(req.Depositor) > 0 { - _, matchDepositor = q.GetDeposit(ctx, p.ProposalId, req.Depositor) + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return false, err + } + _, matchDepositor = q.GetDeposit(ctx, p.ProposalId, depositor) } if matchVoter && matchDepositor && matchStatus { @@ -93,13 +102,17 @@ func (q Keeper) Vote(c context.Context, req *types.QueryVoteRequest) (*types.Que return nil, status.Error(codes.InvalidArgument, "proposal id can not be 0") } - if req.Voter == nil { + if req.Voter == "" { return nil, status.Error(codes.InvalidArgument, "empty voter address") } ctx := sdk.UnwrapSDKContext(c) - vote, found := q.GetVote(ctx, req.ProposalId, req.Voter) + voter, err := sdk.AccAddressFromBech32(req.Voter) + if err != nil { + return nil, err + } + vote, found := q.GetVote(ctx, req.ProposalId, voter) if !found { return nil, status.Errorf(codes.InvalidArgument, "voter: %v not found for proposal: %v", req.Voter, req.ProposalId) @@ -178,13 +191,17 @@ func (q Keeper) Deposit(c context.Context, req *types.QueryDepositRequest) (*typ return nil, status.Error(codes.InvalidArgument, "proposal id can not be 0") } - if req.Depositor == nil { + if req.Depositor == "" { return nil, status.Error(codes.InvalidArgument, "empty depositor address") } ctx := sdk.UnwrapSDKContext(c) - deposit, found := q.GetDeposit(ctx, req.ProposalId, req.Depositor) + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return nil, err + } + deposit, found := q.GetDeposit(ctx, req.ProposalId, depositor) if !found { return nil, status.Errorf(codes.InvalidArgument, "depositer: %v not found for proposal: %v", req.Depositor, req.ProposalId) diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index e18cc099e6..ddea9b4f34 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -169,7 +169,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { app.GovKeeper.SetDeposit(ctx, deposit) req = &types.QueryProposalsRequest{ - Depositor: addrs[0], + Depositor: addrs[0].String(), } expRes = &types.QueryProposalsResponse{ @@ -186,7 +186,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { suite.Require().NoError(app.GovKeeper.AddVote(ctx, testProposals[1].ProposalId, addrs[0], types.OptionAbstain)) req = &types.QueryProposalsRequest{ - Voter: addrs[0], + Voter: addrs[0].String(), } expRes = &types.QueryProposalsResponse{ @@ -245,7 +245,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &types.QueryVoteRequest{ ProposalId: 0, - Voter: addrs[0], + Voter: addrs[0].String(), } }, false, @@ -255,7 +255,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &types.QueryVoteRequest{ ProposalId: 1, - Voter: nil, + Voter: "", } }, false, @@ -265,7 +265,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &types.QueryVoteRequest{ ProposalId: 3, - Voter: addrs[0], + Voter: addrs[0].String(), } }, false, @@ -279,7 +279,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { req = &types.QueryVoteRequest{ ProposalId: proposal.ProposalId, - Voter: addrs[0], + Voter: addrs[0].String(), } expRes = &types.QueryVoteResponse{} @@ -295,7 +295,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { req = &types.QueryVoteRequest{ ProposalId: proposal.ProposalId, - Voter: addrs[0], + Voter: addrs[0].String(), } expRes = &types.QueryVoteResponse{Vote: types.NewVote(proposal.ProposalId, addrs[0], types.OptionAbstain)} @@ -307,7 +307,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &types.QueryVoteRequest{ ProposalId: proposal.ProposalId, - Voter: addrs[1], + Voter: addrs[1].String(), } expRes = &types.QueryVoteResponse{} @@ -395,12 +395,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() { app.GovKeeper.SetProposal(ctx, proposal) votes = []types.Vote{ - {proposal.ProposalId, addrs[0], types.OptionAbstain}, - {proposal.ProposalId, addrs[1], types.OptionYes}, + {proposal.ProposalId, addrs[0].String(), types.OptionAbstain}, + {proposal.ProposalId, addrs[1].String(), types.OptionYes}, } - - suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.ProposalId, votes[0].Voter, votes[0].Option)) - suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.ProposalId, votes[1].Voter, votes[1].Option)) + accAddr1, err1 := sdk.AccAddressFromBech32(votes[0].Voter) + accAddr2, err2 := sdk.AccAddressFromBech32(votes[1].Voter) + suite.Require().NoError(err1) + suite.Require().NoError(err2) + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.ProposalId, accAddr1, votes[0].Option)) + suite.Require().NoError(app.GovKeeper.AddVote(ctx, proposal.ProposalId, accAddr2, votes[1].Option)) req = &types.QueryVotesRequest{ ProposalId: proposal.ProposalId, @@ -538,7 +541,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func() { req = &types.QueryDepositRequest{ ProposalId: 0, - Depositor: addrs[0], + Depositor: addrs[0].String(), } }, false, @@ -548,7 +551,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func() { req = &types.QueryDepositRequest{ ProposalId: 1, - Depositor: nil, + Depositor: "", } }, false, @@ -558,7 +561,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func() { req = &types.QueryDepositRequest{ ProposalId: 2, - Depositor: addrs[0], + Depositor: addrs[0].String(), } }, false, @@ -573,7 +576,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { req = &types.QueryDepositRequest{ ProposalId: proposal.ProposalId, - Depositor: addrs[0], + Depositor: addrs[0].String(), } }, false, @@ -587,7 +590,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { req = &types.QueryDepositRequest{ ProposalId: proposal.ProposalId, - Depositor: addrs[0], + Depositor: addrs[0].String(), } expRes = &types.QueryDepositResponse{Deposit: deposit} diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 5b0273d7ba..1a833737d9 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -90,7 +90,7 @@ func TestGetProposalsFiltered(t *testing.T) { status := []types.ProposalStatus{types.StatusDepositPeriod, types.StatusVotingPeriod} - addr1 := sdk.AccAddress("foo") + addr1 := sdk.AccAddress("foo_________________") for _, s := range status { for i := 0; i < 50; i++ { diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index ea529c61fa..9960fb116b 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -163,7 +163,9 @@ func TestQueries(t *testing.T) { proposal1, err := app.GovKeeper.SubmitProposal(ctx, tp) require.NoError(t, err) deposit1 := types.NewDeposit(proposal1.ProposalId, TestAddrs[0], oneCoins) - _, err = app.GovKeeper.AddDeposit(ctx, deposit1.ProposalId, deposit1.Depositor, deposit1.Amount) + depositer1, err := sdk.AccAddressFromBech32(deposit1.Depositor) + require.NoError(t, err) + _, err = app.GovKeeper.AddDeposit(ctx, deposit1.ProposalId, depositer1, deposit1.Amount) require.NoError(t, err) proposal1.TotalDeposit = proposal1.TotalDeposit.Add(deposit1.Amount...) @@ -171,7 +173,9 @@ func TestQueries(t *testing.T) { proposal2, err := app.GovKeeper.SubmitProposal(ctx, tp) require.NoError(t, err) deposit2 := types.NewDeposit(proposal2.ProposalId, TestAddrs[0], consCoins) - _, err = app.GovKeeper.AddDeposit(ctx, deposit2.ProposalId, deposit2.Depositor, deposit2.Amount) + depositer2, err := sdk.AccAddressFromBech32(deposit2.Depositor) + require.NoError(t, err) + _, err = app.GovKeeper.AddDeposit(ctx, deposit2.ProposalId, depositer2, deposit2.Amount) require.NoError(t, err) proposal2.TotalDeposit = proposal2.TotalDeposit.Add(deposit2.Amount...) @@ -180,14 +184,19 @@ func TestQueries(t *testing.T) { proposal3, err := app.GovKeeper.SubmitProposal(ctx, tp) require.NoError(t, err) deposit3 := types.NewDeposit(proposal3.ProposalId, TestAddrs[1], oneCoins) - _, err = app.GovKeeper.AddDeposit(ctx, deposit3.ProposalId, deposit3.Depositor, deposit3.Amount) + depositer3, err := sdk.AccAddressFromBech32(deposit3.Depositor) + require.NoError(t, err) + + _, err = app.GovKeeper.AddDeposit(ctx, deposit3.ProposalId, depositer3, deposit3.Amount) require.NoError(t, err) proposal3.TotalDeposit = proposal3.TotalDeposit.Add(deposit3.Amount...) // TestAddrs[1] deposits on proposals #2 & #3 deposit4 := types.NewDeposit(proposal2.ProposalId, TestAddrs[1], depositParams.MinDeposit) - _, err = app.GovKeeper.AddDeposit(ctx, deposit4.ProposalId, deposit4.Depositor, deposit4.Amount) + depositer4, err := sdk.AccAddressFromBech32(deposit4.Depositor) + require.NoError(t, err) + _, err = app.GovKeeper.AddDeposit(ctx, deposit4.ProposalId, depositer4, deposit4.Amount) require.NoError(t, err) proposal2.TotalDeposit = proposal2.TotalDeposit.Add(deposit4.Amount...) @@ -195,7 +204,9 @@ func TestQueries(t *testing.T) { proposal2.VotingEndTime = proposal2.VotingEndTime.Add(types.DefaultPeriod) deposit5 := types.NewDeposit(proposal3.ProposalId, TestAddrs[1], depositParams.MinDeposit) - _, err = app.GovKeeper.AddDeposit(ctx, deposit5.ProposalId, deposit5.Depositor, deposit5.Amount) + depositer5, err := sdk.AccAddressFromBech32(deposit5.Depositor) + require.NoError(t, err) + _, err = app.GovKeeper.AddDeposit(ctx, deposit5.ProposalId, depositer5, deposit5.Amount) require.NoError(t, err) proposal3.TotalDeposit = proposal3.TotalDeposit.Add(deposit5.Amount...) @@ -311,7 +322,7 @@ func TestPaginatedVotesQuery(t *testing.T) { rand.Read(addr) vote := types.Vote{ ProposalId: proposal.ProposalId, - Voter: addr, + Voter: addr.String(), Option: types.OptionYes, } votes[i] = vote diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 993167ec33..20fe742b24 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -35,14 +35,20 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes boo keeper.IterateVotes(ctx, proposal.ProposalId, func(vote types.Vote) bool { // if validator, just record it in the map - valAddrStr := sdk.ValAddress(vote.Voter).String() + voter, err := sdk.AccAddressFromBech32(vote.Voter) + + if err != nil { + panic(err) + } + + valAddrStr := sdk.ValAddress(voter.Bytes()).String() if val, ok := currValidators[valAddrStr]; ok { val.Vote = vote.Option currValidators[valAddrStr] = val } // iterate over all delegations from voter, deduct from any delegated-to validators - keeper.sk.IterateDelegations(ctx, vote.Voter, func(index int64, delegation exported.DelegationI) (stop bool) { + keeper.sk.IterateDelegations(ctx, voter, func(index int64, delegation exported.DelegationI) (stop bool) { valAddrStr := delegation.GetValidatorAddr().String() if val, ok := currValidators[valAddrStr]; ok { @@ -61,7 +67,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes boo return false }) - keeper.deleteVote(ctx, vote.ProposalId, vote.Voter) + keeper.deleteVote(ctx, vote.ProposalId, voter) return false }) diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index e7d1825585..a35569bc34 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -70,7 +70,11 @@ func (keeper Keeper) GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.A func (keeper Keeper) SetVote(ctx sdk.Context, vote types.Vote) { store := ctx.KVStore(keeper.storeKey) bz := keeper.cdc.MustMarshalBinaryBare(&vote) - store.Set(types.VoteKey(vote.ProposalId, vote.Voter), bz) + addr, err := sdk.AccAddressFromBech32(vote.Voter) + if err != nil { + panic(err) + } + store.Set(types.VoteKey(vote.ProposalId, addr), bz) } // IterateAllVotes iterates over the all the stored votes and performs a callback function diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index 8dcf721bcc..5f5bf0cc73 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -36,7 +36,7 @@ func TestVotes(t *testing.T) { require.NoError(t, app.GovKeeper.AddVote(ctx, proposalID, addrs[0], types.OptionAbstain)) vote, found := app.GovKeeper.GetVote(ctx, proposalID, addrs[0]) require.True(t, found) - require.Equal(t, addrs[0], vote.Voter) + require.Equal(t, addrs[0].String(), vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.Equal(t, types.OptionAbstain, vote.Option) @@ -44,7 +44,7 @@ func TestVotes(t *testing.T) { require.NoError(t, app.GovKeeper.AddVote(ctx, proposalID, addrs[0], types.OptionYes)) vote, found = app.GovKeeper.GetVote(ctx, proposalID, addrs[0]) require.True(t, found) - require.Equal(t, addrs[0], vote.Voter) + require.Equal(t, addrs[0].String(), vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.Equal(t, types.OptionYes, vote.Option) @@ -52,7 +52,7 @@ func TestVotes(t *testing.T) { require.NoError(t, app.GovKeeper.AddVote(ctx, proposalID, addrs[1], types.OptionNoWithVeto)) vote, found = app.GovKeeper.GetVote(ctx, proposalID, addrs[1]) require.True(t, found) - require.Equal(t, addrs[1], vote.Voter) + require.Equal(t, addrs[1].String(), vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.Equal(t, types.OptionNoWithVeto, vote.Option) @@ -61,10 +61,10 @@ func TestVotes(t *testing.T) { votes := app.GovKeeper.GetAllVotes(ctx) require.Len(t, votes, 2) require.Equal(t, votes, app.GovKeeper.GetVotes(ctx, proposalID)) - require.Equal(t, addrs[0], votes[0].Voter) + require.Equal(t, addrs[0].String(), votes[0].Voter) require.Equal(t, proposalID, votes[0].ProposalId) require.Equal(t, types.OptionYes, votes[0].Option) - require.Equal(t, addrs[1], votes[1].Voter) + require.Equal(t, addrs[1].String(), votes[1].Voter) require.Equal(t, proposalID, votes[1].ProposalId) require.Equal(t, types.OptionNoWithVeto, votes[1].Option) } diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 797ad62c50..9c6e8306f8 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -115,7 +115,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer.String()) + require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) require.Equal(t, "2686011stake", msg.InitialDeposit.String()) require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.GetContent().GetTitle()) require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSiAASNhZqNFlPtfqPJoxKsgMdzjWqLWdqKQuJqWPMvwPQWZUtVMOTMYKJbfdlZsjdsomuScvDmbDkgRualsxDvRJuCAmPOXitIbcyWsKGSdrEunFAOdmXnsuyFVgJqEjbklvmwrUlsxjRSfKZxGcpayDdgoFcnVSutxjRgOSFzPwidAjubMncNweqpbxhXGchpZUxuFDOtpnhNUycJICRYqsPhPSCjPTWZFLkstHWJxvdPEAyEIxXgLwbNOjrgzmaujiBABBIXvcXpLrbcEWNNQsbjvgJFgJkflpRohHUutvnaUqoopuKjTDaemDeSdqbnOzcfJpcTuAQtZoiLZOoAIlboF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ScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.GetContent().GetDescription()) @@ -159,7 +159,7 @@ func TestSimulateMsgDeposit(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, uint64(1), msg.ProposalId) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor.String()) + require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) require.Equal(t, "560969stake", msg.Amount.String()) require.Equal(t, "gov", msg.Route()) require.Equal(t, types.TypeMsgDeposit, msg.Type()) @@ -201,7 +201,7 @@ func TestSimulateMsgVote(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, uint64(1), msg.ProposalId) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Voter.String()) + require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Voter) require.Equal(t, types.OptionYes, msg.Option) require.Equal(t, "gov", msg.Route()) require.Equal(t, types.TypeMsgVote, msg.Type()) diff --git a/x/gov/types/deposit.go b/x/gov/types/deposit.go index c7e48f6967..e386088737 100644 --- a/x/gov/types/deposit.go +++ b/x/gov/types/deposit.go @@ -9,8 +9,9 @@ import ( ) // NewDeposit creates a new Deposit instance +//nolint:interfacer func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { - return Deposit{proposalID, depositor, amount} + return Deposit{proposalID, depositor.String(), amount} } func (d Deposit) String() string { @@ -28,7 +29,7 @@ func (d Deposits) Equal(other Deposits) bool { } for i, deposit := range d { - if !deposit.Equal(other[i]) { + if deposit.String() != other[i].String() { return false } } @@ -49,5 +50,5 @@ func (d Deposits) String() string { // Empty returns whether a deposit is empty. func (d Deposit) Empty() bool { - return d.Equal(Deposit{}) + return d.String() == Deposit{}.String() } diff --git a/x/gov/types/gov.pb.go b/x/gov/types/gov.pb.go index 8d7b9023f9..922186d01f 100644 --- a/x/gov/types/gov.pb.go +++ b/x/gov/types/gov.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -79,15 +78,20 @@ type ProposalStatus int32 const ( // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. StatusNil ProposalStatus = 0 - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. + // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + // period. StatusDepositPeriod ProposalStatus = 1 - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. + // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + // period. StatusVotingPeriod ProposalStatus = 2 - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. + // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + // passed. StatusPassed ProposalStatus = 3 - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. + // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + // been rejected. StatusRejected ProposalStatus = 4 - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. + // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + // failed. StatusFailed ProposalStatus = 5 ) @@ -156,11 +160,12 @@ func (m *TextProposal) XXX_DiscardUnknown() { var xxx_messageInfo_TextProposal proto.InternalMessageInfo -// Deposit defines an amount deposited by an account address to an active proposal. +// Deposit defines an amount deposited by an account address to an active +// proposal. type Deposit struct { - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` - Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *Deposit) Reset() { *m = Deposit{} } @@ -283,9 +288,9 @@ var xxx_messageInfo_TallyResult proto.InternalMessageInfo // Vote defines a vote on a governance proposal. // A Vote consists of a proposal ID, the voter, and the vote option. type Vote struct { - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` - Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` } func (m *Vote) Reset() { *m = Vote{} } @@ -324,7 +329,8 @@ var xxx_messageInfo_Vote proto.InternalMessageInfo type DepositParams struct { // Minimum deposit for a proposal to enter voting period. MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit,omitempty" yaml:"min_deposit"` - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. MaxDepositPeriod time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty" yaml:"max_deposit_period"` } @@ -400,11 +406,13 @@ var xxx_messageInfo_VotingParams proto.InternalMessageInfo // TallyParams defines the params for tallying votes on governance proposals. type TallyParams struct { - // Minimum percentage of total stake needed to vote for a result to be considered valid. + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. Quorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum,omitempty"` // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Threshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold,omitempty"` - // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold,omitempty" yaml:"veto_threshold"` } @@ -456,94 +464,94 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1389 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x4f, 0x6c, 0x1b, 0x45, - 0x17, 0xf7, 0x3a, 0xff, 0xea, 0xb1, 0x93, 0x6c, 0x27, 0x69, 0xe2, 0xec, 0xd7, 0x6f, 0x77, 0xbf, - 0xfd, 0x10, 0x8a, 0xaa, 0xd6, 0x69, 0x03, 0x02, 0xd1, 0x4a, 0x08, 0x3b, 0xde, 0xb6, 0x46, 0x95, - 0x6d, 0xad, 0xb7, 0xae, 0x5a, 0x0e, 0xab, 0xb5, 0x77, 0xea, 0x2c, 0x78, 0x77, 0x8c, 0x77, 0x1c, - 0x62, 0x71, 0xe1, 0x58, 0x19, 0x09, 0xf5, 0x88, 0x84, 0x2c, 0x21, 0x71, 0xe3, 0xcc, 0x99, 0x23, - 0x8a, 0x10, 0x87, 0x8a, 0x53, 0x05, 0x92, 0x4b, 0x53, 0x09, 0xa1, 0x1c, 0x73, 0xe0, 0xc0, 0x01, - 0xa1, 0xdd, 0x99, 0x8d, 0xd7, 0x76, 0x44, 0x6a, 0x38, 0x65, 0xf7, 0xcd, 0xfb, 0xfd, 0x7e, 0x6f, - 0x7e, 0x33, 0xef, 0x6d, 0x0c, 0x2e, 0xd6, 0xb1, 0xe7, 0x60, 0x6f, 0xab, 0x81, 0xf7, 0xb6, 0xf6, - 0xae, 0xd5, 0x10, 0x31, 0xaf, 0xf9, 0xcf, 0x99, 0x56, 0x1b, 0x13, 0x0c, 0x21, 0x5d, 0xcd, 0xf8, - 0x11, 0xb6, 0x2a, 0x88, 0x0c, 0x51, 0x33, 0x3d, 0x74, 0x02, 0xa9, 0x63, 0xdb, 0xa5, 0x18, 0x61, - 0xb5, 0x81, 0x1b, 0x38, 0x78, 0xdc, 0xf2, 0x9f, 0x58, 0x74, 0x83, 0xa2, 0x0c, 0xba, 0xc0, 0x68, - 0xe9, 0x92, 0xd4, 0xc0, 0xb8, 0x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 0x81, 0xef, 0xf5, 0xe5, 0x14, 0xc5, 0x94, 0x4d, 0xcf, 0x43, 0x16, 0xbc, - 0x0a, 0xd2, 0xe3, 0xd9, 0x9a, 0xfa, 0xae, 0xba, 0xa3, 0xab, 0x79, 0x7e, 0x56, 0x80, 0xbd, 0xbe, - 0xbc, 0x44, 0xf3, 0x35, 0xf4, 0x3e, 0xaa, 0x13, 0x74, 0x2a, 0xff, 0xcd, 0x6c, 0xe1, 0x8e, 0x9a, - 0xe7, 0xe7, 0xa2, 0xfc, 0x37, 0x4d, 0xbb, 0x89, 0x2c, 0x6a, 0x67, 0xae, 0x78, 0xf0, 0x5c, 0x8c, - 0x3d, 0x7d, 0x2e, 0xc6, 0x3e, 0x39, 0x14, 0x63, 0x07, 0x87, 0x22, 0xf7, 0xe4, 0x50, 0xe4, 0x7e, - 0x39, 0x14, 0xb9, 0xc7, 0x2f, 0xc4, 0xd8, 0x93, 0x17, 0x62, 0xec, 0xe9, 0x0b, 0x31, 0xf6, 0xe0, - 0xef, 0x07, 0xe2, 0x7e, 0xf0, 0x43, 0x2b, 0xb8, 0xcf, 0xb5, 0xf9, 0x60, 0x86, 0xbc, 0xf6, 0x57, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x64, 0xc1, 0x80, 0x83, 0x0d, 0x00, 0x00, + // 1377 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x5f, 0x6c, 0xdb, 0xd4, + 0x17, 0x8e, 0xd3, 0xbf, 0xb9, 0x49, 0x5b, 0xef, 0x36, 0x6b, 0x53, 0xff, 0xf6, 0xb3, 0x8d, 0x41, + 0xa8, 0x9a, 0xb6, 0x74, 0x2b, 0x08, 0x44, 0x27, 0x21, 0x92, 0xc6, 0x63, 0x41, 0x53, 0x12, 0x39, + 0x5e, 0xa6, 0x8d, 0x07, 0xcb, 0x49, 0xee, 0x52, 0x43, 0xec, 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, 0x44, 0xee, 0xd1, 0x4b, 0x31, 0xf2, 0xf4, 0xa5, 0x18, 0x79, + 0xf6, 0x52, 0x8c, 0xdc, 0xff, 0xe7, 0x85, 0x78, 0xe0, 0xff, 0x29, 0xe4, 0xf7, 0x73, 0x75, 0xde, + 0xdf, 0x21, 0x6f, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xef, 0x91, 0x01, 0x67, 0x25, 0x0d, 0x00, + 0x00, } func (this *TextProposal) Equal(that interface{}) bool { @@ -573,41 +581,6 @@ func (this *TextProposal) Equal(that interface{}) bool { } return true } -func (this *Deposit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Deposit) - if !ok { - that2, ok := that.(Deposit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ProposalId != that1.ProposalId { - return false - } - if !bytes.Equal(this.Depositor, that1.Depositor) { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - return true -} func (this *Proposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -694,36 +667,6 @@ func (this *TallyResult) Equal(that interface{}) bool { } return true } -func (this *Vote) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Vote) - if !ok { - that2, ok := that.(Vote) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ProposalId != that1.ProposalId { - return false - } - if !bytes.Equal(this.Voter, that1.Voter) { - return false - } - if this.Option != that1.Option { - return false - } - return true -} func (m *TextProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1482,7 +1425,7 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGov @@ -1492,25 +1435,23 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGov } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGov } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) - if m.Depositor == nil { - m.Depositor = []byte{} - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2137,7 +2078,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGov @@ -2147,25 +2088,23 @@ func (m *Vote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGov } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGov } if postIndex > l { return io.ErrUnexpectedEOF } - m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) - if m.Voter == nil { - m.Voter = []byte{} - } + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { diff --git a/x/gov/types/msgs.go b/x/gov/types/msgs.go index 1770f1d745..42c4ceafd1 100644 --- a/x/gov/types/msgs.go +++ b/x/gov/types/msgs.go @@ -42,10 +42,11 @@ type MsgSubmitProposalI interface { } // NewMsgSubmitProposal creates a new MsgSubmitProposal. +//nolint:interfacer func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ InitialDeposit: initialDeposit, - Proposer: proposer, + Proposer: proposer.String(), } err := m.SetContent(content) if err != nil { @@ -56,7 +57,10 @@ func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sd func (m *MsgSubmitProposal) GetInitialDeposit() sdk.Coins { return m.InitialDeposit } -func (m *MsgSubmitProposal) GetProposer() sdk.AccAddress { return m.Proposer } +func (m *MsgSubmitProposal) GetProposer() sdk.AccAddress { + proposer, _ := sdk.AccAddressFromBech32(m.Proposer) + return proposer +} func (m *MsgSubmitProposal) GetContent() Content { content, ok := m.Content.GetCachedValue().(Content) @@ -71,7 +75,7 @@ func (m *MsgSubmitProposal) SetInitialDeposit(coins sdk.Coins) { } func (m *MsgSubmitProposal) SetProposer(address sdk.AccAddress) { - m.Proposer = address + m.Proposer = address.String() } func (m *MsgSubmitProposal) SetContent(content Content) error { @@ -95,8 +99,8 @@ func (m MsgSubmitProposal) Type() string { return TypeMsgSubmitProposal } // ValidateBasic implements Msg func (m MsgSubmitProposal) ValidateBasic() error { - if m.Proposer.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Proposer.String()) + if m.Proposer == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Proposer) } if !m.InitialDeposit.IsValid() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, m.InitialDeposit.String()) @@ -127,7 +131,8 @@ func (m MsgSubmitProposal) GetSignBytes() []byte { // GetSigners implements Msg func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{m.Proposer} + proposer, _ := sdk.AccAddressFromBech32(m.Proposer) + return []sdk.AccAddress{proposer} } // String implements the Stringer interface @@ -143,8 +148,9 @@ 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, amount} + return &MsgDeposit{proposalID, depositor.String(), amount} } // Route implements Msg @@ -155,8 +161,8 @@ func (msg MsgDeposit) Type() string { return TypeMsgDeposit } // ValidateBasic implements Msg func (msg MsgDeposit) ValidateBasic() error { - if msg.Depositor.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Depositor.String()) + if msg.Depositor == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Depositor) } if !msg.Amount.IsValid() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) @@ -182,12 +188,14 @@ func (msg MsgDeposit) GetSignBytes() []byte { // GetSigners implements Msg func (msg MsgDeposit) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Depositor} + depositor, _ := sdk.AccAddressFromBech32(msg.Depositor) + return []sdk.AccAddress{depositor} } // 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, option} + return &MsgVote{proposalID, voter.String(), option} } // Route implements Msg @@ -198,8 +206,8 @@ func (msg MsgVote) Type() string { return TypeMsgVote } // ValidateBasic implements Msg func (msg MsgVote) ValidateBasic() error { - if msg.Voter.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Voter.String()) + if msg.Voter == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Voter) } if !ValidVoteOption(msg.Option) { return sdkerrors.Wrap(ErrInvalidVote, msg.Option.String()) @@ -222,5 +230,6 @@ func (msg MsgVote) GetSignBytes() []byte { // GetSigners implements Msg func (msg MsgVote) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Voter} + voter, _ := sdk.AccAddressFromBech32(msg.Voter) + return []sdk.AccAddress{voter} } diff --git a/x/gov/types/query.pb.go b/x/gov/types/query.pb.go index 779ce90883..190cd901b3 100644 --- a/x/gov/types/query.pb.go +++ b/x/gov/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( context "context" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -127,9 +126,9 @@ type QueryProposalsRequest struct { // proposal_status defines the status of the proposals. ProposalStatus ProposalStatus `protobuf:"varint,1,opt,name=proposal_status,json=proposalStatus,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"proposal_status,omitempty"` // voter defines the voter address for the proposals. - Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` // depositor defines the deposit addresses from the proposals. - Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"` + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -167,35 +166,8 @@ func (m *QueryProposalsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryProposalsRequest proto.InternalMessageInfo -func (m *QueryProposalsRequest) GetProposalStatus() ProposalStatus { - if m != nil { - return m.ProposalStatus - } - return StatusNil -} - -func (m *QueryProposalsRequest) GetVoter() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Voter - } - return nil -} - -func (m *QueryProposalsRequest) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Depositor - } - return nil -} - -func (m *QueryProposalsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC method. +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. type QueryProposalsResponse struct { Proposals []Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"` // pagination defines the pagination in the response. @@ -254,7 +226,7 @@ type QueryVoteRequest struct { // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // voter defines the oter address for the proposals. - Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` } func (m *QueryVoteRequest) Reset() { *m = QueryVoteRequest{} } @@ -290,20 +262,6 @@ func (m *QueryVoteRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryVoteRequest proto.InternalMessageInfo -func (m *QueryVoteRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -func (m *QueryVoteRequest) GetVoter() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Voter - } - return nil -} - // QueryVoteResponse is the response type for the Query/Vote RPC method. type QueryVoteResponse struct { // vote defined the queried vote. @@ -462,7 +420,8 @@ func (m *QueryVotesResponse) GetPagination() *query.PageResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { - // params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` } @@ -575,7 +534,7 @@ type QueryDepositRequest struct { // proposal_id defines the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` // depositor defines the deposit addresses from the proposals. - Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` } func (m *QueryDepositRequest) Reset() { *m = QueryDepositRequest{} } @@ -611,20 +570,6 @@ func (m *QueryDepositRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDepositRequest proto.InternalMessageInfo -func (m *QueryDepositRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -func (m *QueryDepositRequest) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Depositor - } - return nil -} - // QueryDepositResponse is the response type for the Query/Deposit RPC method. type QueryDepositResponse struct { // deposit defines the requested deposit. @@ -894,68 +839,68 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/query.proto", fileDescriptor_e35c0d133e91c0a2) } var fileDescriptor_e35c0d133e91c0a2 = []byte{ - // 975 bytes of a gzipped FileDescriptorProto + // 963 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x41, 0x6f, 0x1b, 0x55, - 0x10, 0xce, 0x73, 0x9c, 0x36, 0x9e, 0xa4, 0x01, 0x86, 0x02, 0x96, 0x29, 0x76, 0x58, 0xd1, 0xd6, - 0xa4, 0xc4, 0x4b, 0x92, 0x02, 0x2a, 0x05, 0xd4, 0x58, 0xa8, 0x29, 0xaa, 0x04, 0xc5, 0xad, 0x40, - 0xe2, 0x12, 0x6d, 0xe2, 0xd5, 0x62, 0xe1, 0xf8, 0x6d, 0xfd, 0x9e, 0x2d, 0xa2, 0x34, 0x42, 0xe2, - 0x82, 0x10, 0x17, 0x50, 0x11, 0x37, 0xc4, 0xa1, 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, 0xd5, 0x7f, 0xce, 0x89, 0xce, 0x67, 0xce, 0xe7, 0x2a, 0x47, 0x34, 0x32, 0x62, 0xf3, + 0x98, 0xfa, 0x6d, 0xb2, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x86, 0xe2, 0x1a, 0x4f, + 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2396,7 +2341,7 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2406,31 +2351,29 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) - if m.Voter == nil { - m.Voter = []byte{} - } + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2440,25 +2383,23 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) - if m.Depositor == nil { - m.Depositor = []byte{} - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -2695,7 +2636,7 @@ func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2705,25 +2646,23 @@ func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) - if m.Voter == nil { - m.Voter = []byte{} - } + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3355,7 +3294,7 @@ func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3365,25 +3304,23 @@ func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) - if m.Depositor == nil { - m.Depositor = []byte{} - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/gov/types/query.pb.gw.go b/x/gov/types/query.pb.gw.go index e9fc72f302..52814511b9 100644 --- a/x/gov/types/query.pb.gw.go +++ b/x/gov/types/query.pb.gw.go @@ -148,7 +148,7 @@ func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, clie return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") } - protoReq.Voter, err = runtime.Bytes(val) + protoReq.Voter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) @@ -186,7 +186,7 @@ func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") } - protoReq.Voter, err = runtime.Bytes(val) + protoReq.Voter, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) @@ -350,7 +350,7 @@ func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "depositor") } - protoReq.Depositor, err = runtime.Bytes(val) + protoReq.Depositor, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) @@ -388,7 +388,7 @@ func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "depositor") } - protoReq.Depositor, err = runtime.Bytes(val) + protoReq.Depositor, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) diff --git a/x/gov/types/tx.pb.go b/x/gov/types/tx.pb.go index 5c90c25f0d..a16cc62aa5 100644 --- a/x/gov/types/tx.pb.go +++ b/x/gov/types/tx.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -31,9 +30,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary // proposal Content. type MsgSubmitProposal struct { - Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit" yaml:"initial_deposit"` - Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"` + Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit" yaml:"initial_deposit"` + Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` } func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } @@ -70,9 +69,9 @@ var xxx_messageInfo_MsgSubmitProposal proto.InternalMessageInfo // MsgVote defines a message to cast a vote. type MsgVote struct { - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` - Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` - Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` } func (m *MsgVote) Reset() { *m = MsgVote{} } @@ -109,9 +108,9 @@ var xxx_messageInfo_MsgVote proto.InternalMessageInfo // MsgDeposit defines a message to submit a deposit to an existing proposal. type MsgDeposit struct { - ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` - Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } @@ -155,142 +154,41 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) } var fileDescriptor_3c053992595e3dce = []byte{ - // 518 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x8a, 0x13, 0x4d, - 0x14, 0xed, 0x4e, 0xe6, 0x4b, 0x3e, 0x2b, 0x32, 0x62, 0x31, 0x48, 0x66, 0x94, 0xea, 0x10, 0x10, - 0xb2, 0x49, 0xb5, 0x89, 0xe0, 0x62, 0x5c, 0x25, 0x23, 0x8a, 0x42, 0x1c, 0x89, 0xe0, 0xc2, 0x4d, - 0xe8, 0x9f, 0xb2, 0x2c, 0x4c, 0xfa, 0x36, 0xa9, 0x4a, 0x98, 0xec, 0x7c, 0x02, 0x99, 0x47, 0x70, - 0xed, 0x5a, 0x7c, 0x86, 0xe0, 0x6a, 0x96, 0x59, 0x45, 0x27, 0xd9, 0x88, 0xcb, 0x59, 0xba, 0x92, - 0xae, 0xaa, 0x1e, 0x07, 0x15, 0xff, 0x57, 0xdd, 0x75, 0xcf, 0x3d, 0xa7, 0xef, 0x39, 0x7d, 0x0b, - 0x5d, 0x8e, 0x40, 0x8e, 0x40, 0xfa, 0x1c, 0xa6, 0xfe, 0xb4, 0x15, 0x32, 0x15, 0xb4, 0x7c, 0x75, - 0x40, 0xd3, 0x31, 0x28, 0xc0, 0xd8, 0x80, 0x94, 0xc3, 0x94, 0x5a, 0x70, 0x87, 0x58, 0x42, 0x18, - 0x48, 0x76, 0xca, 0x88, 0x40, 0x24, 0x86, 0xb3, 0x73, 0xe5, 0x3b, 0x82, 0x19, 0xdf, 0xa0, 0xdb, - 0x06, 0x1d, 0xe8, 0x93, 0x6f, 0xe5, 0x0d, 0xb4, 0xc5, 0x81, 0x83, 0xa9, 0x67, 0x6f, 0x39, 0x81, - 0x03, 0xf0, 0x21, 0xf3, 0xf5, 0x29, 0x9c, 0x3c, 0xf1, 0x83, 0x64, 0x66, 0xa0, 0xfa, 0x9b, 0x02, - 0xba, 0xd8, 0x93, 0xfc, 0xe1, 0x24, 0x1c, 0x09, 0xf5, 0x60, 0x0c, 0x29, 0xc8, 0x60, 0x88,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6, 0x58, 0xef, 0xa3, 0xfc, 0x74, 0x37, 0xc6, 0x77, 0xd0, 0x7f, 0x53, - 0x50, 0x6c, 0x5c, 0x2d, 0xfc, 0xe9, 0x94, 0x86, 0x8f, 0x6f, 0xa0, 0x12, 0xa4, 0x4a, 0x40, 0xa2, - 0xfd, 0x6e, 0xb6, 0x09, 0xfd, 0x76, 0x09, 0x69, 0x36, 0xfa, 0xbe, 0xee, 0xea, 0xdb, 0x6e, 0x6b, - 0xed, 0xb0, 0x80, 0x50, 0x4f, 0xf2, 0x3c, 0xbe, 0x7f, 0xe5, 0x6e, 0x1f, 0x9d, 0xb3, 0xbf, 0x13, - 0xfe, 0xc2, 0xe1, 0x17, 0x0d, 0x1c, 0xa1, 0x52, 0x30, 0x82, 0x49, 0xa2, 0xaa, 0xc5, 0x9f, 0xad, - 0xd7, 0xb5, 0x6c, 0xbd, 0x7e, 0x6b, 0x89, 0xac, 0xb4, 0x89, 0xa4, 0x7b, 0x7f, 0x7e, 0x4c, 0x9c, - 0xc5, 0x31, 0x71, 0x9e, 0xaf, 0x88, 0x33, 0x5f, 0x11, 0xf7, 0x68, 0x45, 0xdc, 0xf7, 0x2b, 0xe2, - 0x1e, 0xae, 0x89, 0x73, 0xb4, 0x26, 0xce, 0x62, 0x4d, 0x9c, 0xc7, 0x3f, 0x56, 0x3f, 0xd0, 0xd7, - 0x59, 0x7f, 0x23, 0x2c, 0xe9, 0x7b, 0x74, 0xfd, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x71, - 0x86, 0xf1, 0x3a, 0x04, 0x00, 0x00, + // 498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x31, 0x8b, 0x13, 0x41, + 0x14, 0xde, 0x4d, 0xce, 0xc4, 0x9b, 0xc0, 0x89, 0x43, 0x90, 0x5c, 0x3c, 0x66, 0xc3, 0x82, 0x90, + 0xe6, 0x66, 0xbd, 0x08, 0x16, 0x67, 0x65, 0x4e, 0x04, 0x85, 0xa8, 0xac, 0x60, 0x61, 0x13, 0x76, + 0x37, 0xeb, 0x38, 0x98, 0x9d, 0xb7, 0x64, 0x26, 0xe1, 0xd2, 0x09, 0xf6, 0xe2, 0x4f, 0xb0, 0xb1, + 0xb1, 0xf6, 0x47, 0x04, 0xab, 0x2b, 0xaf, 0x31, 0x7a, 0x49, 0x23, 0x96, 0xf7, 0x0b, 0x64, 0x67, + 0x66, 0xcf, 0x43, 0x45, 0x11, 0xac, 0x92, 0xf7, 0xbe, 0xf9, 0xbe, 0xf9, 0xbe, 0xf7, 0x66, 0xd1, + 0xd5, 0x04, 0x64, 0x06, 0x32, 0x60, 0x30, 0x0b, 0x66, 0x7b, 0x71, 0xaa, 0xa2, 0xbd, 0x40, 0x1d, + 0xd2, 0x7c, 0x02, 0x0a, 0x30, 0x36, 0x20, 0x65, 0x30, 0xa3, 0x16, 0x6c, 0x13, 0x4b, 0x88, 0x23, + 0x99, 0x9e, 0x31, 0x12, 0xe0, 0xc2, 0x70, 0xda, 0x3b, 0xbf, 0x11, 0x2c, 0xf8, 0x06, 0xdd, 0x36, + 0xe8, 0x50, 0x57, 0x81, 0x95, 0x37, 0x50, 0x93, 0x01, 0x03, 0xd3, 0x2f, 0xfe, 0x95, 0x04, 0x06, + 0xc0, 0xc6, 0x69, 0xa0, 0xab, 0x78, 0xfa, 0x2c, 0x88, 0xc4, 0xdc, 0x40, 0xfe, 0xab, 0x0a, 0xba, + 0x3c, 0x90, 0xec, 0xf1, 0x34, 0xce, 0xb8, 0x7a, 0x34, 0x81, 0x1c, 0x64, 0x34, 0xc6, 0xb7, 0x50, + 0x3d, 0x01, 0xa1, 0x52, 0xa1, 0x5a, 0x6e, 0xc7, 0xed, 0x36, 0x7a, 0x4d, 0x6a, 0x24, 0x68, 0x29, + 0x41, 0x6f, 0x8b, 0x79, 0xbf, 0xf1, 0xf1, 0xc3, 0x6e, 0xfd, 0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b4, 0xf5, 0xf9, 0xc9, + 0x45, 0x68, 0x20, 0x59, 0x19, 0xec, 0x7f, 0x59, 0xdd, 0x41, 0x9b, 0x76, 0xd0, 0x50, 0xda, 0xfd, + 0xd1, 0xc0, 0x09, 0xaa, 0x45, 0x19, 0x4c, 0x85, 0x6a, 0x55, 0xff, 0xb6, 0xc5, 0xeb, 0xc5, 0x16, + 0xff, 0x69, 0x57, 0x56, 0xda, 0xe4, 0xeb, 0x3f, 0x58, 0x9c, 0x10, 0xe7, 0xf8, 0x84, 0x38, 0x2f, + 0x57, 0xc4, 0x59, 0xac, 0x88, 0x7b, 0xb4, 0x22, 0xee, 0x97, 0x15, 0x71, 0xdf, 0xac, 0x89, 0x73, + 0xb4, 0x26, 0xce, 0xf1, 0x9a, 0x38, 0x4f, 0xff, 0xac, 0x7e, 0xa8, 0xbf, 0x1a, 0x7d, 0x47, 0x5c, + 0xd3, 0xcf, 0xf5, 0xc6, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x32, 0xb4, 0xbb, 0xa1, 0x03, + 0x00, 0x00, } -func (this *MsgSubmitProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgSubmitProposal) - if !ok { - that2, ok := that.(MsgSubmitProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Content.Equal(that1.Content) { - return false - } - if len(this.InitialDeposit) != len(that1.InitialDeposit) { - return false - } - for i := range this.InitialDeposit { - if !this.InitialDeposit[i].Equal(&that1.InitialDeposit[i]) { - return false - } - } - if !bytes.Equal(this.Proposer, that1.Proposer) { - return false - } - return true -} -func (this *MsgVote) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgVote) - if !ok { - that2, ok := that.(MsgVote) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ProposalId != that1.ProposalId { - return false - } - if !bytes.Equal(this.Voter, that1.Voter) { - return false - } - if this.Option != that1.Option { - return false - } - return true -} -func (this *MsgDeposit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgDeposit) - if !ok { - that2, ok := that.(MsgDeposit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ProposalId != that1.ProposalId { - return false - } - if !bytes.Equal(this.Depositor, that1.Depositor) { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - return true -} func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -620,7 +518,7 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -630,25 +528,23 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) - if m.Proposer == nil { - m.Proposer = []byte{} - } + m.Proposer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -726,7 +622,7 @@ func (m *MsgVote) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -736,25 +632,23 @@ func (m *MsgVote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) - if m.Voter == nil { - m.Voter = []byte{} - } + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { @@ -851,7 +745,7 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -861,25 +755,23 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) - if m.Depositor == nil { - m.Depositor = []byte{} - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/gov/types/vote.go b/x/gov/types/vote.go index 55d2100438..363887a289 100644 --- a/x/gov/types/vote.go +++ b/x/gov/types/vote.go @@ -9,8 +9,9 @@ import ( ) // NewVote creates a new Vote instance +//nolint:interfacer func NewVote(proposalID uint64, voter sdk.AccAddress, option VoteOption) Vote { - return Vote{proposalID, voter, option} + return Vote{proposalID, voter.String(), option} } func (v Vote) String() string { @@ -28,7 +29,7 @@ func (v Votes) Equal(other Votes) bool { } for i, vote := range v { - if !vote.Equal(other[i]) { + if vote.String() != other[i].String() { return false } } @@ -49,7 +50,7 @@ func (v Votes) String() string { // Empty returns whether a vote is empty. func (v Vote) Empty() bool { - return v.Equal(Vote{}) + return v.String() == Vote{}.String() } // VoteOptionFromString returns a VoteOption from a string. It returns an error diff --git a/x/ibc-transfer/handler.go b/x/ibc-transfer/handler.go index 9c4a6807ab..ec34ce6416 100644 --- a/x/ibc-transfer/handler.go +++ b/x/ibc-transfer/handler.go @@ -23,8 +23,12 @@ func NewHandler(k keeper.Keeper) sdk.Handler { // See createOutgoingPacket in spec:https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#packet-relay func handleMsgTransfer(ctx sdk.Context, k keeper.Keeper, msg *types.MsgTransfer) (*sdk.Result, error) { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } if err := k.SendTransfer( - ctx, msg.SourcePort, msg.SourceChannel, msg.Token, msg.Sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp, + ctx, msg.SourcePort, msg.SourceChannel, msg.Token, sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp, ); err != nil { return nil, err } @@ -34,7 +38,7 @@ func handleMsgTransfer(ctx sdk.Context, k keeper.Keeper, msg *types.MsgTransfer) ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeTransfer, - sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver), ), sdk.NewEvent( diff --git a/x/ibc-transfer/types/msgs.go b/x/ibc-transfer/types/msgs.go index f4ecb8da3d..a75a214dd5 100644 --- a/x/ibc-transfer/types/msgs.go +++ b/x/ibc-transfer/types/msgs.go @@ -13,6 +13,7 @@ const ( ) // NewMsgTransfer creates a new MsgTransfer instance +//nolint:interfacer func NewMsgTransfer( sourcePort, sourceChannel string, token sdk.Coin, sender sdk.AccAddress, receiver string, @@ -22,7 +23,7 @@ func NewMsgTransfer( SourcePort: sourcePort, SourceChannel: sourceChannel, Token: token, - Sender: sender, + Sender: sender.String(), Receiver: receiver, TimeoutHeight: timeoutHeight, TimeoutTimestamp: timeoutTimestamp, @@ -54,7 +55,7 @@ func (msg MsgTransfer) ValidateBasic() error { if !msg.Token.IsPositive() { return sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, msg.Token.String()) } - if msg.Sender.Empty() { + if msg.Sender == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing sender address") } if msg.Receiver == "" { @@ -70,5 +71,9 @@ func (msg MsgTransfer) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgTransfer) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Sender} + valAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{valAddr} } diff --git a/x/ibc-transfer/types/msgs_test.go b/x/ibc-transfer/types/msgs_test.go index 2cb61e509d..972f36a640 100644 --- a/x/ibc-transfer/types/msgs_test.go +++ b/x/ibc-transfer/types/msgs_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" ) @@ -24,7 +25,7 @@ const ( ) var ( - addr1 = sdk.AccAddress("testaddr1") + addr1 = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) addr2 = sdk.AccAddress("testaddr2").String() emptyAddr sdk.AccAddress @@ -89,7 +90,7 @@ func TestMsgTransferGetSignBytes(t *testing.T) { msg := NewMsgTransfer(validPort, validChannel, coin, addr1, addr2, clienttypes.NewHeight(0, 110), 10) res := msg.GetSignBytes() - expected := `{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"cosmos1w3jhxarpv3j8yvg4ufs4x","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"110","epoch_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}` + expected := fmt.Sprintf(`{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"%s","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"110","epoch_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}`, addr1.String()) require.Equal(t, expected, string(res)) } @@ -98,6 +99,5 @@ func TestMsgTransferGetSigners(t *testing.T) { msg := NewMsgTransfer(validPort, validChannel, coin, addr1, addr2, timeoutHeight, 0) res := msg.GetSigners() - expected := "[746573746164647231]" - require.Equal(t, expected, fmt.Sprintf("%v", res)) + require.Equal(t, []sdk.AccAddress{addr1}, res) } diff --git a/x/ibc-transfer/types/query.pb.go b/x/ibc-transfer/types/query.pb.go index 7954163702..b517c4d75d 100644 --- a/x/ibc-transfer/types/query.pb.go +++ b/x/ibc-transfer/types/query.pb.go @@ -30,7 +30,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC method +// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +// method type QueryDenomTraceRequest struct { // hash (in hex format) of the denomination trace information. Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` @@ -76,7 +77,8 @@ func (m *QueryDenomTraceRequest) GetHash() string { return "" } -// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. +// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +// method. type QueryDenomTraceResponse struct { // denom_trace returns the requested denomination trace information. DenomTrace *DenomTrace `protobuf:"bytes,1,opt,name=denom_trace,json=denomTrace,proto3" json:"denom_trace,omitempty"` @@ -122,7 +124,8 @@ func (m *QueryDenomTraceResponse) GetDenomTrace() *DenomTrace { return nil } -// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC method +// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +// method type QueryDenomTracesRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -168,7 +171,8 @@ func (m *QueryDenomTracesRequest) GetPagination() *query.PageRequest { return nil } -// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. +// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +// method. type QueryDenomTracesResponse struct { // denom_traces returns all denominations trace information. DenomTraces Traces `protobuf:"bytes,1,rep,name=denom_traces,json=denomTraces,proto3,castrepeated=Traces" json:"denom_traces"` diff --git a/x/ibc-transfer/types/transfer.pb.go b/x/ibc-transfer/types/transfer.pb.go index 0a38b92f30..b5769b971a 100644 --- a/x/ibc-transfer/types/transfer.pb.go +++ b/x/ibc-transfer/types/transfer.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" _ "github.com/gogo/protobuf/gogoproto" @@ -37,7 +36,7 @@ type MsgTransfer struct { // the tokens to be transferred Token types.Coin `protobuf:"bytes,3,opt,name=token,proto3" json:"token"` // the sender address - Sender github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"` + Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` // the recipient address on the destination chain Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` // Timeout height relative to the current block height. @@ -81,55 +80,6 @@ func (m *MsgTransfer) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTransfer proto.InternalMessageInfo -func (m *MsgTransfer) GetSourcePort() string { - if m != nil { - return m.SourcePort - } - return "" -} - -func (m *MsgTransfer) GetSourceChannel() string { - if m != nil { - return m.SourceChannel - } - return "" -} - -func (m *MsgTransfer) GetToken() types.Coin { - if m != nil { - return m.Token - } - return types.Coin{} -} - -func (m *MsgTransfer) GetSender() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Sender - } - return nil -} - -func (m *MsgTransfer) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *MsgTransfer) GetTimeoutHeight() types1.Height { - if m != nil { - return m.TimeoutHeight - } - return types1.Height{} -} - -func (m *MsgTransfer) GetTimeoutTimestamp() uint64 { - if m != nil { - return m.TimeoutTimestamp - } - return 0 -} - // FungibleTokenPacketData defines a struct for the packet payload // See FungibleTokenPacketData spec: // https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures @@ -332,44 +282,43 @@ func init() { func init() { proto.RegisterFile("ibc/transfer/transfer.proto", fileDescriptor_08134a70fd29e656) } var fileDescriptor_08134a70fd29e656 = []byte{ - // 587 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4d, 0x4f, 0x13, 0x41, - 0x18, 0xee, 0x42, 0xa9, 0x30, 0x05, 0xd4, 0x11, 0x61, 0xa9, 0xb2, 0xdb, 0xec, 0xa9, 0x17, 0x76, - 0x53, 0x8d, 0x31, 0xe1, 0xa2, 0x2c, 0x68, 0x24, 0xc6, 0x84, 0x4c, 0x7a, 0x30, 0x5e, 0x9a, 0xd9, - 0xe9, 0xb8, 0xdd, 0xd0, 0x9d, 0x69, 0x66, 0xa6, 0x44, 0xe2, 0x2f, 0xf0, 0xe6, 0xcf, 0x22, 0xf1, - 0xc2, 0xd1, 0xd3, 0xc6, 0xd0, 0x7f, 0xd0, 0xa3, 0x27, 0x33, 0x1f,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xa2, 0x57, 0x00, 0x1c, 0xeb, 0xa0, 0x3d, 0x81, 0x09, 0x85, 0x10, - 0xd4, 0xc7, 0x58, 0x0d, 0xdd, 0x73, 0xe6, 0x0e, 0xf7, 0x00, 0xd0, 0xc3, 0xec, 0xdb, 0x44, 0xcc, - 0x7e, 0xa0, 0x35, 0x8d, 0x18, 0x5d, 0xf4, 0xcd, 0x03, 0x8d, 0x53, 0x2c, 0x70, 0x29, 0xe1, 0x01, - 0x58, 0xd7, 0x2f, 0xf6, 0x29, 0xc3, 0xd9, 0x88, 0x0e, 0x4c, 0x94, 0xd5, 0x74, 0x67, 0x56, 0x85, - 0x8f, 0xdc, 0x2e, 0xdd, 0x61, 0x23, 0xd4, 0xd4, 0xe6, 0x1b, 0x6b, 0xc1, 0x23, 0x70, 0xdf, 0xe5, - 0x34, 0x97, 0x2f, 0x19, 0x79, 0x6b, 0x56, 0x85, 0xdb, 0x56, 0xfe, 0x97, 0x43, 0x84, 0x36, 0x1d, - 0xe2, 0x82, 0xa4, 0xef, 0x2f, 0xaf, 0x03, 0xef, 0xea, 0x3a, 0xf0, 0x7e, 0x5d, 0x07, 0xde, 0xf7, - 0x69, 0x50, 0xbb, 0x9a, 0x06, 0xb5, 0x9f, 0xd3, 0xa0, 0xf6, 0xa9, 0xfb, 0xdf, 0xdd, 0xfa, 0x92, - 0x14, 0x19, 0xd9, 0xbf, 0xfd, 0xca, 0x7a, 0xd5, 0xb2, 0x86, 0xf9, 0x6b, 0xcf, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xf9, 0x9b, 0xd6, 0xb8, 0xe7, 0x03, 0x00, 0x00, + // 574 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xb5, 0x5b, 0x37, 0x5f, 0x3b, 0x69, 0xfb, 0xc1, 0x50, 0x12, 0x37, 0x50,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19, 0x9b, 0x51, 0x2e, 0x97, 0x60, 0x45, + 0x1a, 0x6d, 0xcc, 0x6a, 0xf7, 0x9f, 0xb3, 0xb2, 0xb6, 0x67, 0xe5, 0xbd, 0x00, 0xe0, 0x42, 0x24, + 0xed, 0xe7, 0x08, 0x13, 0x08, 0x81, 0x35, 0x45, 0x7c, 0xa4, 0xcb, 0xc9, 0x3b, 0x3c, 0x03, 0x40, + 0xec, 0x68, 0xa0, 0x3e, 0x44, 0xae, 0x3d, 0x3a, 0x10, 0x8c, 0xf4, 0x79, 0xdf, 0x4c, 0x50, 0xe9, + 0xa1, 0x1c, 0x65, 0x05, 0xec, 0x80, 0x43, 0x51, 0x71, 0x40, 0x28, 0x8a, 0x27, 0x64, 0x28, 0xb3, + 0xec, 0x87, 0xf5, 0x65, 0xe9, 0x3e, 0xd0, 0xbf, 0xc8, 0x86, 0xea, 0x45, 0x55, 0x01, 0x5f, 0x29, + 0x04, 0xbb, 0xe0, 0x7f, 0xfd, 0x4d, 0x6b, 0xfb, 0x8e, 0xb4, 0x37, 0x96, 0xa5, 0x5b, 0x53, 0xf6, + 0xbf, 0x02, 0xbc, 0xe8, 0x58, 0x33, 0x3a, 0x49, 0xf8, 0xee, 0x66, 0xee, 0x98, 0xb7, 0x73, 0xc7, + 0xfc, 0x35, 0x77, 0xcc, 0xef, 0x0b, 0xc7, 0xb8, 0x5d, 0x38, 0xc6, 0xcf, 0x85, 0x63, 0x7c, 0x6c, + 0x27, 0x29, 0x1f, 0xcd, 0x62, 0x1f, 0xb3, 0x2c, 0xd0, 0x8f, 0x49, 0x1d, 0xe7, 0xc5, 0x70, 0x1c, + 0x7c, 0x0e, 0xd2, 0x18, 0x9f, 0xdf, 0xbd, 0xd0, 0xab, 0x29, 0x29, 0xe2, 0x8a, 0x7c, 0x42, 0x4f, + 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x68, 0xe6, 0x1f, 0xf1, 0xbe, 0x03, 0x00, 0x00, } func (m *MsgTransfer) Marshal() (dAtA []byte, err error) { @@ -812,7 +761,7 @@ func (m *MsgTransfer) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTransfer @@ -822,25 +771,23 @@ func (m *MsgTransfer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTransfer } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTransfer } if postIndex > l { return io.ErrUnexpectedEOF } - m.Sender = append(m.Sender[:0], dAtA[iNdEx:postIndex]...) - if m.Sender == nil { - m.Sender = []byte{} - } + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { diff --git a/x/ibc/02-client/types/client.pb.go b/x/ibc/02-client/types/client.pb.go index ae745d8e33..8744668c4c 100644 --- a/x/ibc/02-client/types/client.pb.go +++ b/x/ibc/02-client/types/client.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -249,7 +248,7 @@ type MsgCreateClient struct { // height. ConsensusState *types.Any `protobuf:"bytes,3,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml:"consensus_state"` // signer address - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgCreateClient) Reset() { *m = MsgCreateClient{} } @@ -285,34 +284,6 @@ func (m *MsgCreateClient) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateClient proto.InternalMessageInfo -func (m *MsgCreateClient) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgCreateClient) GetClientState() *types.Any { - if m != nil { - return m.ClientState - } - return nil -} - -func (m *MsgCreateClient) GetConsensusState() *types.Any { - if m != nil { - return m.ConsensusState - } - return nil -} - -func (m *MsgCreateClient) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgUpdateClient defines an sdk.Msg to update a IBC client state using // the given header. type MsgUpdateClient struct { @@ -321,7 +292,7 @@ type MsgUpdateClient struct { // header to update the light client Header *types.Any `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` // signer address - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgUpdateClient) Reset() { *m = MsgUpdateClient{} } @@ -357,27 +328,6 @@ func (m *MsgUpdateClient) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateClient proto.InternalMessageInfo -func (m *MsgUpdateClient) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgUpdateClient) GetHeader() *types.Any { - if m != nil { - return m.Header - } - return nil -} - -func (m *MsgUpdateClient) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for // light client misbehaviour. type MsgSubmitMisbehaviour struct { @@ -386,7 +336,7 @@ type MsgSubmitMisbehaviour struct { // misbehaviour used for freezing the light client Misbehaviour *types.Any `protobuf:"bytes,2,opt,name=misbehaviour,proto3" json:"misbehaviour,omitempty"` // signer address - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgSubmitMisbehaviour) Reset() { *m = MsgSubmitMisbehaviour{} } @@ -422,27 +372,6 @@ func (m *MsgSubmitMisbehaviour) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitMisbehaviour proto.InternalMessageInfo -func (m *MsgSubmitMisbehaviour) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgSubmitMisbehaviour) GetMisbehaviour() *types.Any { - if m != nil { - return m.Misbehaviour - } - return nil -} - -func (m *MsgSubmitMisbehaviour) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // Height is a monotonically increasing data type // that can be compared against another Height for the purposes of updating and // freezing clients @@ -505,48 +434,47 @@ func init() { func init() { proto.RegisterFile("ibc/client/client.proto", fileDescriptor_226f80e576f20abd) } var fileDescriptor_226f80e576f20abd = []byte{ - // 649 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xce, 0x25, 0xf9, 0x45, 0xed, 0x25, 0xfa, 0xb5, 0x32, 0x09, 0x4d, 0x3b, 0xc4, 0xd1, 0x89, - 0xa1, 0x03, 0xb5, 0xdb, 0xb0, 0xa0, 0x6c, 0x4d, 0x17, 0x2a, 0x51, 0x54, 0xb9, 0x42, 0xfc, 0x59, - 0x2a, 0xfb, 0x7c, 0x75, 0x4e, 0xc4, 0x3e, 0xcb, 0x77, 0x46, 0xe4, 0x1b, 0x20, 0x26, 0x46, 0x06, - 0x86, 0x4e, 0x7c, 0x03, 0xb6, 0xb2, 0x77, 0xa3,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 0x8d, 0x99, 0xfe, 0xab, 0xd6, - 0x7b, 0x6b, 0xd9, 0xef, 0x4a, 0xaa, 0x75, 0x6a, 0xd2, 0xc1, 0x07, 0x3f, 0x03, 0x00, 0x00, 0xff, - 0xff, 0xea, 0x4c, 0x79, 0x2a, 0xc9, 0x06, 0x00, 0x00, + // 632 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xbd, 0x6e, 0xd4, 0x40, + 0x10, 0xbe, 0xbd, 0x3b, 0x4e, 0xb9, 0x75, 0x44, 0x22, 0x73, 0x97, 0x5c, 0x52, 0xd8, 0xa7, 0x15, + 0x45, 0x0a, 0x62, 0x87, 0xa3, 0x41, 0xd7, 0x71, 0x69, 0x88, 0x44, 0x50, 0xe4, 0x08, 0xf1, 0xd3, + 0x44, 0xfe, 0xd9, 0xd8, 0x2b, 0xce, 0x5e, 0xcb, 0xbb, 0x46, 0xdc, 0x1b, 0x20, 0x2a, 0x24, 0x28, + 0x28, 0x28, 0x52, 0xe5, 0x0d, 0xe8, 0x78, 0x80, 0x94, 0x29, 0xa9, 0x2c, 0x94, 0x34, 0xd4, 0xf7, + 0x04, 0xc8, 0xbb, 0x0e, 0x67, 0xe7, 0x8f, 0x28, 0x15, 0x95, 0x77, 0x66, 0x67, 0xbe, 0xf9, 0xe6, + 0x9b, 0x91, 0x17, 0x2e, 0x13, 0xc7, 0x35, 0xdd, 0x31, 0xc1, 0x11, 0x2f, 0x3e, 0x46, 0x9c, 0x50, + 0x4e, 0x55, 0x48, 0x1c, 0xd7, 0x90, 0x9e, 0xd5, 0x8e, 0x4f, 0x7d, 0x2a, 0xdc, 0x66, 0x7e, 0x92, + 0x11, 0xab, 0x2b, 0x3e, 0xa5, 0xfe, 0x18, 0x9b, 0xc2, 0x72, 0xd2, 0x7d, 0xd3, 0x8e, 0x26, 0xf2, + 0x0a, 0x7d, 0x03, 0xb0, 0xbb,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08, 0xe7, 0x71, 0x4c, 0xdd, 0x60, 0x2f, 0x4a, 0x43, 0x07, 0x27, 0x82, 0x5c, + 0xb3, 0xbc, 0x03, 0xe5, 0x5b, 0x64, 0x29, 0xc2, 0x7c, 0x2e, 0xac, 0x59, 0x6e, 0xf1, 0x97, 0xaa, + 0x5f, 0x9e, 0x2b, 0x6f, 0xcf, 0x72, 0x65, 0x5d, 0x49, 0xe6, 0xeb, 0x81, 0x5e, 0x1b, 0x3d, 0x3b, + 0x3a, 0xd1, 0xc0, 0xf1, 0x89, 0x06, 0x7e, 0x9d, 0x68, 0xe0, 0xd3, 0xa9, 0x56, 0x3b, 0x3e, 0xd5, + 0x6a, 0x3f, 0x4f, 0xb5, 0xda, 0x9b, 0x81, 0x4f, 0x78, 0x90, 0x3a, 0x86, 0x4b, 0x43, 0xd3, 0xa5, + 0x2c, 0xa4, 0xac, 0xf8, 0xac, 0x33, 0xef, 0xad, 0xf9, 0xde, 0xcc, 0x1f, 0x8c, 0x8d, 0xc1, 0x7a, + 0xf1, 0x66, 0xf0, 0x49, 0x8c, 0x99, 0xd3, 0x12, 0xc2, 0x3c, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, + 0xe9, 0x68, 0x4f, 0xc2, 0x4e, 0x06, 0x00, 0x00, } func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) { @@ -1787,7 +1715,7 @@ func (m *MsgCreateClient) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowClient @@ -1797,25 +1725,23 @@ func (m *MsgCreateClient) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthClient } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthClient } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1942,7 +1868,7 @@ func (m *MsgUpdateClient) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowClient @@ -1952,25 +1878,23 @@ func (m *MsgUpdateClient) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthClient } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthClient } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2097,7 +2021,7 @@ func (m *MsgSubmitMisbehaviour) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowClient @@ -2107,25 +2031,23 @@ func (m *MsgSubmitMisbehaviour) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthClient } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthClient } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/ibc/02-client/types/msgs.go b/x/ibc/02-client/types/msgs.go index cee20e30ba..46c28289c5 100644 --- a/x/ibc/02-client/types/msgs.go +++ b/x/ibc/02-client/types/msgs.go @@ -26,6 +26,7 @@ var ( ) // NewMsgCreateClient creates a new MsgCreateClient instance +//nolint:interfacer func NewMsgCreateClient( id string, clientState exported.ClientState, consensusState exported.ConsensusState, signer sdk.AccAddress, ) (*MsgCreateClient, error) { @@ -44,7 +45,7 @@ func NewMsgCreateClient( ClientId: id, ClientState: anyClientState, ConsensusState: anyConsensusState, - Signer: signer, + Signer: signer.String(), }, nil } @@ -60,7 +61,7 @@ func (msg MsgCreateClient) Type() string { // ValidateBasic implements sdk.Msg func (msg MsgCreateClient) ValidateBasic() error { - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") } clientState, err := UnpackClientState(msg.ClientState) @@ -90,7 +91,11 @@ func (msg MsgCreateClient) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgCreateClient) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -111,6 +116,7 @@ func (msg MsgCreateClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err } // NewMsgUpdateClient creates a new MsgUpdateClient instance +//nolint:interfacer func NewMsgUpdateClient(id string, header exported.Header, signer sdk.AccAddress) (*MsgUpdateClient, error) { anyHeader, err := PackHeader(header) if err != nil { @@ -120,7 +126,7 @@ func NewMsgUpdateClient(id string, header exported.Header, signer sdk.AccAddress return &MsgUpdateClient{ ClientId: id, Header: anyHeader, - Signer: signer, + Signer: signer.String(), }, nil } @@ -136,7 +142,7 @@ func (msg MsgUpdateClient) Type() string { // ValidateBasic implements sdk.Msg func (msg MsgUpdateClient) ValidateBasic() error { - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") } header, err := UnpackHeader(msg.Header) @@ -159,7 +165,11 @@ func (msg MsgUpdateClient) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgUpdateClient) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces @@ -174,6 +184,7 @@ func (msg MsgUpdateClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err } // NewMsgSubmitMisbehaviour creates a new MsgSubmitMisbehaviour instance. +//nolint:interfacer func NewMsgSubmitMisbehaviour(clientID string, misbehaviour exported.Misbehaviour, signer sdk.AccAddress) (*MsgSubmitMisbehaviour, error) { anyMisbehaviour, err := PackMisbehaviour(misbehaviour) if err != nil { @@ -183,7 +194,7 @@ func NewMsgSubmitMisbehaviour(clientID string, misbehaviour exported.Misbehaviou return &MsgSubmitMisbehaviour{ ClientId: clientID, Misbehaviour: anyMisbehaviour, - Signer: signer, + Signer: signer.String(), }, nil } @@ -197,7 +208,7 @@ func (msg MsgSubmitMisbehaviour) Type() string { // ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitMisbehaviour. func (msg MsgSubmitMisbehaviour) ValidateBasic() error { - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") } misbehaviour, err := UnpackMisbehaviour(msg.Misbehaviour) @@ -226,7 +237,11 @@ func (msg MsgSubmitMisbehaviour) GetSignBytes() []byte { // GetSigners returns the single expected signer for a MsgSubmitMisbehaviour. func (msg MsgSubmitMisbehaviour) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces diff --git a/x/ibc/02-client/types/msgs_test.go b/x/ibc/02-client/types/msgs_test.go index 00189dfe43..6aec4ea6d5 100644 --- a/x/ibc/02-client/types/msgs_test.go +++ b/x/ibc/02-client/types/msgs_test.go @@ -142,7 +142,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "invalid signer", func() { - msg.Signer = nil + msg.Signer = "" }, false, }, @@ -291,7 +291,7 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { { "invalid signer", func() { - msg.Signer = nil + msg.Signer = "" }, false, }, @@ -441,7 +441,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { { "invalid signer", func() { - msg.Signer = nil + msg.Signer = "" }, false, }, diff --git a/x/ibc/02-client/types/query.pb.go b/x/ibc/02-client/types/query.pb.go index 50d6231a46..6cb01a452f 100644 --- a/x/ibc/02-client/types/query.pb.go +++ b/x/ibc/02-client/types/query.pb.go @@ -256,8 +256,9 @@ func (m *QueryClientStatesResponse) GetPagination() *query.PageResponse { return nil } -// QueryConsensusStateRequest is the request type for the Query/ConsensusState RPC method. Besides -// the consensus state, it includes a proof and the height from which the proof was retrieved. +// QueryConsensusStateRequest is the request type for the Query/ConsensusState +// RPC method. Besides the consensus state, it includes a proof and the height +// from which the proof was retrieved. type QueryConsensusStateRequest struct { // client identifier ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` @@ -265,7 +266,8 @@ type QueryConsensusStateRequest struct { EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` // consensus state epoch height EpochHeight uint64 `protobuf:"varint,3,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"` - // latest_height overrrides the height field and queries the latest stored ConsensusState + // latest_height overrrides the height field and queries the latest stored + // ConsensusState LatestHeight bool `protobuf:"varint,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"` } @@ -330,7 +332,8 @@ func (m *QueryConsensusStateRequest) GetLatestHeight() bool { return false } -// QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method +// QueryConsensusStateResponse is the response type for the Query/ConsensusState +// RPC method type QueryConsensusStateResponse struct { // consensus state associated with the client identifier at the given height ConsensusState *types.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` @@ -403,7 +406,8 @@ func (m *QueryConsensusStateResponse) GetProofHeight() Height { return Height{} } -// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates RPC method. +// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +// RPC method. type QueryConsensusStatesRequest struct { // client identifier ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` @@ -458,7 +462,8 @@ func (m *QueryConsensusStatesRequest) GetPagination() *query.PageRequest { return nil } -// QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method +// QueryConsensusStatesResponse is the response type for the +// Query/ConsensusStates RPC method type QueryConsensusStatesResponse struct { // consensus states associated with the identifier ConsensusStates []ConsensusStateWithHeight `protobuf:"bytes,1,rep,name=consensus_states,json=consensusStates,proto3" json:"consensus_states"` @@ -593,9 +598,11 @@ type QueryClient interface { ClientState(ctx context.Context, in *QueryClientStateRequest, opts ...grpc.CallOption) (*QueryClientStateResponse, error) // ClientStates queries all the IBC light clients of a chain. ClientStates(ctx context.Context, in *QueryClientStatesRequest, opts ...grpc.CallOption) (*QueryClientStatesResponse, error) - // ConsensusState queries a consensus state associated with a client state at a given height. + // ConsensusState queries a consensus state associated with a client state at + // a given height. ConsensusState(ctx context.Context, in *QueryConsensusStateRequest, opts ...grpc.CallOption) (*QueryConsensusStateResponse, error) - // ConsensusStates queries all the consensus state associated with a given client. + // ConsensusStates queries all the consensus state associated with a given + // client. ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) } @@ -649,9 +656,11 @@ type QueryServer interface { ClientState(context.Context, *QueryClientStateRequest) (*QueryClientStateResponse, error) // ClientStates queries all the IBC light clients of a chain. ClientStates(context.Context, *QueryClientStatesRequest) (*QueryClientStatesResponse, error) - // ConsensusState queries a consensus state associated with a client state at a given height. + // ConsensusState queries a consensus state associated with a client state at + // a given height. ConsensusState(context.Context, *QueryConsensusStateRequest) (*QueryConsensusStateResponse, error) - // ConsensusStates queries all the consensus state associated with a given client. + // ConsensusStates queries all the consensus state associated with a given + // client. ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) } diff --git a/x/ibc/03-connection/types/connection.pb.go b/x/ibc/03-connection/types/connection.pb.go index 850dbce496..700cbfcf52 100644 --- a/x/ibc/03-connection/types/connection.pb.go +++ b/x/ibc/03-connection/types/connection.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" 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/x/ibc/02-client/types" types2 "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types" _ "github.com/gogo/protobuf/gogoproto" @@ -68,10 +67,10 @@ func (State) EnumDescriptor() ([]byte, []int) { // MsgConnectionOpenInit defines the msg sent by an account on Chain A to // initialize a connection with Chain B. type MsgConnectionOpenInit struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenInit) Reset() { *m = MsgConnectionOpenInit{} } @@ -107,34 +106,6 @@ func (m *MsgConnectionOpenInit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenInit proto.InternalMessageInfo -func (m *MsgConnectionOpenInit) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgConnectionOpenInit) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *MsgConnectionOpenInit) GetCounterparty() Counterparty { - if m != nil { - return m.Counterparty - } - return Counterparty{} -} - -func (m *MsgConnectionOpenInit) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // connection on Chain B. type MsgConnectionOpenTry struct { @@ -150,9 +121,9 @@ type MsgConnectionOpenTry struct { // proof of client state included in message ProofClient []byte `protobuf:"bytes,8,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,9,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight types1.Height `protobuf:"bytes,10,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,11,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,9,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight types1.Height `protobuf:"bytes,10,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` + Signer string `protobuf:"bytes,11,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenTry) Reset() { *m = MsgConnectionOpenTry{} } @@ -188,83 +159,6 @@ func (m *MsgConnectionOpenTry) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenTry proto.InternalMessageInfo -func (m *MsgConnectionOpenTry) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgConnectionOpenTry) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *MsgConnectionOpenTry) GetClientState() *types.Any { - if m != nil { - return m.ClientState - } - return nil -} - -func (m *MsgConnectionOpenTry) GetCounterparty() Counterparty { - if m != nil { - return m.Counterparty - } - return Counterparty{} -} - -func (m *MsgConnectionOpenTry) GetCounterpartyVersions() []string { - if m != nil { - return m.CounterpartyVersions - } - return nil -} - -func (m *MsgConnectionOpenTry) GetProofHeight() types1.Height { - if m != nil { - return m.ProofHeight - } - return types1.Height{} -} - -func (m *MsgConnectionOpenTry) GetProofInit() []byte { - if m != nil { - return m.ProofInit - } - return nil -} - -func (m *MsgConnectionOpenTry) GetProofClient() []byte { - if m != nil { - return m.ProofClient - } - return nil -} - -func (m *MsgConnectionOpenTry) GetProofConsensus() []byte { - if m != nil { - return m.ProofConsensus - } - return nil -} - -func (m *MsgConnectionOpenTry) GetConsensusHeight() types1.Height { - if m != nil { - return m.ConsensusHeight - } - return types1.Height{} -} - -func (m *MsgConnectionOpenTry) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. type MsgConnectionOpenAck struct { @@ -278,9 +172,9 @@ type MsgConnectionOpenAck struct { // proof of client state included in message ProofClient []byte `protobuf:"bytes,6,opt,name=proof_client,json=proofClient,proto3" json:"proof_client,omitempty" yaml:"proof_client"` // proof of client consensus state - ProofConsensus []byte `protobuf:"bytes,7,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` - ConsensusHeight types1.Height `protobuf:"bytes,8,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,9,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + ProofConsensus []byte `protobuf:"bytes,7,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus,omitempty" yaml:"proof_consensus"` + ConsensusHeight types1.Height `protobuf:"bytes,8,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height" yaml:"consensus_height"` + Signer string `protobuf:"bytes,9,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenAck) Reset() { *m = MsgConnectionOpenAck{} } @@ -316,77 +210,14 @@ func (m *MsgConnectionOpenAck) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenAck proto.InternalMessageInfo -func (m *MsgConnectionOpenAck) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *MsgConnectionOpenAck) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *MsgConnectionOpenAck) GetClientState() *types.Any { - if m != nil { - return m.ClientState - } - return nil -} - -func (m *MsgConnectionOpenAck) GetProofHeight() types1.Height { - if m != nil { - return m.ProofHeight - } - return types1.Height{} -} - -func (m *MsgConnectionOpenAck) GetProofTry() []byte { - if m != nil { - return m.ProofTry - } - return nil -} - -func (m *MsgConnectionOpenAck) GetProofClient() []byte { - if m != nil { - return m.ProofClient - } - return nil -} - -func (m *MsgConnectionOpenAck) GetProofConsensus() []byte { - if m != nil { - return m.ProofConsensus - } - return nil -} - -func (m *MsgConnectionOpenAck) GetConsensusHeight() types1.Height { - if m != nil { - return m.ConsensusHeight - } - return types1.Height{} -} - -func (m *MsgConnectionOpenAck) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of connection state to OPEN on Chain A. type MsgConnectionOpenConfirm struct { ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` // proof for the change of the connection state on Chain A: `INIT -> OPEN` - ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + ProofAck []byte `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight types1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgConnectionOpenConfirm) Reset() { *m = MsgConnectionOpenConfirm{} } @@ -422,34 +253,6 @@ func (m *MsgConnectionOpenConfirm) XXX_DiscardUnknown() { var xxx_messageInfo_MsgConnectionOpenConfirm proto.InternalMessageInfo -func (m *MsgConnectionOpenConfirm) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *MsgConnectionOpenConfirm) GetProofAck() []byte { - if m != nil { - return m.ProofAck - } - return nil -} - -func (m *MsgConnectionOpenConfirm) GetProofHeight() types1.Height { - if m != nil { - return m.ProofHeight - } - return types1.Height{} -} - -func (m *MsgConnectionOpenConfirm) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // ConnectionEnd defines a stateful object on a chain connected to another // separate one. NOTE: there must only be 2 defined ConnectionEnds to establish // a connection between two chains. @@ -752,71 +555,70 @@ func init() { func init() { proto.RegisterFile("ibc/connection/connection.proto", fileDescriptor_3bf62bacf5a27ee9) } var fileDescriptor_3bf62bacf5a27ee9 = []byte{ - // 1010 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x4f, 0x6f, 0xe2, 0x46, - 0x14, 0xc7, 0xfc, 0xe7, 0x01, 0x09, 0xeb, 0x92, 0xc6, 0xa5, 0x5b, 0x8c, 0xdc, 0x4b, 0xd4, 0x2a, - 0xa6, 0xd9, 0xad, 0xf6, 0x10, 0xa9, 0x07, 0x60, 0x59, 0xd5, 0x6a, 0x37, 0x8b, 0x1c, 0x52, 0xa9, - 0x39, 0x14, 0x81, 0x3d, 0x90, 0x11, 0xc1, 0x46, 0xb6, 0xa9, 0x96, 0x6f, 0xb0, 0xca, 0xa9, 0xd7, - 0x4a, 0x8d, 0x54, 0xa9, 0xc7, 0x1e, 0xfa, 0x1d, 0x7a, 0xda, 0xe3, 0x1e, 0xdb, 0x8b, 0x55, 0x25, - 0xdf, 0x00, 0xf5, 0xd4, 0x4b, 0x2b, 0xcf, 0x8c, 0xff, 0x40, 0xb2, 0x95, 0x36, 0xb0, 0xda, 0x13, - 0xef, 0xcd, 0x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x03, 0x3b, 0x42, - 0x86, 0xc8, 0x63, 0x67, 0xe1, 0x8a, 0xf7, 0xa2, 0x48, 0x2f, 0x26, 0xa9, 0x39, 0xe2, 0x90, 0x56, - 0x38, 0xf4, 0x77, 0x42, 0x97, 0x15, 0xb2, 0x04, 0xb7, 0xbb, 0xba, 0x22, 0x8d, 0xfa, 0x2b, 0xb6, - 0x88, 0xc7, 0xb7, 0x60, 0x9b, 0x45, 0x4d, 0xc3, 0x46, 0x86, 0x3d, 0xb3, 0x85, 0x1c, 0x81, 0x57, - 0x16, 0xae, 0xf8, 0xfe, 0x12, 0xdc, 0x4f, 0x90, 0xd4, 0x2d, 0x3a, 0x83, 0x3f, 0xc0, 0x7f, 0x07, - 0xa5, 0x20, 0xea, 0xd3, 0x01, 0xaf, 0xa5, 0x43, 0x64, 0x74, 0xec, 0x06, 0xaa, 0x5a, 0x42, 0x4a, - 0xea, 0x76, 0x30, 0xc4, 0x68, 0x09, 0x3b, 0x26, 0xbf, 0x6e, 0xc7, 0xfc, 0x9d, 0xbc, 0xa5, 0x63, - 0x1a, 0xda, 0xf8, 0xa6, 0xfc, 0xb9, 0x37, 0x92, 0xbf, 0x00, 0x19, 0x26, 0x18, 0xda, 0x37, 0xaa, - 0xef, 0xbe, 0x85, 0xc6, 0x58, 0x55, 0x5e, 0x72, 0x03, 0xca, 0x3b, 0x00, 0x2a, 0xa8, 0x9e, 0x63, - 0xcd, 0x85, 0x14, 0x61, 0x39, 0x72, 0x60, 0x04, 0x21, 0x49, 0xcd, 0x12, 0xdb, 0x3b, 0x63, 0x56, - 0x65, 0x97, 0x5e, 0x4f, 0x76, 0x99, 0x8d, 0xc8, 0x2e, 0xfb, 0x56, 0x64, 0x97, 0x5b, 0x57, 0x76, - 0xbf, 0xc6, 0x41, 0xb8, 0x21, 0xbb, 0x96, 0x69, 0x0c, 0xb1, 0x35, 0x59, 0x57, 0x7a, 0xc1, 0xa7, - 0xeb, 0x6b, 0x63, 0x22, 0xbe, 0x5b,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f8, 0x2a, 0x00, 0xf6, - 0x15, 0x65, 0xd1, 0x49, 0xd5, 0xc8, 0x88, 0xa7, 0x83, 0x21, 0xea, 0x3b, 0x33, 0x0b, 0x05, 0x9d, - 0xe0, 0xfb, 0xb4, 0x9a, 0x4f, 0x7e, 0xe4, 0x20, 0x45, 0xef, 0x96, 0x47, 0x20, 0x1e, 0x77, 0x1b, - 0xdd, 0x76, 0xef, 0xe4, 0x48, 0x39, 0x52, 0xba, 0x4a, 0xe3, 0x6b, 0xe5, 0xb4, 0xfd, 0xb8, 0x77, - 0x72, 0x74, 0xdc, 0x69, 0xb7, 0x94, 0x27, 0x4a, 0xfb, 0x71, 0x29, 0x56, 0xb9, 0x77, 0x71, 0x59, - 0x2b, 0x2e, 0x25, 0xf0, 0x02, 0x00, 0xc5, 0x79, 0x83, 0x25, 0xae, 0x92, 0xbd, 0xb8, 0xac, 0x25, - 0x3d, 0x9b, 0xaf, 0x42, 0x91, 0x46, 0xba, 0xea, 0xb7, 0xcf, 0x3a, 0xed, 0xa3, 0x52, 0xbc, 0x92, - 0xbf, 0xb8, 0xac, 0x65, 0x98, 0x1b, 0x22, 0x49, 0x30, 0x41, 0x91, 0x9e, 0x5d, 0x49, 0xbe, 0xf8, - 0xa5, 0x1a, 0x6b, 0x76, 0x5e, 0x5e, 0x55, 0xb9, 0x57, 0x57, 0x55, 0xee, 0xaf, 0xab, 0x2a, 0xf7, - 0xc3, 0x75, 0x35, 0xf6, 0xea, 0xba, 0x1a, 0xfb, 0xe3, 0xba, 0x1a, 0x3b, 0x7d, 0xf4, 0xbf, 0xa7, - 0xcb, 0xf3, 0xba, 0xf7, 0xa7, 0xe2, 0xb3, 0x87, 0xfb, 0x91, 0xbf, 0x36, 0xe4, 0xc4, 0x19, 0xa4, - 0xc9, 0x9d, 0xfb, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x5e, 0x84, 0x18, 0xf9, 0x0c, - 0x00, 0x00, + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x4b, 0x6f, 0x1a, 0x57, + 0x14, 0x66, 0x60, 0x78, 0x1d, 0xc0, 0x26, 0x53, 0x1c, 0x4f, 0x69, 0x3a, 0x83, 0xa6, 0x1b, 0xab, + 0x55, 0xa0, 0x49, 0xaa, 0x2c, 0x90, 0xba, 0x30, 0x84, 0xa8, 0xa3, 0x36, 0x0e, 0x1a, 0xe3, 0x4a, + 0xf5, 0xa2, 0x08, 0x86, 0x0b, 0xbe, 0xc2, 0xcc, 0xa0, 0x99, 0xa1, 0x0a, 0xdb, 0x2e, 0xaa, 0xc8, + 0xab, 0x6e, 0xbb, 0xb0, 0x14, 0xa9, 0xff, 0xa4, 0xab, 0x48, 0xdd, 0x64, 0xd9, 0x6e, 0x50, 0x65, + 0x6f, 0xba, 0xa6, 0x3f, 0xa0, 0xd5, 0x7d, 0xcc, 0x03, 0x6c, 0xab, 0x8a, 0xed, 0x28, 0x2b, 0xce, + 0xb9, 0xe7, 0x7c, 0x73, 0xef, 0x77, 0xce, 0x77, 0x1f, 0x80, 0x8a, 0xfb, 0x66, 0xcd, 0xb4, 0x2d, + 0x0b, 0x99, 0x1e, 0xb6, 0xad, 0x88, 0x59, 0x9d, 0x3a, 0xb6, 0x67, 0x4b, 0x1b, 0xb8, 0x6f, 0x56, + 0xc3, 0xd1, 0x72, 0x69, 0x64, 0x8f, 0x6c, 0x1a, 0xaa, 0x11, 0x8b, 0x65, 0x95, 0x3f, 0x1c, 0xd9, + 0xf6, 0xe8, 0x18, 0xd5, 0xa8, 0xd7, 0x9f, 0x0d, 0x6b, 0x3d, 0x6b, 0xce, 0x43, 0x7c, 0x86, 0xc9, + 0x04, 0x7b, 0x13, 0x64, 0x79, 0x11, 0x93, 0x27, 0x6c, 0xd3, 0x84, 0x63, 0x4c, 0x83, 0xf4, 0x87, + 0x05, 0xb4, 0x7f, 0x04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1, 0x04, 0x43, 0x12, 0xbb, 0x2c, + 0xbe, 0xfc, 0x55, 0x89, 0x35, 0xda, 0xaf, 0xcf, 0x14, 0xe1, 0xcd, 0x99, 0x22, 0xfc, 0x75, 0xa6, + 0x08, 0x3f, 0x9f, 0x2b, 0xb1, 0x37, 0xe7, 0x4a, 0xec, 0x8f, 0x73, 0x25, 0x76, 0xf8, 0x78, 0x84, + 0xbd, 0xa3, 0x59, 0x9f, 0xf4, 0xad, 0x66, 0xda, 0xee, 0xc4, 0x76, 0xf9, 0xcf, 0x7d, 0x77, 0x30, + 0xae, 0xbd, 0xa8, 0x91, 0x07, 0xfb, 0xe7, 0x8f, 0xee, 0x47, 0xfe, 0x36, 0x78, 0xf3, 0x29, 0x72, + 0xfb, 0x29, 0x7a, 0x43, 0x3e, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x86, 0xc8, 0x16, 0xfc, 0x55, + 0x0c, 0x00, 0x00, } func (m *MsgConnectionOpenInit) Marshal() (dAtA []byte, err error) { @@ -1819,7 +1621,7 @@ func (m *MsgConnectionOpenInit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -1829,25 +1631,23 @@ func (m *MsgConnectionOpenInit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2239,7 +2039,7 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -2249,25 +2049,23 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2594,7 +2392,7 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -2604,25 +2402,23 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2780,7 +2576,7 @@ func (m *MsgConnectionOpenConfirm) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -2790,25 +2586,23 @@ func (m *MsgConnectionOpenConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/ibc/03-connection/types/msgs.go b/x/ibc/03-connection/types/msgs.go index 9462678a7a..8f70559dbc 100644 --- a/x/ibc/03-connection/types/msgs.go +++ b/x/ibc/03-connection/types/msgs.go @@ -13,6 +13,7 @@ import ( var _ sdk.Msg = &MsgConnectionOpenInit{} // NewMsgConnectionOpenInit creates a new MsgConnectionOpenInit instance +//nolint:interfacer func NewMsgConnectionOpenInit( connectionID, clientID, counterpartyConnectionID, counterpartyClientID string, counterpartyPrefix commitmenttypes.MerklePrefix, @@ -23,7 +24,7 @@ func NewMsgConnectionOpenInit( ConnectionId: connectionID, ClientId: clientID, Counterparty: counterparty, - Signer: signer, + Signer: signer.String(), } } @@ -45,7 +46,7 @@ func (msg MsgConnectionOpenInit) ValidateBasic() error { if err := host.ClientIdentifierValidator(msg.ClientId); err != nil { return sdkerrors.Wrap(err, "invalid client ID") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } return msg.Counterparty.ValidateBasic() @@ -58,12 +59,17 @@ func (msg MsgConnectionOpenInit) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgConnectionOpenInit) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } var _ sdk.Msg = &MsgConnectionOpenTry{} // NewMsgConnectionOpenTry creates a new MsgConnectionOpenTry instance +//nolint:interfacer func NewMsgConnectionOpenTry( connectionID, clientID, counterpartyConnectionID, counterpartyClientID string, counterpartyClient exported.ClientState, @@ -84,7 +90,7 @@ func NewMsgConnectionOpenTry( ProofConsensus: proofConsensus, ProofHeight: proofHeight, ConsensusHeight: consensusHeight, - Signer: signer, + Signer: signer.String(), } } @@ -139,7 +145,7 @@ func (msg MsgConnectionOpenTry) ValidateBasic() error { if msg.ConsensusHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "consensus height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } return msg.Counterparty.ValidateBasic() @@ -163,12 +169,17 @@ func (msg MsgConnectionOpenTry) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgConnectionOpenTry) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } var _ sdk.Msg = &MsgConnectionOpenAck{} // NewMsgConnectionOpenAck creates a new MsgConnectionOpenAck instance +//nolint:interfacer func NewMsgConnectionOpenAck( connectionID string, counterpartyClient exported.ClientState, proofTry, proofClient, proofConsensus []byte, @@ -185,7 +196,7 @@ func NewMsgConnectionOpenAck( ProofHeight: proofHeight, ConsensusHeight: consensusHeight, Version: version, - Signer: signer, + Signer: signer.String(), } } @@ -243,7 +254,7 @@ func (msg MsgConnectionOpenAck) ValidateBasic() error { if msg.ConsensusHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "consensus height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } return nil @@ -256,12 +267,17 @@ func (msg MsgConnectionOpenAck) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgConnectionOpenAck) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } var _ sdk.Msg = &MsgConnectionOpenConfirm{} // NewMsgConnectionOpenConfirm creates a new MsgConnectionOpenConfirm instance +//nolint:interfacer func NewMsgConnectionOpenConfirm( connectionID string, proofAck []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -270,7 +286,7 @@ func NewMsgConnectionOpenConfirm( ConnectionId: connectionID, ProofAck: proofAck, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -295,7 +311,7 @@ func (msg MsgConnectionOpenConfirm) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } return nil @@ -308,5 +324,9 @@ func (msg MsgConnectionOpenConfirm) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgConnectionOpenConfirm) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{accAddr} } diff --git a/x/ibc/03-connection/types/msgs_test.go b/x/ibc/03-connection/types/msgs_test.go index 4f2951b131..3d7f4c4d20 100644 --- a/x/ibc/03-connection/types/msgs_test.go +++ b/x/ibc/03-connection/types/msgs_test.go @@ -128,7 +128,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "ibc/test", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "connectiontotest", "test/conn1", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "connectiontotest", "clienttotest", nil, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), - {"ibcconntest", "clienttotesta", invalidAny, counterparty, []string{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer}, + {"ibcconntest", "clienttotesta", invalidAny, counterparty, []string{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer.String()}, types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "connectiontotest", "clienttotest", invalidClient, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "connectiontotest", "clienttotest", clientState, emptyPrefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), types.NewMsgConnectionOpenTry("ibcconntest", "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), @@ -196,7 +196,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { testMsgs := []*types.MsgConnectionOpenAck{ types.NewMsgConnectionOpenAck("test/conn1", clientState, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), types.NewMsgConnectionOpenAck("ibcconntest", nil, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), - {"ibcconntest", ibctesting.ConnectionVersion, invalidAny, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer}, + {"ibcconntest", ibctesting.ConnectionVersion, invalidAny, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer.String()}, types.NewMsgConnectionOpenAck("ibcconntest", invalidClient, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), types.NewMsgConnectionOpenAck("ibcconntest", clientState, emptyProof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), types.NewMsgConnectionOpenAck("ibcconntest", clientState, suite.proof, emptyProof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), diff --git a/x/ibc/04-channel/types/channel.pb.go b/x/ibc/04-channel/types/channel.pb.go index ed0338cae9..3ce60ffa3a 100644 --- a/x/ibc/04-channel/types/channel.pb.go +++ b/x/ibc/04-channel/types/channel.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -104,10 +103,10 @@ func (Order) EnumDescriptor() ([]byte, []int) { // MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It // is called by a relayer on Chain A. type MsgChannelOpenInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - Channel Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + Channel Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenInit) Reset() { *m = MsgChannelOpenInit{} } @@ -143,44 +142,16 @@ func (m *MsgChannelOpenInit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelOpenInit proto.InternalMessageInfo -func (m *MsgChannelOpenInit) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelOpenInit) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelOpenInit) GetChannel() Channel { - if m != nil { - return m.Channel - } - return Channel{} -} - -func (m *MsgChannelOpenInit) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // on Chain B. type MsgChannelOpenTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - Channel Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"` - CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofInit []byte `protobuf:"bytes,5,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,7,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + Channel Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"` + CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofInit []byte `protobuf:"bytes,5,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight types.Height `protobuf:"bytes,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenTry) Reset() { *m = MsgChannelOpenTry{} } @@ -216,64 +187,15 @@ func (m *MsgChannelOpenTry) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelOpenTry proto.InternalMessageInfo -func (m *MsgChannelOpenTry) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelOpenTry) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelOpenTry) GetChannel() Channel { - if m != nil { - return m.Channel - } - return Channel{} -} - -func (m *MsgChannelOpenTry) GetCounterpartyVersion() string { - if m != nil { - return m.CounterpartyVersion - } - return "" -} - -func (m *MsgChannelOpenTry) GetProofInit() []byte { - if m != nil { - return m.ProofInit - } - return nil -} - -func (m *MsgChannelOpenTry) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgChannelOpenTry) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge // the change of channel state to TRYOPEN on Chain B. type MsgChannelOpenAck struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - CounterpartyVersion string `protobuf:"bytes,3,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` - ProofTry []byte `protobuf:"bytes,4,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` - ProofHeight types.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,6,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + CounterpartyVersion string `protobuf:"bytes,3,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` + ProofTry []byte `protobuf:"bytes,4,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"` + ProofHeight types.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenAck) Reset() { *m = MsgChannelOpenAck{} } @@ -309,56 +231,14 @@ func (m *MsgChannelOpenAck) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelOpenAck proto.InternalMessageInfo -func (m *MsgChannelOpenAck) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelOpenAck) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelOpenAck) GetCounterpartyVersion() string { - if m != nil { - return m.CounterpartyVersion - } - return "" -} - -func (m *MsgChannelOpenAck) GetProofTry() []byte { - if m != nil { - return m.ProofTry - } - return nil -} - -func (m *MsgChannelOpenAck) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgChannelOpenAck) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of channel state to OPEN on Chain A. type MsgChannelOpenConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofAck []byte `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelOpenConfirm) Reset() { *m = MsgChannelOpenConfirm{} } @@ -394,47 +274,12 @@ func (m *MsgChannelOpenConfirm) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelOpenConfirm proto.InternalMessageInfo -func (m *MsgChannelOpenConfirm) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelOpenConfirm) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelOpenConfirm) GetProofAck() []byte { - if m != nil { - return m.ProofAck - } - return nil -} - -func (m *MsgChannelOpenConfirm) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgChannelOpenConfirm) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgChannelCloseInit defines a msg sent by a Relayer to Chain A // to close a channel with Chain B. type MsgChannelCloseInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelCloseInit) Reset() { *m = MsgChannelCloseInit{} } @@ -470,35 +315,14 @@ func (m *MsgChannelCloseInit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelCloseInit proto.InternalMessageInfo -func (m *MsgChannelCloseInit) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelCloseInit) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelCloseInit) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // to acknowledge the change of channel state to CLOSED on Chain A. type MsgChannelCloseConfirm struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ProofInit []byte `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelCloseConfirm) Reset() { *m = MsgChannelCloseConfirm{} } @@ -534,47 +358,12 @@ func (m *MsgChannelCloseConfirm) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelCloseConfirm proto.InternalMessageInfo -func (m *MsgChannelCloseConfirm) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *MsgChannelCloseConfirm) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *MsgChannelCloseConfirm) GetProofInit() []byte { - if m != nil { - return m.ProofInit - } - return nil -} - -func (m *MsgChannelCloseConfirm) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgChannelCloseConfirm) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgRecvPacket receives incoming IBC packet type MsgRecvPacket struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} } @@ -610,41 +399,13 @@ func (m *MsgRecvPacket) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRecvPacket proto.InternalMessageInfo -func (m *MsgRecvPacket) GetPacket() Packet { - if m != nil { - return m.Packet - } - return Packet{} -} - -func (m *MsgRecvPacket) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgRecvPacket) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgRecvPacket) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgTimeout receives timed-out packet type MsgTimeout struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeout) Reset() { *m = MsgTimeout{} } @@ -680,49 +441,14 @@ func (m *MsgTimeout) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTimeout proto.InternalMessageInfo -func (m *MsgTimeout) GetPacket() Packet { - if m != nil { - return m.Packet - } - return Packet{} -} - -func (m *MsgTimeout) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgTimeout) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgTimeout) GetNextSequenceRecv() uint64 { - if m != nil { - return m.NextSequenceRecv - } - return 0 -} - -func (m *MsgTimeout) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. type MsgTimeoutOnClose struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,6,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` + Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgTimeoutOnClose) Reset() { *m = MsgTimeoutOnClose{} } @@ -758,55 +484,13 @@ func (m *MsgTimeoutOnClose) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTimeoutOnClose proto.InternalMessageInfo -func (m *MsgTimeoutOnClose) GetPacket() Packet { - if m != nil { - return m.Packet - } - return Packet{} -} - -func (m *MsgTimeoutOnClose) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgTimeoutOnClose) GetProofClose() []byte { - if m != nil { - return m.ProofClose - } - return nil -} - -func (m *MsgTimeoutOnClose) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgTimeoutOnClose) GetNextSequenceRecv() uint64 { - if m != nil { - return m.NextSequenceRecv - } - return 0 -} - -func (m *MsgTimeoutOnClose) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // MsgAcknowledgement receives incoming IBC acknowledgement type MsgAcknowledgement struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` - Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgAcknowledgement) Reset() { *m = MsgAcknowledgement{} } @@ -842,41 +526,6 @@ func (m *MsgAcknowledgement) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAcknowledgement proto.InternalMessageInfo -func (m *MsgAcknowledgement) GetPacket() Packet { - if m != nil { - return m.Packet - } - return Packet{} -} - -func (m *MsgAcknowledgement) GetAcknowledgement() []byte { - if m != nil { - return m.Acknowledgement - } - return nil -} - -func (m *MsgAcknowledgement) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgAcknowledgement) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - -func (m *MsgAcknowledgement) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Signer - } - return nil -} - // Channel defines pipeline for exactly-once packet delivery between specific // modules on separate blockchains, which has at least one end capable of // sending packets and one end capable of receiving packets. @@ -1240,93 +889,92 @@ func init() { func init() { proto.RegisterFile("ibc/channel/channel.proto", fileDescriptor_9277922ccfb7f043) } var fileDescriptor_9277922ccfb7f043 = []byte{ - // 1373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x3b, 0x6f, 0x1b, 0x47, - 0x10, 0xe6, 0xf1, 0x29, 0x8e, 0x5e, 0xd4, 0xea, 0x61, 0x8a, 0xb6, 0x79, 0xc4, 0x21, 0x85, 0xe0, - 0xc0, 0x54, 0xfc, 0x40, 0x02, 0xb8, 0x0a, 0x49, 0xd1, 0x10, 0x11, 0x8b, 0x14, 0x56, 0x74, 0x90, - 0xb8, 0x21, 0x4e, 0xc7, 0x35, 0x79, 0xa0, 0x78, 0xcb, 0xdc, 0xad, 0x6c, 0xab, 0x4c, 0x67, 0x08, - 0x08, 0x90, 0x1f, 0x10, 0x01, 0x01, 0x02, 0xa4, 0x4c, 0x9b, 0x3a, 0x48, 0xe3, 0x22, 0x40, 0xdc, - 0x04, 0x48, 0x75, 0x08, 0xec, 0x7f, 0xc0, 0xc6, 0x41, 0xaa, 0xe0, 0x76, 0xf7, 0xc8, 0x3b, 0x4a, - 0x76, 0x61, 0x2a, 0x82, 0x8a, 0x54, 0x77, 0x33, 0xf3, 0xed, 0xee, 0xcc, 0x37, 0x73, 0xb3, 0x43, - 0xc2, 0xba, 0xb9, 0x6f, 0x6c, 0x1a, 0x5d, 0xdd, 0xb2, 0xc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, 0xa2, - 0xb9, 0xd9, 0xe3, 0x93, 0x42, 0x4a, 0x8a, 0xe3, 0x95, 0xdc, 0x18, 0x13, 0x2b, 0xb9, 0xe5, 0x1a, - 0xcc, 0x09, 0x4b, 0xe5, 0x41, 0x63, 0xaf, 0xba, 0x95, 0x89, 0xe7, 0xe0, 0xf8, 0xa4, 0x90, 0x14, - 0x52, 0x2e, 0xfe, 0xfc, 0x87, 0x7c, 0xe4, 0xc6, 0x53, 0x48, 0xf0, 0x1e, 0x89, 0x3e, 0x80, 0xb5, - 0x06, 0xde, 0xaa, 0xe2, 0x56, 0xbd, 0x51, 0xaf, 0x4e, 0xf8, 0xcb, 0xb7, 0xf4, 0xf4, 0x48, 0x83, - 0x45, 0x81, 0x7a, 0x58, 0xe7, 0xcf, 0xea, 0x56, 0x46, 0xc9, 0xcd, 0x1f, 0x9f, 0x14, 0xd2, 0x23, - 0x85, 0xe7, 0xb0, 0xc0, 0xf8, 0x08, 0xe9, 0xb0, 0x14, 0xc5, 0xc1, 0xe5, 0x9d, 0x17, 0xaf, 0xf2, - 0xca, 0xcb, 0x57, 0x79, 0xe5, 0xaf, 0x57, 0x79, 0xe5, 0xdb, 0xd7, 0xf9, 0xc8, 0xcb, 0xd7, 0xf9, - 0xc8, 0x9f, 0xaf, 0xf3, 0x91, 0x47, 0x77, 0xde, 0x79, 0xb5, 0x3e, 0xdb, 0x34, 0xf7, 0x8d, 0xcd, - 0x8f, 0xee, 0xde, 0xf4, 0xff, 0x61, 0xe4, 0x77, 0xed, 0x7e, 0x92, 0xff, 0x49, 0x78, 0xe7, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x78, 0x52, 0x52, 0x7d, 0x14, 0x00, 0x00, + // 1356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6b, 0x1b, 0x47, + 0x14, 0xd7, 0xea, 0x9f, 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 0xe2, 0x75, 0x31, 0xf6, 0xf2, + 0x75, 0x31, 0x76, 0xef, 0x46, 0xc7, 0x62, 0xdd, 0xa3, 0x83, 0x0d, 0x93, 0xf6, 0x37, 0x4d, 0xea, + 0xf6, 0xa9, 0x2b, 0x87, 0xab, 0x6e, 0xbb, 0xb7, 0xf9, 0x68, 0xd3, 0x3a, 0x30, 0x37, 0x3f, 0xb9, + 0x79, 0x35, 0xf8, 0x1f, 0x8b, 0x1d, 0x0f, 0x88, 0x7b, 0x90, 0xe6, 0x7f, 0x45, 0xdd, 0xf8, 0x3b, + 0x00, 0x00, 0xff, 0xff, 0x99, 0x07, 0x44, 0x6c, 0xe3, 0x12, 0x00, 0x00, } func (m *MsgChannelOpenInit) Marshal() (dAtA []byte, err error) { @@ -2891,7 +2539,7 @@ func (m *MsgChannelOpenInit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -2901,25 +2549,23 @@ func (m *MsgChannelOpenInit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3174,7 +2820,7 @@ func (m *MsgChannelOpenTry) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -3184,25 +2830,23 @@ func (m *MsgChannelOpenTry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3424,7 +3068,7 @@ func (m *MsgChannelOpenAck) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -3434,25 +3078,23 @@ func (m *MsgChannelOpenAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3642,7 +3284,7 @@ func (m *MsgChannelOpenConfirm) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -3652,25 +3294,23 @@ func (m *MsgChannelOpenConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3793,7 +3433,7 @@ func (m *MsgChannelCloseInit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -3803,25 +3443,23 @@ func (m *MsgChannelCloseInit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4011,7 +3649,7 @@ func (m *MsgChannelCloseConfirm) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -4021,25 +3659,23 @@ func (m *MsgChannelCloseConfirm) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4198,7 +3834,7 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -4208,25 +3844,23 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4404,7 +4038,7 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -4414,25 +4048,23 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4644,7 +4276,7 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -4654,25 +4286,23 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4865,7 +4495,7 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -4875,25 +4505,23 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthChannel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthChannel } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) - if m.Signer == nil { - m.Signer = []byte{} - } + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/ibc/04-channel/types/msgs.go b/x/ibc/04-channel/types/msgs.go index 653f1ea935..cc98565f32 100644 --- a/x/ibc/04-channel/types/msgs.go +++ b/x/ibc/04-channel/types/msgs.go @@ -13,6 +13,7 @@ import ( var _ sdk.Msg = &MsgChannelOpenInit{} // NewMsgChannelOpenInit creates a new MsgChannelOpenInit +//nolint:interfacer func NewMsgChannelOpenInit( portID, channelID string, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID string, signer sdk.AccAddress, @@ -23,7 +24,7 @@ func NewMsgChannelOpenInit( PortId: portID, ChannelId: channelID, Channel: channel, - Signer: signer, + Signer: signer.String(), } } @@ -56,12 +57,17 @@ func (msg MsgChannelOpenInit) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelOpenInit) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgChannelOpenTry{} // NewMsgChannelOpenTry creates a new MsgChannelOpenTry instance +//nolint:interfacer func NewMsgChannelOpenTry( portID, channelID, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID, counterpartyVersion string, @@ -76,7 +82,7 @@ func NewMsgChannelOpenTry( CounterpartyVersion: counterpartyVersion, ProofInit: proofInit, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -115,12 +121,17 @@ func (msg MsgChannelOpenTry) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelOpenTry) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgChannelOpenAck{} // NewMsgChannelOpenAck creates a new MsgChannelOpenAck instance +//nolint:interfacer func NewMsgChannelOpenAck( portID, channelID string, cpv string, proofTry []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -131,7 +142,7 @@ func NewMsgChannelOpenAck( CounterpartyVersion: cpv, ProofTry: proofTry, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -170,12 +181,17 @@ func (msg MsgChannelOpenAck) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelOpenAck) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgChannelOpenConfirm{} // NewMsgChannelOpenConfirm creates a new MsgChannelOpenConfirm instance +//nolint:interfacer func NewMsgChannelOpenConfirm( portID, channelID string, proofAck []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -185,7 +201,7 @@ func NewMsgChannelOpenConfirm( ChannelId: channelID, ProofAck: proofAck, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -224,19 +240,24 @@ func (msg MsgChannelOpenConfirm) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelOpenConfirm) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgChannelCloseInit{} // NewMsgChannelCloseInit creates a new MsgChannelCloseInit instance +//nolint:interfacer func NewMsgChannelCloseInit( portID string, channelID string, signer sdk.AccAddress, ) *MsgChannelCloseInit { return &MsgChannelCloseInit{ PortId: portID, ChannelId: channelID, - Signer: signer, + Signer: signer.String(), } } @@ -269,12 +290,17 @@ func (msg MsgChannelCloseInit) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelCloseInit) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgChannelCloseConfirm{} // NewMsgChannelCloseConfirm creates a new MsgChannelCloseConfirm instance +//nolint:interfacer func NewMsgChannelCloseConfirm( portID, channelID string, proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -284,7 +310,7 @@ func NewMsgChannelCloseConfirm( ChannelId: channelID, ProofInit: proofInit, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -323,12 +349,17 @@ func (msg MsgChannelCloseConfirm) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgChannelCloseConfirm) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket +//nolint:interfacer func NewMsgRecvPacket( packet Packet, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -337,7 +368,7 @@ func NewMsgRecvPacket( Packet: packet, Proof: proof, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -354,7 +385,7 @@ func (msg MsgRecvPacket) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } @@ -375,7 +406,11 @@ func (msg MsgRecvPacket) GetDataSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgRecvPacket) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } // Type implements sdk.Msg @@ -386,6 +421,7 @@ func (msg MsgRecvPacket) Type() string { var _ sdk.Msg = &MsgTimeout{} // NewMsgTimeout constructs new MsgTimeout +//nolint:interfacer func NewMsgTimeout( packet Packet, nextSequenceRecv uint64, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -395,7 +431,7 @@ func NewMsgTimeout( NextSequenceRecv: nextSequenceRecv, Proof: proof, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -412,7 +448,7 @@ func (msg MsgTimeout) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } @@ -426,7 +462,11 @@ func (msg MsgTimeout) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgTimeout) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } // Type implements sdk.Msg @@ -435,6 +475,7 @@ func (msg MsgTimeout) Type() string { } // NewMsgTimeoutOnClose constructs new MsgTimeoutOnClose +//nolint:interfacer func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, proof, proofClose []byte, @@ -446,7 +487,7 @@ func NewMsgTimeoutOnClose( Proof: proof, ProofClose: proofClose, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -466,7 +507,7 @@ func (msg MsgTimeoutOnClose) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } @@ -480,7 +521,11 @@ func (msg MsgTimeoutOnClose) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgTimeoutOnClose) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } // Type implements sdk.Msg @@ -491,6 +536,7 @@ func (msg MsgTimeoutOnClose) Type() string { var _ sdk.Msg = &MsgAcknowledgement{} // NewMsgAcknowledgement constructs a new MsgAcknowledgement +//nolint:interfacer func NewMsgAcknowledgement( packet Packet, ack []byte, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { return &MsgAcknowledgement{ @@ -498,7 +544,7 @@ func NewMsgAcknowledgement( Acknowledgement: ack, Proof: proof, ProofHeight: proofHeight, - Signer: signer, + Signer: signer.String(), } } @@ -515,7 +561,7 @@ func (msg MsgAcknowledgement) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer.Empty() { + if msg.Signer == "" { return sdkerrors.ErrInvalidAddress } @@ -529,7 +575,11 @@ func (msg MsgAcknowledgement) GetSignBytes() []byte { // GetSigners implements sdk.Msg func (msg MsgAcknowledgement) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.Signer} + signer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + panic(err) + } + return []sdk.AccAddress{signer} } // Type implements sdk.Msg diff --git a/x/ibc/04-channel/types/msgs_test.go b/x/ibc/04-channel/types/msgs_test.go index b386fc4f1c..7290441301 100644 --- a/x/ibc/04-channel/types/msgs_test.go +++ b/x/ibc/04-channel/types/msgs_test.go @@ -51,7 +51,7 @@ var ( invalidProofs1 = exported.Proof(nil) invalidProofs2 = emptyProof - addr1 = sdk.AccAddress("testaddr1") + addr1 = sdk.AccAddress("testaddr111111111111") emptyAddr sdk.AccAddress portid = "testportid" @@ -416,8 +416,9 @@ func (suite *TypesTestSuite) TestMsgRecvPacketGetSignBytes() { res := msg.GetSignBytes() expected := fmt.Sprintf( - `{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"100","epoch_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"epoch_height":"1","epoch_number":"0"},"signer":"cosmos1w3jhxarpv3j8yvg4ufs4x"}`, + `{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"100","epoch_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"epoch_height":"1","epoch_number":"0"},"signer":"%s"}`, string(msg.GetDataSignBytes()), + addr1.String(), ) suite.Equal(expected, string(res)) } @@ -427,7 +428,7 @@ func (suite *TypesTestSuite) TestMsgRecvPacketGetSigners() { msg := types.NewMsgRecvPacket(packet, suite.proof, height, addr1) res := msg.GetSigners() - expected := "[746573746164647231]" + expected := "[7465737461646472313131313131313131313131]" suite.Equal(expected, fmt.Sprintf("%v", res)) } diff --git a/x/ibc/04-channel/types/query.pb.go b/x/ibc/04-channel/types/query.pb.go index 8f8bfcfb75..aa0fd811f3 100644 --- a/x/ibc/04-channel/types/query.pb.go +++ b/x/ibc/04-channel/types/query.pb.go @@ -1278,7 +1278,7 @@ func (m *QueryUnrelayedAcksRequest) GetPacketCommitmentSequences() []uint64 { // QueryUnrelayedAcksResponse is the response type for the // Query/UnrelayedAcks RPC method type QueryUnrelayedAcksResponse struct { - // list of unreceived acknowledgement sequences + // list of unrelayed acknowledgement sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` diff --git a/x/ibc/23-commitment/types/commitment.pb.go b/x/ibc/23-commitment/types/commitment.pb.go index 2c158fc51c..e79a3d7eb9 100644 --- a/x/ibc/23-commitment/types/commitment.pb.go +++ b/x/ibc/23-commitment/types/commitment.pb.go @@ -88,7 +88,8 @@ func (m *MerkleRoot) XXX_DiscardUnknown() { var xxx_messageInfo_MerkleRoot proto.InternalMessageInfo // MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) +// The constructed key from the Path and the key will be append(Path.KeyPath, +// append(Path.KeyPrefix, key...)) type MerklePrefix struct { KeyPrefix []byte `protobuf:"bytes,1,opt,name=key_prefix,json=keyPrefix,proto3" json:"key_prefix,omitempty" yaml:"key_prefix"` } @@ -133,8 +134,8 @@ func (m *MerklePrefix) GetKeyPrefix() []byte { return nil } -// MerklePath is the path used to verify commitment proofs, which can be an arbitrary -// structured object (defined by a commitment type). +// MerklePath is the path used to verify commitment proofs, which can be an +// arbitrary structured object (defined by a commitment type). type MerklePath struct { KeyPath KeyPath `protobuf:"bytes,1,opt,name=key_path,json=keyPath,proto3" json:"key_path" yaml:"key_path"` } @@ -179,9 +180,9 @@ func (m *MerklePath) GetKeyPath() KeyPath { } // MerkleProof is a wrapper type that contains a merkle proof. -// It demonstrates membership or non-membership for an element or set of elements, -// verifiable in conjunction with a known commitment root. Proofs should be -// succinct. +// It demonstrates membership or non-membership for an element or set of +// elements, verifiable in conjunction with a known commitment root. Proofs +// should be succinct. type MerkleProof struct { Proof *crypto.ProofOps `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` } diff --git a/x/ibc/light-clients/solomachine/types/solomachine.pb.go b/x/ibc/light-clients/solomachine/types/solomachine.pb.go index a841a398f8..392be1a509 100644 --- a/x/ibc/light-clients/solomachine/types/solomachine.pb.go +++ b/x/ibc/light-clients/solomachine/types/solomachine.pb.go @@ -403,7 +403,8 @@ func (m *ClientStateData) XXX_DiscardUnknown() { var xxx_messageInfo_ClientStateData proto.InternalMessageInfo -// ConsensusStateSignBytes returns the SignBytes data for consensus state verification. +// ConsensusStateSignBytes returns the SignBytes data for consensus state +// verification. type ConsensusStateData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` ConsensusState *types.Any `protobuf:"bytes,2,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml:"consensus_state"` @@ -442,7 +443,8 @@ func (m *ConsensusStateData) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusStateData proto.InternalMessageInfo -// ConnectionStateSignBytes returns the SignBytes data for connection state verification. +// ConnectionStateSignBytes returns the SignBytes data for connection state +// verification. type ConnectionStateData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Connection *types1.ConnectionEnd `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"` @@ -481,7 +483,8 @@ func (m *ConnectionStateData) XXX_DiscardUnknown() { var xxx_messageInfo_ConnectionStateData proto.InternalMessageInfo -// ChannelStateSignBytes returns the SignBytes data for channel state verification. +// ChannelStateSignBytes returns the SignBytes data for channel state +// verification. type ChannelStateData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Channel *types2.Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` @@ -520,7 +523,8 @@ func (m *ChannelStateData) XXX_DiscardUnknown() { var xxx_messageInfo_ChannelStateData proto.InternalMessageInfo -// PacketCommitmentSignBytes returns the SignBytes data for packet commitment verification. +// PacketCommitmentSignBytes returns the SignBytes data for packet commitment +// verification. type PacketCommitmentData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Commitment []byte `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` @@ -573,7 +577,8 @@ func (m *PacketCommitmentData) GetCommitment() []byte { return nil } -// PacketAcknowledgementSignBytes returns the SignBytes data for acknowledgement verification. +// PacketAcknowledgementSignBytes returns the SignBytes data for acknowledgement +// verification. type PacketAcknowledgementData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` @@ -626,8 +631,8 @@ func (m *PacketAcknowledgementData) GetAcknowledgement() []byte { return nil } -// PacketAcknowledgementAbsenceSignBytes returns the SignBytes data for acknowledgement absence -// verification. +// PacketAcknowledgementAbsenceSignBytes returns the SignBytes data for +// acknowledgement absence verification. type PacketAcknowledgementAbsenseData struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` } diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 56c156865f..fc83372602 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -125,7 +125,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { senderPrivKey := secp256k1.GenPrivKey() acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) balance := banktypes.Balance{ - Address: acc.GetAddress(), + Address: acc.GetAddress().String(), Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), } diff --git a/x/mint/types/query.pb.go b/x/mint/types/query.pb.go index 93547408bf..ea5f843cd0 100644 --- a/x/mint/types/query.pb.go +++ b/x/mint/types/query.pb.go @@ -150,7 +150,8 @@ func (m *QueryInflationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInflationRequest proto.InternalMessageInfo -// QueryInflationResponse is the response type for the Query/Inflation RPC method. +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. type QueryInflationResponse struct { // inflation is the current minting inflation value. Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"` @@ -189,7 +190,8 @@ func (m *QueryInflationResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInflationResponse proto.InternalMessageInfo -// QueryAnnualProvisionsRequest is the request type for the Query/AnnualProvisions RPC method. +// QueryAnnualProvisionsRequest is the request type for the +// Query/AnnualProvisions RPC method. type QueryAnnualProvisionsRequest struct { } @@ -226,7 +228,8 @@ func (m *QueryAnnualProvisionsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAnnualProvisionsRequest proto.InternalMessageInfo -// QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. type QueryAnnualProvisionsResponse struct { // annual_provisions is the current minting annual provisions value. AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions"` diff --git a/x/params/types/proposal/params.pb.go b/x/params/types/proposal/params.pb.go index 42c16d0085..68b2f87820 100644 --- a/x/params/types/proposal/params.pb.go +++ b/x/params/types/proposal/params.pb.go @@ -62,7 +62,8 @@ func (m *ParameterChangeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ParameterChangeProposal proto.InternalMessageInfo -// ParamChange defines an individual parameter change, for use in ParameterChangeProposal. +// ParamChange defines an individual parameter change, for use in +// ParameterChangeProposal. type ParamChange struct { Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` diff --git a/x/params/types/proposal/query.pb.go b/x/params/types/proposal/query.pb.go index 3f6e9ac679..40bdab3960 100644 --- a/x/params/types/proposal/query.pb.go +++ b/x/params/types/proposal/query.pb.go @@ -174,7 +174,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries a specific parameter of a module, given its subspace and key. + // Params queries a specific parameter of a module, given its subspace and + // key. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -197,7 +198,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries a specific parameter of a module, given its subspace and key. + // Params queries a specific parameter of a module, given its subspace and + // key. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index a8959fb610..72330875b2 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -47,12 +47,12 @@ func TestSlashingMsgs(t *testing.T) { bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) acc1 := &authtypes.BaseAccount{ - Address: addr1, + Address: addr1.String(), } accs := authtypes.GenesisAccounts{acc1} balances := []banktypes.Balance{ { - Address: addr1, + Address: addr1.String(), Coins: sdk.Coins{genCoin}, }, } @@ -77,10 +77,10 @@ func TestSlashingMsgs(t *testing.T) { app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, addr1, true) - require.Equal(t, sdk.ValAddress(addr1), validator.OperatorAddress) + require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) require.Equal(t, sdk.Bonded, validator.Status) require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens())) - unjailMsg := &types.MsgUnjail{ValidatorAddr: sdk.ValAddress(addr1)} + unjailMsg := &types.MsgUnjail{ValidatorAddr: sdk.ValAddress(addr1).String()} checkValidatorSigningInfo(t, app, sdk.ConsAddress(valAddr), true) diff --git a/x/slashing/client/cli/query.go b/x/slashing/client/cli/query.go index 6558b03cd8..55009706ef 100644 --- a/x/slashing/client/cli/query.go +++ b/x/slashing/client/cli/query.go @@ -59,7 +59,7 @@ $ query slashing signing-info cosmosvalconspub1zcjduepqfhvwcmt7p06fvdge } consAddr := sdk.ConsAddress(pk.Address()) - params := &types.QuerySigningInfoRequest{ConsAddress: consAddr} + params := &types.QuerySigningInfoRequest{ConsAddress: consAddr.String()} res, err := queryClient.SigningInfo(context.Background(), params) if err != nil { return err diff --git a/x/slashing/client/rest/grpc_query_test.go b/x/slashing/client/rest/grpc_query_test.go index 32d97206bd..8d4efd364c 100644 --- a/x/slashing/client/rest/grpc_query_test.go +++ b/x/slashing/client/rest/grpc_query_test.go @@ -1,7 +1,6 @@ package rest_test import ( - "encoding/base64" "fmt" "testing" "time" @@ -46,9 +45,7 @@ func (s *IntegrationTestSuite) TestGRPCQueries() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - consAddrBase64 := base64.URLEncoding.EncodeToString(sdk.ConsAddress(val.PubKey.Address())) + consAddr := sdk.ConsAddress(val.PubKey.Address()).String() testCases := []struct { name string @@ -69,7 +66,7 @@ func (s *IntegrationTestSuite) TestGRPCQueries() { &types.QuerySigningInfosResponse{ Info: []types.ValidatorSigningInfo{ { - Address: sdk.ConsAddress(val.PubKey.Address()), + Address: sdk.ConsAddress(val.PubKey.Address()).String(), JailedUntil: time.Unix(0, 0), }, }, @@ -80,7 +77,7 @@ func (s *IntegrationTestSuite) TestGRPCQueries() { }, { "get signing info (height specific)", - fmt.Sprintf("%s/cosmos/slashing/v1beta1/signing_infos/%s", baseURL, consAddrBase64), + fmt.Sprintf("%s/cosmos/slashing/v1beta1/signing_infos/%s", baseURL, consAddr), map[string]string{ grpctypes.GRPCBlockHeightHeader: "1", }, @@ -88,7 +85,7 @@ func (s *IntegrationTestSuite) TestGRPCQueries() { &types.QuerySigningInfoResponse{}, &types.QuerySigningInfoResponse{ ValSigningInfo: types.ValidatorSigningInfo{ - Address: sdk.ConsAddress(val.PubKey.Address()), + Address: sdk.ConsAddress(val.PubKey.Address()).String(), JailedUntil: time.Unix(0, 0), }, }, diff --git a/x/slashing/client/rest/query.go b/x/slashing/client/rest/query.go index 3cb65d81e0..36eb8cc24a 100644 --- a/x/slashing/client/rest/query.go +++ b/x/slashing/client/rest/query.go @@ -43,7 +43,7 @@ func signingInfoHandlerFn(clientCtx client.Context) http.HandlerFunc { return } - params := types.QuerySigningInfoRequest{ConsAddress: sdk.ConsAddress(pk.Address())} + params := types.QuerySigningInfoRequest{ConsAddress: pk.Address().String()} bz, err := clientCtx.LegacyAmino.MarshalJSON(params) if rest.CheckBadRequestError(w, err) { diff --git a/x/slashing/handler.go b/x/slashing/handler.go index 328a3db61c..e27b1e439a 100644 --- a/x/slashing/handler.go +++ b/x/slashing/handler.go @@ -25,7 +25,11 @@ func NewHandler(k keeper.Keeper) sdk.Handler { // Validators must submit a transaction to unjail itself after // having been jailed (and thus unbonded) for downtime func handleMsgUnjail(ctx sdk.Context, msg *types.MsgUnjail, k keeper.Keeper) (*sdk.Result, error) { - err := k.Unjail(ctx, msg.ValidatorAddr) + valAddr, valErr := sdk.ValAddressFromBech32(msg.ValidatorAddr) + if valErr != nil { + return nil, valErr + } + err := k.Unjail(ctx, valAddr) if err != nil { return nil, err } @@ -34,7 +38,7 @@ func handleMsgUnjail(ctx sdk.Context, msg *types.MsgUnjail, k keeper.Keeper) (*s sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddr.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddr), ), ) diff --git a/x/slashing/keeper/grpc_query.go b/x/slashing/keeper/grpc_query.go index 04ba220cb8..982d093997 100644 --- a/x/slashing/keeper/grpc_query.go +++ b/x/slashing/keeper/grpc_query.go @@ -30,12 +30,17 @@ func (k Keeper) SigningInfo(c context.Context, req *types.QuerySigningInfoReques return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.ConsAddress == nil { + if req.ConsAddress == "" { return nil, status.Errorf(codes.InvalidArgument, "invalid request") } + consAddr, err := sdk.ConsAddressFromBech32(req.ConsAddress) + if err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(c) - signingInfo, found := k.GetValidatorSigningInfo(ctx, req.ConsAddress) + signingInfo, found := k.GetValidatorSigningInfo(ctx, consAddr) if !found { return nil, status.Errorf(codes.NotFound, "SigningInfo not found for validator %s", req.ConsAddress) } diff --git a/x/slashing/keeper/grpc_query_test.go b/x/slashing/keeper/grpc_query_test.go index ef47b26710..199fd9b05e 100644 --- a/x/slashing/keeper/grpc_query_test.go +++ b/x/slashing/keeper/grpc_query_test.go @@ -66,7 +66,7 @@ func (suite *SlashingTestSuite) TestGRPCQueryParams() { func (suite *SlashingTestSuite) TestGRPCSigningInfo() { queryClient := suite.queryClient - infoResp, err := queryClient.SigningInfo(gocontext.Background(), &types.QuerySigningInfoRequest{ConsAddress: nil}) + infoResp, err := queryClient.SigningInfo(gocontext.Background(), &types.QuerySigningInfoRequest{ConsAddress: ""}) suite.Error(err) suite.Nil(infoResp) @@ -75,7 +75,7 @@ func (suite *SlashingTestSuite) TestGRPCSigningInfo() { suite.True(found) infoResp, err = queryClient.SigningInfo(gocontext.Background(), - &types.QuerySigningInfoRequest{ConsAddress: consAddr}) + &types.QuerySigningInfoRequest{ConsAddress: consAddr.String()}) suite.NoError(err) suite.Equal(info, infoResp.ValSigningInfo) } diff --git a/x/slashing/keeper/querier.go b/x/slashing/keeper/querier.go index b168c4e62f..036f3a16dd 100644 --- a/x/slashing/keeper/querier.go +++ b/x/slashing/keeper/querier.go @@ -48,9 +48,9 @@ func querySigningInfo(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQu return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - signingInfo, found := k.GetValidatorSigningInfo(ctx, params.ConsAddress) + signingInfo, found := k.GetValidatorSigningInfo(ctx, sdk.ConsAddress(params.ConsAddress)) if !found { - return nil, sdkerrors.Wrap(types.ErrNoSigningInfoFound, params.ConsAddress.String()) + return nil, sdkerrors.Wrap(types.ErrNoSigningInfoFound, params.ConsAddress) } res, err := codec.MarshalJSONIndent(legacyQuerierCdc, signingInfo) diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 2ae8d200cd..71e5e85a4c 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -78,10 +78,11 @@ func TestSimulateMsgUnjail(t *testing.T) { // setup self delegation delTokens := sdk.TokensFromConsensusPower(2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) - val0AccAddress := sdk.AccAddress(validator0.OperatorAddress.Bytes()) - selfDelegation := stakingtypes.NewDelegation(val0AccAddress, validator0.OperatorAddress, issuedShares) + val0AccAddress, err := sdk.ValAddressFromBech32(validator0.OperatorAddress) + require.NoError(t, err) + selfDelegation := stakingtypes.NewDelegation(val0AccAddress.Bytes(), validator0.GetOperator(), issuedShares) app.StakingKeeper.SetDelegation(ctx, selfDelegation) - app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.OperatorAddress, val0AccAddress, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) + app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), val0AccAddress.Bytes(), distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) // begin a new block app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) @@ -96,7 +97,7 @@ func TestSimulateMsgUnjail(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, types.TypeMsgUnjail, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.GetValidatorAddr().String()) + require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddr) require.Len(t, futureOperations, 0) } diff --git a/x/slashing/types/genesis.pb.go b/x/slashing/types/genesis.pb.go index a47e76ce63..2a600bdb6c 100644 --- a/x/slashing/types/genesis.pb.go +++ b/x/slashing/types/genesis.pb.go @@ -144,7 +144,8 @@ func (m *SigningInfo) GetValidatorSigningInfo() ValidatorSigningInfo { return ValidatorSigningInfo{} } -// ValidatorMissedBlocks contains array of missed blocks of corresponding address. +// ValidatorMissedBlocks contains array of missed blocks of corresponding +// address. type ValidatorMissedBlocks struct { // address is the validator address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` diff --git a/x/slashing/types/msg.go b/x/slashing/types/msg.go index da691dffcf..d86ff5eb72 100644 --- a/x/slashing/types/msg.go +++ b/x/slashing/types/msg.go @@ -13,16 +13,21 @@ const ( var _ sdk.Msg = &MsgUnjail{} // NewMsgUnjail creates a new MsgUnjail instance +//nolint:interfacer func NewMsgUnjail(validatorAddr sdk.ValAddress) *MsgUnjail { return &MsgUnjail{ - ValidatorAddr: validatorAddr, + ValidatorAddr: validatorAddr.String(), } } func (msg MsgUnjail) Route() string { return RouterKey } func (msg MsgUnjail) Type() string { return TypeMsgUnjail } func (msg MsgUnjail) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.AccAddress(msg.ValidatorAddr)} + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddr) + if err != nil { + panic(err) + } + return []sdk.AccAddress{valAddr.Bytes()} } // GetSignBytes gets the bytes for the message signer to sign on @@ -33,7 +38,7 @@ func (msg MsgUnjail) GetSignBytes() []byte { // ValidateBasic validity check for the AnteHandler func (msg MsgUnjail) ValidateBasic() error { - if msg.ValidatorAddr.Empty() { + if msg.ValidatorAddr == "" { return ErrBadValidatorAddr } diff --git a/x/slashing/types/query.pb.go b/x/slashing/types/query.pb.go index 306cdee638..31f168becf 100644 --- a/x/slashing/types/query.pb.go +++ b/x/slashing/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( context "context" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -113,10 +112,11 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC method +// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC +// method type QuerySigningInfoRequest struct { // cons_address is the address to query signing info of - ConsAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"cons_address,omitempty"` + ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` } func (m *QuerySigningInfoRequest) Reset() { *m = QuerySigningInfoRequest{} } @@ -152,14 +152,15 @@ func (m *QuerySigningInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySigningInfoRequest proto.InternalMessageInfo -func (m *QuerySigningInfoRequest) GetConsAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { +func (m *QuerySigningInfoRequest) GetConsAddress() string { if m != nil { return m.ConsAddress } - return nil + return "" } -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method type QuerySigningInfoResponse struct { // val_signing_info is the signing info of requested val cons address ValSigningInfo ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info"` @@ -205,7 +206,8 @@ func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo { return ValidatorSigningInfo{} } -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method +// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC +// method type QuerySigningInfosRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -250,7 +252,8 @@ func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest { return nil } -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method type QuerySigningInfosResponse struct { // info is the signing info of all validators Info []ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` @@ -318,41 +321,40 @@ func init() { } var fileDescriptor_791b11d41a861ed0 = []byte{ - // 543 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x3f, 0x6f, 0x13, 0x31, - 0x18, 0xc6, 0xe3, 0xb6, 0x64, 0x70, 0x22, 0x84, 0x4c, 0xa5, 0x96, 0x08, 0x5d, 0xe0, 0x90, 0xd2, - 0x0a, 0x88, 0x4d, 0x82, 0x10, 0x53, 0x07, 0x82, 0x44, 0xc4, 0x06, 0xe1, 0xcf, 0x80, 0x84, 0x22, - 0x5f, 0xe2, 0xba, 0x16, 0x17, 0xfb, 0x7a, 0xbe, 0x44, 0x44, 0x88, 0x85, 0x99, 0x01, 0x89, 0xcf, - 0xc0, 0xc8, 0xc0, 0xb7, 0xe8, 0x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0, 0x93, 0x89, 0xbe, 0x01, 0x58, 0x48, 0xa5, 0x47, 0x77, 0xce, 0xb6, 0x59, 0x1c, 0xe0, 0x52, - 0x6d, 0x05, 0x85, 0xa3, 0xdb, 0x33, 0x74, 0xf7, 0xd1, 0xbd, 0x4c, 0xba, 0xf4, 0x6c, 0x6a, 0xf2, - 0x2e, 0x7d, 0x43, 0xde, 0xa3, 0x2f, 0x00, 0x16, 0xd3, 0xe7, 0x8e, 0x96, 0x47, 0x98, 0x6d, 0x67, - 0x7d, 0x15, 0x89, 0xc3, 0xc6, 0x06, 0x7b, 0x17, 0x55, 0x96, 0xc3, 0x6e, 0x34, 0x8f, 0x46, 0x1e, - 0x38, 0x1e, 0x79, 0xe0, 0xe7, 0xc8, 0x03, 0x9f, 0xc6, 0x5e, 0xee, 0x78, 0xec, 0xe5, 0x7e, 0x8c, - 0xbd, 0xdc, 0xab, 0xea, 0x99, 0x57, 0xfb, 0xed, 0xbc, 0xb1, 0xb9, 0xe5, 0x41, 0xde, 0x7c, 0xb1, - 0xee, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x25, 0xb9, 0x69, 0x79, 0x05, 0x00, 0x00, + // 526 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0x33, 0x6d, 0x0d, 0x38, 0x29, 0x22, 0x63, 0xa1, 0x35, 0xc8, 0xc6, 0xae, 0x90, 0x16, + 0x35, 0x3b, 0x26, 0x22, 0x5e, 0xec, 0xc1, 0x1e, 0x0c, 0xde, 0x34, 0x8a, 0x07, 0x41, 0xc2, 0x6c, + 0x32, 0x9d, 0x0e, 0x6e, 0x66, 0xb6, 0xfb, 0x36, 0xc1, 0x20, 0x5e, 0x3c, 0x7b, 0x10, 0xfc, 0x0c, + 0x1e, 0x3d, 0xf8, 0x2d, 0x7a, 0x2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xcd, 0x6e, 0xfb, 0x3b, 0xf2, 0x19, 0xe1, 0xf5, 0xec, 0xdc, 0xc9, 0xf2, 0x08, 0xb3, 0xe7, + 0x6c, 0x9c, 0x45, 0xe2, 0xb0, 0x03, 0x83, 0xbd, 0x4b, 0xaa, 0xcb, 0x61, 0xef, 0x37, 0x8f, 0x47, + 0x1e, 0x3a, 0x19, 0x79, 0xe8, 0xe7, 0xc8, 0x43, 0x1f, 0xc7, 0x5e, 0xe1, 0x64, 0xec, 0x15, 0xbe, + 0x8f, 0xbd, 0xc2, 0xcb, 0x9a, 0x90, 0xe9, 0x61, 0x3f, 0x0c, 0x3a, 0xba, 0x37, 0xad, 0x65, 0x3f, + 0x35, 0xe8, 0xbe, 0xa6, 0x6f, 0xe6, 0x85, 0xd3, 0x61, 0xcc, 0x21, 0x2c, 0x9a, 0xbf, 0xcf, 0xdd, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x0f, 0xc0, 0xe6, 0x45, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -981,7 +983,7 @@ func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -991,25 +993,23 @@ func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ConsAddress = append(m.ConsAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ConsAddress == nil { - m.ConsAddress = []byte{} - } + m.ConsAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/slashing/types/query.pb.gw.go b/x/slashing/types/query.pb.gw.go index 5ac3296025..083fe73aa9 100644 --- a/x/slashing/types/query.pb.gw.go +++ b/x/slashing/types/query.pb.gw.go @@ -65,7 +65,7 @@ func request_Query_SigningInfo_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") } - protoReq.ConsAddress, err = runtime.Bytes(val) + protoReq.ConsAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) @@ -92,7 +92,7 @@ func local_request_Query_SigningInfo_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") } - protoReq.ConsAddress, err = runtime.Bytes(val) + protoReq.ConsAddress, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) diff --git a/x/slashing/types/signing_info.go b/x/slashing/types/signing_info.go index a9cc15f6ec..ad359c3a51 100644 --- a/x/slashing/types/signing_info.go +++ b/x/slashing/types/signing_info.go @@ -5,18 +5,18 @@ import ( "time" "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" ) // NewValidatorSigningInfo creates a new ValidatorSigningInfo instance +//nolint:interfacer func NewValidatorSigningInfo( condAddr sdk.ConsAddress, startHeight, indexOffset int64, jailedUntil time.Time, tombstoned bool, missedBlocksCounter int64, ) ValidatorSigningInfo { return ValidatorSigningInfo{ - Address: condAddr, + Address: condAddr.String(), StartHeight: startHeight, IndexOffset: indexOffset, JailedUntil: jailedUntil, diff --git a/x/slashing/types/slashing.pb.go b/x/slashing/types/slashing.pb.go index b99db26f1c..87d3baf7c3 100644 --- a/x/slashing/types/slashing.pb.go +++ b/x/slashing/types/slashing.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" @@ -30,16 +29,18 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. +// ValidatorSigningInfo defines a validator's signing info for monitoring their +// liveness activity. type ValidatorSigningInfo struct { - Address github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // height at which validator was first a candidate OR was unjailed StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty" yaml:"start_height"` // index offset into signed block bit array IndexOffset int64 `protobuf:"varint,3,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty" yaml:"index_offset"` // timestamp validator cannot be unjailed until JailedUntil time.Time `protobuf:"bytes,4,opt,name=jailed_until,json=jailedUntil,proto3,stdtime" json:"jailed_until" yaml:"jailed_until"` - // whether or not a validator has been tombstoned (killed out of validator set) + // whether or not a validator has been tombstoned (killed out of validator + // set) Tombstoned bool `protobuf:"varint,5,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` // missed blocks counter (to avoid scanning the array every time) MissedBlocksCounter int64 `protobuf:"varint,6,opt,name=missed_blocks_counter,json=missedBlocksCounter,proto3" json:"missed_blocks_counter,omitempty" yaml:"missed_blocks_counter"` @@ -77,11 +78,11 @@ func (m *ValidatorSigningInfo) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorSigningInfo proto.InternalMessageInfo -func (m *ValidatorSigningInfo) GetAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { +func (m *ValidatorSigningInfo) GetAddress() string { if m != nil { return m.Address } - return nil + return "" } func (m *ValidatorSigningInfo) GetStartHeight() int64 { @@ -185,48 +186,47 @@ func init() { } var fileDescriptor_1078e5d96a74cc52 = []byte{ - // 652 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbf, 0x53, 0x13, 0x41, - 0x14, 0xce, 0x12, 0x44, 0x66, 0x93, 0xea, 0x08, 0x26, 0x46, 0xbd, 0x8b, 0x57, 0x30, 0xb1, 0xe0, - 0x6e, 0xc0, 0x8e, 0xce, 0x83, 0x71, 0xfc, 0x35, 0x8a, 0x07, 0xea, 0x8c, 0x85, 0x37, 0x7b, 0xd9, - 0xcd, 0x65, 0xe5, 0x6e, 0x37, 0x73, 0xbb, 0x11, 0xb0, 0xb3, 0xb3, 0xa4, 0xa4, 0xa4, 0xf4, 0x8f, - 0xf0, 0x0f, 0xa0, 0xa4, 0x74, 0x2c, 0xa2, 0x13, 0x1a, 0x6b, 0x3a, 0xad, 0x9c, 0xdb, 0xbd, 0x83, - 0x0c, 0x04, 0x47, 0xaa, 0xe4, 0x7d, 0xef, 0xbd, 0xef, 0x7d, 0xfb, 0xbd, 0x97, 0xc0, 0x85, 0x0e, - 0x17, 0x09, 0x17, 0xae, 0x88, 0x91, 0xe8, 0x51, 0x16, 0xb9, 0x1f, 0x96, 0x42, 0x22, 0xd1, 0xd2, - 0x29, 0xe0, 0xf4, 0x53, 0x2e, 0xb9, 0x51, 0xd7, 0x75, 0xce, 0x29, 0x9c, 0xd7, 0x35, 0x6b, 0x11, - 0x8f, 0xb8, 0xaa, 0x71, 0xb3, 0x6f, 0xba, 0xbc, 0x69, 0x46, 0x9c, 0x47, 0x31, 0x71, 0x55, 0x14, - 0x0e, 0xba, 0x2e, 0x1e, 0xa4, 0x48, 0x52, 0xce, 0xf2, 0xbc, 0x75, 0x3e, 0x2f, 0x69, 0x42, 0x84, - 0x44, 0x49, 0x5f, 0x17, 0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88, 0xc6, 0x05, 0x81, - 0xb1, 0x07, 0x60, 0x53, 0xfd, 0x10, 0x83, 0x6e, 0x8a, 0x3a, 0x19, 0x14, 0x60, 0x3e, 0x08, 0x63, - 0xa2, 0xc4, 0xab, 0x63, 0xaa, 0x7a, 0x1b, 0x57, 0x36, 0xe1, 0x6e, 0xbe, 0x87, 0x4b, 0x99, 0x6d, - 0xbf, 0xae, 0x92, 0x0f, 0xf3, 0xdc, 0x9a, 0x4a, 0x65, 0xce, 0x18, 0x9f, 0x01, 0xac, 0x5f, 0x68, - 0xd4, 0xd2, 0xd5, 0xf9, 0x55, 0xbd, 0xf5, 0x2b, 0xeb, 0x31, 0x2f, 0xd1, 0xa3, 0x69, 0x6d, 0x7f, - 0xfe, 0x9c, 0x18, 0x8d, 0x7b, 0x4f, 0xbf, 0x8c, 0x4c, 0x70, 0x38, 0x32, 0xc1, 0xd1, 0xc8, 0x04, - 0x3f, 0x47, 0x26, 0xd8, 0x3b, 0x36, 0x4b, 0x47, 0xc7, 0x66, 0xe9, 0xdb, 0xb1, 0x59, 0x7a, 0xbb, - 0xf8, 0xcf, 0xf1, 0x3b, 0x67, 0x7f, 0x84, 0x4a, 0x49, 0x38, 0xa3, 0xd6, 0x77, 0xff, 0x6f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xe2, 0x97, 0xe5, 0x36, 0x28, 0x05, 0x00, 0x00, + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbd, 0x6f, 0xd3, 0x4e, + 0x18, 0xce, 0xfd, 0xd2, 0x5f, 0x29, 0x97, 0x4c, 0x6e, 0x4a, 0x4c, 0x00, 0x3b, 0x78, 0xa8, 0xc2, + 0x50, 0x5b, 0x2d, 0x5b, 0x47, 0x53, 0x21, 0x3e, 0x24, 0x28, 0x6e, 0x01, 0x89, 0x01, 0xeb, 0x9c, + 0xbb, 0x38, 0x47, 0x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, 0x3c, 0xb3, 0x2a, 0xa7, 0x67, 0x56, 0xe5, 0xfb, 0x99, 0x55, 0xf9, 0xb0, + 0xf2, 0xcf, 0xe7, 0xf7, 0x2e, 0xff, 0xd4, 0x94, 0x93, 0x68, 0x5e, 0xad, 0xef, 0xf1, 0xdf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x7b, 0x78, 0xfd, 0x40, 0xf4, 0x04, 0x00, 0x00, } func (this *ValidatorSigningInfo) Equal(that interface{}) bool { @@ -248,7 +248,7 @@ func (this *ValidatorSigningInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if !bytes.Equal(this.Address, that1.Address) { + if this.Address != that1.Address { return false } if this.StartHeight != that1.StartHeight { @@ -530,7 +530,7 @@ func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSlashing @@ -540,25 +540,23 @@ func (m *ValidatorSigningInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSlashing } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSlashing } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { diff --git a/x/slashing/types/tx.pb.go b/x/slashing/types/tx.pb.go index 03db68cf3c..01e951a7c8 100644 --- a/x/slashing/types/tx.pb.go +++ b/x/slashing/types/tx.pb.go @@ -4,9 +4,7 @@ package types import ( - bytes "bytes" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -29,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // them into the bonded validator set, so they can begin receiving provisions // and rewards again. type MsgUnjail struct { - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"address" yaml:"address"` + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"address" yaml:"address"` } func (m *MsgUnjail) Reset() { *m = MsgUnjail{} } @@ -65,13 +63,6 @@ func (m *MsgUnjail) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUnjail proto.InternalMessageInfo -func (m *MsgUnjail) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddr - } - return nil -} - func init() { proto.RegisterType((*MsgUnjail)(nil), "cosmos.slashing.v1beta1.MsgUnjail") } @@ -79,22 +70,22 @@ func init() { func init() { proto.RegisterFile("cosmos/slashing/v1beta1/tx.proto", fileDescriptor_3c5611c0c4a59d9d) } var fileDescriptor_3c5611c0c4a59d9d = []byte{ - // 231 bytes of a gzipped FileDescriptorProto + // 227 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x2f, 0xce, 0x49, 0x2c, 0xce, 0xc8, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, - 0xb1, 0x20, 0xca, 0x95, 0x9a, 0x18, 0xb9, 0x38, 0x7d, 0x8b, 0xd3, 0x43, 0xf3, 0xb2, 0x12, 0x33, - 0x73, 0x84, 0x4a, 0xb9, 0xf8, 0xca, 0x12, 0x73, 0x32, 0x53, 0x12, 0x4b, 0xf2, 0x8b, 0xe2, 0x13, - 0x53, 0x52, 0x8a, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x9c, 0xfc, 0x5e, 0xdd, 0x93, 0x67, 0x07, - 0xf1, 0x53, 0x8b, 0x8b, 0x3f, 0xdd, 0x93, 0xe7, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x82, 0x0a, - 0x28, 0xfd, 0xba, 0x27, 0xaf, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, - 0x0f, 0x75, 0x22, 0x84, 0xd2, 0x2d, 0x4e, 0xc9, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x0b, - 0x4b, 0xcc, 0x71, 0x84, 0xe8, 0x08, 0xe2, 0x85, 0xdb, 0x02, 0x12, 0x71, 0xf2, 0x5e, 0xf1, 0x48, - 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, - 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf0, 0x9b, 0x5d, 0x81, - 0x08, 0x0b, 0xb0, 0x35, 0x49, 0x6c, 0x60, 0x8f, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, - 0x61, 0xe5, 0x85, 0x2b, 0x01, 0x00, 0x00, + 0xb1, 0x20, 0xca, 0x95, 0xa2, 0xb9, 0x38, 0x7d, 0x8b, 0xd3, 0x43, 0xf3, 0xb2, 0x12, 0x33, 0x73, + 0x84, 0x5c, 0xb8, 0xf8, 0xca, 0x12, 0x73, 0x32, 0x53, 0x12, 0x4b, 0xf2, 0x8b, 0xe2, 0x13, 0x53, + 0x52, 0x8a, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x64, 0x5f, 0xdd, 0x93, 0x67, 0x07, 0xf1, + 0x53, 0x8b, 0x8b, 0x3f, 0xdd, 0x93, 0xe7, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x82, 0x0a, 0x28, + 0x05, 0xf1, 0xc2, 0x35, 0x39, 0xa6, 0xa4, 0x14, 0x59, 0x71, 0x74, 0x2c, 0x90, 0x67, 0x98, 0xb1, + 0x40, 0x9e, 0xd1, 0xc9, 0x7b, 0xc5, 0x23, 0x39, 0xc6, 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, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, + 0x7a, 0x0b, 0x42, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x57, 0x20, 0xfc, 0x58, 0x52, 0x59, 0x90, 0x5a, + 0x9c, 0xc4, 0x06, 0x76, 0xb0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x4a, 0x48, 0x01, 0x03, + 0x01, 0x00, 0x00, } func (this *MsgUnjail) Equal(that interface{}) bool { @@ -116,7 +107,7 @@ func (this *MsgUnjail) Equal(that interface{}) bool { } else if this == nil { return false } - if !bytes.Equal(this.ValidatorAddr, that1.ValidatorAddr) { + if this.ValidatorAddr != that1.ValidatorAddr { return false } return true @@ -214,7 +205,7 @@ func (m *MsgUnjail) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -224,25 +215,23 @@ func (m *MsgUnjail) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 28cbfdce60..7e74d51b66 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -45,16 +45,16 @@ func TestStakingMsgs(t *testing.T) { genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens) bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) - acc1 := &authtypes.BaseAccount{Address: addr1} - acc2 := &authtypes.BaseAccount{Address: addr2} + acc1 := &authtypes.BaseAccount{Address: addr1.String()} + acc2 := &authtypes.BaseAccount{Address: addr2.String()} accs := authtypes.GenesisAccounts{acc1, acc2} balances := []banktypes.Balance{ { - Address: addr1, + Address: addr1.String(), Coins: sdk.Coins{genCoin}, }, { - Address: addr2, + Address: addr2.String(), Coins: sdk.Coins{genCoin}, }, } @@ -79,7 +79,7 @@ func TestStakingMsgs(t *testing.T) { app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, sdk.ValAddress(addr1), true) - require.Equal(t, sdk.ValAddress(addr1), validator.OperatorAddress) + require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) require.Equal(t, sdk.Bonded, validator.Status) require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens())) diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index 56156a3757..ba0f7119fc 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -234,7 +234,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidator() { } else { var result types.Validator s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &result)) - s.Require().Equal(val.ValAddress, result.OperatorAddress) + s.Require().Equal(val.ValAddress.String(), result.OperatorAddress) } }) } @@ -317,8 +317,8 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() { &types.DelegationResponse{}, &types.DelegationResponse{ Delegation: types.Delegation{ - DelegatorAddress: val.Address, - ValidatorAddress: val2.ValAddress, + DelegatorAddress: val.Address.String(), + ValidatorAddress: val2.ValAddress.String(), Shares: sdk.NewDec(10), }, Balance: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10)), @@ -498,7 +498,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegations() { s.Require().NoError(err) s.Require().Len(ubds.UnbondingResponses, 1) - s.Require().Equal(ubds.UnbondingResponses[0].DelegatorAddress, val.Address) + s.Require().Equal(ubds.UnbondingResponses[0].DelegatorAddress, val.Address.String()) } }) } @@ -556,8 +556,8 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() { err = val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &ubd) s.Require().NoError(err) - s.Require().Equal(ubd.DelegatorAddress, val.Address) - s.Require().Equal(ubd.ValidatorAddress, val.ValAddress) + s.Require().Equal(ubd.DelegatorAddress, val.Address.String()) + s.Require().Equal(ubd.ValidatorAddress, val.ValAddress.String()) s.Require().Len(ubd.Entries, 1) } }) @@ -606,7 +606,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorUnbondingDelegations() { s.Require().NoError(err) s.Require().Len(ubds.UnbondingResponses, 1) - s.Require().Equal(ubds.UnbondingResponses[0].DelegatorAddress, val.Address) + s.Require().Equal(ubds.UnbondingResponses[0].DelegatorAddress, val.Address.String()) } }) } @@ -656,9 +656,9 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegations() { s.Require().NoError(err) s.Require().Len(redelegations.RedelegationResponses, 1) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress.String()) } }) } @@ -732,9 +732,9 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() { s.Require().NoError(err) s.Require().Len(redelegations.RedelegationResponses, 1) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress.String()) } }) } @@ -784,9 +784,9 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegationsFrom() { s.Require().NoError(err) s.Require().Len(redelegations.RedelegationResponses, 1) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress.String()) } }) } diff --git a/x/staking/client/cli/query.go b/x/staking/client/cli/query.go index d1689f0350..eeb2bb95b0 100644 --- a/x/staking/client/cli/query.go +++ b/x/staking/client/cli/query.go @@ -76,7 +76,7 @@ $ %s query staking validator %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj return err } - params := &types.QueryValidatorRequest{ValidatorAddr: addr} + params := &types.QueryValidatorRequest{ValidatorAddr: addr.String()} res, err := queryClient.Validator(cmd.Context(), params) if err != nil { return err @@ -174,7 +174,7 @@ $ %s query staking unbonding-delegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9l } params := &types.QueryValidatorUnbondingDelegationsRequest{ - ValidatorAddr: valAddr, + ValidatorAddr: valAddr.String(), Pagination: pageReq, } @@ -231,7 +231,7 @@ $ %s query staking redelegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } params := &types.QueryRedelegationsRequest{ - SrcValidatorAddr: valSrcAddr, + SrcValidatorAddr: valSrcAddr.String(), Pagination: pageReq, } @@ -288,8 +288,8 @@ $ %s query staking delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghju } params := &types.QueryDelegationRequest{ - DelegatorAddr: delAddr, - ValidatorAddr: valAddr, + DelegatorAddr: delAddr.String(), + ValidatorAddr: valAddr.String(), } res, err := queryClient.Delegation(context.Background(), params) @@ -344,7 +344,7 @@ $ %s query staking delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p } params := &types.QueryDelegatorDelegationsRequest{ - DelegatorAddr: delAddr, + DelegatorAddr: delAddr.String(), Pagination: pageReq, } @@ -401,7 +401,7 @@ $ %s query staking delegations-to %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } params := &types.QueryValidatorDelegationsRequest{ - ValidatorAddr: valAddr, + ValidatorAddr: valAddr.String(), Pagination: pageReq, } @@ -459,8 +459,8 @@ $ %s query staking unbonding-delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9 } params := &types.QueryUnbondingDelegationRequest{ - DelegatorAddr: delAddr, - ValidatorAddr: valAddr, + DelegatorAddr: delAddr.String(), + ValidatorAddr: valAddr.String(), } res, err := queryClient.UnbondingDelegation(context.Background(), params) @@ -515,7 +515,7 @@ $ %s query staking unbonding-delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru } params := &types.QueryDelegatorUnbondingDelegationsRequest{ - DelegatorAddr: delegatorAddr, + DelegatorAddr: delegatorAddr.String(), Pagination: pageReq, } @@ -578,9 +578,9 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1l2r } params := &types.QueryRedelegationsRequest{ - DelegatorAddr: delAddr, - DstValidatorAddr: valDstAddr, - SrcValidatorAddr: valSrcAddr, + DelegatorAddr: delAddr.String(), + DstValidatorAddr: valDstAddr.String(), + SrcValidatorAddr: valSrcAddr.String(), } res, err := queryClient.Redelegations(context.Background(), params) @@ -635,7 +635,7 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p } params := &types.QueryRedelegationsRequest{ - DelegatorAddr: delAddr, + DelegatorAddr: delAddr.String(), Pagination: pageReq, } diff --git a/x/staking/client/rest/grpc_query_test.go b/x/staking/client/rest/grpc_query_test.go index d2a45aa18f..73386fb62a 100644 --- a/x/staking/client/rest/grpc_query_test.go +++ b/x/staking/client/rest/grpc_query_test.go @@ -3,7 +3,6 @@ package rest_test import ( - "encoding/base64" "fmt" "testing" @@ -115,10 +114,6 @@ func (s *IntegrationTestSuite) TestQueryValidatorGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -136,7 +131,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s", baseURL, valAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s", baseURL, val.ValAddress.String()), false, }, } @@ -155,7 +150,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorGRPC() { } else { s.Require().NoError(err) s.Require().NotNil(validator.Validator) - s.Require().Equal(s.network.Validators[0].ValAddress, validator.Validator.OperatorAddress) + s.Require().Equal(s.network.Validators[0].ValAddress.String(), validator.Validator.OperatorAddress) } }) } @@ -165,10 +160,6 @@ func (s *IntegrationTestSuite) TestQueryValidatorDelegationsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -195,7 +186,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorDelegationsGRPC() { }, { "valid request(height specific)", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations", baseURL, valAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations", baseURL, val.ValAddress.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "1", }, @@ -232,10 +223,6 @@ func (s *IntegrationTestSuite) TestQueryValidatorUnbondingDelegationsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -253,7 +240,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorUnbondingDelegationsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/unbonding_delegations", baseURL, valAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/unbonding_delegations", baseURL, val.ValAddress.String()), false, }, } @@ -273,7 +260,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorUnbondingDelegationsGRPC() { } else { s.Require().NoError(err) s.Require().Len(ubds.UnbondingResponses, 1) - s.Require().Equal(ubds.UnbondingResponses[0].ValidatorAddress, val.ValAddress) + s.Require().Equal(ubds.UnbondingResponses[0].ValidatorAddress, val.ValAddress.String()) } }) } @@ -284,14 +271,6 @@ func (s *IntegrationTestSuite) TestQueryDelegationGRPC() { val2 := s.network.Validators[1] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val2.Address) - - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - accAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -301,42 +280,42 @@ func (s *IntegrationTestSuite) TestQueryDelegationGRPC() { }{ { "wrong validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, "wrongValAddress", accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, "wrongValAddress", val.Address.String()), true, &types.QueryDelegationResponse{}, nil, }, { "wrong account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, valAddressBase64, "wrongAccAddress"), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, val.ValAddress.String(), "wrongAccAddress"), true, &types.QueryDelegationResponse{}, nil, }, { "with no validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, "", accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, "", val.Address.String()), true, &types.QueryDelegationResponse{}, nil, }, { "with no account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, valAddressBase64, ""), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, val.ValAddress.String(), ""), true, &types.QueryDelegationResponse{}, nil, }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, valAddressBase64, accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s", baseURL, val2.ValAddress.String(), val.Address.String()), false, &types.QueryDelegationResponse{}, &types.QueryDelegationResponse{ DelegationResponse: &types.DelegationResponse{ Delegation: types.Delegation{ - DelegatorAddress: val.Address, - ValidatorAddress: val2.ValAddress, + DelegatorAddress: val.Address.String(), + ValidatorAddress: val2.ValAddress.String(), Shares: sdk.NewDec(10), }, Balance: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10)), @@ -367,14 +346,6 @@ func (s *IntegrationTestSuite) TestQueryUnbondingDelegationGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - accAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -382,27 +353,27 @@ func (s *IntegrationTestSuite) TestQueryUnbondingDelegationGRPC() { }{ { "wrong validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, "wrongValAddress", accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, "wrongValAddress", val.Address.String()), true, }, { "wrong account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, valAddressBase64, "wrongAccAddress"), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, val.ValAddress.String(), "wrongAccAddress"), true, }, { "with no validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, "", accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, "", val.Address.String()), true, }, { "with no account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, valAddressBase64, ""), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, val.ValAddress.String(), ""), true, }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, valAddressBase64, accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/validators/%s/delegations/%s/unbonding_delegation", baseURL, val.ValAddress.String(), val.Address.String()), false, }, } @@ -421,8 +392,8 @@ func (s *IntegrationTestSuite) TestQueryUnbondingDelegationGRPC() { s.Require().Error(err) } else { s.Require().NoError(err) - s.Require().Equal(ubd.Unbond.DelegatorAddress, val.Address) - s.Require().Equal(ubd.Unbond.ValidatorAddress, val.ValAddress) + s.Require().Equal(ubd.Unbond.DelegatorAddress, val.Address.String()) + s.Require().Equal(ubd.Unbond.ValidatorAddress, val.ValAddress.String()) s.Require().Len(ubd.Unbond.Entries, 1) } }) @@ -433,10 +404,6 @@ func (s *IntegrationTestSuite) TestQueryDelegatorDelegationsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -463,7 +430,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorDelegationsGRPC() { }, { "valid request (height specific)", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegations/%s", baseURL, delAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegations/%s", baseURL, val.Address.String()), map[string]string{ grpctypes.GRPCBlockHeightHeader: "1", }, @@ -500,10 +467,6 @@ func (s *IntegrationTestSuite) TestQueryDelegatorUnbondingDelegationsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -524,7 +487,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorUnbondingDelegationsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/unbonding_delegations", baseURL, delAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/unbonding_delegations", baseURL, val.Address.String()), false, 1, }, @@ -555,18 +518,6 @@ func (s *IntegrationTestSuite) TestQueryRedelegationsGRPC() { val2 := s.network.Validators[1] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - srcValBase64 := base64.URLEncoding.EncodeToString(val.Address) - - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - dstValBase64 := base64.URLEncoding.EncodeToString(val2.Address) - testCases := []struct { name string url string @@ -584,22 +535,22 @@ func (s *IntegrationTestSuite) TestQueryRedelegationsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations", baseURL, delAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations", baseURL, val.Address.String()), false, }, { "valid request with src address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?src_validator_addr=%s", baseURL, delAddressBase64, srcValBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?src_validator_addr=%s", baseURL, val.Address.String(), val.ValAddress.String()), false, }, { "valid request with dst address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?dst_validator_addr=%s", baseURL, delAddressBase64, dstValBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?dst_validator_addr=%s", baseURL, val.Address.String(), val2.ValAddress.String()), false, }, { "valid request with dst address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?src_validator_addr=%s&dst_validator_addr=%s", baseURL, delAddressBase64, srcValBase64, dstValBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/redelegations?src_validator_addr=%s&dst_validator_addr=%s", baseURL, val.Address.String(), val.ValAddress.String(), val2.ValAddress.String()), false, }, } @@ -619,9 +570,9 @@ func (s *IntegrationTestSuite) TestQueryRedelegationsGRPC() { s.Require().NoError(err) s.Require().Len(redelegations.RedelegationResponses, 1) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress) - s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.DelegatorAddress, val.Address.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorSrcAddress, val.ValAddress.String()) + s.Require().Equal(redelegations.RedelegationResponses[0].Redelegation.ValidatorDstAddress, val2.ValAddress.String()) } }) } @@ -631,10 +582,6 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorsGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - delAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string @@ -652,7 +599,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorsGRPC() { }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators", baseURL, delAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators", baseURL, val.Address.String()), false, }, } @@ -682,42 +629,34 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorGRPC() { val := s.network.Validators[0] baseURL := val.APIAddress - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - valAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - - // TODO: need to pass bech32 string instead of base64 encoding string. - // ref: https://github.com/cosmos/cosmos-sdk/issues/7195 - accAddressBase64 := base64.URLEncoding.EncodeToString(val.Address) - testCases := []struct { name string url string error bool }{ + { + "wrong delegator address", + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, "wrongAccAddress", val.ValAddress.String()), + true, + }, { "wrong validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, "wrongValAddress", accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, val.Address.String(), "wrongValAddress"), true, }, { - "wrong account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, valAddressBase64, "wrongAccAddress"), + "with empty delegator address", + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, "", val.ValAddress.String()), true, }, { - "with no validator address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, "", accAddressBase64), - true, - }, - { - "with no account address", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, valAddressBase64, ""), + "with empty validator address", + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, val.Address.String(), ""), true, }, { "valid request", - fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, valAddressBase64, accAddressBase64), + fmt.Sprintf("%s/cosmos/staking/v1beta1/delegators/%s/validators/%s", baseURL, val.Address.String(), val.ValAddress.String()), false, }, } @@ -736,7 +675,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorValidatorGRPC() { } else { s.Require().NoError(err) s.Require().NotNil(validator) - s.Require().Equal(validator.Validator.OperatorAddress, val.ValAddress) + s.Require().Equal(validator.Validator.OperatorAddress, val.ValAddress.String()) } }) } diff --git a/x/staking/client/rest/utils.go b/x/staking/client/rest/utils.go index cacba533dc..2b8a1c4dcf 100644 --- a/x/staking/client/rest/utils.go +++ b/x/staking/client/rest/utils.go @@ -57,7 +57,7 @@ func queryBonds(clientCtx client.Context, endpoint string) http.HandlerFunc { return } - params := types.QueryDelegatorValidatorRequest{DelegatorAddr: delegatorAddr, ValidatorAddr: validatorAddr} + params := types.QueryDelegatorValidatorRequest{DelegatorAddr: delegatorAddr.String(), ValidatorAddr: validatorAddr.String()} bz, err := clientCtx.LegacyAmino.MarshalJSON(params) if rest.CheckBadRequestError(w, err) { diff --git a/x/staking/genesis.go b/x/staking/genesis.go index ebba834dbb..c339707e53 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -43,7 +43,7 @@ func InitGenesis( // Call the creation hook if not exported if !data.Exported { - keeper.AfterValidatorCreated(ctx, validator.OperatorAddress) + keeper.AfterValidatorCreated(ctx, validator.GetOperator()) } // update timeslice if necessary @@ -62,15 +62,20 @@ func InitGenesis( } for _, delegation := range data.Delegations { + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } + // Call the before-creation hook if not exported if !data.Exported { - keeper.BeforeDelegationCreated(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + keeper.BeforeDelegationCreated(ctx, delegatorAddress, delegation.GetValidatorAddr()) } keeper.SetDelegation(ctx, delegation) // Call the after-modification hook if not exported if !data.Exported { - keeper.AfterDelegationModified(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + keeper.AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()) } } @@ -126,8 +131,12 @@ func InitGenesis( // don't need to run Tendermint updates if we exported if data.Exported { for _, lv := range data.LastValidatorPowers { - keeper.SetLastValidatorPower(ctx, lv.Address, lv.Power) - validator, found := keeper.GetValidator(ctx, lv.Address) + valAddr, err := sdk.ValAddressFromBech32(lv.Address) + if err != nil { + panic(err) + } + keeper.SetLastValidatorPower(ctx, valAddr, lv.Power) + validator, found := keeper.GetValidator(ctx, valAddr) if !found { panic(fmt.Sprintf("validator %s not found", lv.Address)) @@ -165,7 +174,7 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { var lastValidatorPowers []types.LastValidatorPower keeper.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) { - lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addr, Power: power}) + lastValidatorPowers = append(lastValidatorPowers, types.LastValidatorPower{Address: addr.String(), Power: power}) return false }) diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 55daa7935a..6ee682b563 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -50,13 +50,13 @@ func TestInitGenesis(t *testing.T) { require.NoError(t, err) // initialize the validators - validators[0].OperatorAddress = sdk.ValAddress(addrs[0]) + validators[0].OperatorAddress = sdk.ValAddress(addrs[0]).String() validators[0].ConsensusPubkey = pk0 validators[0].Description = types.NewDescription("hoop", "", "", "", "") validators[0].Status = sdk.Bonded validators[0].Tokens = valTokens validators[0].DelegatorShares = valTokens.ToDec() - validators[1].OperatorAddress = sdk.ValAddress(addrs[1]) + validators[1].OperatorAddress = sdk.ValAddress(addrs[1]).String() validators[1].ConsensusPubkey = pk1 validators[1].Description = types.NewDescription("bloop", "", "", "", "") validators[1].Status = sdk.Bonded diff --git a/x/staking/handler.go b/x/staking/handler.go index 8159365fa0..6c647f9343 100644 --- a/x/staking/handler.go +++ b/x/staking/handler.go @@ -44,8 +44,14 @@ func NewHandler(k keeper.Keeper) sdk.Handler { // now we just perform action and save func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k keeper.Keeper) (*sdk.Result, error) { + + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + // check to see if the pubkey or sender has been registered before - if _, found := k.GetValidator(ctx, msg.ValidatorAddress); found { + if _, found := k.GetValidator(ctx, valAddr); found { return nil, types.ErrValidatorOwnerExists } @@ -77,7 +83,7 @@ func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k } } - validator := types.NewValidator(msg.ValidatorAddress, pk, msg.Description) + validator := types.NewValidator(valAddr, pk, msg.Description) commission := types.NewCommissionWithTime( msg.Commission.Rate, msg.Commission.MaxRate, msg.Commission.MaxChangeRate, ctx.BlockHeader().Time, @@ -88,6 +94,11 @@ func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k return nil, err } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + validator.MinSelfDelegation = msg.MinSelfDelegation k.SetValidator(ctx, validator) @@ -95,12 +106,12 @@ func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k k.SetNewValidatorByPowerIndex(ctx, validator) // call the after-creation hook - k.AfterValidatorCreated(ctx, validator.OperatorAddress) + k.AfterValidatorCreated(ctx, validator.GetOperator()) // move coins from the msg.Address account to a (self-delegation) delegator account // the validator account and global shares are updated within here // NOTE source will always be from a wallet which are unbonded - _, err = k.Delegate(ctx, msg.DelegatorAddress, msg.Value.Amount, sdk.Unbonded, validator, true) + _, err = k.Delegate(ctx, delegatorAddress, msg.Value.Amount, sdk.Unbonded, validator, true) if err != nil { return nil, err } @@ -108,13 +119,13 @@ func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeCreateValidator, - sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress.String()), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Value.Amount.String()), ), sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), }) @@ -122,8 +133,12 @@ func handleMsgCreateValidator(ctx sdk.Context, msg *types.MsgCreateValidator, k } func handleMsgEditValidator(ctx sdk.Context, msg *types.MsgEditValidator, k keeper.Keeper) (*sdk.Result, error) { + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } // validator must already be registered - validator, found := k.GetValidator(ctx, msg.ValidatorAddress) + validator, found := k.GetValidator(ctx, valAddr) if !found { return nil, types.ErrNoValidatorFound } @@ -143,7 +158,7 @@ func handleMsgEditValidator(ctx sdk.Context, msg *types.MsgEditValidator, k keep } // call the before-modification hook since we're about to update the commission - k.BeforeValidatorModified(ctx, msg.ValidatorAddress) + k.BeforeValidatorModified(ctx, valAddr) validator.Commission = commission } @@ -171,7 +186,7 @@ func handleMsgEditValidator(ctx sdk.Context, msg *types.MsgEditValidator, k keep sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.ValidatorAddress), ), }) @@ -179,18 +194,28 @@ func handleMsgEditValidator(ctx sdk.Context, msg *types.MsgEditValidator, k keep } func handleMsgDelegate(ctx sdk.Context, msg *types.MsgDelegate, k keeper.Keeper) (*sdk.Result, error) { - validator, found := k.GetValidator(ctx, msg.ValidatorAddress) + valAddr, valErr := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if valErr != nil { + return nil, valErr + } + + validator, found := k.GetValidator(ctx, valAddr) if !found { return nil, types.ErrNoValidatorFound } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + bondDenom := k.BondDenom(ctx) if msg.Amount.Denom != bondDenom { return nil, sdkerrors.Wrapf(types.ErrBadDenom, "got %s, expected %s", msg.Amount.Denom, bondDenom) } // NOTE: source funds are always unbonded - _, err := k.Delegate(ctx, msg.DelegatorAddress, msg.Amount.Amount, sdk.Unbonded, validator, true) + _, err = k.Delegate(ctx, delegatorAddress, msg.Amount.Amount, sdk.Unbonded, validator, true) if err != nil { return nil, err } @@ -207,13 +232,13 @@ func handleMsgDelegate(ctx sdk.Context, msg *types.MsgDelegate, k keeper.Keeper) ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeDelegate, - sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress.String()), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), ), sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), }) @@ -221,8 +246,16 @@ func handleMsgDelegate(ctx sdk.Context, msg *types.MsgDelegate, k keeper.Keeper) } func handleMsgUndelegate(ctx sdk.Context, msg *types.MsgUndelegate, k keeper.Keeper) (*sdk.Result, error) { + addr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } shares, err := k.ValidateUnbondAmount( - ctx, msg.DelegatorAddress, msg.ValidatorAddress, msg.Amount.Amount, + ctx, delegatorAddress, addr, msg.Amount.Amount, ) if err != nil { return nil, err @@ -233,7 +266,7 @@ func handleMsgUndelegate(ctx sdk.Context, msg *types.MsgUndelegate, k keeper.Kee return nil, sdkerrors.Wrapf(types.ErrBadDenom, "got %s, expected %s", msg.Amount.Denom, bondDenom) } - completionTime, err := k.Undelegate(ctx, msg.DelegatorAddress, msg.ValidatorAddress, shares) + completionTime, err := k.Undelegate(ctx, delegatorAddress, addr, shares) if err != nil { return nil, err } @@ -256,14 +289,14 @@ func handleMsgUndelegate(ctx sdk.Context, msg *types.MsgUndelegate, k keeper.Kee ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeUnbond, - sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress.String()), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), }) @@ -271,8 +304,16 @@ func handleMsgUndelegate(ctx sdk.Context, msg *types.MsgUndelegate, k keeper.Kee } func handleMsgBeginRedelegate(ctx sdk.Context, msg *types.MsgBeginRedelegate, k keeper.Keeper) (*sdk.Result, error) { + valSrcAddr, err := sdk.ValAddressFromBech32(msg.ValidatorSrcAddress) + if err != nil { + return nil, err + } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } shares, err := k.ValidateUnbondAmount( - ctx, msg.DelegatorAddress, msg.ValidatorSrcAddress, msg.Amount.Amount, + ctx, delegatorAddress, valSrcAddr, msg.Amount.Amount, ) if err != nil { return nil, err @@ -283,8 +324,13 @@ func handleMsgBeginRedelegate(ctx sdk.Context, msg *types.MsgBeginRedelegate, k return nil, sdkerrors.Wrapf(types.ErrBadDenom, "got %s, expected %s", msg.Amount.Denom, bondDenom) } + valDstAddr, err := sdk.ValAddressFromBech32(msg.ValidatorDstAddress) + if err != nil { + return nil, err + } + completionTime, err := k.BeginRedelegation( - ctx, msg.DelegatorAddress, msg.ValidatorSrcAddress, msg.ValidatorDstAddress, shares, + ctx, delegatorAddress, valSrcAddr, valDstAddr, shares, ) if err != nil { return nil, err @@ -308,15 +354,15 @@ func handleMsgBeginRedelegate(ctx sdk.Context, msg *types.MsgBeginRedelegate, k ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRedelegate, - sdk.NewAttribute(types.AttributeKeySrcValidator, msg.ValidatorSrcAddress.String()), - sdk.NewAttribute(types.AttributeKeyDstValidator, msg.ValidatorDstAddress.String()), + sdk.NewAttribute(types.AttributeKeySrcValidator, msg.ValidatorSrcAddress), + sdk.NewAttribute(types.AttributeKeyDstValidator, msg.ValidatorDstAddress), sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.Amount.String()), sdk.NewAttribute(types.AttributeKeyCompletionTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress.String()), + sdk.NewAttribute(sdk.AttributeKeySender, msg.DelegatorAddress), ), }) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 9ac3e10e6a..f4cf4c72f1 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -153,7 +153,7 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator, found := app.StakingKeeper.GetValidator(ctx, addr1) require.True(t, found) assert.Equal(t, sdk.Bonded, validator.Status) - assert.Equal(t, addr1, validator.OperatorAddress) + assert.Equal(t, addr1.String(), validator.OperatorAddress) assert.Equal(t, pk1.(cryptotypes.IntoTmPubKey).AsTmPubKey(), validator.GetConsPubKey()) assert.Equal(t, valTokens, validator.BondedTokens()) assert.Equal(t, valTokens.ToDec(), validator.DelegatorShares) @@ -185,7 +185,7 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { require.True(t, found) assert.Equal(t, sdk.Bonded, validator.Status) - assert.Equal(t, addr2, validator.OperatorAddress) + assert.Equal(t, addr2.String(), validator.OperatorAddress) assert.Equal(t, pk2.(cryptotypes.IntoTmPubKey).AsTmPubKey(), validator.GetConsPubKey()) assert.True(sdk.IntEq(t, valTokens, validator.Tokens)) assert.True(sdk.DecEq(t, valTokens.ToDec(), validator.DelegatorShares)) diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index b7f32c3fc9..1038799235 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -90,17 +90,26 @@ func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddres // set a delegation func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } + store := ctx.KVStore(k.storeKey) b := types.MustMarshalDelegation(k.cdc, delegation) - store.Set(types.GetDelegationKey(delegation.DelegatorAddress, delegation.ValidatorAddress), b) + store.Set(types.GetDelegationKey(delegatorAddress, delegation.GetValidatorAddr()), b) } // remove a delegation func (k Keeper) RemoveDelegation(ctx sdk.Context, delegation types.Delegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } // TODO: Consider calling hooks outside of the store wrapper functions, it's unobvious. - k.BeforeDelegationRemoved(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + k.BeforeDelegationRemoved(ctx, delegatorAddress, delegation.GetValidatorAddr()) store := ctx.KVStore(k.storeKey) - store.Delete(types.GetDelegationKey(delegation.DelegatorAddress, delegation.ValidatorAddress)) + store.Delete(types.GetDelegationKey(delegatorAddress, delegation.GetValidatorAddr())) } // return a given amount of all the delegator unbonding-delegations @@ -187,19 +196,36 @@ func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, // set the unbonding delegation and associated index func (k Keeper) SetUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(ubd.DelegatorAddress) + if err != nil { + panic(err) + } store := ctx.KVStore(k.storeKey) bz := types.MustMarshalUBD(k.cdc, ubd) - key := types.GetUBDKey(ubd.DelegatorAddress, ubd.ValidatorAddress) + addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + if err != nil { + panic(err) + } + key := types.GetUBDKey(delegatorAddress, addr) store.Set(key, bz) - store.Set(types.GetUBDByValIndexKey(ubd.DelegatorAddress, ubd.ValidatorAddress), []byte{}) // index, store empty bytes + store.Set(types.GetUBDByValIndexKey(delegatorAddress, addr), []byte{}) // index, store empty bytes } // remove the unbonding delegation object and associated index func (k Keeper) RemoveUnbondingDelegation(ctx sdk.Context, ubd types.UnbondingDelegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(ubd.DelegatorAddress) + if err != nil { + panic(err) + } + store := ctx.KVStore(k.storeKey) - key := types.GetUBDKey(ubd.DelegatorAddress, ubd.ValidatorAddress) + addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + if err != nil { + panic(err) + } + key := types.GetUBDKey(delegatorAddress, addr) store.Delete(key) - store.Delete(types.GetUBDByValIndexKey(ubd.DelegatorAddress, ubd.ValidatorAddress)) + store.Delete(types.GetUBDByValIndexKey(delegatorAddress, addr)) } // SetUnbondingDelegationEntry adds an entry to the unbonding delegation at @@ -368,12 +394,25 @@ func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, // set a redelegation and associated index func (k Keeper) SetRedelegation(ctx sdk.Context, red types.Redelegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(red.DelegatorAddress) + if err != nil { + panic(err) + } + store := ctx.KVStore(k.storeKey) bz := types.MustMarshalRED(k.cdc, red) - key := types.GetREDKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress) + valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) + if err != nil { + panic(err) + } + valDestAddr, err := sdk.ValAddressFromBech32(red.ValidatorDstAddress) + if err != nil { + panic(err) + } + key := types.GetREDKey(delegatorAddress, valSrcAddr, valDestAddr) store.Set(key, bz) - store.Set(types.GetREDByValSrcIndexKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress), []byte{}) - store.Set(types.GetREDByValDstIndexKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress), []byte{}) + store.Set(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) + store.Set(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) } // SetUnbondingDelegationEntry adds an entry to the unbonding delegation at @@ -414,11 +453,23 @@ func (k Keeper) IterateRedelegations(ctx sdk.Context, fn func(index int64, red t // remove a redelegation object and associated index func (k Keeper) RemoveRedelegation(ctx sdk.Context, red types.Redelegation) { + delegatorAddress, err := sdk.AccAddressFromBech32(red.DelegatorAddress) + if err != nil { + panic(err) + } store := ctx.KVStore(k.storeKey) - redKey := types.GetREDKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress) + valSrcAddr, err := sdk.ValAddressFromBech32(red.ValidatorSrcAddress) + if err != nil { + panic(err) + } + valDestAddr, err := sdk.ValAddressFromBech32(red.ValidatorDstAddress) + if err != nil { + panic(err) + } + redKey := types.GetREDKey(delegatorAddress, valSrcAddr, valDestAddr) store.Delete(redKey) - store.Delete(types.GetREDByValSrcIndexKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress)) - store.Delete(types.GetREDByValDstIndexKey(red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress)) + store.Delete(types.GetREDByValSrcIndexKey(delegatorAddress, valSrcAddr, valDestAddr)) + store.Delete(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr)) } // redelegation queue timeslice operations @@ -505,16 +556,21 @@ func (k Keeper) Delegate( } // Get or create the delegation object - delegation, found := k.GetDelegation(ctx, delAddr, validator.OperatorAddress) + delegation, found := k.GetDelegation(ctx, delAddr, validator.GetOperator()) if !found { - delegation = types.NewDelegation(delAddr, validator.OperatorAddress, sdk.ZeroDec()) + delegation = types.NewDelegation(delAddr, validator.GetOperator(), sdk.ZeroDec()) } // call the appropriate hook if present if found { - k.BeforeDelegationSharesModified(ctx, delAddr, validator.OperatorAddress) + k.BeforeDelegationSharesModified(ctx, delAddr, validator.GetOperator()) } else { - k.BeforeDelegationCreated(ctx, delAddr, validator.OperatorAddress) + k.BeforeDelegationCreated(ctx, delAddr, validator.GetOperator()) + } + + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) } // if subtractAccount is true then we are @@ -537,7 +593,7 @@ func (k Keeper) Delegate( } coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), bondAmt)) - if err := k.bankKeeper.DelegateCoinsFromAccountToModule(ctx, delegation.DelegatorAddress, sendName, coins); err != nil { + if err := k.bankKeeper.DelegateCoinsFromAccountToModule(ctx, delegatorAddress, sendName, coins); err != nil { return sdk.Dec{}, err } } else { @@ -565,7 +621,7 @@ func (k Keeper) Delegate( k.SetDelegation(ctx, delegation) // Call the after-modification hook - k.AfterDelegationModified(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + k.AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()) return newShares, nil } @@ -597,14 +653,19 @@ func (k Keeper) Unbond( // subtract shares from delegation delegation.Shares = delegation.Shares.Sub(shares) - isValidatorOperator := delegation.DelegatorAddress.Equals(validator.OperatorAddress) + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + return amount, err + } + + isValidatorOperator := delegatorAddress.Equals(validator.GetOperator()) // If the delegation is the operator of the validator and undelegating will decrease the validator's // self-delegation below their minimum, we jail the validator. if isValidatorOperator && !validator.Jailed && validator.TokensFromShares(delegation.Shares).TruncateInt().LT(validator.MinSelfDelegation) { k.jailValidator(ctx, validator) - validator = k.mustGetValidator(ctx, validator.OperatorAddress) + validator = k.mustGetValidator(ctx, validator.GetOperator()) } // remove the delegation @@ -613,7 +674,7 @@ func (k Keeper) Unbond( } else { k.SetDelegation(ctx, delegation) // call the after delegation modification hook - k.AfterDelegationModified(ctx, delegation.DelegatorAddress, delegation.ValidatorAddress) + k.AfterDelegationModified(ctx, delegatorAddress, delegation.GetValidatorAddr()) } // remove the shares and coins from the validator @@ -622,7 +683,7 @@ func (k Keeper) Unbond( if validator.DelegatorShares.IsZero() && validator.IsUnbonded() { // if not unbonded, we must instead remove validator in EndBlocker once it finishes its unbonding period - k.RemoveValidator(ctx, validator.OperatorAddress) + k.RemoveValidator(ctx, validator.GetOperator()) } return amount, nil @@ -703,6 +764,11 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd balances := sdk.NewCoins() ctxTime := ctx.BlockHeader().Time + delegatorAddress, err := sdk.AccAddressFromBech32(ubd.DelegatorAddress) + if err != nil { + return nil, err + } + // loop through all the entries and complete unbonding mature entries for i := 0; i < len(ubd.Entries); i++ { entry := ubd.Entries[i] @@ -714,7 +780,7 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd if !entry.Balance.IsZero() { amt := sdk.NewCoin(bondDenom, entry.Balance) if err := k.bankKeeper.UndelegateCoinsFromModuleToAccount( - ctx, types.NotBondedPoolName, ubd.DelegatorAddress, sdk.NewCoins(amt), + ctx, types.NotBondedPoolName, delegatorAddress, sdk.NewCoins(amt), ); err != nil { return nil, err } diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 9f9c87e1f0..64906bb65f 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -43,14 +43,14 @@ func TestDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, bond1to1) resBond, found := app.StakingKeeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) require.True(t, found) - require.True(t, bond1to1.Equal(resBond)) + require.Equal(t, bond1to1, resBond) // modify a records, save, and retrieve bond1to1.Shares = sdk.NewDec(99) app.StakingKeeper.SetDelegation(ctx, bond1to1) resBond, found = app.StakingKeeper.GetDelegation(ctx, addrDels[0], valAddrs[0]) require.True(t, found) - require.True(t, bond1to1.Equal(resBond)) + require.Equal(t, bond1to1, resBond) // add some more records bond1to2 := types.NewDelegation(addrDels[0], valAddrs[1], sdk.NewDec(9)) @@ -67,26 +67,26 @@ func TestDelegation(t *testing.T) { // test all bond retrieve capabilities resBonds := app.StakingKeeper.GetDelegatorDelegations(ctx, addrDels[0], 5) require.Equal(t, 3, len(resBonds)) - require.True(t, bond1to1.Equal(resBonds[0])) - require.True(t, bond1to2.Equal(resBonds[1])) - require.True(t, bond1to3.Equal(resBonds[2])) + require.Equal(t, bond1to1, resBonds[0]) + require.Equal(t, bond1to2, resBonds[1]) + require.Equal(t, bond1to3, resBonds[2]) resBonds = app.StakingKeeper.GetAllDelegatorDelegations(ctx, addrDels[0]) require.Equal(t, 3, len(resBonds)) resBonds = app.StakingKeeper.GetDelegatorDelegations(ctx, addrDels[0], 2) require.Equal(t, 2, len(resBonds)) resBonds = app.StakingKeeper.GetDelegatorDelegations(ctx, addrDels[1], 5) require.Equal(t, 3, len(resBonds)) - require.True(t, bond2to1.Equal(resBonds[0])) - require.True(t, bond2to2.Equal(resBonds[1])) - require.True(t, bond2to3.Equal(resBonds[2])) + require.Equal(t, bond2to1, resBonds[0]) + require.Equal(t, bond2to2, resBonds[1]) + require.Equal(t, bond2to3, resBonds[2]) allBonds := app.StakingKeeper.GetAllDelegations(ctx) require.Equal(t, 6, len(allBonds)) - require.True(t, bond1to1.Equal(allBonds[0])) - require.True(t, bond1to2.Equal(allBonds[1])) - require.True(t, bond1to3.Equal(allBonds[2])) - require.True(t, bond2to1.Equal(allBonds[3])) - require.True(t, bond2to2.Equal(allBonds[4])) - require.True(t, bond2to3.Equal(allBonds[5])) + require.Equal(t, bond1to1, allBonds[0]) + require.Equal(t, bond1to2, allBonds[1]) + require.Equal(t, bond1to3, allBonds[2]) + require.Equal(t, bond2to1, allBonds[3]) + require.Equal(t, bond2to2, allBonds[4]) + require.Equal(t, bond2to3, allBonds[5]) resVals := app.StakingKeeper.GetDelegatorValidators(ctx, addrDels[0], 3) require.Equal(t, 3, len(resVals)) @@ -112,8 +112,8 @@ func TestDelegation(t *testing.T) { require.False(t, found) resBonds = app.StakingKeeper.GetDelegatorDelegations(ctx, addrDels[1], 5) require.Equal(t, 2, len(resBonds)) - require.True(t, bond2to1.Equal(resBonds[0])) - require.True(t, bond2to2.Equal(resBonds[1])) + require.Equal(t, bond2to1, resBonds[0]) + require.Equal(t, bond2to2, resBonds[1]) resBonds = app.StakingKeeper.GetAllDelegatorDelegations(ctx, addrDels[1]) require.Equal(t, 2, len(resBonds)) @@ -140,7 +140,7 @@ func TestUnbondingDelegation(t *testing.T) { delAddrs[0], valAddrs[0], 0, - time.Unix(0, 0), + time.Unix(0, 0).UTC(), sdk.NewInt(5), ) @@ -148,7 +148,7 @@ func TestUnbondingDelegation(t *testing.T) { app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) resUnbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) require.True(t, found) - require.True(t, ubd.Equal(resUnbond)) + require.Equal(t, ubd, resUnbond) // modify a records, save, and retrieve ubd.Entries[0].Balance = sdk.NewInt(21) @@ -162,7 +162,7 @@ func TestUnbondingDelegation(t *testing.T) { resUnbond, found = app.StakingKeeper.GetUnbondingDelegation(ctx, delAddrs[0], valAddrs[0]) require.True(t, found) - require.True(t, ubd.Equal(resUnbond)) + require.Equal(t, ubd, resUnbond) // delete a record app.StakingKeeper.RemoveUnbondingDelegation(ctx, ubd) @@ -645,12 +645,12 @@ func TestGetRedelegationsFromSrcValidator(t *testing.T) { // get the redelegations one time redelegations := app.StakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resBond)) + require.Equal(t, redelegations[0], resBond) // get the redelegations a second time, should be exactly the same redelegations = app.StakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resBond)) + require.Equal(t, redelegations[0], resBond) } // tests Get/Set/Remove/Has UnbondingDelegation @@ -661,7 +661,7 @@ func TestRedelegation(t *testing.T) { addrVals := simapp.ConvertAddrsToValAddrs(addrDels) rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 0, - time.Unix(0, 0), sdk.NewInt(5), + time.Unix(0, 0).UTC(), sdk.NewInt(5), sdk.NewDec(5)) // test shouldn't have and redelegations @@ -675,15 +675,15 @@ func TestRedelegation(t *testing.T) { redelegations := app.StakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resRed)) + require.Equal(t, redelegations[0], resRed) redelegations = app.StakingKeeper.GetRedelegations(ctx, addrDels[0], 5) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resRed)) + require.Equal(t, redelegations[0], resRed) redelegations = app.StakingKeeper.GetAllRedelegations(ctx, addrDels[0], nil, nil) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resRed)) + require.Equal(t, redelegations[0], resRed) // check if has the redelegation has = app.StakingKeeper.HasReceivingRedelegation(ctx, addrDels[0], addrVals[1]) @@ -695,15 +695,15 @@ func TestRedelegation(t *testing.T) { resRed, found = app.StakingKeeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) require.True(t, found) - require.True(t, rd.Equal(resRed)) + require.Equal(t, rd, resRed) redelegations = app.StakingKeeper.GetRedelegationsFromSrcValidator(ctx, addrVals[0]) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resRed)) + require.Equal(t, redelegations[0], resRed) redelegations = app.StakingKeeper.GetRedelegations(ctx, addrDels[0], 5) require.Equal(t, 1, len(redelegations)) - require.True(t, redelegations[0].Equal(resRed)) + require.Equal(t, redelegations[0], resRed) // delete a record app.StakingKeeper.RemoveRedelegation(ctx, rd) diff --git a/x/staking/keeper/grpc_query.go b/x/staking/keeper/grpc_query.go index 435b7e1079..e553b2c72c 100644 --- a/x/staking/keeper/grpc_query.go +++ b/x/staking/keeper/grpc_query.go @@ -67,11 +67,17 @@ func (k Querier) Validator(c context.Context, req *types.QueryValidatorRequest) return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(c) - validator, found := k.GetValidator(ctx, req.ValidatorAddr) + validator, found := k.GetValidator(ctx, valAddr) if !found { return nil, status.Errorf(codes.NotFound, "validator %s not found", req.ValidatorAddr) } @@ -85,7 +91,7 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } var delegations []types.Delegation @@ -98,7 +104,13 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat if err != nil { return false, err } - if !delegation.GetValidatorAddr().Equals(req.ValidatorAddr) { + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return false, err + } + + if !delegation.GetValidatorAddr().Equals(valAddr) { return false, nil } @@ -126,14 +138,20 @@ func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.Que return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } var ubds types.UnbondingDelegations ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) - srcValPrefix := types.GetUBDsByValIndexKey(req.ValidatorAddr) + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, err + } + + srcValPrefix := types.GetUBDsByValIndexKey(valAddr) ubdStore := prefix.NewStore(store, srcValPrefix) pageRes, err := query.Paginate(ubdStore, req.Pagination, func(key []byte, value []byte) error { storeKey := types.GetUBDKeyFromValIndexKey(append(srcValPrefix, key...)) @@ -162,15 +180,25 @@ func (k Querier) Delegation(c context.Context, req *types.QueryDelegationRequest return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) - delegation, found := k.GetDelegation(ctx, req.DelegatorAddr, req.ValidatorAddr) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, err + } + + delegation, found := k.GetDelegation(ctx, delAddr, valAddr) if !found { return nil, status.Errorf( codes.NotFound, @@ -192,15 +220,26 @@ func (k Querier) UnbondingDelegation(c context.Context, req *types.QueryUnbondin return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Errorf(codes.InvalidArgument, "delegator address cannot be empty") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Errorf(codes.InvalidArgument, "validator address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) - unbond, found := k.GetUnbondingDelegation(ctx, req.DelegatorAddr, req.ValidatorAddr) + + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, err + } + + unbond, found := k.GetUnbondingDelegation(ctx, delAddr, valAddr) if !found { return nil, status.Errorf( codes.NotFound, @@ -217,14 +256,19 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat return nil, status.Errorf(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var delegations types.Delegations ctx := sdk.UnwrapSDKContext(c) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + store := ctx.KVStore(k.storeKey) - delStore := prefix.NewStore(store, types.GetDelegationsKey(req.DelegatorAddr)) + delStore := prefix.NewStore(store, types.GetDelegationsKey(delAddr)) pageRes, err := query.Paginate(delStore, req.Pagination, func(key []byte, value []byte) error { delegation, err := types.UnmarshalDelegation(k.cdc, value) if err != nil { @@ -257,15 +301,25 @@ func (k Querier) DelegatorValidator(c context.Context, req *types.QueryDelegator return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } - if req.ValidatorAddr.Empty() { + if req.ValidatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "validator address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) - validator, err := k.GetDelegatorValidator(ctx, req.DelegatorAddr, req.ValidatorAddr) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, err + } + + validator, err := k.GetDelegatorValidator(ctx, delAddr, valAddr) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -279,14 +333,19 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var unbondingDelegations types.UnbondingDelegations ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) - unbStore := prefix.NewStore(store, types.GetUBDsKey(req.DelegatorAddr)) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + unbStore := prefix.NewStore(store, types.GetUBDsKey(delAddr)) pageRes, err := query.Paginate(unbStore, req.Pagination, func(key []byte, value []byte) error { unbond, err := types.UnmarshalUBD(k.cdc, value) if err != nil { @@ -333,9 +392,9 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) switch { - case !req.DelegatorAddr.Empty() && !req.SrcValidatorAddr.Empty() && !req.DstValidatorAddr.Empty(): + case req.DelegatorAddr != "" && req.SrcValidatorAddr != "" && req.DstValidatorAddr != "": redels, err = queryRedelegation(ctx, k, req) - case req.DelegatorAddr.Empty() && !req.SrcValidatorAddr.Empty() && req.DstValidatorAddr.Empty(): + case req.DelegatorAddr == "" && req.SrcValidatorAddr != "" && req.DstValidatorAddr == "": redels, pageRes, err = queryRedelegationsFromSrcValidator(store, k, req) default: redels, pageRes, err = queryAllRedelegations(store, k, req) @@ -356,21 +415,26 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.DelegatorAddr.Empty() { + if req.DelegatorAddr == "" { return nil, status.Error(codes.InvalidArgument, "delegator address cannot be empty") } var validators types.Validators ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) - delStore := prefix.NewStore(store, types.GetDelegationsKey(req.DelegatorAddr)) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + delStore := prefix.NewStore(store, types.GetDelegationsKey(delAddr)) pageRes, err := query.Paginate(delStore, req.Pagination, func(key []byte, value []byte) error { delegation, err := types.UnmarshalDelegation(k.cdc, value) if err != nil { return err } - validator, found := k.GetValidator(ctx, delegation.ValidatorAddress) + validator, found := k.GetValidator(ctx, delegation.GetValidatorAddr()) if !found { return types.ErrNoValidatorFound } @@ -410,7 +474,23 @@ func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types. } func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, err error) { - redel, found := k.GetRedelegation(ctx, req.DelegatorAddr, req.SrcValidatorAddr, req.DstValidatorAddr) + + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, err + } + + srcValAddr, err := sdk.ValAddressFromBech32(req.SrcValidatorAddr) + if err != nil { + return nil, err + } + + dstValAddr, err := sdk.ValAddressFromBech32(req.DstValidatorAddr) + if err != nil { + return nil, err + } + + redel, found := k.GetRedelegation(ctx, delAddr, srcValAddr, dstValAddr) if !found { return nil, status.Errorf( codes.NotFound, @@ -423,7 +503,12 @@ func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegations } func queryRedelegationsFromSrcValidator(store sdk.KVStore, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, res *query.PageResponse, err error) { - srcValPrefix := types.GetREDsFromValSrcIndexKey(req.SrcValidatorAddr) + valAddr, err := sdk.ValAddressFromBech32(req.SrcValidatorAddr) + if err != nil { + return nil, nil, err + } + + srcValPrefix := types.GetREDsFromValSrcIndexKey(valAddr) redStore := prefix.NewStore(store, srcValPrefix) res, err = query.Paginate(redStore, req.Pagination, func(key []byte, value []byte) error { storeKey := types.GetREDKeyFromValSrcIndexKey(append(srcValPrefix, key...)) @@ -440,7 +525,12 @@ func queryRedelegationsFromSrcValidator(store sdk.KVStore, k Querier, req *types } func queryAllRedelegations(store sdk.KVStore, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, res *query.PageResponse, err error) { - redStore := prefix.NewStore(store, types.GetREDsKey(req.DelegatorAddr)) + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddr) + if err != nil { + return nil, nil, err + } + + redStore := prefix.NewStore(store, types.GetREDsKey(delAddr)) res, err = query.Paginate(redStore, req.Pagination, func(key []byte, value []byte) error { redelegation, err := types.UnmarshalRED(k.cdc, value) if err != nil { diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index f6fa936943..8c8f979df9 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidators() { func (suite *KeeperTestSuite) TestGRPCValidator() { app, ctx, queryClient, vals := suite.app, suite.ctx, suite.queryClient, suite.vals - validator, found := app.StakingKeeper.GetValidator(ctx, vals[0].OperatorAddress) + validator, found := app.StakingKeeper.GetValidator(ctx, vals[0].GetOperator()) suite.True(found) var req *types.QueryValidatorRequest testCases := []struct { @@ -140,7 +140,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidators() { {"valid request", func() { req = &types.QueryDelegatorValidatorsRequest{ - DelegatorAddr: addrs[0], + DelegatorAddr: addrs[0].String(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} }, true, @@ -184,7 +184,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidator() { {"invalid delegator, validator pair", func() { req = &types.QueryDelegatorValidatorRequest{ - DelegatorAddr: addr, + DelegatorAddr: addr.String(), ValidatorAddr: addrVal, } }, @@ -193,7 +193,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidator() { {"valid request", func() { req = &types.QueryDelegatorValidatorRequest{ - DelegatorAddr: addr, + DelegatorAddr: addr.String(), ValidatorAddr: addrVal1, } }, @@ -220,8 +220,9 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegation() { app, ctx, queryClient, addrs, vals := suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals addrAcc, addrAcc1 := addrs[0], addrs[1] addrVal := vals[0].OperatorAddress - - delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, addrVal) + valAddr, err := sdk.ValAddressFromBech32(addrVal) + suite.NoError(err) + delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, valAddr) suite.True(found) var req *types.QueryDelegationRequest @@ -239,7 +240,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegation() { {"invalid validator, delegator pair", func() { req = &types.QueryDelegationRequest{ - DelegatorAddr: addrAcc1, + DelegatorAddr: addrAcc1.String(), ValidatorAddr: addrVal, } }, @@ -247,7 +248,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegation() { }, {"valid request", func() { - req = &types.QueryDelegationRequest{DelegatorAddr: addrAcc, ValidatorAddr: addrVal} + req = &types.QueryDelegationRequest{DelegatorAddr: addrAcc.String(), ValidatorAddr: addrVal} }, true, }, @@ -273,8 +274,9 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorDelegations() { app, ctx, queryClient, addrs, vals := suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals addrAcc := addrs[0] addrVal1 := vals[0].OperatorAddress - - delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, addrVal1) + valAddr, err := sdk.ValAddressFromBech32(addrVal1) + suite.NoError(err) + delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, valAddr) suite.True(found) var req *types.QueryDelegatorDelegationsRequest @@ -290,13 +292,13 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorDelegations() { false, }, {"invalid request", func() { - req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrs[4]} + req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrs[4].String()} }, false, }, {"valid request", func() { - req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrAcc, + req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrAcc.String(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} }, true, @@ -326,8 +328,9 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorDelegations() { addrVal1 := vals[1].OperatorAddress valAddrs := simapp.ConvertAddrsToValAddrs(addrs) addrVal2 := valAddrs[4] - - delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, addrVal1) + valAddr, err := sdk.ValAddressFromBech32(addrVal1) + suite.NoError(err) + delegation, found := app.StakingKeeper.GetDelegation(ctx, addrAcc, valAddr) suite.True(found) var req *types.QueryValidatorDelegationsRequest @@ -346,7 +349,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorDelegations() { }, {"invalid validator delegator pair", func() { - req = &types.QueryValidatorDelegationsRequest{ValidatorAddr: addrVal2} + req = &types.QueryValidatorDelegationsRequest{ValidatorAddr: addrVal2.String()} }, false, false, @@ -389,10 +392,12 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { addrVal2 := vals[1].OperatorAddress unbondingTokens := sdk.TokensFromConsensusPower(2) - _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, addrVal2, unbondingTokens.ToDec()) + valAddr, err1 := sdk.ValAddressFromBech32(addrVal2) + suite.NoError(err1) + _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, valAddr, unbondingTokens.ToDec()) suite.NoError(err) - unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc2, addrVal2) + unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc2, valAddr) suite.True(found) var req *types.QueryUnbondingDelegationRequest testCases := []struct { @@ -415,7 +420,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { {"valid request", func() { req = &types.QueryUnbondingDelegationRequest{ - DelegatorAddr: addrAcc2, ValidatorAddr: addrVal2} + DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal2} }, true, }, @@ -442,12 +447,16 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { addrVal, addrVal2 := vals[0].OperatorAddress, vals[1].OperatorAddress unbondingTokens := sdk.TokensFromConsensusPower(2) - _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, addrVal, unbondingTokens.ToDec()) + valAddr1, err1 := sdk.ValAddressFromBech32(addrVal) + suite.NoError(err1) + _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr1, unbondingTokens.ToDec()) suite.NoError(err) - _, err = app.StakingKeeper.Undelegate(ctx, addrAcc, addrVal2, unbondingTokens.ToDec()) + valAddr2, err1 := sdk.ValAddressFromBech32(addrVal2) + suite.NoError(err1) + _, err = app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr2, unbondingTokens.ToDec()) suite.NoError(err) - unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc, addrVal) + unbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc, valAddr1) suite.True(found) var req *types.QueryDelegatorUnbondingDelegationsRequest testCases := []struct { @@ -465,14 +474,14 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { }, {"invalid request", func() { - req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc1} + req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc1.String()} }, false, false, }, {"valid request", func() { - req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc, + req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc.String(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} }, true, @@ -589,7 +598,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { suite.NoError(err) app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc1, val1.OperatorAddress, val2.OperatorAddress) + redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator()) suite.True(found) var req *types.QueryRedelegationsRequest @@ -601,15 +610,15 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { }{ {"request redelegations for non existent addr", func() { - req = &types.QueryRedelegationsRequest{DelegatorAddr: addrAcc} + req = &types.QueryRedelegationsRequest{DelegatorAddr: addrAcc.String()} }, false, false, }, {"request redelegations with non existent pairs", func() { - req = &types.QueryRedelegationsRequest{DelegatorAddr: addrAcc, SrcValidatorAddr: val3, - DstValidatorAddr: val4} + req = &types.QueryRedelegationsRequest{DelegatorAddr: addrAcc.String(), SrcValidatorAddr: val3.String(), + DstValidatorAddr: val4.String()} }, false, true, @@ -617,7 +626,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { {"request redelegations with delegatoraddr, sourceValAddr, destValAddr", func() { req = &types.QueryRedelegationsRequest{ - DelegatorAddr: addrAcc1, SrcValidatorAddr: val1.OperatorAddress, + DelegatorAddr: addrAcc1.String(), SrcValidatorAddr: val1.OperatorAddress, DstValidatorAddr: val2.OperatorAddress, Pagination: &query.PageRequest{}} }, true, @@ -626,7 +635,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { {"request redelegations with delegatoraddr and sourceValAddr", func() { req = &types.QueryRedelegationsRequest{ - DelegatorAddr: addrAcc1, SrcValidatorAddr: val1.OperatorAddress, + DelegatorAddr: addrAcc1.String(), SrcValidatorAddr: val1.OperatorAddress, Pagination: &query.PageRequest{}} }, true, @@ -635,7 +644,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { {"query redelegations with sourceValAddr only", func() { req = &types.QueryRedelegationsRequest{ - SrcValidatorAddr: val1.GetOperator(), + SrcValidatorAddr: val1.GetOperator().String(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} }, true, @@ -691,7 +700,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { {"valid request", func() { req = &types.QueryValidatorUnbondingDelegationsRequest{ - ValidatorAddr: val1.GetOperator(), + ValidatorAddr: val1.GetOperator().String(), Pagination: &query.PageRequest{Limit: 1, CountTotal: true}} }, true, @@ -706,7 +715,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { suite.NoError(err) suite.Equal(uint64(1), res.Pagination.Total) suite.Equal(1, len(res.UnbondingResponses)) - suite.Equal(res.UnbondingResponses[0].ValidatorAddress, val1.GetOperator()) + suite.Equal(res.UnbondingResponses[0].ValidatorAddress, val1.OperatorAddress) } else { suite.Error(err) suite.Nil(res) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index c4aa2415f5..48d250a115 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -79,12 +79,12 @@ func TestTrackHistoricalInfo(t *testing.T) { // Set last validators in keeper val1 := types.NewValidator(addrVals[2], PKs[2], types.Description{}) app.StakingKeeper.SetValidator(ctx, val1) - app.StakingKeeper.SetLastValidatorPower(ctx, val1.OperatorAddress, 10) + app.StakingKeeper.SetLastValidatorPower(ctx, val1.GetOperator(), 10) val2 := types.NewValidator(addrVals[3], PKs[3], types.Description{}) vals := []types.Validator{val1, val2} sort.Sort(types.Validators(vals)) app.StakingKeeper.SetValidator(ctx, val2) - app.StakingKeeper.SetLastValidatorPower(ctx, val2.OperatorAddress, 8) + app.StakingKeeper.SetLastValidatorPower(ctx, val2.GetOperator(), 8) // Set Header for BeginBlock context header := tmproto.Header{ diff --git a/x/staking/keeper/querier.go b/x/staking/keeper/querier.go index ebe6ab79b6..2b8f0deb94 100644 --- a/x/staking/keeper/querier.go +++ b/x/staking/keeper/querier.go @@ -259,7 +259,17 @@ func queryDelegatorValidator(ctx sdk.Context, req abci.RequestQuery, k Keeper, l return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - validator, err := k.GetDelegatorValidator(ctx, params.DelegatorAddr, params.ValidatorAddr) + delAddr, err := sdk.AccAddressFromBech32(params.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(params.ValidatorAddr) + if err != nil { + return nil, err + } + + validator, err := k.GetDelegatorValidator(ctx, delAddr, valAddr) if err != nil { return nil, err } @@ -280,7 +290,17 @@ func queryDelegation(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQue return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - delegation, found := k.GetDelegation(ctx, params.DelegatorAddr, params.ValidatorAddr) + delAddr, err := sdk.AccAddressFromBech32(params.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(params.ValidatorAddr) + if err != nil { + return nil, err + } + + delegation, found := k.GetDelegation(ctx, delAddr, valAddr) if !found { return nil, types.ErrNoDelegation } @@ -306,7 +326,17 @@ func queryUnbondingDelegation(ctx sdk.Context, req abci.RequestQuery, k Keeper, return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) } - unbond, found := k.GetUnbondingDelegation(ctx, params.DelegatorAddr, params.ValidatorAddr) + delAddr, err := sdk.AccAddressFromBech32(params.DelegatorAddr) + if err != nil { + return nil, err + } + + valAddr, err := sdk.ValAddressFromBech32(params.ValidatorAddr) + if err != nil { + return nil, err + } + + unbond, found := k.GetUnbondingDelegation(ctx, delAddr, valAddr) if !found { return nil, types.ErrNoUnbondingDelegation } @@ -418,14 +448,19 @@ func queryParameters(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAm // util func DelegationToDelegationResponse(ctx sdk.Context, k Keeper, del types.Delegation) (types.DelegationResponse, error) { - val, found := k.GetValidator(ctx, del.ValidatorAddress) + val, found := k.GetValidator(ctx, del.GetValidatorAddr()) if !found { return types.DelegationResponse{}, types.ErrNoValidatorFound } + delegatorAddress, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + if err != nil { + return types.DelegationResponse{}, err + } + return types.NewDelegationResp( - del.DelegatorAddress, - del.ValidatorAddress, + delegatorAddress, + del.GetValidatorAddr(), del.Shares, sdk.NewCoin(k.BondDenom(ctx), val.TokensFromShares(del.Shares).TruncateInt()), ), nil @@ -454,7 +489,20 @@ func RedelegationsToRedelegationResponses( resp := make(types.RedelegationResponses, len(redels)) for i, redel := range redels { - val, found := k.GetValidator(ctx, redel.ValidatorDstAddress) + valSrcAddr, err := sdk.ValAddressFromBech32(redel.ValidatorSrcAddress) + if err != nil { + panic(err) + } + valDstAddr, err := sdk.ValAddressFromBech32(redel.ValidatorDstAddress) + if err != nil { + panic(err) + } + + delegatorAddress, err := sdk.AccAddressFromBech32(redel.DelegatorAddress) + if err != nil { + panic(err) + } + val, found := k.GetValidator(ctx, valDstAddr) if !found { return nil, types.ErrNoValidatorFound } @@ -471,9 +519,9 @@ func RedelegationsToRedelegationResponses( } resp[i] = types.NewRedelegationResponse( - redel.DelegatorAddress, - redel.ValidatorSrcAddress, - redel.ValidatorDstAddress, + delegatorAddress, + valSrcAddr, + valDstAddr, entryResponses, ) } diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index 54ae2b5014..bdd796a1a7 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -177,12 +177,12 @@ func TestQueryValidators(t *testing.T) { require.NoError(t, err) require.Equal(t, 1, len(validatorsResp)) - require.ElementsMatch(t, validators[i].OperatorAddress, validatorsResp[0].OperatorAddress) + require.Equal(t, validators[i].OperatorAddress, validatorsResp[0].OperatorAddress) } // Query each validator for _, validator := range validators { - queryParams := types.NewQueryValidatorParams(validator.OperatorAddress, 0, 0) + queryParams := types.NewQueryValidatorParams(validator.GetOperator(), 0, 0) bz, err := cdc.MarshalJSON(queryParams) require.NoError(t, err) @@ -259,7 +259,7 @@ func TestQueryDelegation(t *testing.T) { require.Error(t, err) // Query bonded validator - queryBondParams := types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2, ValidatorAddr: addrVal1} + queryBondParams := types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal1.String()} bz, errRes = cdc.MarshalJSON(queryBondParams) require.NoError(t, errRes) @@ -349,10 +349,10 @@ func TestQueryDelegation(t *testing.T) { // Query unbonding delegation unbondingTokens := sdk.TokensFromConsensusPower(10) - _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.OperatorAddress, unbondingTokens.ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.GetOperator(), unbondingTokens.ToDec()) require.NoError(t, err) - queryBondParams = types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2, ValidatorAddr: addrVal1} + queryBondParams = types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2.String(), ValidatorAddr: addrVal1.String()} bz, errRes = cdc.MarshalJSON(queryBondParams) require.NoError(t, errRes) @@ -402,13 +402,13 @@ func TestQueryDelegation(t *testing.T) { // Query redelegation redelegationTokens := sdk.TokensFromConsensusPower(10) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.OperatorAddress, - val2.OperatorAddress, redelegationTokens.ToDec()) + _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), + val2.GetOperator(), redelegationTokens.ToDec()) require.NoError(t, err) - redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc2, val1.OperatorAddress, val2.OperatorAddress) + redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator()) require.True(t, found) - bz, errRes = cdc.MarshalJSON(types.NewQueryRedelegationParams(addrAcc2, val1.OperatorAddress, val2.OperatorAddress)) + bz, errRes = cdc.MarshalJSON(types.NewQueryRedelegationParams(addrAcc2, val1.GetOperator(), val2.GetOperator())) require.NoError(t, errRes) query = abci.RequestQuery{ @@ -561,7 +561,7 @@ func TestQueryRedelegations(t *testing.T) { require.NoError(t, err) app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc2, val1.OperatorAddress, val2.OperatorAddress) + redel, found := app.StakingKeeper.GetRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator()) require.True(t, found) // delegator redelegations @@ -633,13 +633,13 @@ func TestQueryUnbondingDelegation(t *testing.T) { require.NoError(t, err) app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - _, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc1, val1.OperatorAddress) + _, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrAcc1, val1.GetOperator()) require.True(t, found) // // found: query unbonding delegation by delegator and validator // - queryValidatorParams := types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc1, ValidatorAddr: val1.GetOperator()} + queryValidatorParams := types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc1.String(), ValidatorAddr: val1.GetOperator().String()} bz, errRes := cdc.MarshalJSON(queryValidatorParams) require.NoError(t, errRes) query := abci.RequestQuery{ @@ -651,14 +651,14 @@ func TestQueryUnbondingDelegation(t *testing.T) { require.NotNil(t, res) var ubDel types.UnbondingDelegation require.NoError(t, cdc.UnmarshalJSON(res, &ubDel)) - require.Equal(t, addrAcc1, ubDel.DelegatorAddress) + require.Equal(t, addrAcc1.String(), ubDel.DelegatorAddress) require.Equal(t, val1.OperatorAddress, ubDel.ValidatorAddress) require.Equal(t, 1, len(ubDel.Entries)) // // not found: query unbonding delegation by delegator and validator // - queryValidatorParams = types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2, ValidatorAddr: val1.GetOperator()} + queryValidatorParams = types.QueryDelegatorValidatorRequest{DelegatorAddr: addrAcc2.String(), ValidatorAddr: val1.GetOperator().String()} bz, errRes = cdc.MarshalJSON(queryValidatorParams) require.NoError(t, errRes) query = abci.RequestQuery{ @@ -684,7 +684,7 @@ func TestQueryUnbondingDelegation(t *testing.T) { var ubDels []types.UnbondingDelegation require.NoError(t, cdc.UnmarshalJSON(res, &ubDels)) require.Equal(t, 1, len(ubDels)) - require.Equal(t, addrAcc1, ubDels[0].DelegatorAddress) + require.Equal(t, addrAcc1.String(), ubDels[0].DelegatorAddress) require.Equal(t, val1.OperatorAddress, ubDels[0].ValidatorAddress) // diff --git a/x/staking/keeper/query_utils.go b/x/staking/keeper/query_utils.go index 0496b9fe74..a530a86cbe 100644 --- a/x/staking/keeper/query_utils.go +++ b/x/staking/keeper/query_utils.go @@ -21,7 +21,7 @@ func (k Keeper) GetDelegatorValidators( for ; iterator.Valid() && i < int(maxRetrieve); iterator.Next() { delegation := types.MustUnmarshalDelegation(k.cdc, iterator.Value()) - validator, found := k.GetValidator(ctx, delegation.ValidatorAddress) + validator, found := k.GetValidator(ctx, delegation.GetValidatorAddr()) if !found { panic(types.ErrNoValidatorFound) } @@ -42,7 +42,7 @@ func (k Keeper) GetDelegatorValidator( return validator, types.ErrNoDelegation } - validator, found = k.GetValidator(ctx, delegation.ValidatorAddress) + validator, found = k.GetValidator(ctx, delegation.GetValidatorAddr()) if !found { panic(types.ErrNoValidatorFound) } @@ -109,11 +109,19 @@ func (k Keeper) GetAllRedelegations( for ; iterator.Valid(); iterator.Next() { redelegation := types.MustUnmarshalRED(k.cdc, iterator.Value()) - if srcValFilter && !(srcValAddress.Equals(redelegation.ValidatorSrcAddress)) { + valSrcAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorSrcAddress) + if err != nil { + panic(err) + } + valDstAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorDstAddress) + if err != nil { + panic(err) + } + if srcValFilter && !(srcValAddress.Equals(valSrcAddr)) { continue } - if dstValFilter && !(dstValAddress.Equals(redelegation.ValidatorDstAddress)) { + if dstValFilter && !(dstValAddress.Equals(valDstAddr)) { continue } diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 12c633030e..f35e84ef77 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -241,7 +241,17 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, continue } - delegation, found := k.GetDelegation(ctx, redelegation.DelegatorAddress, redelegation.ValidatorDstAddress) + valDstAddr, err := sdk.ValAddressFromBech32(redelegation.ValidatorDstAddress) + if err != nil { + panic(err) + } + + delegatorAddress, err := sdk.AccAddressFromBech32(redelegation.DelegatorAddress) + if err != nil { + panic(err) + } + + delegation, found := k.GetDelegation(ctx, delegatorAddress, valDstAddr) if !found { // If deleted, delegation has zero shares, and we can't unbond any more continue @@ -251,12 +261,12 @@ func (k Keeper) SlashRedelegation(ctx sdk.Context, srcValidator types.Validator, sharesToUnbond = delegation.Shares } - tokensToBurn, err := k.Unbond(ctx, redelegation.DelegatorAddress, redelegation.ValidatorDstAddress, sharesToUnbond) + tokensToBurn, err := k.Unbond(ctx, delegatorAddress, valDstAddr, sharesToUnbond) if err != nil { panic(fmt.Errorf("error unbonding delegator: %v", err)) } - dstValidator, found := k.GetValidator(ctx, redelegation.ValidatorDstAddress) + dstValidator, found := k.GetValidator(ctx, valDstAddr) if !found { panic("destination validator not found") } diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 7eb277b41a..954758b224 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -217,7 +217,7 @@ func TestSlashAtNegativeHeight(t *testing.T) { updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) require.Equal(t, 1, len(updates), "cons addr: %v, updates: %v", []byte(consAddr), updates) - validator, found = app.StakingKeeper.GetValidator(ctx, validator.OperatorAddress) + validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) require.True(t, found) // power decreased require.Equal(t, int64(5), validator.GetConsensusPower()) @@ -249,7 +249,7 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) require.Equal(t, 1, len(updates), "cons addr: %v, updates: %v", []byte(consAddr), updates) - validator, found = app.StakingKeeper.GetValidator(ctx, validator.OperatorAddress) + validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) assert.True(t, found) // power decreased require.Equal(t, int64(5), validator.GetConsensusPower()) diff --git a/x/staking/keeper/test_common.go b/x/staking/keeper/test_common.go index 185eff7058..8ded090ffe 100644 --- a/x/staking/keeper/test_common.go +++ b/x/staking/keeper/test_common.go @@ -27,7 +27,7 @@ func TestingUpdateValidator(keeper Keeper, ctx sdk.Context, validator types.Vali for ; iterator.Valid(); iterator.Next() { valAddr := types.ParseValidatorPowerRankKey(iterator.Key()) - if bytes.Equal(valAddr, validator.OperatorAddress) { + if bytes.Equal(valAddr, validator.GetOperator()) { if deleted { panic("found duplicate power index key") } else { @@ -43,7 +43,7 @@ func TestingUpdateValidator(keeper Keeper, ctx sdk.Context, validator types.Vali if apply { keeper.ApplyAndReturnValidatorSetUpdates(ctx) - validator, found := keeper.GetValidator(ctx, validator.OperatorAddress) + validator, found := keeper.GetValidator(ctx, validator.GetOperator()) if !found { panic("validator expected but not found") } @@ -54,7 +54,7 @@ func TestingUpdateValidator(keeper Keeper, ctx sdk.Context, validator types.Vali cachectx, _ := ctx.CacheContext() keeper.ApplyAndReturnValidatorSetUpdates(cachectx) - validator, found := keeper.GetValidator(cachectx, validator.OperatorAddress) + validator, found := keeper.GetValidator(cachectx, validator.GetOperator()) if !found { panic("validator expected but not found") } diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 12262dd82c..52992abbbe 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -32,7 +32,15 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // Remove all mature unbonding delegations from the ubd queue. matureUnbonds := k.DequeueAllMatureUBDQueue(ctx, ctx.BlockHeader().Time) for _, dvPair := range matureUnbonds { - balances, err := k.CompleteUnbonding(ctx, dvPair.DelegatorAddress, dvPair.ValidatorAddress) + addr, err := sdk.ValAddressFromBech32(dvPair.ValidatorAddress) + if err != nil { + panic(err) + } + delegatorAddress, err := sdk.AccAddressFromBech32(dvPair.DelegatorAddress) + if err != nil { + panic(err) + } + balances, err := k.CompleteUnbonding(ctx, delegatorAddress, addr) if err != nil { continue } @@ -41,8 +49,8 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { sdk.NewEvent( types.EventTypeCompleteUnbonding, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), - sdk.NewAttribute(types.AttributeKeyValidator, dvPair.ValidatorAddress.String()), - sdk.NewAttribute(types.AttributeKeyDelegator, dvPair.DelegatorAddress.String()), + sdk.NewAttribute(types.AttributeKeyValidator, dvPair.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, dvPair.DelegatorAddress), ), ) } @@ -50,11 +58,23 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // Remove all mature redelegations from the red queue. matureRedelegations := k.DequeueAllMatureRedelegationQueue(ctx, ctx.BlockHeader().Time) for _, dvvTriplet := range matureRedelegations { + valSrcAddr, err := sdk.ValAddressFromBech32(dvvTriplet.ValidatorSrcAddress) + if err != nil { + panic(err) + } + valDstAddr, err := sdk.ValAddressFromBech32(dvvTriplet.ValidatorDstAddress) + if err != nil { + panic(err) + } + delegatorAddress, err := sdk.AccAddressFromBech32(dvvTriplet.DelegatorAddress) + if err != nil { + panic(err) + } balances, err := k.CompleteRedelegation( ctx, - dvvTriplet.DelegatorAddress, - dvvTriplet.ValidatorSrcAddress, - dvvTriplet.ValidatorDstAddress, + delegatorAddress, + valSrcAddr, + valDstAddr, ) if err != nil { continue @@ -64,9 +84,9 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { sdk.NewEvent( types.EventTypeCompleteRedelegation, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), - sdk.NewAttribute(types.AttributeKeyDelegator, dvvTriplet.DelegatorAddress.String()), - sdk.NewAttribute(types.AttributeKeySrcValidator, dvvTriplet.ValidatorSrcAddress.String()), - sdk.NewAttribute(types.AttributeKeyDstValidator, dvvTriplet.ValidatorDstAddress.String()), + sdk.NewAttribute(types.AttributeKeyDelegator, dvvTriplet.DelegatorAddress), + sdk.NewAttribute(types.AttributeKeySrcValidator, dvvTriplet.ValidatorSrcAddress), + sdk.NewAttribute(types.AttributeKeyDstValidator, dvvTriplet.ValidatorDstAddress), ), ) } @@ -255,7 +275,7 @@ func (k Keeper) bondValidator(ctx sdk.Context, validator types.Validator) types. k.DeleteValidatorQueue(ctx, validator) // trigger hook - k.AfterValidatorBonded(ctx, validator.GetConsAddr(), validator.OperatorAddress) + k.AfterValidatorBonded(ctx, validator.GetConsAddr(), validator.GetOperator()) return validator } @@ -286,7 +306,7 @@ func (k Keeper) beginUnbondingValidator(ctx sdk.Context, validator types.Validat k.InsertUnbondingValidatorQueue(ctx, validator) // trigger hook - k.AfterValidatorBeginUnbonding(ctx, validator.GetConsAddr(), validator.OperatorAddress) + k.AfterValidatorBeginUnbonding(ctx, validator.GetConsAddr(), validator.GetOperator()) return validator } diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index b9006abf30..21353585ed 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -1,7 +1,6 @@ package keeper import ( - "bytes" "fmt" "time" @@ -41,7 +40,7 @@ func (k Keeper) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator ty if val, ok := k.validatorCache[strValue]; ok { valToReturn := val.val // Doesn't mutate the cache's value - valToReturn.OperatorAddress = addr + valToReturn.OperatorAddress = addr.String() return valToReturn, true } @@ -97,13 +96,13 @@ func (k Keeper) mustGetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAdd func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) bz := types.MustMarshalValidator(k.cdc, validator) - store.Set(types.GetValidatorKey(validator.OperatorAddress), bz) + store.Set(types.GetValidatorKey(validator.GetOperator()), bz) } // validator index func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorByConsAddrKey(validator.GetConsAddr()), validator.OperatorAddress) + store.Set(types.GetValidatorByConsAddrKey(validator.GetConsAddr()), validator.GetOperator()) } // validator index @@ -114,7 +113,7 @@ func (k Keeper) SetValidatorByPowerIndex(ctx sdk.Context, validator types.Valida } store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.OperatorAddress) + store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.GetOperator()) } // validator index @@ -126,7 +125,7 @@ func (k Keeper) DeleteValidatorByPowerIndex(ctx sdk.Context, validator types.Val // validator index func (k Keeper) SetNewValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.OperatorAddress) + store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.GetOperator()) } // Update the tokens of an existing validator, update the validators power index key @@ -205,7 +204,7 @@ func (k Keeper) RemoveValidator(ctx sdk.Context, address sdk.ValAddress) { store.Delete(types.GetValidatorsByPowerIndexKey(validator)) // call hooks - k.AfterValidatorRemoved(ctx, valConsAddr, validator.OperatorAddress) + k.AfterValidatorRemoved(ctx, valConsAddr, validator.GetOperator()) } // get groups of validators @@ -360,12 +359,12 @@ func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []types.Validator // GetUnbondingValidators returns a slice of mature validator addresses that // complete their unbonding at a given time and height. -func (k Keeper) GetUnbondingValidators(ctx sdk.Context, endTime time.Time, endHeight int64) []sdk.ValAddress { +func (k Keeper) GetUnbondingValidators(ctx sdk.Context, endTime time.Time, endHeight int64) []string { store := ctx.KVStore(k.storeKey) bz := store.Get(types.GetValidatorQueueKey(endTime, endHeight)) if bz == nil { - return []sdk.ValAddress{} + return []string{} } addrs := types.ValAddresses{} @@ -376,7 +375,7 @@ func (k Keeper) GetUnbondingValidators(ctx sdk.Context, endTime time.Time, endHe // SetUnbondingValidatorsQueue sets a given slice of validator addresses into // the unbonding validator queue by a given height and time. -func (k Keeper) SetUnbondingValidatorsQueue(ctx sdk.Context, endTime time.Time, endHeight int64, addrs []sdk.ValAddress) { +func (k Keeper) SetUnbondingValidatorsQueue(ctx sdk.Context, endTime time.Time, endHeight int64, addrs []string) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryBare(&types.ValAddresses{Addresses: addrs}) store.Set(types.GetValidatorQueueKey(endTime, endHeight), bz) @@ -401,10 +400,10 @@ func (k Keeper) DeleteValidatorQueueTimeSlice(ctx sdk.Context, endTime time.Time // indexed by a given height and time. func (k Keeper) DeleteValidatorQueue(ctx sdk.Context, val types.Validator) { addrs := k.GetUnbondingValidators(ctx, val.UnbondingTime, val.UnbondingHeight) - newAddrs := []sdk.ValAddress{} + newAddrs := []string{} for _, addr := range addrs { - if !bytes.Equal(addr, val.OperatorAddress) { + if addr != val.OperatorAddress { newAddrs = append(newAddrs, addr) } } @@ -454,7 +453,11 @@ func (k Keeper) UnbondAllMatureValidators(ctx sdk.Context) { k.cdc.MustUnmarshalBinaryBare(unbondingValIterator.Value(), &addrs) for _, valAddr := range addrs.Addresses { - val, found := k.GetValidator(ctx, valAddr) + addr, err := sdk.ValAddressFromBech32(valAddr) + if err != nil { + panic(err) + } + val, found := k.GetValidator(ctx, addr) if !found { panic("validator in the unbonding queue was not found") } @@ -465,7 +468,7 @@ func (k Keeper) UnbondAllMatureValidators(ctx sdk.Context) { val = k.UnbondingToUnbonded(ctx, val) if val.GetDelegatorShares().IsZero() { - k.RemoveValidator(ctx, val.OperatorAddress) + k.RemoveValidator(ctx, val.GetOperator()) } } diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index d507544b81..9fd77add73 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -183,7 +183,9 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { // require all the validators have their respective statuses for valIdx, status := range expectedValStatus { valAddr := validators[valIdx].OperatorAddress - val, _ := app.StakingKeeper.GetValidator(ctx, valAddr) + addr, err := sdk.ValAddressFromBech32(valAddr) + assert.NoError(t, err) + val, _ := app.StakingKeeper.GetValidator(ctx, addr) assert.Equal( t, status, val.GetStatus(), @@ -306,18 +308,18 @@ func TestValidatorBasics(t *testing.T) { // shouldn't be able to remove if status is not unbonded assert.PanicsWithValue(t, "cannot call RemoveValidator on bonded or unbonding validators", - func() { app.StakingKeeper.RemoveValidator(ctx, validators[1].OperatorAddress) }) + func() { app.StakingKeeper.RemoveValidator(ctx, validators[1].GetOperator()) }) // shouldn't be able to remove if there are still tokens left validators[1].Status = sdk.Unbonded app.StakingKeeper.SetValidator(ctx, validators[1]) assert.PanicsWithValue(t, "attempting to remove a validator which still contains tokens", - func() { app.StakingKeeper.RemoveValidator(ctx, validators[1].OperatorAddress) }) + func() { app.StakingKeeper.RemoveValidator(ctx, validators[1].GetOperator()) }) - validators[1].Tokens = sdk.ZeroInt() // ...remove all tokens - app.StakingKeeper.SetValidator(ctx, validators[1]) // ...set the validator - app.StakingKeeper.RemoveValidator(ctx, validators[1].OperatorAddress) // Now it can be removed. + validators[1].Tokens = sdk.ZeroInt() // ...remove all tokens + app.StakingKeeper.SetValidator(ctx, validators[1]) // ...set the validator + app.StakingKeeper.RemoveValidator(ctx, validators[1].GetOperator()) // Now it can be removed. _, found = app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.False(t, found) } @@ -533,7 +535,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { ctx = ctx.WithBlockHeight(40) var found bool - validators[3], found = app.StakingKeeper.GetValidator(ctx, validators[3].OperatorAddress) + validators[3], found = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) assert.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[3]) validators[3], _ = validators[3].AddTokensFromDel(sdk.TokensFromConsensusPower(1)) @@ -580,7 +582,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { require.Equal(t, nMax, uint32(len(resValidators))) assert.True(ValEq(t, validators[0], resValidators[0])) assert.True(ValEq(t, validators[2], resValidators[1])) - _, exists := app.StakingKeeper.GetValidator(ctx, validators[3].OperatorAddress) + _, exists := app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) require.True(t, exists) } @@ -649,7 +651,7 @@ func TestFullValidatorSetPowerChange(t *testing.T) { } for i := range powers { var found bool - validators[i], found = app.StakingKeeper.GetValidator(ctx, validators[i].OperatorAddress) + validators[i], found = app.StakingKeeper.GetValidator(ctx, validators[i].GetOperator()) require.True(t, found) } assert.Equal(t, sdk.Unbonded, validators[0].Status) @@ -697,8 +699,8 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) assert.Equal(t, 2, len(updates)) - validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].OperatorAddress) - validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].OperatorAddress) + validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) + validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) assert.Equal(t, validators[0].ABCIValidatorUpdate(), updates[1]) assert.Equal(t, validators[1].ABCIValidatorUpdate(), updates[0]) } @@ -810,7 +812,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidator(ctx, validators[2]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].OperatorAddress) + validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) require.Equal(t, 1, len(updates)) require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) @@ -819,7 +821,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidator(ctx, validators[3]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[3]) updates = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - validators[3], _ = app.StakingKeeper.GetValidator(ctx, validators[3].OperatorAddress) + validators[3], _ = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) require.Equal(t, 1, len(updates)) require.Equal(t, validators[3].ABCIValidatorUpdate(), updates[0]) @@ -828,7 +830,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidator(ctx, validators[4]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[4]) updates = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - validators[4], _ = app.StakingKeeper.GetValidator(ctx, validators[4].OperatorAddress) + validators[4], _ = app.StakingKeeper.GetValidator(ctx, validators[4].GetOperator()) require.Equal(t, 1, len(updates)) require.Equal(t, validators[4].ABCIValidatorUpdate(), updates[0]) } @@ -868,7 +870,7 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { app.StakingKeeper.SetValidator(ctx, validators[2]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].OperatorAddress) + validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) require.Equal(t, 2, len(updates), "%v", updates) require.Equal(t, validators[0].ABCIValidatorUpdateZero(), updates[1]) require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) @@ -942,8 +944,8 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { // verify initial Tendermint updates are correct updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) require.Equal(t, len(validators), len(updates)) - validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].OperatorAddress) - validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].OperatorAddress) + validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) + validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0]) require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) @@ -987,9 +989,9 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { // verify initial Tendermint updates are correct updates = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - validator, _ = app.StakingKeeper.GetValidator(ctx, validator.OperatorAddress) - validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].OperatorAddress) - validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].OperatorAddress) + validator, _ = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) + validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) + validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) require.Equal(t, len(validators)+1, len(updates)) require.Equal(t, validator.ABCIValidatorUpdate(), updates[0]) require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[1]) @@ -1022,8 +1024,8 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { // verify initial Tendermint updates are correct updates := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) require.Equal(t, 2, len(updates)) - validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].OperatorAddress) - validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].OperatorAddress) + validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) + validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) @@ -1033,7 +1035,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { ctx = ctx.WithBlockHeight(1) var found bool - validators[0], found = app.StakingKeeper.GetValidator(ctx, validators[0].OperatorAddress) + validators[0], found = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) require.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) @@ -1049,7 +1051,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { // lowest power in a single block context (height) ctx = ctx.WithBlockHeight(2) - validators[1], found = app.StakingKeeper.GetValidator(ctx, validators[1].OperatorAddress) + validators[1], found = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) require.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) @@ -1112,7 +1114,7 @@ func TestUpdateValidatorCommission(t *testing.T) { } else { tc.validator.Commission = commission app.StakingKeeper.SetValidator(ctx, tc.validator) - val, found := app.StakingKeeper.GetValidator(ctx, tc.validator.OperatorAddress) + val, found := app.StakingKeeper.GetValidator(ctx, tc.validator.GetOperator()) require.True(t, found, "expected to find validator for test case #%d with rate: %s", i, tc.newRate, diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index b32a9c411e..171c68819e 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -48,11 +48,11 @@ func TestRandomizedGenState(t *testing.T) { require.Len(t, stakingGenesis.Delegations, 3) require.Len(t, stakingGenesis.Validators, 3) // check Delegations - require.Equal(t, "cosmos1tnh2q55v8wyygtt9srz5safamzdengsnqeycj3", stakingGenesis.Delegations[0].DelegatorAddress.String()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", stakingGenesis.Delegations[0].ValidatorAddress.String()) + require.Equal(t, "cosmos1tnh2q55v8wyygtt9srz5safamzdengsnqeycj3", stakingGenesis.Delegations[0].DelegatorAddress) + require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", stakingGenesis.Delegations[0].ValidatorAddress) require.Equal(t, "1000.000000000000000000", stakingGenesis.Delegations[0].Shares.String()) // check validators - require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", stakingGenesis.Validators[2].OperatorAddress.String()) + require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", stakingGenesis.Validators[2].GetOperator().String()) require.Equal(t, "cosmosvalconspub1zcjduepq280tm686ma80cva9z620dmknd9a858pd2zmq9ackfenfllecjxds0hg9n7", stakingGenesis.Validators[2].ConsensusPubkey) require.Equal(t, false, stakingGenesis.Validators[2].Jailed) require.Equal(t, "Unbonded", stakingGenesis.Validators[2].Status.String()) diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index 5c0e21a491..ff54822aa3 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -331,7 +331,7 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper } valAddr := validator.GetOperator() - delegations := k.GetValidatorDelegations(ctx, validator.OperatorAddress) + delegations := k.GetValidatorDelegations(ctx, validator.GetOperator()) if delegations == nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUndelegate, "keeper does have any delegation entries"), nil, nil } diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 13553ed122..f077a4e50c 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -86,8 +86,8 @@ func TestSimulateMsgCreateValidator(t *testing.T) { require.Equal(t, "0.047464127245687382", msg.Commission.Rate.String()) require.Equal(t, types.TypeMsgCreateValidator, msg.Type()) require.Equal(t, "cosmosvalconspub1zcjduepq280tm686ma80cva9z620dmknd9a858pd2zmq9ackfenfllecjxds0hg9n7", msg.Pubkey) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress.String()) - require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", msg.ValidatorAddress.String()) + require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) + require.Equal(t, "cosmosvaloper1ghekyjucln7y67ntx7cf27m9dpuxxemnsvnaes", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -119,12 +119,12 @@ func TestSimulateMsgEditValidator(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "0.280623462081924936", msg.CommissionRate.String()) - require.Equal(t, "jLxzIivHSl", msg.GetDescription().Moniker) - require.Equal(t, "rBqDOTtGTO", msg.GetDescription().Identity) - require.Equal(t, "BSpYuLyYgg", msg.GetDescription().Website) - require.Equal(t, "wNbeHVIkPZ", msg.GetDescription().SecurityContact) + require.Equal(t, "jLxzIivHSl", msg.Description.Moniker) + require.Equal(t, "rBqDOTtGTO", msg.Description.Identity) + require.Equal(t, "BSpYuLyYgg", msg.Description.Website) + require.Equal(t, "wNbeHVIkPZ", msg.Description.SecurityContact) require.Equal(t, types.TypeMsgEditValidator, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress.String()) + require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -142,7 +142,7 @@ func TestSimulateMsgDelegate(t *testing.T) { // setup accounts[0] as validator validator0 := getTestingValidator0(t, app, ctx, accounts) - setupValidatorRewards(app, ctx, validator0.OperatorAddress) + setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) @@ -156,11 +156,11 @@ func TestSimulateMsgDelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress.String()) + require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) require.Equal(t, "4896096", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgDelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress.String()) + require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -183,11 +183,11 @@ func TestSimulateMsgUndelegate(t *testing.T) { delTokens := sdk.TokensFromConsensusPower(2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] - delegation := types.NewDelegation(delegator.Address, validator0.OperatorAddress, issuedShares) + delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) - app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.OperatorAddress, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) + app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) - setupValidatorRewards(app, ctx, validator0.OperatorAddress) + setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) @@ -201,11 +201,11 @@ func TestSimulateMsgUndelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress.String()) + require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress) require.Equal(t, "560969", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgUndelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress.String()) + require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) require.Len(t, futureOperations, 0) } @@ -231,12 +231,12 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { // setup accounts[2] as delegator delegator := accounts[2] - delegation := types.NewDelegation(delegator.Address, validator1.OperatorAddress, issuedShares) + delegation := types.NewDelegation(delegator.Address, validator1.GetOperator(), issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) - app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator1.OperatorAddress, delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) + app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator1.GetOperator(), delegator.Address, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) - setupValidatorRewards(app, ctx, validator0.OperatorAddress) - setupValidatorRewards(app, ctx, validator1.OperatorAddress) + setupValidatorRewards(app, ctx, validator0.GetOperator()) + setupValidatorRewards(app, ctx, validator1.GetOperator()) // begin a new block app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) @@ -250,12 +250,12 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "cosmos12gwd9jchc69wck8dhstxgwz3z8qs8yv67ps8mu", msg.DelegatorAddress.String()) + require.Equal(t, "cosmos12gwd9jchc69wck8dhstxgwz3z8qs8yv67ps8mu", msg.DelegatorAddress) require.Equal(t, "692322", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgBeginRedelegate, msg.Type()) - require.Equal(t, "cosmosvaloper1h6a7shta7jyc72hyznkys683z98z36e0zdk8g9", msg.GetValidatorDstAddress().String()) - require.Equal(t, "cosmosvaloper17s94pzwhsn4ah25tec27w70n65h5t2scgxzkv2", msg.GetValidatorSrcAddress().String()) + require.Equal(t, "cosmosvaloper1h6a7shta7jyc72hyznkys683z98z36e0zdk8g9", msg.ValidatorDstAddress) + require.Equal(t, "cosmosvaloper17s94pzwhsn4ah25tec27w70n65h5t2scgxzkv2", msg.ValidatorSrcAddress) require.Len(t, futureOperations, 0) } diff --git a/x/staking/types/data_test.go b/x/staking/types/data_test.go index 01b9427204..8a87c840be 100644 --- a/x/staking/types/data_test.go +++ b/x/staking/types/data_test.go @@ -11,12 +11,12 @@ var ( pk1 = ed25519.GenPrivKey().PubKey() pk2 = ed25519.GenPrivKey().PubKey() pk3 = ed25519.GenPrivKey().PubKey() - addr1 = pk1.Address() - addr2 = pk2.Address() - addr3 = pk3.Address() - valAddr1 = sdk.ValAddress(addr1) - valAddr2 = sdk.ValAddress(addr2) - valAddr3 = sdk.ValAddress(addr3) + addr1, _ = sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixAccAddr, pk1.Address().Bytes()) + addr2, _ = sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixAccAddr, pk2.Address().Bytes()) + addr3, _ = sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixAccAddr, pk3.Address().Bytes()) + valAddr1 = sdk.ValAddress(pk1.Address()) + valAddr2 = sdk.ValAddress(pk2.Address()) + valAddr3 = sdk.ValAddress(pk3.Address()) emptyAddr sdk.ValAddress emptyPubkey crypto.PubKey diff --git a/x/staking/types/delegation.go b/x/staking/types/delegation.go index 260789fc00..b3cb79bd33 100644 --- a/x/staking/types/delegation.go +++ b/x/staking/types/delegation.go @@ -29,10 +29,11 @@ func (dvv DVVTriplet) String() string { } // NewDelegation creates a new delegation object +//nolint:interfacer func NewDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec) Delegation { return Delegation{ - DelegatorAddress: delegatorAddr, - ValidatorAddress: validatorAddr, + DelegatorAddress: delegatorAddr.String(), + ValidatorAddress: validatorAddr.String(), Shares: shares, } } @@ -59,9 +60,21 @@ func UnmarshalDelegation(cdc codec.BinaryMarshaler, value []byte) (delegation De return delegation, err } -func (d Delegation) GetDelegatorAddr() sdk.AccAddress { return d.DelegatorAddress } -func (d Delegation) GetValidatorAddr() sdk.ValAddress { return d.ValidatorAddress } -func (d Delegation) GetShares() sdk.Dec { return d.Shares } +func (d Delegation) GetDelegatorAddr() sdk.AccAddress { + delAddr, err := sdk.AccAddressFromBech32(d.DelegatorAddress) + if err != nil { + panic(err) + } + return delAddr +} +func (d Delegation) GetValidatorAddr() sdk.ValAddress { + addr, err := sdk.ValAddressFromBech32(d.ValidatorAddress) + if err != nil { + panic(err) + } + return addr +} +func (d Delegation) GetShares() sdk.Dec { return d.Shares } // String returns a human readable string representation of a Delegation. func (d Delegation) String() string { @@ -101,13 +114,14 @@ func (e UnbondingDelegationEntry) IsMature(currentTime time.Time) bool { } // NewUnbondingDelegation - create a new unbonding delegation object +//nolint:interfacer func NewUnbondingDelegation( delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdk.Int, ) UnbondingDelegation { return UnbondingDelegation{ - DelegatorAddress: delegatorAddr, - ValidatorAddress: validatorAddr, + DelegatorAddress: delegatorAddr.String(), + ValidatorAddress: validatorAddr.String(), Entries: []UnbondingDelegationEntry{ NewUnbondingDelegationEntry(creationHeight, minTime, balance), }, @@ -194,14 +208,15 @@ func (e RedelegationEntry) IsMature(currentTime time.Time) bool { return !e.CompletionTime.After(currentTime) } +//nolint:interfacer func NewRedelegation( delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdk.Int, sharesDst sdk.Dec, ) Redelegation { return Redelegation{ - DelegatorAddress: delegatorAddr, - ValidatorSrcAddress: validatorSrcAddr, - ValidatorDstAddress: validatorDstAddr, + DelegatorAddress: delegatorAddr.String(), + ValidatorSrcAddress: validatorSrcAddr.String(), + ValidatorDstAddress: validatorDstAddr.String(), Entries: []RedelegationEntry{ NewRedelegationEntry(creationHeight, minTime, balance, sharesDst), }, @@ -320,14 +335,15 @@ func (d DelegationResponses) String() (out string) { } // NewRedelegationResponse crates a new RedelegationEntryResponse instance. +//nolint:interfacer func NewRedelegationResponse( delegatorAddr sdk.AccAddress, validatorSrc, validatorDst sdk.ValAddress, entries []RedelegationEntryResponse, ) RedelegationResponse { return RedelegationResponse{ Redelegation: Redelegation{ - DelegatorAddress: delegatorAddr, - ValidatorSrcAddress: validatorSrc, - ValidatorDstAddress: validatorDst, + DelegatorAddress: delegatorAddr.String(), + ValidatorSrcAddress: validatorSrc.String(), + ValidatorDstAddress: validatorDst.String(), }, Entries: entries, } diff --git a/x/staking/types/delegation_test.go b/x/staking/types/delegation_test.go index 45ec655d54..7723570ff0 100644 --- a/x/staking/types/delegation_test.go +++ b/x/staking/types/delegation_test.go @@ -15,13 +15,13 @@ func TestDelegationEqual(t *testing.T) { d1 := NewDelegation(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(100)) d2 := d1 - ok := d1.Equal(d2) + ok := d1.String() == d2.String() require.True(t, ok) - d2.ValidatorAddress = valAddr3 + d2.ValidatorAddress = valAddr3.String() d2.Shares = sdk.NewDec(200) - ok = d1.Equal(d2) + ok = d1.String() == d2.String() require.False(t, ok) } @@ -35,13 +35,13 @@ func TestUnbondingDelegationEqual(t *testing.T) { time.Unix(0, 0), sdk.NewInt(0)) ubd2 := ubd1 - ok := ubd1.Equal(ubd2) + ok := ubd1.String() == ubd2.String() require.True(t, ok) - ubd2.ValidatorAddress = valAddr3 + ubd2.ValidatorAddress = valAddr3.String() ubd2.Entries[0].CompletionTime = time.Unix(20*20*2, 0) - ok = ubd1.Equal(ubd2) + ok = (ubd1.String() == ubd2.String()) require.False(t, ok) } @@ -60,13 +60,13 @@ func TestRedelegationEqual(t *testing.T) { time.Unix(0, 0), sdk.NewInt(0), sdk.NewDec(0)) - ok := r1.Equal(r2) + ok := r1.String() == r2.String() require.True(t, ok) r2.Entries[0].SharesDst = sdk.NewDec(10) r2.Entries[0].CompletionTime = time.Unix(20*20*2, 0) - ok = r1.Equal(r2) + ok = r1.String() == r2.String() require.False(t, ok) } diff --git a/x/staking/types/genesis.pb.go b/x/staking/types/genesis.pb.go index b7b74c25e7..1f81d9fed4 100644 --- a/x/staking/types/genesis.pb.go +++ b/x/staking/types/genesis.pb.go @@ -130,7 +130,7 @@ func (m *GenesisState) GetExported() bool { // LastValidatorPower required for validator set update logic. type LastValidatorPower struct { // address is the address of the validator. - Address github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"address,omitempty"` + 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"` } @@ -168,20 +168,6 @@ func (m *LastValidatorPower) XXX_DiscardUnknown() { var xxx_messageInfo_LastValidatorPower proto.InternalMessageInfo -func (m *LastValidatorPower) GetAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.Address - } - return nil -} - -func (m *LastValidatorPower) GetPower() int64 { - if m != nil { - return m.Power - } - return 0 -} - func init() { proto.RegisterType((*GenesisState)(nil), "cosmos.staking.v1beta1.GenesisState") proto.RegisterType((*LastValidatorPower)(nil), "cosmos.staking.v1beta1.LastValidatorPower") @@ -193,37 +179,37 @@ func init() { var fileDescriptor_9b3dec8894f2831b = []byte{ // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6f, 0xd3, 0x30, - 0x1c, 0x86, 0x6b, 0xba, 0x76, 0x95, 0x5b, 0x10, 0x32, 0x1d, 0x44, 0x15, 0x4a, 0x4a, 0x54, 0xa1, - 0x0a, 0x58, 0xa2, 0x8e, 0x1b, 0xe2, 0x42, 0x84, 0x98, 0x06, 0x1c, 0xaa, 0x00, 0x3b, 0x70, 0xa9, - 0xdc, 0xc5, 0x0a, 0xd1, 0xd2, 0x38, 0xca, 0xcf, 0xdd, 0x9f, 0x3b, 0xe2, 0xcc, 0xc7, 0xda, 0x71, - 0x07, 0x0e, 0x88, 0x43, 0x84, 0xda, 0x6f, 0xb0, 0x23, 0x27, 0x14, 0x3b, 0x0d, 0xa1, 0x5d, 0x10, - 0xa7, 0xd6, 0xd6, 0xf3, 0x3e, 0xaf, 0xed, 0xd8, 0x78, 0x70, 0xc4, 0x61, 0xc6, 0xc1, 0x06, 0x41, - 0x8f, 0x83, 0xc8, 0xb7, 0x4f, 0x46, 0x53, 0x26, 0xe8, 0xc8, 0xf6, 0x59, 0xc4, 0x20, 0x00, 0x2b, - 0x4e, 0xb8, 0xe0, 0xe4, 0xae, 0xa2, 0xac, 0x9c, 0xb2, 0x72, 0xaa, 0xd7, 0xf5, 0xb9, 0xcf, 0x25, - 0x62, 0x67, 0xff, 0x14, 0xdd, 0xab, 0x72, 0xae, 0xd2, 0x92, 0x32, 0xbf, 0x35, 0x70, 0x67, 0x5f, - 0xb5, 0xbc, 0x13, 0x54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xe0, 0xfc, 0xc5, 0xfe, 0x15, 0x90, 0x1e, 0x6e, 0xf3, 0x93, 0x48, 0xc4, 0x92, 0xbb, 0x7a, 0xbb, + 0x8f, 0x86, 0x6d, 0x5a, 0xae, 0xad, 0xd7, 0x98, 0xac, 0x7f, 0x5c, 0xa2, 0xe3, 0x4d, 0xe6, 0xba, + 0x31, 0x87, 0x6c, 0xb8, 0xaf, 0xd3, 0x62, 0x49, 0xba, 0xb8, 0xf9, 0x77, 0x58, 0x1b, 0x34, 0x5b, + 0xec, 0xb5, 0xbf, 0x9e, 0x99, 0xda, 0xef, 0x33, 0x53, 0x1b, 0xbd, 0x38, 0x5f, 0x18, 0xe8, 0x62, + 0x61, 0xa0, 0x5f, 0x0b, 0x03, 0x7d, 0x5b, 0x1a, 0xda, 0xc5, 0xd2, 0xd0, 0x7e, 0x2c, 0x0d, 0xed, + 0xc3, 0xe3, 0xff, 0xce, 0xf3, 0x49, 0x79, 0xfd, 0xd4, 0x64, 0x4f, 0x5b, 0xea, 0xd6, 0x3d, 0xfd, + 0x13, 0x00, 0x00, 0xff, 0xff, 0xff, 0x85, 0xad, 0xc8, 0xf1, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -805,7 +791,7 @@ func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -815,25 +801,23 @@ func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index 5217a9f023..71aa587506 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -94,8 +94,11 @@ func getValidatorPowerRank(validator Validator) []byte { key[0] = ValidatorsByPowerIndexKey[0] copy(key[1:powerBytesLen+1], powerBytes) - - operAddrInvr := sdk.CopyBytes(validator.OperatorAddress) + addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) + if err != nil { + panic(err) + } + operAddrInvr := sdk.CopyBytes(addr) for i, b := range operAddrInvr { operAddrInvr[i] = ^b diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 75d8c24763..e7e8305ea0 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -39,8 +39,8 @@ func NewMsgCreateValidator( return &MsgCreateValidator{ Description: description, - DelegatorAddress: sdk.AccAddress(valAddr), - ValidatorAddress: valAddr, + DelegatorAddress: sdk.AccAddress(valAddr).String(), + ValidatorAddress: valAddr.String(), Pubkey: pkStr, Value: selfDelegation, Commission: commission, @@ -60,10 +60,17 @@ func (msg MsgCreateValidator) Type() string { return TypeMsgCreateValidator } // sign the msg as well. func (msg MsgCreateValidator) GetSigners() []sdk.AccAddress { // delegator is first signer so delegator pays fees - addrs := []sdk.AccAddress{msg.DelegatorAddress} - - if !bytes.Equal(msg.DelegatorAddress.Bytes(), msg.ValidatorAddress.Bytes()) { - addrs = append(addrs, sdk.AccAddress(msg.ValidatorAddress)) + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + addrs := []sdk.AccAddress{delAddr} + addr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + panic(err) + } + if !bytes.Equal(delAddr.Bytes(), addr.Bytes()) { + addrs = append(addrs, sdk.AccAddress(addr)) } return addrs @@ -78,15 +85,23 @@ func (msg MsgCreateValidator) GetSignBytes() []byte { // ValidateBasic implements the sdk.Msg interface. func (msg MsgCreateValidator) ValidateBasic() error { // note that unmarshaling from bech32 ensures either empty or valid - if msg.DelegatorAddress.Empty() { + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return err + } + if delAddr.Empty() { return ErrEmptyDelegatorAddr } - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } - if !sdk.AccAddress(msg.ValidatorAddress).Equals(msg.DelegatorAddress) { + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return err + } + if !sdk.AccAddress(valAddr).Equals(delAddr) { return ErrBadValidatorAddr } @@ -122,11 +137,12 @@ func (msg MsgCreateValidator) ValidateBasic() error { } // NewMsgEditValidator creates a new MsgEditValidator instance +//nolint:interfacer func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *sdk.Dec, newMinSelfDelegation *sdk.Int) *MsgEditValidator { return &MsgEditValidator{ Description: description, CommissionRate: newRate, - ValidatorAddress: valAddr, + ValidatorAddress: valAddr.String(), MinSelfDelegation: newMinSelfDelegation, } } @@ -139,7 +155,11 @@ func (msg MsgEditValidator) Type() string { return TypeMsgEditValidator } // GetSigners implements the sdk.Msg interface. func (msg MsgEditValidator) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.AccAddress(msg.ValidatorAddress)} + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{valAddr.Bytes()} } // GetSignBytes implements the sdk.Msg interface. @@ -150,7 +170,7 @@ func (msg MsgEditValidator) GetSignBytes() []byte { // ValidateBasic implements the sdk.Msg interface. func (msg MsgEditValidator) ValidateBasic() error { - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } @@ -172,10 +192,11 @@ func (msg MsgEditValidator) ValidateBasic() error { } // NewMsgDelegate creates a new MsgDelegate instance. +//nolint:interfacer func NewMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) *MsgDelegate { return &MsgDelegate{ - DelegatorAddress: delAddr, - ValidatorAddress: valAddr, + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), Amount: amount, } } @@ -188,7 +209,11 @@ func (msg MsgDelegate) Type() string { return TypeMsgDelegate } // GetSigners implements the sdk.Msg interface. func (msg MsgDelegate) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.DelegatorAddress} + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delAddr} } // GetSignBytes implements the sdk.Msg interface. @@ -199,11 +224,11 @@ func (msg MsgDelegate) GetSignBytes() []byte { // ValidateBasic implements the sdk.Msg interface. func (msg MsgDelegate) ValidateBasic() error { - if msg.DelegatorAddress.Empty() { + if msg.DelegatorAddress == "" { return ErrEmptyDelegatorAddr } - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } @@ -215,13 +240,14 @@ func (msg MsgDelegate) ValidateBasic() error { } // NewMsgBeginRedelegate creates a new MsgBeginRedelegate instance. +//nolint:interfacer func NewMsgBeginRedelegate( delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, amount sdk.Coin, ) *MsgBeginRedelegate { return &MsgBeginRedelegate{ - DelegatorAddress: delAddr, - ValidatorSrcAddress: valSrcAddr, - ValidatorDstAddress: valDstAddr, + DelegatorAddress: delAddr.String(), + ValidatorSrcAddress: valSrcAddr.String(), + ValidatorDstAddress: valDstAddr.String(), Amount: amount, } } @@ -234,7 +260,11 @@ func (msg MsgBeginRedelegate) Type() string { return TypeMsgBeginRedelegate } // GetSigners implements the sdk.Msg interface func (msg MsgBeginRedelegate) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{msg.DelegatorAddress} + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delAddr} } // GetSignBytes implements the sdk.Msg interface. @@ -245,15 +275,15 @@ func (msg MsgBeginRedelegate) GetSignBytes() []byte { // ValidateBasic implements the sdk.Msg interface. func (msg MsgBeginRedelegate) ValidateBasic() error { - if msg.DelegatorAddress.Empty() { + if msg.DelegatorAddress == "" { return ErrEmptyDelegatorAddr } - if msg.ValidatorSrcAddress.Empty() { + if msg.ValidatorSrcAddress == "" { return ErrEmptyValidatorAddr } - if msg.ValidatorDstAddress.Empty() { + if msg.ValidatorDstAddress == "" { return ErrEmptyValidatorAddr } @@ -265,10 +295,11 @@ func (msg MsgBeginRedelegate) ValidateBasic() error { } // NewMsgUndelegate creates a new MsgUndelegate instance. +//nolint:interfacer func NewMsgUndelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin) *MsgUndelegate { return &MsgUndelegate{ - DelegatorAddress: delAddr, - ValidatorAddress: valAddr, + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), Amount: amount, } } @@ -280,7 +311,13 @@ func (msg MsgUndelegate) Route() string { return RouterKey } func (msg MsgUndelegate) Type() string { return TypeMsgUndelegate } // GetSigners implements the sdk.Msg interface. -func (msg MsgUndelegate) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.DelegatorAddress} } +func (msg MsgUndelegate) GetSigners() []sdk.AccAddress { + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delAddr} +} // GetSignBytes implements the sdk.Msg interface. func (msg MsgUndelegate) GetSignBytes() []byte { @@ -290,11 +327,11 @@ func (msg MsgUndelegate) GetSignBytes() []byte { // ValidateBasic implements the sdk.Msg interface. func (msg MsgUndelegate) ValidateBasic() error { - if msg.DelegatorAddress.Empty() { + if msg.DelegatorAddress == "" { return ErrEmptyDelegatorAddr } - if msg.ValidatorAddress.Empty() { + if msg.ValidatorAddress == "" { return ErrEmptyValidatorAddr } diff --git a/x/staking/types/query.pb.go b/x/staking/types/query.pb.go index 2d1b10befe..0df0d02b0f 100644 --- a/x/staking/types/query.pb.go +++ b/x/staking/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( context "context" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -144,7 +143,7 @@ func (m *QueryValidatorsResponse) GetPagination() *query.PageResponse { // QueryValidatorRequest is response type for the Query/Validator RPC method type QueryValidatorRequest struct { // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` } func (m *QueryValidatorRequest) Reset() { *m = QueryValidatorRequest{} } @@ -180,11 +179,11 @@ func (m *QueryValidatorRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorRequest proto.InternalMessageInfo -func (m *QueryValidatorRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *QueryValidatorRequest) GetValidatorAddr() string { if m != nil { return m.ValidatorAddr } - return nil + return "" } // QueryValidatorResponse is response type for the Query/Validator RPC method @@ -233,10 +232,11 @@ func (m *QueryValidatorResponse) GetValidator() Validator { return Validator{} } -// QueryValidatorDelegationsRequest is request type for the Query/ValidatorDelegations RPC method +// QueryValidatorDelegationsRequest is request type for the +// Query/ValidatorDelegations RPC method type QueryValidatorDelegationsRequest struct { // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -274,11 +274,11 @@ func (m *QueryValidatorDelegationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorDelegationsRequest proto.InternalMessageInfo -func (m *QueryValidatorDelegationsRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *QueryValidatorDelegationsRequest) GetValidatorAddr() string { if m != nil { return m.ValidatorAddr } - return nil + return "" } func (m *QueryValidatorDelegationsRequest) GetPagination() *query.PageRequest { @@ -288,7 +288,8 @@ func (m *QueryValidatorDelegationsRequest) GetPagination() *query.PageRequest { return nil } -// QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method type QueryValidatorDelegationsResponse struct { DelegationResponses DelegationResponses `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3,castrepeated=DelegationResponses" json:"delegation_responses"` // pagination defines the pagination in the response. @@ -342,10 +343,11 @@ func (m *QueryValidatorDelegationsResponse) GetPagination() *query.PageResponse return nil } -// QueryValidatorUnbondingDelegationsRequest is required type for the Query/ValidatorUnbondingDelegations RPC method +// QueryValidatorUnbondingDelegationsRequest is required type for the +// Query/ValidatorUnbondingDelegations RPC method type QueryValidatorUnbondingDelegationsRequest struct { // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -387,11 +389,11 @@ func (m *QueryValidatorUnbondingDelegationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorUnbondingDelegationsRequest proto.InternalMessageInfo -func (m *QueryValidatorUnbondingDelegationsRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *QueryValidatorUnbondingDelegationsRequest) GetValidatorAddr() string { if m != nil { return m.ValidatorAddr } - return nil + return "" } func (m *QueryValidatorUnbondingDelegationsRequest) GetPagination() *query.PageRequest { @@ -401,7 +403,8 @@ func (m *QueryValidatorUnbondingDelegationsRequest) GetPagination() *query.PageR return nil } -// QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method. +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. type QueryValidatorUnbondingDelegationsResponse struct { UnbondingResponses []UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` // pagination defines the pagination in the response. @@ -462,9 +465,9 @@ func (m *QueryValidatorUnbondingDelegationsResponse) GetPagination() *query.Page // QueryDelegationRequest is request type for the Query/Delegation RPC method. type QueryDelegationRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` } func (m *QueryDelegationRequest) Reset() { *m = QueryDelegationRequest{} } @@ -500,20 +503,6 @@ func (m *QueryDelegationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegationRequest proto.InternalMessageInfo -func (m *QueryDelegationRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryDelegationRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddr - } - return nil -} - // QueryDelegationResponse is response type for the Query/Delegation RPC method. type QueryDelegationResponse struct { // delegation_responses defines the delegation info of a delegation. @@ -560,12 +549,13 @@ func (m *QueryDelegationResponse) GetDelegationResponse() *DelegationResponse { return nil } -// QueryUnbondingDelegationRequest is request type for the Query/UnbondingDelegation RPC method. +// QueryUnbondingDelegationRequest is request type for the +// Query/UnbondingDelegation RPC method. type QueryUnbondingDelegationRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` } func (m *QueryUnbondingDelegationRequest) Reset() { *m = QueryUnbondingDelegationRequest{} } @@ -601,21 +591,8 @@ func (m *QueryUnbondingDelegationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUnbondingDelegationRequest proto.InternalMessageInfo -func (m *QueryUnbondingDelegationRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryUnbondingDelegationRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddr - } - return nil -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. type QueryUnbondingDelegationResponse struct { // unbond defines the unbonding information of a delegation. Unbond UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond"` @@ -661,10 +638,11 @@ func (m *QueryUnbondingDelegationResponse) GetUnbond() UnbondingDelegation { return UnbondingDelegation{} } -// QueryDelegatorDelegationsRequest is request type for the Query/DelegatorDelegations RPC method. +// QueryDelegatorDelegationsRequest is request type for the +// Query/DelegatorDelegations RPC method. type QueryDelegatorDelegationsRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -702,21 +680,8 @@ func (m *QueryDelegatorDelegationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorDelegationsRequest proto.InternalMessageInfo -func (m *QueryDelegatorDelegationsRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryDelegatorDelegationsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. type QueryDelegatorDelegationsResponse struct { // delegation_responses defines all the delegations' info of a delegator. DelegationResponses []DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses"` @@ -771,10 +736,11 @@ func (m *QueryDelegatorDelegationsResponse) GetPagination() *query.PageResponse return nil } -// QueryDelegatorUnbondingDelegationsRequest is request type for the Query/DelegatorUnbondingDelegations RPC method. +// QueryDelegatorUnbondingDelegationsRequest is request type for the +// Query/DelegatorUnbondingDelegations RPC method. type QueryDelegatorUnbondingDelegationsRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -816,21 +782,8 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorUnbondingDelegationsRequest proto.InternalMessageInfo -func (m *QueryDelegatorUnbondingDelegationsRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryDelegatorUnbondingDelegationsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method. +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. type QueryDelegatorUnbondingDelegationsResponse struct { UnbondingResponses []UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` // pagination defines the pagination in the response. @@ -888,14 +841,15 @@ func (m *QueryDelegatorUnbondingDelegationsResponse) GetPagination() *query.Page return nil } -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC method. +// QueryRedelegationsRequest is request type for the Query/Redelegations RPC +// method. type QueryRedelegationsRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // src_validator_addr defines the validator address to redelegate from. - SrcValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=src_validator_addr,json=srcValidatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"src_validator_addr,omitempty"` + SrcValidatorAddr string `protobuf:"bytes,2,opt,name=src_validator_addr,json=srcValidatorAddr,proto3" json:"src_validator_addr,omitempty"` // dst_validator_addr defines the validator address to redelegate to. - DstValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,3,opt,name=dst_validator_addr,json=dstValidatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"dst_validator_addr,omitempty"` + DstValidatorAddr string `protobuf:"bytes,3,opt,name=dst_validator_addr,json=dstValidatorAddr,proto3" json:"dst_validator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -933,35 +887,8 @@ func (m *QueryRedelegationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryRedelegationsRequest proto.InternalMessageInfo -func (m *QueryRedelegationsRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryRedelegationsRequest) GetSrcValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.SrcValidatorAddr - } - return nil -} - -func (m *QueryRedelegationsRequest) GetDstValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.DstValidatorAddr - } - return nil -} - -func (m *QueryRedelegationsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC method. +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. type QueryRedelegationsResponse struct { RedelegationResponses []RedelegationResponse `protobuf:"bytes,1,rep,name=redelegation_responses,json=redelegationResponses,proto3" json:"redelegation_responses"` // pagination defines the pagination in the response. @@ -1015,10 +942,11 @@ func (m *QueryRedelegationsResponse) GetPagination() *query.PageResponse { return nil } -// QueryDelegatorValidatorsRequest is request type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsRequest is request type for the +// Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -1056,21 +984,8 @@ func (m *QueryDelegatorValidatorsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorValidatorsRequest proto.InternalMessageInfo -func (m *QueryDelegatorValidatorsRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryDelegatorValidatorsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsResponse struct { // validators defines the the validators' info of a delegator. Validators []Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` @@ -1125,12 +1040,13 @@ func (m *QueryDelegatorValidatorsResponse) GetPagination() *query.PageResponse { return nil } -// QueryDelegatorValidatorRequest is request type for the Query/DelegatorValidator RPC method. +// QueryDelegatorValidatorRequest is request type for the +// Query/DelegatorValidator RPC method. type QueryDelegatorValidatorRequest struct { // delegator_addr defines the delegator address to query for. - DelegatorAddr github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_addr,omitempty"` + DelegatorAddr string `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` // validator_addr defines the validator address to query for. - ValidatorAddr github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_addr,omitempty"` + ValidatorAddr string `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` } func (m *QueryDelegatorValidatorRequest) Reset() { *m = QueryDelegatorValidatorRequest{} } @@ -1166,21 +1082,8 @@ func (m *QueryDelegatorValidatorRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegatorValidatorRequest proto.InternalMessageInfo -func (m *QueryDelegatorValidatorRequest) GetDelegatorAddr() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddr - } - return nil -} - -func (m *QueryDelegatorValidatorRequest) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddr - } - return nil -} - -// QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. type QueryDelegatorValidatorResponse struct { // validator defines the the validator info. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` @@ -1226,7 +1129,8 @@ func (m *QueryDelegatorValidatorResponse) GetValidator() Validator { return Validator{} } -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC method. +// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +// method. type QueryHistoricalInfoRequest struct { // height defines at which height to query the historical info. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` @@ -1272,7 +1176,8 @@ func (m *QueryHistoricalInfoRequest) GetHeight() int64 { return 0 } -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method. +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. type QueryHistoricalInfoResponse struct { // hist defines the historical info at the given height. Hist *HistoricalInfo `protobuf:"bytes,1,opt,name=hist,proto3" json:"hist,omitempty"` @@ -1520,90 +1425,89 @@ func init() { } var fileDescriptor_f270127f442bbcd8 = []byte{ - // 1325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdf, 0x4f, 0x1c, 0xd5, - 0x17, 0xe7, 0x52, 0xbe, 0x24, 0x9c, 0x7e, 0xdb, 0xd4, 0xbb, 0x80, 0x38, 0xc5, 0x85, 0x4e, 0x08, - 0x52, 0x5a, 0x76, 0x04, 0x2a, 0x45, 0x6d, 0x54, 0xb0, 0x52, 0x49, 0x1f, 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 0x9e, 0x1d, 0x00, 0x00, + // 1303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcf, 0x4f, 0x1c, 0x75, + 0x14, 0xdf, 0x2f, 0x20, 0x91, 0xd7, 0xb4, 0xa9, 0xdf, 0x05, 0xc4, 0x29, 0xee, 0xd2, 0x09, 0x22, + 0xa5, 0x74, 0x46, 0xa0, 0x52, 0xac, 0x4d, 0x15, 0xac, 0x54, 0xd2, 0x83, 0xb0, 0x46, 0xfc, 0x75, + 0x20, 0xb3, 0x3b, 0xd3, 0xd9, 0x49, 0x97, 0x99, 0xed, 0xcc, 0x40, 0x40, 0xc2, 0x41, 0x4f, 0x7a, + 0xd3, 0x78, 0x52, 0x2f, 0x3d, 0x98, 0x98, 0xe8, 0x51, 0xff, 0x01, 0x4f, 0xd6, 0x1b, 0x46, 0x0f, + 0x7a, 0xa9, 0x06, 0x3c, 0x34, 0x9e, 0xbc, 0x19, 0x6f, 0x66, 0xbf, 0xf3, 0x66, 0x76, 0x86, 0xf9, + 0xb9, 0xcb, 0x12, 0xd2, 0x13, 0xbb, 0xdf, 0x7d, 0x3f, 0x3e, 0x9f, 0xf7, 0xbe, 0xef, 0x7d, 0xdf, + 0x0b, 0xc0, 0x57, 0x0c, 0x6b, 0xdd, 0xb0, 0x44, 0xcb, 0x96, 0xee, 0x68, 0xba, 0x2a, 0x6e, 0x4e, + 0x95, 0x15, 0x5b, 0x9a, 0x12, 0xef, 0x6e, 0x28, 0xe6, 0xb6, 0x50, 0x37, 0x0d, 0xdb, 0xa0, 0x83, + 0x8e, 0x8c, 0x80, 0x32, 0x02, 0xca, 0x70, 0x13, 0xa8, 0x5b, 0x96, 0x2c, 0xc5, 0x51, 0xf0, 0xd4, + 0xeb, 0x92, 0xaa, 0xe9, 0x92, 0xad, 0x19, 0xba, 0x63, 0x83, 0xeb, 0x57, 0x0d, 0xd5, 0x60, 0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ba, 0x6d, 0x5c, 0x14, + 0x34, 0xc0, 0x7f, 0xe9, 0xf6, 0xb2, 0x1b, 0x2e, 0xec, 0xe8, 0x1a, 0xca, 0xc2, 0xb5, 0x43, 0x35, + 0xe4, 0x0b, 0xc6, 0xcf, 0x6e, 0x57, 0x8b, 0x46, 0x87, 0xe1, 0xa8, 0x74, 0xac, 0xab, 0x39, 0xb1, + 0x39, 0xde, 0xf6, 0xf5, 0x95, 0xdb, 0xbe, 0x3c, 0x4e, 0x29, 0xed, 0xeb, 0x64, 0x42, 0xef, 0x35, + 0xb2, 0x14, 0x98, 0x8f, 0x62, 0x23, 0xfb, 0x87, 0xc0, 0x53, 0x8c, 0x5b, 0x49, 0x91, 0xdb, 0x0e, + 0xf9, 0x24, 0x50, 0xcb, 0xac, 0xac, 0x45, 0x56, 0xf7, 0x59, 0xcb, 0xac, 0xac, 0x06, 0xde, 0x97, + 0x49, 0xa0, 0xb2, 0x65, 0x1f, 0x96, 0xee, 0x76, 0xa4, 0x65, 0xcb, 0x5e, 0x4d, 0x78, 0x8d, 0x7a, + 0x3a, 0x90, 0xce, 0x3d, 0x02, 0x5c, 0x14, 0x65, 0x4c, 0x9f, 0x06, 0x83, 0xa6, 0x92, 0x50, 0x44, + 0x93, 0x71, 0x19, 0xf4, 0x9b, 0x3b, 0x54, 0x46, 0x03, 0xa6, 0x72, 0xdc, 0x73, 0x40, 0x31, 0x78, + 0x43, 0xc3, 0x93, 0xf5, 0x89, 0x95, 0xcf, 0xf7, 0xa1, 0xbe, 0xfa, 0x48, 0xcc, 0xde, 0x5b, 0x50, + 0x88, 0x41, 0x7d, 0xdc, 0xef, 0x5e, 0x35, 0x36, 0x99, 0x9d, 0x1e, 0xdf, 0x2f, 0x63, 0x25, 0xbc, + 0xa6, 0x59, 0xb6, 0x61, 0x6a, 0x15, 0xa9, 0xb6, 0xa4, 0xdf, 0x36, 0x7c, 0xbb, 0x58, 0x55, 0xd1, + 0xd4, 0xaa, 0xcd, 0x3c, 0x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, 0x25, 0x4b, 0xbe, 0x23, 0x6e, 0x79, 0x06, 0xed, + 0xed, 0xba, 0x62, 0x95, 0x7b, 0xd9, 0x3f, 0x88, 0x66, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x4b, + 0x6e, 0xeb, 0x7f, 0xe4, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1628,17 +1532,21 @@ type QueryClient interface { ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) // Delegation queries delegate info for given validator delegator pair. Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator pair. + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) // DelegatorDelegations queries all delegations of a given delegator address. DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) // Redelegations queries redelegations of given address. Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator address. + // DelegatorValidators queries all validators info for given delegator + // address. DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator pair. + // DelegatorValidator queries validator info for given delegator validator + // pair. DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) // HistoricalInfo queries the historical info for given height. HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) @@ -1794,17 +1702,21 @@ type QueryServer interface { ValidatorUnbondingDelegations(context.Context, *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) // Delegation queries delegate info for given validator delegator pair. Delegation(context.Context, *QueryDelegationRequest) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator pair. + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. UnbondingDelegation(context.Context, *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) // DelegatorDelegations queries all delegations of a given delegator address. DelegatorDelegations(context.Context, *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. DelegatorUnbondingDelegations(context.Context, *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) // Redelegations queries redelegations of given address. Redelegations(context.Context, *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator address. + // DelegatorValidators queries all validators info for given delegator + // address. DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator pair. + // DelegatorValidator queries validator info for given delegator validator + // pair. DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) // HistoricalInfo queries the historical info for given height. HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) @@ -4012,7 +3924,7 @@ func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4022,25 +3934,23 @@ func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4185,7 +4095,7 @@ func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4195,25 +4105,23 @@ func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -4431,7 +4339,7 @@ func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4441,25 +4349,23 @@ func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -4677,7 +4583,7 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4687,31 +4593,29 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4721,25 +4625,23 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4887,7 +4789,7 @@ func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4897,31 +4799,29 @@ func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4931,25 +4831,23 @@ func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5094,7 +4992,7 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5104,25 +5002,23 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -5340,7 +5236,7 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5350,25 +5246,23 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -5586,7 +5480,7 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5596,31 +5490,29 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5630,31 +5522,29 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.SrcValidatorAddr = append(m.SrcValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.SrcValidatorAddr == nil { - m.SrcValidatorAddr = []byte{} - } + m.SrcValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5664,25 +5554,23 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DstValidatorAddr = append(m.DstValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DstValidatorAddr == nil { - m.DstValidatorAddr = []byte{} - } + m.DstValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -5900,7 +5788,7 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5910,25 +5798,23 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -6146,7 +6032,7 @@ func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6156,31 +6042,29 @@ func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = append(m.DelegatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddr == nil { - m.DelegatorAddr = []byte{} - } + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6190,25 +6074,23 @@ func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = append(m.ValidatorAddr[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddr == nil { - m.ValidatorAddr = []byte{} - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/staking/types/query.pb.gw.go b/x/staking/types/query.pb.gw.go index 0c43333020..eecdb3f316 100644 --- a/x/staking/types/query.pb.gw.go +++ b/x/staking/types/query.pb.gw.go @@ -83,7 +83,7 @@ func request_Query_Validator_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -110,7 +110,7 @@ func local_request_Query_Validator_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -141,7 +141,7 @@ func request_Query_ValidatorDelegations_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -175,7 +175,7 @@ func local_request_Query_ValidatorDelegations_0(ctx context.Context, marshaler r return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -213,7 +213,7 @@ func request_Query_ValidatorUnbondingDelegations_0(ctx context.Context, marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -247,7 +247,7 @@ func local_request_Query_ValidatorUnbondingDelegations_0(ctx context.Context, ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -281,7 +281,7 @@ func request_Query_Delegation_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -292,7 +292,7 @@ func request_Query_Delegation_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -319,7 +319,7 @@ func local_request_Query_Delegation_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -330,7 +330,7 @@ func local_request_Query_Delegation_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -357,7 +357,7 @@ func request_Query_UnbondingDelegation_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -368,7 +368,7 @@ func request_Query_UnbondingDelegation_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -395,7 +395,7 @@ func local_request_Query_UnbondingDelegation_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -406,7 +406,7 @@ func local_request_Query_UnbondingDelegation_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -437,7 +437,7 @@ func request_Query_DelegatorDelegations_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -471,7 +471,7 @@ func local_request_Query_DelegatorDelegations_0(ctx context.Context, marshaler r return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -509,7 +509,7 @@ func request_Query_DelegatorUnbondingDelegations_0(ctx context.Context, marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -543,7 +543,7 @@ func local_request_Query_DelegatorUnbondingDelegations_0(ctx context.Context, ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -581,7 +581,7 @@ func request_Query_Redelegations_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -615,7 +615,7 @@ func local_request_Query_Redelegations_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -653,7 +653,7 @@ func request_Query_DelegatorValidators_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -687,7 +687,7 @@ func local_request_Query_DelegatorValidators_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -721,7 +721,7 @@ func request_Query_DelegatorValidator_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -732,7 +732,7 @@ func request_Query_DelegatorValidator_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) @@ -759,7 +759,7 @@ func local_request_Query_DelegatorValidator_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_addr") } - protoReq.DelegatorAddr, err = runtime.Bytes(val) + protoReq.DelegatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_addr", err) @@ -770,7 +770,7 @@ func local_request_Query_DelegatorValidator_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") } - protoReq.ValidatorAddr, err = runtime.Bytes(val) + protoReq.ValidatorAddr, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index b67c039138..b7bcbefda9 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -38,8 +38,9 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// 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 +// 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"` @@ -254,16 +255,16 @@ func (m *Description) GetDetails() string { 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. +// 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 { - OperatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"operator_address,omitempty" yaml:"operator_address"` + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` ConsensusPubkey string `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` Status github_com_cosmos_cosmos_sdk_types.BondStatus `protobuf:"varint,4,opt,name=status,proto3,casttype=github.com/cosmos/cosmos-sdk/types.BondStatus" json:"status,omitempty"` @@ -310,7 +311,7 @@ var xxx_messageInfo_Validator proto.InternalMessageInfo // ValAddresses defines a repeated set of validator addresses. type ValAddresses struct { - Addresses []github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,rep,name=addresses,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"addresses,omitempty"` + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` } func (m *ValAddresses) Reset() { *m = ValAddresses{} } @@ -345,7 +346,7 @@ func (m *ValAddresses) XXX_DiscardUnknown() { var xxx_messageInfo_ValAddresses proto.InternalMessageInfo -func (m *ValAddresses) GetAddresses() []github_com_cosmos_cosmos_sdk_types.ValAddress { +func (m *ValAddresses) GetAddresses() []string { if m != nil { return m.Addresses } @@ -356,8 +357,8 @@ func (m *ValAddresses) GetAddresses() []github_com_cosmos_cosmos_sdk_types.ValAd // 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 github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` + 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{} } @@ -392,20 +393,6 @@ func (m *DVPair) XXX_DiscardUnknown() { var xxx_messageInfo_DVPair proto.InternalMessageInfo -func (m *DVPair) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *DVPair) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - // DVPairs defines an array of DVPair objects. type DVPairs struct { Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` @@ -456,9 +443,9 @@ func (m *DVPairs) GetPairs() []DVPair { // example, a DVVTriplet can be used to construct the key to getting a // Redelegation from state. type DVVTriplet struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` + 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{} } @@ -493,27 +480,6 @@ func (m *DVVTriplet) XXX_DiscardUnknown() { var xxx_messageInfo_DVVTriplet proto.InternalMessageInfo -func (m *DVVTriplet) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *DVVTriplet) GetValidatorSrcAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorSrcAddress - } - return nil -} - -func (m *DVVTriplet) GetValidatorDstAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorDstAddress - } - return nil -} - // DVVTriplets defines an array of DVVTriplet objects. type DVVTriplets struct { Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` @@ -563,9 +529,9 @@ func (m *DVVTriplets) GetTriplets() []DVVTriplet { // owned by one delegator, and is associated with the voting power of one // validator. type Delegation struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - 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"` + 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"` + 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{} } @@ -600,26 +566,12 @@ func (m *Delegation) XXX_DiscardUnknown() { var xxx_messageInfo_Delegation proto.InternalMessageInfo -func (m *Delegation) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *Delegation) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list. type UnbondingDelegation struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` + 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"` + Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` } func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } @@ -654,27 +606,6 @@ func (m *UnbondingDelegation) XXX_DiscardUnknown() { var xxx_messageInfo_UnbondingDelegation proto.InternalMessageInfo -func (m *UnbondingDelegation) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *UnbondingDelegation) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *UnbondingDelegation) GetEntries() []UnbondingDelegationEntry { - if m != nil { - return m.Entries - } - return nil -} - // UnbondingDelegationEntry defines an unbonding object with relevant metadata. type UnbondingDelegationEntry struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` @@ -786,10 +717,10 @@ func (m *RedelegationEntry) GetCompletionTime() 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 { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` - Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` + 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"` + Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` } func (m *Redelegation) Reset() { *m = Redelegation{} } @@ -824,34 +755,6 @@ func (m *Redelegation) XXX_DiscardUnknown() { var xxx_messageInfo_Redelegation proto.InternalMessageInfo -func (m *Redelegation) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *Redelegation) GetValidatorSrcAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorSrcAddress - } - return nil -} - -func (m *Redelegation) GetValidatorDstAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorDstAddress - } - return nil -} - -func (m *Redelegation) GetEntries() []RedelegationEntry { - if m != nil { - return m.Entries - } - return nil -} - // Params defines the parameters for the staking module. type Params struct { UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` @@ -928,8 +831,8 @@ func (m *Params) GetBondDenom() string { return "" } -// DelegationResponse is equivalent to Delegation except that it contains a balance -// in addition to shares which is more suitable for client responses. +// 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 types1.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` @@ -1084,7 +987,8 @@ func (m *RedelegationResponse) GetEntries() []RedelegationEntryResponse { return nil } -// Pool is used for tracking bonded and not-bonded token supply of the bond denomination. +// 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"` @@ -1151,112 +1055,110 @@ func init() { } var fileDescriptor_64c30c6cf92913c9 = []byte{ - // 1680 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcb, 0x6f, 0x1b, 0xc7, - 0x19, 0xd7, 0x92, 0x32, 0x45, 0x7d, 0x94, 0x44, 0x71, 0x6c, 0xab, 0x94, 0xea, 0x72, 0xe5, 0xad, - 0xd1, 0xaa, 0x40, 0x4d, 0x55, 0x6a, 0xd1, 0xa2, 0xba, 0xb4, 0xa6, 0x68, 0x43, 0x42, 0xed, 0x56, - 0x5e, 0xb9, 0x2a, 0xd0, 0x1a, 0x25, 0x86, 0xbb, 0x23, 0x6a, 0x2b, 0xee, 0x2e, 0xbb, 0x33, 0xb4, - 0x25, 0xc3, 0x87, 0x5e, 0x0a, 0xb4, 0x05, 0x8a, 0xfa, 0xe8, 0xa3, 0xd0, 0xfe, 0x01, 0xfd, 0x0f, - 0xda, 0xab, 0x83, 0x5c, 0x9c, 0x4b, 0x10, 0x04, 0x01, 0x13, 0xd8, 0x97, 0x24, 0x97, 0x04, 0x3c, - 0xe4, 0x90, 0x4b, 0x82, 0x79, 0xec, 0x43, 0x4b, 0xd1, 0x16, 0x95, 0x00, 0x09, 0x10, 0x5f, 0xa4, - 0x9d, 0x6f, 0xbe, 0xd7, 0xfc, 0xbe, 0xc7, 0x3c, 0x08, 0x57, 0x2c, 0x9f, 0xba, 0x3e, 0x5d, 0xa6, - 0x0c, 0xef, 0x3b, 0x5e, 0x6b, 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0x06, 0xe3, 0x01, 0x66, 0x44, 0xb8, - 0x32, 0x59, 0xab, 0x72, 0xfe, 0xb7, 0x7b, 0xfa, 0xf7, 0x5a, 0x0e, 0xdb, 0xeb, 0x36, 0xab, 0x96, - 0xef, 0x2e, 0xab, 0x05, 0xca, 0x7f, 0x57, 0xa9, 0xbd, 0xaf, 0x00, 0xac, 0x13, 0xcb, 0x14, 0xb2, - 0xe8, 0x2e, 0xe4, 0x5d, 0x7c, 0xd0, 0x10, 0x7a, 0x32, 0x42, 0xcf, 0xb5, 0xd1, 0xf4, 0xf4, 0x7b, - 0x7a, 0xf1, 0x10, 0xbb, 0xed, 0x35, 0x23, 0xd4, 0x63, 0x98, 0x13, 0x2e, 0x3e, 0xe0, 0x2e, 0xa2, - 0x0e, 0x14, 0x39, 0xd5, 0xda, 0xc3, 0x5e, 0x8b, 0x48, 0x23, 0x59, 0x61, 0x64, 0x63, 0x64, 0x23, - 0x73, 0xb1, 0x91, 0x84, 0x3a, 0xc3, 0x9c, 0x76, 0xf1, 0xc1, 0xba, 0x20, 0x70, 0x8b, 0x6b, 0xf9, - 0xc7, 0x47, 0xfa, 0xd8, 0xfb, 0x47, 0xba, 0x66, 0xbc, 0xa1, 0x01, 0xc4, 0x88, 0xa1, 0xbb, 0x30, - 0x6b, 0x45, 0x23, 0x21, 0x4b, 0x55, 0x0c, 0xbf, 0x3f, 0x2c, 0x16, 0x29, 0xbc, 0x6b, 0x79, 0xee, - 0xf4, 0xd3, 0x9e, 0xae, 0x99, 0x45, 0x2b, 0x15, 0x8a, 0x3f, 0x40, 0xa1, 0xdb, 0xb1, 0x31, 0x23, - 0x0d, 0x9e, 0x84, 0x02, 0xc9, 0xc2, 0xea, 0x42, 0x55, 0x26, 0x60, 0x35, 0x4c, 0xc0, 0xea, 0x9d, - 0x30, 0x43, 0x6b, 0x15, 0xae, 0xab, 0xdf, 0xd3, 0x91, 0x5c, 0x56, 0x42, 0xd8, 0x78, 0xf4, 0xae, - 0xae, 0x99,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xf4, 0x10, 0xa6, 0x8f, 0x1b, 0x93, 0x2f, 0x5e, 0xbf, 0x1b, 0xd9, - 0xd8, 0x71, 0x35, 0xfd, 0x9e, 0x7e, 0x21, 0xae, 0x98, 0x88, 0x6c, 0x98, 0x53, 0xcd, 0x84, 0xf5, - 0xb5, 0x3c, 0x5f, 0xfd, 0xc7, 0x47, 0xba, 0x56, 0xbb, 0xf1, 0xe4, 0x59, 0x45, 0x7b, 0xfa, 0xac, - 0xa2, 0xbd, 0xf7, 0xac, 0xa2, 0x3d, 0x7a, 0x5e, 0x19, 0x7b, 0xfa, 0xbc, 0x32, 0xf6, 0xd6, 0xf3, - 0xca, 0xd8, 0xef, 0x7f, 0xf8, 0x42, 0x17, 0x0e, 0xa2, 0x9f, 0x19, 0x84, 0x33, 0xcd, 0x9c, 0xe8, - 0x66, 0x3f, 0xfe, 0x3c, 0x00, 0x00, 0xff, 0xff, 0x70, 0xa3, 0x33, 0x33, 0x85, 0x18, 0x00, 0x00, + // 1641 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x5b, + 0x15, 0xf7, 0xd8, 0xae, 0x63, 0x1f, 0x27, 0x71, 0x7c, 0xdb, 0x06, 0x27, 0x04, 0x4f, 0x3a, 0x54, + 0x10, 0x24, 0xea, 0x90, 0x80, 0x8a, 0xc8, 0x06, 0xea, 0xb8, 0x55, 0x22, 0x0a, 0x0a, 0x93, 0x10, + 0x24, 0xa8, 0xb0, 0xae, 0x67, 0x6e, 0x9c, 0x21, 0x9e, 0x19, 0x33, 0xf7, 0xba, 0x24, 0x52, 0x17, + 0x2c, 0x41, 0x08, 0x51, 0x76, 0x5d, 0x46, 0x62, 0x8b, 0xc4, 0x9f, 0xc0, 0xb6, 0x88, 0x4d, 0xd9, + 0x21, 0x84, 0x0c, 0x6a, 0x37, 0x88, 0x15, 0xf2, 0x02, 0x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2, 0xa4, + 0x39, 0x0c, 0x9e, 0x50, 0x45, 0xda, 0x13, 0x14, 0xb4, 0x08, 0x85, 0x9f, 0x60, 0xa7, 0x47, 0x6c, + 0x11, 0xa2, 0xa2, 0xa9, 0x4e, 0x68, 0x17, 0x0a, 0x94, 0x61, 0x36, 0xa0, 0x22, 0x2e, 0x37, 0x9a, + 0x1b, 0xff, 0x1f, 0xea, 0xf7, 0xae, 0x50, 0xc4, 0x4d, 0xdf, 0xb3, 0xf7, 0x85, 0xa0, 0xa9, 0x00, + 0xd0, 0x23, 0x28, 0x30, 0xff, 0x84, 0x78, 0x2a, 0x46, 0x53, 0x35, 0xf0, 0xae, 0xc7, 0x4c, 0x25, + 0x8d, 0x18, 0x2c, 0xd8, 0xa4, 0x47, 0xba, 0x22, 0x32, 0xf4, 0x18, 0x07, 0x84, 0xd6, 0x0a, 0x02, + 0x71, 0x77, 0xea, 0x2e, 0x53, 0x01, 0x4a, 0xe3, 0x19, 0x66, 0x25, 0x22, 0xed, 0x0b, 0x0a, 0xfa, + 0x36, 0x94, 0xed, 0xb8, 0x12, 0x6b, 0x33, 0xa2, 0xe2, 0x3f, 0x3f, 0xa9, 0x95, 0x12, 0x45, 0xab, + 0x06, 0x5b, 0x52, 0x9a, 0x67, 0x6d, 0xe0, 0x75, 0x7c, 0xcf, 0x76, 0xbc, 0x6e, 0xfb, 0x98, 0x38, + 0xdd, 0x63, 0x56, 0x2b, 0xae, 0x6a, 0x6b, 0xb9, 0x64, 0xd6, 0xd2, 0x1c, 0x86, 0x59, 0x89, 0x48, + 0x3b, 0x82, 0x82, 0x6c, 0x98, 0x8f, 0xb9, 0x44, 0x27, 0x96, 0xde, 0xd9, 0x89, 0x77, 0x54, 0x27, + 0xde, 0x4e, 0x6b, 0x89, 0x9b, 0x71, 0x2e, 0x22, 0x72, 0x31, 0xb4, 0x03, 0x10, 0xf7, 0x7f, 0x0d, + 0x84, 0x06, 0xe3, 0xdd, 0x43, 0x44, 0x39, 0x9e, 0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0x49, 0x7b, 0x9f, + 0x60, 0x33, 0xcc, 0x9b, 0x11, 0x7d, 0x3f, 0xb0, 0x2e, 0x45, 0xb5, 0x29, 0x8b, 0x50, 0x73, 0x93, + 0x51, 0x13, 0x6c, 0x49, 0xd4, 0x16, 0x65, 0x97, 0x87, 0x76, 0x1f, 0xca, 0x71, 0x48, 0x28, 0x6a, + 0x41, 0x91, 0xa9, 0x67, 0x15, 0x61, 0x63, 0x72, 0x84, 0x43, 0x31, 0x15, 0xe5, 0x48, 0xd2, 0xf8, + 0x9f, 0x06, 0x10, 0xd7, 0xec, 0x87, 0x59, 0x62, 0x7c, 0x94, 0xab, 0xc1, 0x9b, 0xbb, 0xd6, 0x2e, + 0xa6, 0xa4, 0x53, 0xf1, 0xfc, 0x55, 0x16, 0x6e, 0x7e, 0x3f, 0x9c, 0x3c, 0x1f, 0x7c, 0x0c, 0xf6, + 0x60, 0x86, 0x78, 0x2c, 0x70, 0x44, 0x10, 0x78, 0xb6, 0xbf, 0x32, 0x29, 0xdb, 0x97, 0xf8, 0xf4, + 0xd0, 0x63, 0xc1, 0x99, 0xca, 0x7d, 0x08, 0x93, 0x8a, 0xc6, 0x6f, 0x72, 0x50, 0x9b, 0x24, 0x89, + 0xb6, 0xa1, 0x62, 0x05, 0x44, 0x10, 0xc2, 0xef, 0x87, 0x26, 0xbe, 0x1f, 0xcb, 0xf1, 0xea, 0x98, + 0x62, 0x30, 0xcc, 0xf9, 0x90, 0xa2, 0xbe, 0x1e, 0x5d, 0xe0, 0x7b, 0x1d, 0x2f, 0x3b, 0xce, 0x75, + 0xc5, 0x45, 0xce, 0x50, 0x9f, 0x8f, 0x50, 0xc9, 0x45, 0x00, 0xf9, 0xfd, 0x98, 0x8f, 0xa9, 0xe2, + 0x03, 0xf2, 0x53, 0xa8, 0x38, 0x9e, 0xc3, 0x1c, 0xdc, 0x6b, 0x77, 0x70, 0x0f, 0x7b, 0xd6, 0x75, + 0xd6, 0x62, 0x39, 0xf2, 0x95, 0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x4c, 0x4e, 0xc9, 0x1f, 0x4c, 0xad, 0xec, 0x22, 0xcc, 0x68, 0xa8, 0xdf, 0x8a, + 0x3b, 0x26, 0x22, 0x1b, 0xe6, 0x6c, 0x27, 0xa1, 0x7d, 0xab, 0xc8, 0xf3, 0xf7, 0x9f, 0x73, 0x5d, + 0x6b, 0x3e, 0x7a, 0xf9, 0xba, 0xae, 0xbd, 0x7a, 0x5d, 0xd7, 0xfe, 0xf9, 0xba, 0xae, 0x3d, 0x7f, + 0x53, 0xcf, 0xbc, 0x7a, 0x53, 0xcf, 0xfc, 0xf5, 0x4d, 0x3d, 0xf3, 0xc3, 0x2f, 0xbf, 0xd5, 0x84, + 0xd3, 0xe8, 0x67, 0x5c, 0x61, 0x4c, 0xa7, 0x20, 0xa6, 0xd9, 0x57, 0x3f, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0x24, 0x46, 0xec, 0x34, 0xe5, 0x15, 0x00, 0x00, } func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { @@ -1265,587 +1167,583 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ 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{ - // 9278 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7b, 0x74, 0x1c, 0xe7, - 0x75, 0x18, 0xce, 0xd9, 0x07, 0xb0, 0x7b, 0x17, 0x8f, 0xc5, 0x07, 0x10, 0x5a, 0x2e, 0x49, 0x00, - 0x1a, 0xc9, 0x12, 0x45, 0x49, 0x80, 0x44, 0x91, 0x14, 0xb9, 0xb4, 0x2d, 0x63, 0x81, 0x25, 0x08, - 0x12, 0x2f, 0x0d, 0x40, 0x4a, 0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73, - 0x8e, 0xbd, 0x8d, 0xeb, 0x2f, 0x89, 0xc4, 0xca, 0xa8, 0x2f, 0x87, 0x47, 0xf7, 0x83, 0x90, 0xf7, - 0xcc, 0x29, 0x0a, 0x56, 0xa7, 0x5c, 0x57, 0xad, 0x2e, 0x38, 0xff, 0x32, 0xe7, 0x2c, 0x32, 0xbe, - 0x57, 0xf1, 0x3a, 0xcb, 0xaa, 0x45, 0x98, 0x3f, 0x0d, 0x39, 0xc1, 0xbc, 0x61, 0xd8, 0x58, 0x33, - 0xab, 0x86, 0x7e, 0x03, 0x57, 0xba, 0x60, 0xfd, 0x2b, 0x4d, 0x43, 0x75, 0x39, 0x40, 0x4e, 0x38, - 0x2f, 0x42, 0xd6, 0xab, 0x55, 0xca, 0x7a, 0xdd, 0x32, 0x6d, 0x37, 0x82, 0xe3, 0xd7, 0xc4, 0x48, - 0x79, 0x74, 0x8b, 0x94, 0xac, 0x50, 0x02, 0x76, 0xf2, 0xdc, 0xad, 0x4b, 0xfe, 0x2a, 0x67, 0x34, - 0xe8, 0x53, 0xf1, 0xc4, 0xa1, 0x99, 0x75, 0x4b, 0xb5, 0xbb, 0xc9, 0x7f, 0x7f, 0x4f, 0x24, 0x0e, - 0x4e, 0xc2, 0x13, 0x87, 0xbb, 0x6b, 0x61, 0x32, 0xdb, 0x77, 0xc1, 0xe1, 0xd7, 0x44, 0xe2, 0x10, - 0x34, 0x9c, 0x85, 0x28, 0x18, 0xba, 0x60, 0xf1, 0xf7, 0x05, 0x0b, 0x41, 0x43, 0x58, 0x3c, 0xe9, - 0x4f, 0xb4, 0x36, 0xae, 0xea, 0x8e, 0x6b, 0xb3, 0x32, 0x79, 0x6f, 0x56, 0xff, 0xe0, 0x07, 0xe1, - 0x22, 0x4c, 0x09, 0x90, 0x92, 0x4c, 0xc4, 0xb7, 0x5d, 0xe9, 0x2a, 0x2a, 0x5a, 0xb0, 0x5f, 0x17, - 0x99, 0x28, 0x40, 0x46, 0x64, 0x0b, 0x54, 0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, 0x68, 0xea, - 0x4f, 0x0b, 0xab, 0x0b, 0x92, 0xc2, 0x13, 0x90, 0xf6, 0x26, 0x9b, 0x68, 0xfa, 0xcf, 0x70, 0x7a, - 0x9f, 0x86, 0x58, 0x20, 0x30, 0xd9, 0x45, 0xb3, 0xf8, 0xcb, 0xc2, 0x02, 0x01, 0x2a, 0x12, 0x46, - 0xcd, 0x05, 0x4c, 0x34, 0xa7, 0x9f, 0x11, 0x61, 0xd4, 0x54, 0xbf, 0x90, 0xd1, 0xa4, 0x39, 0x3f, - 0x9a, 0xc5, 0xcf, 0x8a, 0xd1, 0xa4, 0xf8, 0x44, 0x8c, 0xe6, 0x8a, 0x20, 0x9a, 0xc7, 0x5f, 0x11, - 0x62, 0x34, 0x15, 0x04, 0x85, 0x35, 0x40, 0xad, 0xd5, 0x40, 0x34, 0xbf, 0xcf, 0x72, 0x7e, 0x23, - 0x2d, 0xc5, 0x40, 0xe1, 0x29, 0x18, 0x6f, 0x5f, 0x09, 0x44, 0x73, 0xfd, 0xdc, 0xeb, 0x4d, 0x6b, - 0xb7, 0x60, 0x21, 0x50, 0xd8, 0xf0, 0xa7, 0x94, 0x60, 0x15, 0x10, 0xcd, 0xf6, 0x85, 0xd7, 0xc3, - 0x89, 0x3b, 0x58, 0x04, 0x14, 0x66, 0x01, 0xfc, 0x09, 0x38, 0x9a, 0xd7, 0xe7, 0x39, 0xaf, 0x00, - 0x11, 0x09, 0x0d, 0x3e, 0xff, 0x46, 0xd3, 0xbf, 0x28, 0x42, 0x83, 0x53, 0x90, 0xd0, 0x10, 0x53, - 0x6f, 0x34, 0xf5, 0x17, 0x44, 0x68, 0x08, 0x12, 0xe2, 0xd9, 0x81, 0xd9, 0x2d, 0x9a, 0xc3, 0x17, - 0x85, 0x67, 0x07, 0xa8, 0x0a, 0x2b, 0x30, 0xd2, 0x32, 0x21, 0x46, 0xb3, 0xfa, 0x12, 0x67, 0x95, - 0x6d, 0x9e, 0x0f, 0x83, 0x93, 0x17, 0x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7f, 0x4a, 0x40, 0x1f, 0x37, 0xc6, 0x7b, 0xa0, 0x9f, 0x9b, 0x95, 0xfb, 0xef, - 0xd1, 0xe9, 0xd6, 0xa9, 0x69, 0xda, 0x9b, 0x42, 0x38, 0x3f, 0x41, 0x83, 0xee, 0x83, 0x94, 0xb6, - 0xad, 0xea, 0x46, 0x59, 0xaf, 0x88, 0x5a, 0xfe, 0xd5, 0x9b, 0x93, 0xfd, 0x73, 0x04, 0xb6, 0x38, - 0xaf, 0xf4, 0xd3, 0x87, 0x8b, 0x15, 0x52, 0x0b, 0x6c, 0x63, 0xbd, 0xba, 0xed, 0xf2, 0x18, 0xe4, - 0x2d, 0x74, 0x06, 0x12, 0xc4, 0x65, 0xf8, 0xeb, 0x31, 0xf9, 0x96, 0x35, 0x96, 0x57, 0xb7, 0x16, - 0x53, 0xa4, 0xe3, 0x4f, 0x7f, 0x67, 0x52, 0x52, 0x28, 0x05, 0x9a, 0x83, 0xc1, 0x9a, 0xea, 0xb8, - 0x65, 0x3a, 0x87, 0x91, 0xee, 0x93, 0x94, 0xc5, 0xa1, 0x56, 0x83, 0x70, 0xc3, 0x72, 0xd1, 0x33, - 0x84, 0x8a, 0x81, 0x2a, 0xe8, 0x18, 0x64, 0x29, 0x13, 0xcd, 0xac, 0xd7, 0x75, 0x97, 0x55, 0x57, - 0x7d, 0xd4, 0xee, 0x43, 0x04, 0x3e, 0x47, 0xc1, 0xb4, 0xc6, 0x3a, 0x0c, 0x69, 0x7a, 0x21, 0x9f, - 0xa2, 0xb0, 0xcb, 0x67, 0x29, 0x02, 0xa0, 0x0f, 0xef, 0x87, 0x61, 0x3f, 0x83, 0x32, 0x94, 0x14, - 0xe3, 0xe2, 0x83, 0x29, 0xe2, 0x23, 0x30, 0x66, 0xe0, 0x1d, 0x7a, 0x1d, 0x2e, 0x84, 0x9d, 0xa6, - 0xd8, 0x88, 0x3c, 0xbb, 0x12, 0xa6, 0x78, 0x17, 0x0c, 0x69, 0xc2, 0xf8, 0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 0xa6, 0xc1, 0x45, - 0xc8, 0x04, 0x32, 0x7d, 0x2e, 0x19, 0xf1, 0x0a, 0x6f, 0xf3, 0xce, 0x62, 0x90, 0x18, 0x7d, 0x42, - 0x82, 0x83, 0x6d, 0x27, 0x41, 0xfa, 0xff, 0x7b, 0x7b, 0xdc, 0xb9, 0x6c, 0x32, 0x4e, 0x5b, 0xbe, - 0xb2, 0x32, 0xd6, 0x68, 0x57, 0x4d, 0xac, 0xc1, 0x60, 0x68, 0x02, 0xcb, 0x89, 0xff, 0xc2, 0xdd, - 0xfd, 0x0b, 0x17, 0x61, 0x06, 0x28, 0x0f, 0x29, 0xbc, 0x63, 0x99, 0xb6, 0x8b, 0x2b, 0xf4, 0xb2, - 0x4e, 0x4a, 0xf1, 0xda, 0xf2, 0x75, 0x40, 0xad, 0x83, 0x8b, 0x2e, 0x35, 0x7d, 0x77, 0x78, 0x3f, - 0x1b, 0x18, 0xde, 0xa7, 0x8a, 0xc7, 0x20, 0x19, 0xfc, 0x98, 0x2f, 0x6b, 0xdc, 0xee, 0xe4, 0xf0, - 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xaa, 0x53, 0x6b, 0xa7, 0x95, 0x00, 0x00, + // 9213 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x74, 0x1c, 0xd7, + 0x75, 0x18, 0x67, 0x3f, 0x80, 0xdd, 0x8b, 0xaf, 0xc5, 0x03, 0x48, 0x2d, 0x97, 0x24, 0x00, 0x8d, + 0x64, 0x89, 0xa2, 0x24, 0x40, 0xa2, 0xf8, 0xb9, 0x8c, 0x25, 0x63, 0x81, 0x25, 0x08, 0x12, 0x5f, + 0x1a, 0x80, 0x94, 0x3f, 0x92, 0xce, 0x19, 0xec, 0x3e, 0x2c, 0x46, 0xdc, 0x9d, 0x19, 0xcd, 0xcc, + 0x92, 0x80, 0x6c, 0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 0xf6, 0x0b, 0x30, + 0xda, 0xc2, 0xa8, 0xeb, 0x18, 0xfb, 0x31, 0x09, 0xf2, 0xed, 0x8c, 0xd3, 0x21, 0xd2, 0x25, 0x42, + 0x91, 0xee, 0x42, 0xd4, 0x82, 0xf7, 0xb6, 0xef, 0x84, 0x96, 0xbe, 0xfe, 0x9a, 0x04, 0x87, 0xe2, + 0x33, 0xc5, 0x58, 0x19, 0x9e, 0x84, 0xbe, 0x06, 0x76, 0xb7, 0x4d, 0x91, 0x2d, 0x3d, 0x10, 0x33, + 0x07, 0x93, 0xea, 0x68, 0x67, 0x73, 0xaa, 0xe0, 0x24, 0x9e, 0x6c, 0x97, 0xee, 0x31, 0x69, 0x5a, + 0x24, 0xfd, 0x54, 0x02, 0x0e, 0xc6, 0x32, 0x8f, 0x15, 0xf4, 0x18, 0x80, 0x6e, 0x58, 0x4d, 0x97, + 0x65, 0x44, 0x2c, 0xc0, 0x66, 0x29, 0x84, 0x06, 0x2f, 0x12, 0x3c, 0x9b, 0xae, 0x57, 0x9f, 0xa4, + 0xf5, 0xc0, 0x40, 0x14, 0xe1, 0x9c, 0x2f, 0x68, 0x8a, 0x0a, 0x3a, 0xd1, 0x46, 0xd3, 0x16, 0xc7, + 0x7c, 0x0c, 0x72, 0x95, 0xba, 0x8e, 0x0d, 0x57, 0x75, 0x5c, 0x1b, 0x6b, 0x0d, 0xdd, 0xa8, 0xd1, + 0x19, 0x24, 0x53, 0x4c, 0x6f, 0x69, 0x75, 0x07, 0x2b, 0x23, 0xac, 0x7a, 0x5d, 0xd4, 0x12, 0x0a, + 0xea, 0x40, 0x76, 0x80, 0xa2, 0x2f, 0x44, 0xc1, 0xaa, 0x3d, 0x0a, 0xf9, 0x27, 0xb3, 0x30, 0x10, + 0xc8, 0xab, 0xd1, 0xbd, 0x30, 0xf8, 0xac, 0x76, 0x43, 0x53, 0xc5, 0x5a, 0x89, 0x59, 0x62, 0x80, + 0xc0, 0xd6, 0xf8, 0x7a, 0xe9, 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 0x30, 0x11, 0x38, 0x2f, 0xa3, 0x43, 0x90, 0xb6, 0x34, + 0xb7, 0xb2, 0xcd, 0xae, 0x4e, 0x5f, 0x3a, 0xa0, 0xb0, 0x22, 0x42, 0x90, 0xda, 0x34, 0xab, 0xbb, + 0xfc, 0x52, 0x34, 0xfd, 0x8d, 0xce, 0x42, 0x1f, 0x1b, 0xed, 0xd1, 0xdb, 0xcc, 0xc4, 0x40, 0x6c, + 0x5b, 0x95, 0xe8, 0xb2, 0xa6, 0x91, 0x0c, 0xde, 0x20, 0x8d, 0x30, 0x74, 0x54, 0x86, 0x31, 0xad, + 0x5a, 0xd5, 0x89, 0x23, 0x68, 0x75, 0x75, 0x53, 0x37, 0xaa, 0xba, 0x51, 0x73, 0xe8, 0xeb, 0x9f, + 0x76, 0x66, 0x46, 0x3e, 0x41, 0x89, 0xe3, 0xf3, 0xeb, 0xa2, 0xf4, 0x85, 0x97, 0x4a, 0x85, 0x63, + 0x6f, 0x51, 0x06, 0x05, 0xb0, 0x64, 0x56, 0x77, 0x4b, 0x59, 0xe8, 0xb7, 0x98, 0x00, 0xf2, 0x05, + 0x18, 0x6d, 0x91, 0x8a, 0x28, 0x76, 0x5d, 0x37, 0xaa, 0xe2, 0x1e, 0x23, 0xf9, 0x4d, 0x60, 0xf4, + 0x18, 0x84, 0x9d, 0x73, 0xd0, 0xdf, 0xa5, 0x1f, 0x93, 0xda, 0xba, 0xe6, 0x70, 0xc0, 0x35, 0x35, + 0x4b, 0x2f, 0x65, 0x29, 0x7f, 0xe2, 0x56, 0x6b, 0xd2, 0x07, 0x67, 0x79, 0x05, 0x3b, 0xc1, 0x98, + 0x36, 0xed, 0xda, 0x4c, 0x0d, 0x1b, 0xe2, 0xb4, 0x81, 0x54, 0x69, 0x96, 0xee, 0x50, 0x77, 0xf4, + 0x8f, 0x65, 0x9c, 0x0b, 0x81, 0xdf, 0xf4, 0x20, 0x23, 0xb5, 0x30, 0xbb, 0xb6, 0xe8, 0x3d, 0x29, +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be, 0x21, 0x3e, 0x51, 0x0c, 0x99, 0x74, 0x28, 0x07, 0xad, 0x51, 0x08, 0x59, 0xa8, 0x3c, + 0xab, 0xe9, 0x75, 0xf1, 0xd0, 0x5d, 0xe1, 0x25, 0xb4, 0x08, 0x7d, 0x8e, 0xab, 0xb9, 0x4d, 0x96, + 0x12, 0xa6, 0x4b, 0x8f, 0xff, 0xef, 0x5b, 0x93, 0x8f, 0x76, 0xe1, 0xc4, 0x25, 0xd3, 0xa8, 0xae, + 0x53, 0x42, 0x85, 0x33, 0x40, 0x17, 0xa1, 0xcf, 0x35, 0xaf, 0x63, 0x83, 0xdb, 0xa8, 0xa7, 0x01, + 0x4c, 0xa7, 0x1c, 0x46, 0x8d, 0x5c, 0xc8, 0x55, 0x71, 0x1d, 0xd7, 0x58, 0x5e, 0xbe, 0xad, 0x91, + 0xf5, 0x30, 0xbd, 0x31, 0x51, 0x5a, 0xec, 0x79, 0x94, 0x71, 0x03, 0x45, 0xf9, 0xc9, 0xca, 0x88, + 0x07, 0x5a, 0xa7, 0x10, 0x74, 0x25, 0x74, 0x07, 0x96, 0x7f, 0x91, 0xf1, 0xbe, 0x76, 0x43, 0x29, + 0xe0, 0xb4, 0x62, 0x17, 0x2d, 0x78, 0x83, 0xf6, 0x22, 0xe4, 0x9a, 0xc6, 0xa6, 0x49, 0xef, 0x52, + 0xa8, 0x7c, 0x81, 0x98, 0x21, 0xe9, 0x49, 0xb0, 0xd7, 0xa2, 0x18, 0xb2, 0x32, 0xe2, 0x81, 0x2e, + 0xb1, 0x65, 0x64, 0x15, 0x86, 0x7d, 0x2c, 0x3a, 0x12, 0xb3, 0x1d, 0x47, 0xe2, 0xbd, 0x7c, 0x24, + 0x1e, 0x8c, 0xb6, 0xe2, 0x0f, 0xc6, 0x21, 0x0f, 0x48, 0xc8, 0xd0, 0x25, 0x00, 0x7f, 0xfc, 0xd3, + 0xdd, 0xb4, 0x81, 0x93, 0x72, 0xe7, 0x20, 0x22, 0x76, 0x20,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ed, 0x03, 0x68, + 0xb2, 0x32, 0xe6, 0x2f, 0xb8, 0xed, 0x4a, 0x2c, 0xd7, 0xaa, 0xe3, 0x7a, 0x5c, 0x93, 0xed, 0xb9, + 0x06, 0xd0, 0x82, 0x5c, 0xe7, 0x1d, 0x37, 0xde, 0xb4, 0xeb, 0x30, 0xe0, 0x9b, 0xc4, 0x41, 0xf3, + 0x90, 0x71, 0xf9, 0x6f, 0x6e, 0x61, 0xb9, 0xbd, 0x85, 0x05, 0x19, 0xb7, 0xb2, 0x47, 0x29, 0xff, + 0x99, 0x04, 0xe0, 0xfb, 0xec, 0x0f, 0xa6, 0x8b, 0x91, 0x50, 0xce, 0x03, 0x6f, 0x72, 0x5f, 0xb9, + 0x18, 0xa7, 0x8e, 0xd8, 0xf3, 0xc7, 0x13, 0x30, 0x76, 0x55, 0x44, 0x9e, 0x1f, 0x78, 0x1b, 0xac, + 0x41, 0x3f, 0x36, 0x5c, 0x5b, 0xa7, 0x46, 0x20, 0xbd, 0xfd, 0x58, 0xbb, 0xde, 0x8e, 0xd1, 0x89, + 0x7e, 0x5d, 0x49, 0x1c, 0x0d, 0x71, 0x36, 0x11, 0x6b, 0x7c, 0x3a, 0x09, 0xf9, 0x76, 0x94, 0x68, + 0x0e, 0x46, 0x2a, 0x36, 0xa6, 0x00, 0x35, 0xb8, 0x17, 0x5d, 0x2a, 0xf8, 0xa9, 0x63, 0x04, 0x41, + 0x56, 0x86, 0x05, 0x84, 0xcf, 0x1e, 0x35, 0x20, 0x79, 0x1d, 0x71, 0x3b, 0x82, 0xd5, 0x65, 0x22, + 0x27, 0xf3, 0xe9, 0x43, 0x34, 0x12, 0x66, 0xc0, 0xe6, 0x8f, 0x61, 0x1f, 0x4a, 0x27, 0x90, 0xe7, + 0x60, 0x44, 0x37, 0x74, 0x57, 0xd7, 0xea, 0xea, 0xa6, 0x56, 0xd7, 0x8c, 0xca, 0x7e, 0xd2, 0x62, + 0x16, 0xf2, 0x79, 0xb3, 0x11, 0x76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91, 0x3b, 0x15, 0x4a, + 0x6f, 0x87, 0x05, 0xd7, 0xf8, 0x69, 0xaa, 0xf1, 0x15, 0xb4, 0xb8, 0x1f, 0x8d, 0xfd, 0x8c, 0x28, + 0xa8, 0xfb, 0x6f, 0x85, 0x4f, 0x96, 0xf7, 0x76, 0xa7, 0x96, 0x85, 0x47, 0x87, 0x81, 0xd1, 0x9a, + 0xd4, 0xca, 0xef, 0xa7, 0x2a, 0x28, 0x68, 0xed, 0x6d, 0x76, 0xda, 0xcc, 0x87, 0xc3, 0x81, 0xff, + 0xa3, 0xe8, 0x7f, 0x4a, 0xf1, 0x07, 0xc5, 0x67, 0xf7, 0x14, 0xb1, 0xfd, 0xa2, 0xaa, 0x70, 0xae, + 0x77, 0x42, 0xae, 0x64, 0x83, 0x2a, 0x59, 0x43, 0xf8, 0x4e, 0x2b, 0x19, 0xdb, 0x89, 0xe8, 0xb7, + 0x25, 0x18, 0x8f, 0x5b, 0x93, 0x74, 0x18, 0x96, 0x7b, 0x2c, 0xb2, 0x3a, 0x0c, 0xcb, 0xbd, 0x16, + 0x40, 0xf2, 0x0f, 0x51, 0xe5, 0xcf, 0xa0, 0x53, 0xed, 0x94, 0xdf, 0xb3, 0x17, 0xc9, 0x58, 0xdc, + 0x33, 0xc9, 0xef, 0x30, 0x16, 0xbb, 0x59, 0xc7, 0x74, 0x18, 0x8b, 0x5d, 0xad, 0x31, 0x3a, 0x8f, + 0x45, 0x4f, 0xb3, 0x2e, 0xbb, 0xd1, 0x41, 0xbf, 0x21, 0xc1, 0x50, 0x28, 0x23, 0x46, 0x8f, 0xef, + 0x29, 0x68, 0xdc, 0x82, 0xa1, 0x70, 0xb2, 0x17, 0x12, 0xae, 0xcb, 0x22, 0xd5, 0x65, 0x0e, 0xcd, + 0xee, 0x47, 0x17, 0x3b, 0x24, 0xf1, 0xab, 0x12, 0x8c, 0xc5, 0x64, 0x99, 0x1d, 0x46, 0x61, 0xfb, + 0xa4, 0xb9, 0x70, 0xae, 0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5, 0x71, 0x48, 0x07, 0xbf, 0x4d, 0xc6, 0x0a, 0x77, 0x6f, 0xcc, 0xff, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xa4, 0x53, 0x0e, 0x24, 0x8e, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) @@ -1954,182 +1852,6 @@ func (this *Description) Equal(that interface{}) bool { } return true } -func (this *Validator) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Validator) - if !ok { - that2, ok := that.(Validator) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.OperatorAddress, that1.OperatorAddress) { - return false - } - if this.ConsensusPubkey != that1.ConsensusPubkey { - return false - } - if this.Jailed != that1.Jailed { - return false - } - if this.Status != that1.Status { - return false - } - if !this.Tokens.Equal(that1.Tokens) { - return false - } - if !this.DelegatorShares.Equal(that1.DelegatorShares) { - return false - } - if !this.Description.Equal(&that1.Description) { - return false - } - if this.UnbondingHeight != that1.UnbondingHeight { - return false - } - if !this.UnbondingTime.Equal(that1.UnbondingTime) { - return false - } - if !this.Commission.Equal(&that1.Commission) { - return false - } - if !this.MinSelfDelegation.Equal(that1.MinSelfDelegation) { - return false - } - return true -} -func (this *DVPair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DVPair) - if !ok { - that2, ok := that.(DVPair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - return true -} -func (this *DVVTriplet) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DVVTriplet) - if !ok { - that2, ok := that.(DVVTriplet) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorSrcAddress, that1.ValidatorSrcAddress) { - return false - } - if !bytes.Equal(this.ValidatorDstAddress, that1.ValidatorDstAddress) { - return false - } - return true -} -func (this *Delegation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Delegation) - if !ok { - that2, ok := that.(Delegation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Shares.Equal(that1.Shares) { - return false - } - return true -} -func (this *UnbondingDelegation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UnbondingDelegation) - if !ok { - that2, ok := that.(UnbondingDelegation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(&that1.Entries[i]) { - return false - } - } - return true -} func (this *UnbondingDelegationEntry) Equal(that interface{}) bool { if that == nil { return this == nil @@ -2196,44 +1918,6 @@ func (this *RedelegationEntry) Equal(that interface{}) bool { } return true } -func (this *Redelegation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Redelegation) - if !ok { - that2, ok := that.(Redelegation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorSrcAddress, that1.ValidatorSrcAddress) { - return false - } - if !bytes.Equal(this.ValidatorDstAddress, that1.ValidatorDstAddress) { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(&that1.Entries[i]) { - return false - } - } - return true -} func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -2270,33 +1954,6 @@ func (this *Params) Equal(that interface{}) bool { } return true } -func (this *DelegationResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DelegationResponse) - if !ok { - that2, ok := that.(DelegationResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Delegation.Equal(&that1.Delegation) { - return false - } - if !this.Balance.Equal(&that1.Balance) { - return false - } - return true -} func (this *RedelegationEntryResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -2324,38 +1981,6 @@ func (this *RedelegationEntryResponse) Equal(that interface{}) bool { } return true } -func (this *RedelegationResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedelegationResponse) - if !ok { - that2, ok := that.(RedelegationResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Redelegation.Equal(&that1.Redelegation) { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(&that1.Entries[i]) { - return false - } - } - return true -} func (this *Pool) Equal(that interface{}) bool { if that == nil { return this == nil @@ -3511,8 +3136,8 @@ func (m *ValAddresses) Size() (n int) { var l int _ = l if len(m.Addresses) > 0 { - for _, b := range m.Addresses { - l = len(b) + for _, s := range m.Addresses { + l = len(s) n += 1 + l + sovStaking(uint64(l)) } } @@ -4436,7 +4061,7 @@ func (m *Validator) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -4446,25 +4071,23 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.OperatorAddress = append(m.OperatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.OperatorAddress == nil { - m.OperatorAddress = []byte{} - } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -4814,7 +4437,7 @@ func (m *ValAddresses) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -4824,23 +4447,23 @@ func (m *ValAddresses) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.Addresses = append(m.Addresses, make([]byte, postIndex-iNdEx)) - copy(m.Addresses[len(m.Addresses)-1], dAtA[iNdEx:postIndex]) + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -4899,7 +4522,7 @@ func (m *DVPair) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -4909,31 +4532,29 @@ func (m *DVPair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -4943,25 +4564,23 @@ func (m *DVPair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5107,7 +4726,7 @@ func (m *DVVTriplet) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5117,31 +4736,29 @@ func (m *DVVTriplet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5151,31 +4768,29 @@ func (m *DVVTriplet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorSrcAddress = append(m.ValidatorSrcAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorSrcAddress == nil { - m.ValidatorSrcAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5185,25 +4800,23 @@ func (m *DVVTriplet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorDstAddress = append(m.ValidatorDstAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorDstAddress == nil { - m.ValidatorDstAddress = []byte{} - } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5349,7 +4962,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5359,31 +4972,29 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5393,25 +5004,23 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5504,7 +5113,7 @@ func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5514,31 +5123,29 @@ func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -5548,25 +5155,23 @@ func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -6005,7 +5610,7 @@ func (m *Redelegation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -6015,31 +5620,29 @@ func (m *Redelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -6049,31 +5652,29 @@ func (m *Redelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorSrcAddress = append(m.ValidatorSrcAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorSrcAddress == nil { - m.ValidatorSrcAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStaking @@ -6083,25 +5684,23 @@ func (m *Redelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStaking } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStaking } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorDstAddress = append(m.ValidatorDstAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorDstAddress == nil { - m.ValidatorDstAddress = []byte{} - } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index 9e53ec2f7c..07c643c7dc 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -4,7 +4,6 @@ package types import ( - bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -28,13 +27,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateValidator defines an SDK message for creating a new validator. type MsgCreateValidator struct { - Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` - Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,5,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - Pubkey string `protobuf:"bytes,6,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - Value types.Coin `protobuf:"bytes,7,opt,name=value,proto3" json:"value"` + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` + Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` + DelegatorAddress string `protobuf:"bytes,4,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,5,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Pubkey string `protobuf:"bytes,6,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Value types.Coin `protobuf:"bytes,7,opt,name=value,proto3" json:"value"` } func (m *MsgCreateValidator) Reset() { *m = MsgCreateValidator{} } @@ -70,52 +69,10 @@ func (m *MsgCreateValidator) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateValidator proto.InternalMessageInfo -func (m *MsgCreateValidator) GetDescription() Description { - if m != nil { - return m.Description - } - return Description{} -} - -func (m *MsgCreateValidator) GetCommission() CommissionRates { - if m != nil { - return m.Commission - } - return CommissionRates{} -} - -func (m *MsgCreateValidator) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgCreateValidator) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *MsgCreateValidator) GetPubkey() string { - if m != nil { - return m.Pubkey - } - return "" -} - -func (m *MsgCreateValidator) GetValue() types.Coin { - if m != nil { - return m.Value - } - return types.Coin{} -} - // MsgEditValidator defines an SDK message for editing an existing validator. type MsgEditValidator struct { - Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"address"` + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"address"` // We pass a reference to the new commission rate and min self delegation as // it's not mandatory to update. If not updated, the deserialized rate will be // zero with no way to distinguish if an update was intended. @@ -158,26 +115,12 @@ func (m *MsgEditValidator) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditValidator proto.InternalMessageInfo -func (m *MsgEditValidator) GetDescription() Description { - if m != nil { - return m.Description - } - return Description{} -} - -func (m *MsgEditValidator) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - // MsgDelegate defines an SDK message for performing a delegation of coins // from a delegator to a validator. type MsgDelegate struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + 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"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgDelegate) Reset() { *m = MsgDelegate{} } @@ -213,34 +156,13 @@ func (m *MsgDelegate) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDelegate proto.InternalMessageInfo -func (m *MsgDelegate) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgDelegate) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *MsgDelegate) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - // MsgBeginRedelegate defines an SDK message for performing a redelegation // of coins from a delegator and source validator to a destination validator. type MsgBeginRedelegate struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` - Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` + 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"` + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` } func (m *MsgBeginRedelegate) Reset() { *m = MsgBeginRedelegate{} } @@ -276,40 +198,12 @@ func (m *MsgBeginRedelegate) XXX_DiscardUnknown() { var xxx_messageInfo_MsgBeginRedelegate proto.InternalMessageInfo -func (m *MsgBeginRedelegate) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgBeginRedelegate) GetValidatorSrcAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorSrcAddress - } - return nil -} - -func (m *MsgBeginRedelegate) GetValidatorDstAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorDstAddress - } - return nil -} - -func (m *MsgBeginRedelegate) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - // MsgUndelegate defines an SDK message for performing an undelegation from a // delegate and a validator. type MsgUndelegate struct { - DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + 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"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } func (m *MsgUndelegate) Reset() { *m = MsgUndelegate{} } @@ -345,27 +239,6 @@ func (m *MsgUndelegate) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUndelegate proto.InternalMessageInfo -func (m *MsgUndelegate) GetDelegatorAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.DelegatorAddress - } - return nil -} - -func (m *MsgUndelegate) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAddress { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *MsgUndelegate) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - func init() { proto.RegisterType((*MsgCreateValidator)(nil), "cosmos.staking.v1beta1.MsgCreateValidator") proto.RegisterType((*MsgEditValidator)(nil), "cosmos.staking.v1beta1.MsgEditValidator") @@ -377,226 +250,48 @@ func init() { func init() { proto.RegisterFile("cosmos/staking/v1beta1/tx.proto", fileDescriptor_0926ef28816b35ab) } var fileDescriptor_0926ef28816b35ab = []byte{ - // 644 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x31, 0x6f, 0xd3, 0x4e, - 0x1c, 0x8d, 0x13, 0x37, 0x7f, 0xfd, 0xaf, 0x50, 0x5a, 0x17, 0xaa, 0x50, 0x21, 0xbb, 0x32, 0x08, - 0x32, 0x50, 0x5b, 0x05, 0x21, 0xa4, 0x6e, 0x4d, 0x02, 0x02, 0x81, 0x07, 0x5c, 0xd1, 0x81, 0x25, - 0xba, 0xd8, 0x57, 0x73, 0x8a, 0xed, 0x8b, 0x7c, 0x97, 0x28, 0x41, 0xac, 0xec, 0x7c, 0x04, 0x3e, - 0x0a, 0x03, 0x42, 0x1d, 0x3b, 0x22, 0x06, 0x83, 0x92, 0x85, 0x39, 0x23, 0x2c, 0xc8, 0xf6, 0xc5, - 0x09, 0x89, 0x83, 0xa2, 0x96, 0x02, 0x03, 0x53, 0x92, 0xcb, 0xf3, 0xfb, 0x3d, 0xbd, 0xf7, 0x7b, - 0xd6, 0x01, 0xc5, 0x22, 0xd4, 0x23, 0x54, 0xa7, 0x0c, 0x36, 0xb1, 0xef, 0xe8, 0x9d, 0x9d, 0x06, - 0x62, 0x70, 0x47, 0x67, 0x5d, 0xad, 0x15, 0x10, 0x46, 0xa4, 0x8d, 0x04, 0xa0, 0x71, 0x80, 0xc6, - 0x01, 0x9b, 0x17, 0x1d, 0xe2, 0x90, 0x18, 0xa2, 0x47, 0xdf, 0x12, 0xf4, 0xa6, 0xcc, 0xe9, 0x1a, - 0x90, 0xa2, 0x94, 0xcb, 0x22, 0xd8, 0xe7, 0xff, 0x5f, 0x9b, 0x33, 0x6e, 0xc4, 0x1e, 0xa3, 0xd4, - 0x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, - 0xe0, 0xe6, 0x2b, 0x01, 0x5c, 0x1a, 0x7b, 0x45, 0x03, 0x6b, 0xca, 0xd2, 0x27, 0xc3, 0x50, 0xb9, - 0x32, 0x6d, 0xe9, 0x04, 0xec, 0x04, 0xb6, 0xae, 0xa7, 0x44, 0xfb, 0x81, 0x95, 0xad, 0xc3, 0xa6, - 0x2c, 0xd5, 0x51, 0x98, 0xaf, 0x63, 0x02, 0x76, 0x2a, 0x1d, 0x35, 0xca, 0x66, 0x13, 0x16, 0x4f, - 0x92, 0xf0, 0xfb, 0x3c, 0x38, 0x6f, 0x50, 0xe7, 0xa9, 0x6f, 0xff, 0xab, 0xca, 0x69, 0xaa, 0x52, - 0xb9, 0x7f, 0xd4, 0x97, 0x85, 0xe3, 0xbe, 0x2c, 0x7c, 0xee, 0xcb, 0xc2, 0xeb, 0x81, 0x9c, 0x3b, - 0x1e, 0xc8, 0xb9, 0x0f, 0x03, 0x39, 0xf7, 0xec, 0xe6, 0x4f, 0x95, 0x75, 0xd3, 0xab, 0x50, 0xac, - 0xb1, 0x51, 0x8c, 0x6f, 0x40, 0xb7, 0xbf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x28, 0x49, 0xde, 0x06, - 0x98, 0x09, 0x00, 0x00, + // 621 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x95, 0xc1, 0x8a, 0xd3, 0x40, + 0x1c, 0xc6, 0x93, 0x6e, 0xb7, 0xea, 0x14, 0xd7, 0x6e, 0x56, 0x4b, 0x2d, 0x4b, 0x52, 0xa2, 0xe8, + 0x1e, 0x34, 0x61, 0x15, 0x11, 0xf6, 0x22, 0x76, 0xab, 0xb8, 0x68, 0x2f, 0x59, 0xf5, 0xe0, 0xa5, + 0x4c, 0x93, 0xd9, 0x38, 0x34, 0xc9, 0x94, 0xcc, 0xb4, 0xb4, 0xe0, 0x03, 0x78, 0x14, 0x3c, 0x0b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0x00, 0xff, 0xff, 0x4f, 0x9f, 0xcb, 0x45, 0xc0, 0x07, 0x00, 0x00, } -func (this *MsgCreateValidator) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgCreateValidator) - if !ok { - that2, ok := that.(MsgCreateValidator) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Description.Equal(&that1.Description) { - return false - } - if !this.Commission.Equal(&that1.Commission) { - return false - } - if !this.MinSelfDelegation.Equal(that1.MinSelfDelegation) { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if this.Pubkey != that1.Pubkey { - return false - } - if !this.Value.Equal(&that1.Value) { - return false - } - return true -} -func (this *MsgEditValidator) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgEditValidator) - if !ok { - that2, ok := that.(MsgEditValidator) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Description.Equal(&that1.Description) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if that1.CommissionRate == nil { - if this.CommissionRate != nil { - return false - } - } else if !this.CommissionRate.Equal(*that1.CommissionRate) { - return false - } - if that1.MinSelfDelegation == nil { - if this.MinSelfDelegation != nil { - return false - } - } else if !this.MinSelfDelegation.Equal(*that1.MinSelfDelegation) { - return false - } - return true -} -func (this *MsgDelegate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgDelegate) - if !ok { - that2, ok := that.(MsgDelegate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Amount.Equal(&that1.Amount) { - return false - } - return true -} -func (this *MsgBeginRedelegate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgBeginRedelegate) - if !ok { - that2, ok := that.(MsgBeginRedelegate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorSrcAddress, that1.ValidatorSrcAddress) { - return false - } - if !bytes.Equal(this.ValidatorDstAddress, that1.ValidatorDstAddress) { - return false - } - if !this.Amount.Equal(&that1.Amount) { - return false - } - return true -} -func (this *MsgUndelegate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgUndelegate) - if !ok { - that2, ok := that.(MsgUndelegate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.DelegatorAddress, that1.DelegatorAddress) { - return false - } - if !bytes.Equal(this.ValidatorAddress, that1.ValidatorAddress) { - return false - } - if !this.Amount.Equal(&that1.Amount) { - return false - } - return true -} func (m *MsgCreateValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1156,7 +851,7 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1166,31 +861,29 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1200,25 +893,23 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { @@ -1375,7 +1066,7 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1385,25 +1076,23 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -1534,7 +1223,7 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1544,31 +1233,29 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1578,25 +1265,23 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -1688,7 +1373,7 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1698,31 +1383,29 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1732,31 +1415,29 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorSrcAddress = append(m.ValidatorSrcAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorSrcAddress == nil { - m.ValidatorSrcAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1766,25 +1447,23 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorDstAddress = append(m.ValidatorDstAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorDstAddress == nil { - m.ValidatorDstAddress = []byte{} - } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1876,7 +1555,7 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1886,31 +1565,29 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = append(m.DelegatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorAddress == nil { - m.DelegatorAddress = []byte{} - } + 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 byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1920,25 +1597,23 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index e64cd52b27..aa042c307e 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -31,6 +31,8 @@ const ( var _ exported.ValidatorI = Validator{} +// NewValidator constructs a new Validator +//nolint:interfacer func NewValidator(operator sdk.ValAddress, pubKey crypto.PubKey, description Description) Validator { var pkStr string if pubKey != nil { @@ -38,7 +40,7 @@ func NewValidator(operator sdk.ValAddress, pubKey crypto.PubKey, description Des } return Validator{ - OperatorAddress: operator, + OperatorAddress: operator.String(), ConsensusPubkey: pkStr, Jailed: false, Status: sdk.Unbonded, @@ -100,7 +102,7 @@ func (v Validators) Len() int { // Implements sort interface func (v Validators) Less(i, j int) bool { - return bytes.Compare(v[i].OperatorAddress, v[j].OperatorAddress) == -1 + return bytes.Compare(v[i].GetOperator().Bytes(), v[j].GetOperator().Bytes()) == -1 } // Implements sort interface @@ -409,7 +411,7 @@ func (v Validator) RemoveDelShares(delShares sdk.Dec) (Validator, sdk.Int) { // validators. func (v Validator) MinEqual(other Validator) bool { return v.ConsensusPubkey == other.ConsensusPubkey && - bytes.Equal(v.OperatorAddress, other.OperatorAddress) && + (v.OperatorAddress == other.OperatorAddress) && v.Status.Equal(other.Status) && v.Tokens.Equal(other.Tokens) && v.DelegatorShares.Equal(other.DelegatorShares) && @@ -417,10 +419,19 @@ func (v Validator) MinEqual(other Validator) bool { v.Commission.Equal(other.Commission) } -func (v Validator) IsJailed() bool { return v.Jailed } -func (v Validator) GetMoniker() string { return v.Description.Moniker } -func (v Validator) GetStatus() sdk.BondStatus { return v.Status } -func (v Validator) GetOperator() sdk.ValAddress { return v.OperatorAddress } +func (v Validator) IsJailed() bool { return v.Jailed } +func (v Validator) GetMoniker() string { return v.Description.Moniker } +func (v Validator) GetStatus() sdk.BondStatus { return v.Status } +func (v Validator) GetOperator() sdk.ValAddress { + if v.OperatorAddress == "" { + return nil + } + addr, err := sdk.ValAddressFromBech32(v.OperatorAddress) + if err != nil { + panic(err) + } + return addr +} func (v Validator) GetConsPubKey() crypto.PubKey { // The way things are refactored now, v.ConsensusPubkey is sometimes a TM // ed25519 pubkey, sometimes our own ed25519 pubkey. This is very ugly and diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index e2f3813e75..5ea04c2034 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -21,12 +21,12 @@ func TestValidatorTestEquivalent(t *testing.T) { val1 := NewValidator(valAddr1, pk1, Description{}) val2 := NewValidator(valAddr1, pk1, Description{}) - ok := val1.Equal(val2) + ok := val1.String() == val2.String() require.True(t, ok) val2 = NewValidator(valAddr2, pk2, Description{}) - ok = val1.Equal(val2) + ok = val1.String() == val2.String() require.False(t, ok) } @@ -81,7 +81,7 @@ func TestABCIValidatorUpdateZero(t *testing.T) { func TestShareTokens(t *testing.T) { validator := Validator{ - OperatorAddress: valAddr1, + OperatorAddress: valAddr1.String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pk1), Status: sdk.Bonded, Tokens: sdk.NewInt(100), @@ -99,7 +99,7 @@ func TestRemoveTokens(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validator := Validator{ - OperatorAddress: valAddr, + OperatorAddress: valAddr.String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), Status: sdk.Bonded, Tokens: sdk.NewInt(100), @@ -155,7 +155,7 @@ func TestAddTokensValidatorUnbonded(t *testing.T) { // TODO refactor to make simpler like the AddToken tests above func TestRemoveDelShares(t *testing.T) { valA := Validator{ - OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()), + OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()).String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pk1), Status: sdk.Bonded, Tokens: sdk.NewInt(100), @@ -172,7 +172,7 @@ func TestRemoveDelShares(t *testing.T) { poolTokens := sdk.NewInt(5102) delShares := sdk.NewDec(115) validator := Validator{ - OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()), + OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()).String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pk1), Status: sdk.Bonded, Tokens: poolTokens, @@ -221,7 +221,7 @@ func TestUpdateStatus(t *testing.T) { func TestPossibleOverflow(t *testing.T) { delShares := sdk.NewDec(391432570689183511).Quo(sdk.NewDec(40113011844664)) validator := Validator{ - OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()), + OperatorAddress: sdk.ValAddress(pk1.Address().Bytes()).String(), ConsensusPubkey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pk1), Status: sdk.Bonded, Tokens: sdk.NewInt(2159), diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index bf1dc7fc7a..5175e183ed 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -28,7 +28,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC method. +// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +// method. type QueryCurrentPlanRequest struct { } @@ -65,7 +66,8 @@ func (m *QueryCurrentPlanRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCurrentPlanRequest proto.InternalMessageInfo -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. +// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +// method. type QueryCurrentPlanResponse struct { // plan is the current upgrade plan. Plan *Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` @@ -111,7 +113,8 @@ func (m *QueryCurrentPlanResponse) GetPlan() *Plan { return nil } -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC method. +// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +// method. type QueryAppliedPlanRequest struct { // name is the name of the applied plan to query for. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -157,7 +160,8 @@ func (m *QueryAppliedPlanRequest) GetName() string { return "" } -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC method. +// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +// method. type QueryAppliedPlanResponse struct { // height is the block height at which the plan was applied. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` diff --git a/x/upgrade/types/upgrade.pb.go b/x/upgrade/types/upgrade.pb.go index ce9d9d3b83..420a8db538 100644 --- a/x/upgrade/types/upgrade.pb.go +++ b/x/upgrade/types/upgrade.pb.go @@ -29,11 +29,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Plan specifies information about a planned upgrade and when it should occur. type Plan struct { - // Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any - // special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been - // set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height - // is reached and the software will exit. + // Sets the name for the upgrade. This name will be used by the upgraded + // version of the software to apply any special "on-upgrade" commands during + // the first BeginBlock method after the upgrade is applied. It is also used + // to detect whether a software version can handle a given upgrade. If no + // upgrade handler with this name has been set in the software, it will be + // assumed that the software is out-of-date when the upgrade Time or Height is + // reached and the software will exit. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The time after which the upgrade must be performed. // Leave set to its zero value to use a pre-defined Height instead. @@ -78,7 +80,8 @@ func (m *Plan) XXX_DiscardUnknown() { var xxx_messageInfo_Plan proto.InternalMessageInfo -// SoftwareUpgradeProposal is a gov Content type for initiating a software upgrade. +// SoftwareUpgradeProposal is a gov Content type for initiating a software +// upgrade. 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"` @@ -117,7 +120,8 @@ func (m *SoftwareUpgradeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software upgrade. +// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +// upgrade. 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"`