Fix proto format (#9279)
* makefile: fix proto-format * reformat all proto files * regenerating proto * remove dangling semicolon
This commit is contained in:
parent
1986104ef4
commit
3e4d81c3d3
5
Makefile
5
Makefile
|
@ -394,8 +394,9 @@ proto-swagger-gen:
|
|||
|
||||
proto-format:
|
||||
@echo "Formatting Protobuf files"
|
||||
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
|
||||
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {}; fi
|
||||
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
|
||||
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; ; fi
|
||||
|
||||
|
||||
proto-lint:
|
||||
@$(DOCKER_BUF) lint --error-format=json
|
||||
|
|
|
@ -2693,7 +2693,8 @@ between a store name and the commit ID.
|
|||
|
||||
### StoreKVPair
|
||||
StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
|
||||
It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
|
||||
It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
|
||||
Deletes
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
|
@ -7590,7 +7591,7 @@ TxBody is the body of a transaction that all signers sign over.
|
|||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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. |
|
||||
| `memo` | [string](#string) | | memo is any arbitrary note/comment to be added to the transaction. In clients, any public exposing text should not be called as memo, should use `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). |
|
||||
| `memo` | [string](#string) | | memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). |
|
||||
| `timeout_height` | [uint64](#uint64) | | timeout is the block height after which this transaction will not be processed by the chain |
|
||||
| `extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected |
|
||||
| `non_critical_extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored |
|
||||
|
|
|
@ -6,7 +6,7 @@ import "google/protobuf/timestamp.proto";
|
|||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// GenericAuthorization gives the grantee unrestricted permissions to execute
|
||||
|
|
|
@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto";
|
|||
import "google/protobuf/any.proto";
|
||||
import "cosmos/base/abci/v1beta1/abci.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// Msg defines the authz Msg service.
|
||||
|
@ -45,11 +45,11 @@ message MsgExecResponse {
|
|||
// authorizations granted to the grantee. Each message should have only
|
||||
// one signer corresponding to the granter of the authorization.
|
||||
message MsgExec {
|
||||
string grantee = 1;
|
||||
string grantee = 1;
|
||||
// Authorization Msg requests to execute. Each msg must implement Authorization interface
|
||||
// The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
|
||||
// triple and validate it.
|
||||
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"];;
|
||||
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"];
|
||||
}
|
||||
|
||||
// MsgGrantResponse defines the Msg/MsgGrant response type.
|
||||
|
@ -58,8 +58,8 @@ message MsgGrantResponse {}
|
|||
// MsgRevoke revokes any authorization with the provided sdk.Msg type on the
|
||||
// granter's account with that has been granted to the grantee.
|
||||
message MsgRevoke {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
string msg_type_url = 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ message Output {
|
|||
message Supply {
|
||||
option deprecated = true;
|
||||
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ service ReflectionService {
|
|||
// interface.
|
||||
rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/"
|
||||
"{interface_name}/implementations";
|
||||
"{interface_name}/implementations";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ message CodecDescriptor {
|
|||
message InterfaceDescriptor {
|
||||
// fullname is the name of the interface
|
||||
string fullname = 1;
|
||||
// interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field
|
||||
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
|
||||
// google.protobuf.Any field
|
||||
repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2;
|
||||
// interface_implementers is a list of the descriptors of the interface implementers
|
||||
repeated InterfaceImplementerDescriptor interface_implementers = 3;
|
||||
|
@ -188,7 +189,6 @@ message GetTxDescriptorResponse {
|
|||
TxDescriptor tx = 1;
|
||||
}
|
||||
|
||||
|
||||
// QueryServicesDescriptor contains the list of cosmos-sdk queriable services
|
||||
message QueryServicesDescriptor {
|
||||
// query_services is a list of cosmos-sdk QueryServiceDescriptor
|
||||
|
|
|
@ -4,10 +4,11 @@ package cosmos.base.store.v1beta1;
|
|||
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||
|
||||
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
|
||||
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
|
||||
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
|
||||
// Deletes
|
||||
message StoreKVPair {
|
||||
string store_key = 1; // the store key for the KVStore this pair originates from
|
||||
bool delete = 2; // true indicates a delete operation, false indicates a set operation
|
||||
bytes key = 3;
|
||||
bytes value = 4;
|
||||
bool delete = 2; // true indicates a delete operation, false indicates a set operation
|
||||
bytes key = 3;
|
||||
bytes value = 4;
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@ package cosmos.crypto.secp256r1;
|
|||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1";
|
||||
option (gogoproto.messagename_all) = true;
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1";
|
||||
option (gogoproto.messagename_all) = true;
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// PubKey defines a secp256r1 ECDSA public key.
|
||||
message PubKey {
|
||||
|
|
|
@ -67,10 +67,10 @@ message AllowedMsgAllowance {
|
|||
// Grant is stored in the KVStore to record a grant with full context
|
||||
message Grant {
|
||||
// granter is the address of the user granting an allowance of their funds.
|
||||
string granter = 1;
|
||||
string granter = 1;
|
||||
|
||||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
string grantee = 2;
|
||||
string grantee = 2;
|
||||
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
|
|
|
@ -23,10 +23,10 @@ service Msg {
|
|||
// of fees from the account of Granter.
|
||||
message MsgGrantAllowance {
|
||||
// granter is the address of the user granting an allowance of their funds.
|
||||
string granter = 1;
|
||||
string granter = 1;
|
||||
|
||||
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||
string grantee = 2;
|
||||
string grantee = 2;
|
||||
|
||||
// allowance can be any of basic and filtered fee allowance.
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
|
|
|
@ -284,9 +284,9 @@ message Params {
|
|||
string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""];
|
||||
// power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power
|
||||
string power_reduction = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"power_reduction\"",
|
||||
(gogoproto.moretags) = "yaml:\"power_reduction\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import "gogoproto/gogo.proto";
|
|||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
|
||||
option (gogoproto.goproto_registration) = true;
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
||||
|
||||
// Service defines a gRPC service for interacting with transactions.
|
||||
service Service {
|
||||
|
@ -43,7 +43,7 @@ message GetTxsEventRequest {
|
|||
repeated string events = 1;
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
OrderBy order_by = 3;
|
||||
OrderBy order_by = 3;
|
||||
}
|
||||
|
||||
// OrderBy defines the sorting order
|
||||
|
@ -51,9 +51,9 @@ enum OrderBy {
|
|||
// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.
|
||||
ORDER_BY_UNSPECIFIED = 0;
|
||||
// ORDER_BY_ASC defines ascending order
|
||||
ORDER_BY_ASC = 1;
|
||||
ORDER_BY_ASC = 1;
|
||||
// ORDER_BY_DESC defines descending order
|
||||
ORDER_BY_DESC = 2;
|
||||
ORDER_BY_DESC = 2;
|
||||
}
|
||||
|
||||
// GetTxsEventResponse is the response type for the Service.TxsByEvents
|
||||
|
@ -102,7 +102,7 @@ message BroadcastTxResponse {
|
|||
message SimulateRequest {
|
||||
// tx is the transaction to simulate.
|
||||
// Deprecated. Send raw tx bytes instead.
|
||||
cosmos.tx.v1beta1.Tx tx = 1 [deprecated=true];
|
||||
cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true];
|
||||
// tx_bytes is the raw transaction.
|
||||
bytes tx_bytes = 2;
|
||||
}
|
||||
|
|
|
@ -388,7 +388,8 @@ func (m *CodecDescriptor) GetInterfaces() []*InterfaceDescriptor {
|
|||
type InterfaceDescriptor struct {
|
||||
// fullname is the name of the interface
|
||||
Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"`
|
||||
// interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field
|
||||
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
|
||||
// google.protobuf.Any field
|
||||
InterfaceAcceptingMessages []*InterfaceAcceptingMessageDescriptor `protobuf:"bytes,2,rep,name=interface_accepting_messages,json=interfaceAcceptingMessages,proto3" json:"interface_accepting_messages,omitempty"`
|
||||
// interface_implementers is a list of the descriptors of the interface implementers
|
||||
InterfaceImplementers []*InterfaceImplementerDescriptor `protobuf:"bytes,3,rep,name=interface_implementers,json=interfaceImplementers,proto3" json:"interface_implementers,omitempty"`
|
||||
|
|
|
@ -23,7 +23,8 @@ var _ = math.Inf
|
|||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
|
||||
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
|
||||
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
|
||||
// Deletes
|
||||
type StoreKVPair struct {
|
||||
StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
|
||||
Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"`
|
||||
|
|
|
@ -255,8 +255,8 @@ type TxBody struct {
|
|||
// transaction.
|
||||
Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
||||
// memo is any arbitrary note/comment to be added to the transaction.
|
||||
// In clients, any public exposing text should not be called as memo,
|
||||
// should use `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
|
||||
// WARNING: in clients, any publicly exposed text should not be called memo,
|
||||
// but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
|
||||
Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"`
|
||||
// timeout is the block height after which this transaction will not
|
||||
// be processed by the chain
|
||||
|
|
Loading…
Reference in New Issue