chore: Add "Since:" on proto doc comments (#10434)
<!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: https://github.com/cosmos/cosmos-sdk/discussions/10406#discussioncomment-1533289 For clients to know whether a protobuf feature is available for a certain SDK version, we decided to use the [`@since` doc comment](https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#@since) inside protobuf files. <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
This commit is contained in:
@@ -33,6 +33,8 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// QueryAccountsRequest is the request type for the Query/Accounts RPC method.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type QueryAccountsRequest struct {
|
||||
// pagination defines an optional pagination for the request.
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
@@ -79,6 +81,8 @@ func (m *QueryAccountsRequest) GetPagination() *query.PageRequest {
|
||||
}
|
||||
|
||||
// QueryAccountsResponse is the response type for the Query/Accounts RPC method.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type QueryAccountsResponse struct {
|
||||
// accounts are the existing accounts
|
||||
Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
|
||||
@@ -732,6 +736,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 {
|
||||
// Accounts returns all the existing accounts
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
|
||||
// Account returns account details based on address.
|
||||
Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error)
|
||||
@@ -821,6 +827,8 @@ func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStrin
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Accounts returns all the existing accounts
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
|
||||
// Account returns account details based on address.
|
||||
Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error)
|
||||
|
||||
@@ -241,6 +241,8 @@ var xxx_messageInfo_PeriodicVestingAccount proto.InternalMessageInfo
|
||||
// PermanentLockedAccount implements the VestingAccount interface. It does
|
||||
// not ever release coins, locking them indefinitely. Coins in this account can
|
||||
// still be used for delegating and for governance votes even while locked.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type PermanentLockedAccount struct {
|
||||
*BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3,embedded=base_vesting_account" json:"base_vesting_account,omitempty"`
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// SendAuthorization allows the grantee to spend up to spend_limit coins from
|
||||
// the granter's account.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type SendAuthorization struct {
|
||||
SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spend_limit"`
|
||||
}
|
||||
|
||||
@@ -332,14 +332,22 @@ type Metadata struct {
|
||||
// displayed in clients.
|
||||
Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty"`
|
||||
// name defines the name of the token (eg: Cosmos Atom)
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
|
||||
// be the same as the display.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"`
|
||||
// URI to a document (on or off-chain) that contains additional information. Optional.
|
||||
//
|
||||
// Since: cosmos-sdk 0.45
|
||||
URI string `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"`
|
||||
// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
|
||||
// the document didn't change. Optional.
|
||||
//
|
||||
// Since: cosmos-sdk 0.45
|
||||
URIHash string `protobuf:"bytes,8,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -221,6 +221,8 @@ func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse {
|
||||
// method.
|
||||
type QueryTotalSupplyRequest struct {
|
||||
// pagination defines an optional pagination for the request.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@@ -263,6 +265,8 @@ 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"`
|
||||
// pagination defines the pagination in the response.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,8 @@ func (ProposalStatus) EnumDescriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
// WeightedVoteOption defines a unit of vote for vote split.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type WeightedVoteOption struct {
|
||||
Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
|
||||
Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"`
|
||||
@@ -331,7 +333,8 @@ type Vote struct {
|
||||
// Deprecated: Prefer to use `options` instead. This field is set in queries
|
||||
// if and only if `len(options) == 1` and that option has weight 1. In all
|
||||
// other cases, this field will default to VOTE_OPTION_UNSPECIFIED.
|
||||
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` // Deprecated: Do not use.
|
||||
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` // Deprecated: Do not use.
|
||||
// Since: cosmos-sdk 0.43
|
||||
Options []WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options"`
|
||||
}
|
||||
|
||||
|
||||
@@ -194,6 +194,8 @@ func (m *MsgVoteResponse) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgVoteWeighted defines a message to cast a vote.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type MsgVoteWeighted struct {
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
|
||||
@@ -233,6 +235,8 @@ func (m *MsgVoteWeighted) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_MsgVoteWeighted proto.InternalMessageInfo
|
||||
|
||||
// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type MsgVoteWeightedResponse struct {
|
||||
}
|
||||
|
||||
@@ -420,6 +424,8 @@ type MsgClient interface {
|
||||
// Vote defines a method to add a vote on a specific proposal.
|
||||
Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
|
||||
// VoteWeighted defines a method to add a weighted vote on a specific proposal.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error)
|
||||
// Deposit defines a method to add deposit on a specific proposal.
|
||||
Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
|
||||
@@ -476,6 +482,8 @@ type MsgServer interface {
|
||||
// Vote defines a method to add a vote on a specific proposal.
|
||||
Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
|
||||
// VoteWeighted defines a method to add a weighted vote on a specific proposal.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error)
|
||||
// Deposit defines a method to add deposit on a specific proposal.
|
||||
Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
|
||||
|
||||
@@ -26,6 +26,8 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// AuthorizationType defines the type of staking module authorization type
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type AuthorizationType int32
|
||||
|
||||
const (
|
||||
@@ -62,6 +64,8 @@ func (AuthorizationType) EnumDescriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
// StakeAuthorization defines authorization for delegate/undelegate/redelegate.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type StakeAuthorization struct {
|
||||
// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
|
||||
// empty, there is no spend limit and any amount of coins can be delegated.
|
||||
|
||||
@@ -263,6 +263,7 @@ func (m *QueryUpgradedConsensusStateRequest) GetLastHeight() int64 {
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type QueryUpgradedConsensusStateResponse struct {
|
||||
// Since: cosmos-sdk 0.43
|
||||
UpgradedConsensusState []byte `protobuf:"bytes,2,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"`
|
||||
}
|
||||
|
||||
@@ -308,6 +309,8 @@ func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() []byte
|
||||
|
||||
// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions
|
||||
// RPC method.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type QueryModuleVersionsRequest struct {
|
||||
// module_name is a field to query a specific module
|
||||
// consensus version from state. Leaving this empty will
|
||||
@@ -357,6 +360,8 @@ func (m *QueryModuleVersionsRequest) GetModuleName() string {
|
||||
|
||||
// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions
|
||||
// RPC method.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type QueryModuleVersionsResponse struct {
|
||||
// module_versions is a list of module names with their consensus versions.
|
||||
ModuleVersions []*ModuleVersion `protobuf:"bytes,1,rep,name=module_versions,json=moduleVersions,proto3" json:"module_versions,omitempty"`
|
||||
@@ -482,6 +487,8 @@ type QueryClient interface {
|
||||
// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
|
||||
UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error)
|
||||
// ModuleVersions queries the list of module versions from state.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error)
|
||||
}
|
||||
|
||||
@@ -544,6 +551,8 @@ type QueryServer interface {
|
||||
// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
|
||||
UpgradedConsensusState(context.Context, *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error)
|
||||
// ModuleVersions queries the list of module versions from state.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error)
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,8 @@ func (m *CancelSoftwareUpgradeProposal) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_CancelSoftwareUpgradeProposal proto.InternalMessageInfo
|
||||
|
||||
// ModuleVersion specifies a module and its consensus version.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
type ModuleVersion struct {
|
||||
// name of the app module
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user