chore: proto format (#13685)

This commit is contained in:
Marko 2022-10-28 17:40:48 +02:00 committed by GitHub
parent dd78ce9ca4
commit 348734a137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 211 additions and 229 deletions

View File

@ -426,7 +426,7 @@ 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 tendermintdev/docker-build-proto \
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
find ./ -name "*.proto" -exec clang-format -i {} \; ; fi

View File

@ -15,42 +15,42 @@ service Query {
message EchoRequest {
// u32 is an uint32
uint32 u32 = 1;
uint64 u64 = 2;
string str = 3;
bytes bz = 4;
google.protobuf.Timestamp timestamp = 5;
google.protobuf.Duration duration = 6;
int32 i32 = 7;
int64 i64 = 10;
bool a_bool = 15;
Enum an_enum = 16;
AMessage a_message = 17;
cosmos.base.v1beta1.Coin a_coin = 18;
uint32 u32 = 1;
uint64 u64 = 2;
string str = 3;
bytes bz = 4;
google.protobuf.Timestamp timestamp = 5;
google.protobuf.Duration duration = 6;
int32 i32 = 7;
int64 i64 = 10;
bool a_bool = 15;
Enum an_enum = 16;
AMessage a_message = 17;
cosmos.base.v1beta1.Coin a_coin = 18;
string an_address = 19 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.query.v1beta1.PageRequest page = 20;
repeated bool bools = 21;
repeated uint32 uints = 22;
repeated string strings = 23;
repeated Enum enums = 24;
repeated google.protobuf.Duration durations = 25;
repeated AMessage some_messages = 26;
cosmos.base.query.v1beta1.PageRequest page = 20;
repeated bool bools = 21;
repeated uint32 uints = 22;
repeated string strings = 23;
repeated Enum enums = 24;
repeated google.protobuf.Duration durations = 25;
repeated AMessage some_messages = 26;
int32 positional1 = 27;
string positional2 = 28;
int32 positional1 = 27;
string positional2 = 28;
repeated cosmos.base.v1beta1.Coin positional3_varargs = 29;
string deprecated_field = 30;
string deprecated_field = 30;
string shorthand_deprecated_field = 31;
bool hidden_bool = 32;
bool hidden_bool = 32;
}
enum Enum {
ENUM_UNSPECIFIED = 0;
ENUM_ONE = 1;
ENUM_TWO = 2;
ENUM_FIVE = 5;
ENUM_NEG_THREE = -3;
ENUM_ONE = 1;
ENUM_TWO = 2;
ENUM_FIVE = 5;
ENUM_NEG_THREE = -3;
}
message AMessage {

View File

@ -8,13 +8,13 @@ import "testpb/bank.proto";
// BankQuery queries the state of the tables specified by testpb/bank.proto.
service BankQuery {
// Get queries the Balance table by its primary key.
rpc GetBalance (GetBalanceRequest) returns (GetBalanceResponse) {}
rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse) {}
// ListBalance queries the Balance table using prefix and range queries against defined indexes.
rpc ListBalance (ListBalanceRequest) returns (ListBalanceResponse) {}
rpc ListBalance(ListBalanceRequest) returns (ListBalanceResponse) {}
// Get queries the Supply table by its primary key.
rpc GetSupply (GetSupplyRequest) returns (GetSupplyResponse) {}
rpc GetSupply(GetSupplyRequest) returns (GetSupplyResponse) {}
// ListSupply queries the Supply table using prefix and range queries against defined indexes.
rpc ListSupply (ListSupplyRequest) returns (ListSupplyResponse) {}
rpc ListSupply(ListSupplyRequest) returns (ListSupplyResponse) {}
}
// GetBalanceRequest is the BankQuery/GetBalanceRequest request type.
@ -42,7 +42,7 @@ message ListBalanceRequest {
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 2;
}
message AddressDenom {
// address is the value of the address field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
@ -51,14 +51,14 @@ message ListBalanceRequest {
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 2;
}
message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -68,7 +68,7 @@ message ListBalanceRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -110,14 +110,14 @@ message ListSupplyRequest {
// denom specifies the value of the Denom index key to use in the query.
Denom denom = 1;
}
message Denom {
// denom is the value of the denom field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string denom = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -127,7 +127,7 @@ message ListSupplyRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -147,4 +147,3 @@ message ListSupplyResponse {
// pagination is the pagination response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

View File

@ -9,33 +9,38 @@ import "testpb/test_schema.proto";
// TestSchemaQuery queries the state of the tables specified by testpb/test_schema.proto.
service TestSchemaQuery {
// Get queries the ExampleTable table by its primary key.
rpc GetExampleTable (GetExampleTableRequest) returns (GetExampleTableResponse) {}
rpc GetExampleTable(GetExampleTableRequest) returns (GetExampleTableResponse) {}
// GetExampleTableByU64Str queries the ExampleTable table by its U64Str index
rpc GetExampleTableByU64Str (GetExampleTableByU64StrRequest) returns (GetExampleTableByU64StrResponse) {}
rpc GetExampleTableByU64Str(GetExampleTableByU64StrRequest) returns (GetExampleTableByU64StrResponse) {}
// ListExampleTable queries the ExampleTable table using prefix and range queries against defined indexes.
rpc ListExampleTable (ListExampleTableRequest) returns (ListExampleTableResponse) {}
rpc ListExampleTable(ListExampleTableRequest) returns (ListExampleTableResponse) {}
// Get queries the ExampleAutoIncrementTable table by its primary key.
rpc GetExampleAutoIncrementTable (GetExampleAutoIncrementTableRequest) returns (GetExampleAutoIncrementTableResponse) {}
rpc GetExampleAutoIncrementTable(GetExampleAutoIncrementTableRequest) returns (GetExampleAutoIncrementTableResponse) {
}
// GetExampleAutoIncrementTableByX queries the ExampleAutoIncrementTable table by its X index
rpc GetExampleAutoIncrementTableByX (GetExampleAutoIncrementTableByXRequest) returns (GetExampleAutoIncrementTableByXResponse) {}
// ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against defined indexes.
rpc ListExampleAutoIncrementTable (ListExampleAutoIncrementTableRequest) returns (ListExampleAutoIncrementTableResponse) {}
rpc GetExampleAutoIncrementTableByX(GetExampleAutoIncrementTableByXRequest)
returns (GetExampleAutoIncrementTableByXResponse) {}
// ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against
// defined indexes.
rpc ListExampleAutoIncrementTable(ListExampleAutoIncrementTableRequest)
returns (ListExampleAutoIncrementTableResponse) {}
// GetExampleSingleton queries the ExampleSingleton singleton.
rpc GetExampleSingleton (GetExampleSingletonRequest) returns (GetExampleSingletonResponse) {}
rpc GetExampleSingleton(GetExampleSingletonRequest) returns (GetExampleSingletonResponse) {}
// Get queries the ExampleTimestamp table by its primary key.
rpc GetExampleTimestamp (GetExampleTimestampRequest) returns (GetExampleTimestampResponse) {}
rpc GetExampleTimestamp(GetExampleTimestampRequest) returns (GetExampleTimestampResponse) {}
// ListExampleTimestamp queries the ExampleTimestamp table using prefix and range queries against defined indexes.
rpc ListExampleTimestamp (ListExampleTimestampRequest) returns (ListExampleTimestampResponse) {}
rpc ListExampleTimestamp(ListExampleTimestampRequest) returns (ListExampleTimestampResponse) {}
// Get queries the SimpleExample table by its primary key.
rpc GetSimpleExample (GetSimpleExampleRequest) returns (GetSimpleExampleResponse) {}
rpc GetSimpleExample(GetSimpleExampleRequest) returns (GetSimpleExampleResponse) {}
// GetSimpleExampleByUnique queries the SimpleExample table by its Unique index
rpc GetSimpleExampleByUnique (GetSimpleExampleByUniqueRequest) returns (GetSimpleExampleByUniqueResponse) {}
rpc GetSimpleExampleByUnique(GetSimpleExampleByUniqueRequest) returns (GetSimpleExampleByUniqueResponse) {}
// ListSimpleExample queries the SimpleExample table using prefix and range queries against defined indexes.
rpc ListSimpleExample (ListSimpleExampleRequest) returns (ListSimpleExampleResponse) {}
rpc ListSimpleExample(ListSimpleExampleRequest) returns (ListSimpleExampleResponse) {}
// Get queries the ExampleAutoIncFieldName table by its primary key.
rpc GetExampleAutoIncFieldName (GetExampleAutoIncFieldNameRequest) returns (GetExampleAutoIncFieldNameResponse) {}
// ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against defined indexes.
rpc ListExampleAutoIncFieldName (ListExampleAutoIncFieldNameRequest) returns (ListExampleAutoIncFieldNameResponse) {}
rpc GetExampleAutoIncFieldName(GetExampleAutoIncFieldNameRequest) returns (GetExampleAutoIncFieldNameResponse) {}
// ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against
// defined indexes.
rpc ListExampleAutoIncFieldName(ListExampleAutoIncFieldNameRequest) returns (ListExampleAutoIncFieldNameResponse) {}
}
// GetExampleTableRequest is the TestSchemaQuery/GetExampleTableRequest request type.
@ -80,7 +85,7 @@ message ListExampleTableRequest {
// bz_str specifies the value of the BzStr index key to use in the query.
BzStr bz_str = 4;
}
message U32I64Str {
// u32 is the value of the u32 field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
@ -92,7 +97,7 @@ message ListExampleTableRequest {
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string str = 3;
}
message U64Str {
// u64 is the value of the u64 field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
@ -101,7 +106,7 @@ message ListExampleTableRequest {
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string str = 2;
}
message StrU32 {
// str is the value of the str field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
@ -110,7 +115,7 @@ message ListExampleTableRequest {
// It can be omitted to query for all valid values of that field in this segment of the index.
optional uint32 u32 = 2;
}
message BzStr {
// bz is the value of the bz field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
@ -120,7 +125,7 @@ message ListExampleTableRequest {
optional string str = 2;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -130,7 +135,7 @@ message ListExampleTableRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -184,20 +189,20 @@ message ListExampleAutoIncrementTableRequest {
// x specifies the value of the X index key to use in the query.
X x = 2;
}
message Id {
// id is the value of the id field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional uint64 id = 1;
}
message X {
// x is the value of the x field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string x = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -207,7 +212,7 @@ message ListExampleAutoIncrementTableRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -229,8 +234,7 @@ message ListExampleAutoIncrementTableResponse {
}
// GetExampleSingletonRequest is the TestSchemaQuery/GetExampleSingletonRequest request type.
message GetExampleSingletonRequest {
}
message GetExampleSingletonRequest {}
// GetExampleSingletonResponse is the TestSchemaQuery/GetExampleSingletonResponse request type.
message GetExampleSingletonResponse {
@ -260,20 +264,20 @@ message ListExampleTimestampRequest {
// ts specifies the value of the Ts index key to use in the query.
Ts ts = 2;
}
message Id {
// id is the value of the id field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional uint64 id = 1;
}
message Ts {
// ts is the value of the ts field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional google.protobuf.Timestamp ts = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -283,7 +287,7 @@ message ListExampleTimestampRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -337,20 +341,20 @@ message ListSimpleExampleRequest {
// unique specifies the value of the Unique index key to use in the query.
Unique unique = 2;
}
message Name {
// name is the value of the name field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string name = 1;
}
message Unique {
// unique is the value of the unique field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional string unique = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -360,7 +364,7 @@ message ListSimpleExampleRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -402,14 +406,14 @@ message ListExampleAutoIncFieldNameRequest {
// foo specifies the value of the Foo index key to use in the query.
Foo foo = 1;
}
message Foo {
// foo is the value of the foo field in the index.
// It can be omitted to query for all valid values of that field in this segment of the index.
optional uint64 foo = 1;
}
}
// query specifies the type of query - either a prefix or range query.
oneof query {
// prefix_query specifies the index key value to use for the prefix query.
@ -419,7 +423,7 @@ message ListExampleAutoIncFieldNameRequest {
}
// pagination specifies optional pagination parameters.
cosmos.base.query.v1beta1.PageRequest pagination = 3;
// RangeQuery specifies the from/to index keys for a range query.
message RangeQuery {
// from is the index key to use for the start of the range query.
@ -439,4 +443,3 @@ message ListExampleAutoIncFieldNameResponse {
// pagination is the pagination response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

View File

@ -21,13 +21,13 @@ service Query {
// Since: cosmos-sdk 0.43
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
}
// Account returns account details based on address.
rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
}
// AccountAddressByID returns account address based on account number.
@ -35,13 +35,13 @@ service Query {
// Since: cosmos-sdk 0.46.2
rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}";
option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}";
}
// Params queries all parameters.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/params";
option (google.api.http).get = "/cosmos/auth/v1beta1/params";
}
// ModuleAccounts returns all the existing module accounts.
@ -49,13 +49,13 @@ service Query {
// Since: cosmos-sdk 0.46
rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts";
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts";
}
// ModuleAccountByName returns the module account info by module name
rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}";
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}";
}
// Bech32Prefix queries bech32Prefix
@ -79,13 +79,12 @@ service Query {
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
}
// AccountInfo queries account info which is common to all account types.
//
// Since: cosmos-sdk 0.47
rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}";
option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}";
}
}

View File

@ -16,7 +16,7 @@ service Query {
// Balance queries the balance of a single coin for a single account.
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom";
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom";
}
// AllBalances queries the balance of all coins for a single account.
@ -25,7 +25,7 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}";
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}";
}
// SpendableBalances queries the spenable balance of all coins for a single
@ -37,7 +37,7 @@ service Query {
// Since: cosmos-sdk 0.46
rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}";
option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}";
}
// TotalSupply queries the total supply of all coins.
@ -46,7 +46,7 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/supply";
option (google.api.http).get = "/cosmos/bank/v1beta1/supply";
}
// SupplyOf queries the supply of a single coin.
@ -55,26 +55,26 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom";
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom";
}
// Params queries the parameters of x/bank module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
}
// DenomsMetadata queries the client metadata of a given coin denomination.
rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
}
// DenomsMetadata queries the client metadata for all registered coin
// denominations.
rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata";
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata";
}
// DenomOwners queries for all account addresses that own a particular token
@ -86,7 +86,7 @@ service Query {
// Since: cosmos-sdk 0.46
rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}";
option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}";
}
// SendEnabled queries for SendEnabled entries.
@ -98,7 +98,7 @@ service Query {
// Since: cosmos-sdk 0.47
rpc SendEnabled(QuerySendEnabledRequest) returns (QuerySendEnabledResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/send_enabled";
option (google.api.http).get = "/cosmos/bank/v1beta1/send_enabled";
}
}

View File

@ -94,10 +94,8 @@ message QueryValidatorDistributionInfoResponse {
repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
// commission defines the commission the validator received.
repeated cosmos.base.v1beta1.DecCoin commission = 3 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false
];
repeated cosmos.base.v1beta1.DecCoin commission = 3
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
}
// QueryValidatorOutstandingRewardsRequest is the request type for the

View File

@ -30,6 +30,6 @@ extend google.protobuf.MethodOptions {
// also recommend adding Protobuf comments to warn module developers
// consuming these queries.
//
// When set to true, the query can safely be called
// When set to true, the query can safely be called
bool module_query_safe = 11110001;
}

View File

@ -17,7 +17,6 @@ service ReflectionService {
}
}
// FileDescriptorsRequest is the Query/FileDescriptors request type.
message FileDescriptorsRequest {}

View File

@ -18,13 +18,13 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators";
option (google.api.http).get = "/cosmos/staking/v1beta1/validators";
}
// Validator queries validator info for given validator address.
rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}";
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}";
}
// ValidatorDelegations queries delegate info for given validator.
@ -33,7 +33,7 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations";
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations";
}
// ValidatorUnbondingDelegations queries unbonding delegations of a validator.
@ -43,14 +43,14 @@ service Query {
rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest)
returns (QueryValidatorUnbondingDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/"
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 (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
"{delegator_addr}";
}
@ -58,7 +58,7 @@ service Query {
// pair.
rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
"{delegator_addr}/unbonding_delegation";
}
@ -68,7 +68,7 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}";
option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}";
}
// DelegatorUnbondingDelegations queries all unbonding delegations of a given
@ -79,7 +79,7 @@ service Query {
rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest)
returns (QueryDelegatorUnbondingDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/"
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/"
"{delegator_addr}/unbonding_delegations";
}
@ -89,7 +89,7 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations";
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations";
}
// DelegatorValidators queries all validators info for given delegator
@ -99,33 +99,33 @@ service Query {
// gas if the pagination field is incorrectly set.
rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators";
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators";
}
// DelegatorValidator queries validator info for given delegator validator
// pair.
rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/"
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/"
"{validator_addr}";
}
// HistoricalInfo queries the historical info for given height.
rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}";
option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}";
}
// Pool queries the pool info.
rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/pool";
option (google.api.http).get = "/cosmos/staking/v1beta1/pool";
}
// Parameters queries the staking parameters.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/params";
option (google.api.http).get = "/cosmos/staking/v1beta1/params";
}
}

View File

@ -223,7 +223,7 @@ message UnbondingDelegation {
// validator_address is the bech32-encoded address of the validator.
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// entries are the unbonding delegation entries.
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
}
// UnbondingDelegationEntry defines an unbonding object with relevant metadata.
@ -296,7 +296,7 @@ message Redelegation {
// validator_dst_address is the validator redelegation destination operator address.
string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// entries are the redelegation entries.
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
}
// Params defines the parameters for the x/staking module.

View File

@ -55,8 +55,7 @@ message RequestInfo {
}
message RequestInitChain {
google.protobuf.Timestamp time = 1
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 2;
tendermint.types.ConsensusParams consensus_params = 3;
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
@ -103,8 +102,8 @@ message RequestListSnapshots {}
// offers a snapshot to the application
message RequestOfferSnapshot {
Snapshot snapshot = 1; // snapshot offered by peers
bytes app_hash = 2; // light client-verified app hash for snapshot height
Snapshot snapshot = 1; // snapshot offered by peers
bytes app_hash = 2; // light client-verified app hash for snapshot height
}
// loads a snapshot chunk
@ -205,8 +204,8 @@ message ResponseInitChain {
message ResponseQuery {
uint32 code = 1;
// bytes data = 2; // use "value" instead.
string log = 3; // nondeterministic
string info = 4; // nondeterministic
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 index = 5;
bytes key = 6;
bytes value = 7;
@ -216,22 +215,20 @@ message ResponseQuery {
}
message ResponseBeginBlock {
repeated Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCheckTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
string sender = 9;
int64 priority = 10;
repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
string sender = 9;
int64 priority = 10;
// mempool_error is set by Tendermint.
// ABCI applictions creating a ResponseCheckTX should not set mempool_error.
@ -241,22 +238,20 @@ message ResponseCheckTx {
message ResponseDeliverTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "events,omitempty"
]; // nondeterministic
repeated Event events = 7
[(gogoproto.nullable) = false,
(gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
string codespace = 8;
}
message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
tendermint.types.ConsensusParams consensus_param_updates = 2;
repeated Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCommit {
@ -273,12 +268,12 @@ message ResponseOfferSnapshot {
Result result = 1;
enum Result {
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Snapshot accepted, apply chunks
ABORT = 2; // Abort all snapshot restoration
REJECT = 3; // Reject this specific snapshot, try others
REJECT_FORMAT = 4; // Reject all snapshots of this format, try others
REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Snapshot accepted, apply chunks
ABORT = 2; // Abort all snapshot restoration
REJECT = 3; // Reject this specific snapshot, try others
REJECT_FORMAT = 4; // Reject all snapshots of this format, try others
REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
}
}
@ -288,16 +283,16 @@ message ResponseLoadSnapshotChunk {
message ResponseApplySnapshotChunk {
Result result = 1;
repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
repeated string reject_senders = 3; // Chunk senders to reject and ban
repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
repeated string reject_senders = 3; // Chunk senders to reject and ban
enum Result {
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Chunk successfully accepted
ABORT = 2; // Abort all snapshot restoration
RETRY = 3; // Retry chunk (combine with refetch and reject)
RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Chunk successfully accepted
ABORT = 2; // Abort all snapshot restoration
RETRY = 3; // Retry chunk (combine with refetch and reject)
RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
}
}
@ -336,17 +331,14 @@ message ExtendedCommitInfo {
// Later, transactions may be queried using these events.
message Event {
string type = 1;
repeated EventAttribute attributes = 2 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "attributes,omitempty"
];
repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
}
// EventAttribute is a single key-value pair, associated with an event.
message EventAttribute {
string key = 1;
string value = 2;
bool index = 3; // nondeterministic
bool index = 3; // nondeterministic
}
// TxResult contains results of executing the transaction.
@ -364,9 +356,9 @@ message TxResult {
// Validator
message Validator {
bytes address = 1; // The first 20 bytes of SHA256(public key)
bytes address = 1; // The first 20 bytes of SHA256(public key)
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3; // The voting power
int64 power = 3; // The voting power
}
// ValidatorUpdate
@ -384,7 +376,7 @@ message VoteInfo {
message ExtendedVoteInfo {
Validator validator = 1 [(gogoproto.nullable) = false];
bool signed_last_block = 2;
bytes vote_extension = 3; // Reserved for future use
bytes vote_extension = 3; // Reserved for future use
}
enum MisbehaviorType {
@ -400,8 +392,7 @@ message Misbehavior {
// The height when the offense occurred
int64 height = 3;
// The corresponding time where the offense occurred
google.protobuf.Timestamp time = 4
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// Total voting power of the validator set in case the ABCI application does
// not store historical validators.
// https://github.com/tendermint/tendermint/issues/4581
@ -412,11 +403,11 @@ message Misbehavior {
// State Sync Types
message Snapshot {
uint64 height = 1; // The height at which the snapshot was taken
uint32 format = 2; // The application-specific snapshot format
uint32 chunks = 3; // Number of chunks in the snapshot
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
bytes metadata = 5; // Arbitrary application metadata
uint64 height = 1; // The height at which the snapshot was taken
uint32 format = 2; // The application-specific snapshot format
uint32 chunks = 3; // Number of chunks in the snapshot
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
bytes metadata = 5; // Arbitrary application metadata
}
//----------------------------------------
@ -435,10 +426,8 @@ service ABCIApplication {
rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
rpc LoadSnapshotChunk(RequestLoadSnapshotChunk)
returns (ResponseLoadSnapshotChunk);
rpc ApplySnapshotChunk(RequestApplySnapshotChunk)
returns (ResponseApplySnapshotChunk);
rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk);
rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk);
rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal);
}

View File

@ -30,7 +30,7 @@ message LightClientAttackEvidence {
int64 common_height = 2;
repeated tendermint.types.Validator byzantine_validators = 3;
int64 total_voting_power = 4;
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
message EvidenceList {

View File

@ -26,7 +26,7 @@ message BlockParams {
// Note: must be greater or equal to -1
int64 max_gas = 2;
reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792
reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792
}
// EvidenceParams determine how we handle evidence of malfeasance.
@ -42,8 +42,7 @@ message EvidenceParams {
// It should correspond with an app's "unbonding period" or other similar
// mechanism for handling [Nothing-At-Stake
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
google.protobuf.Duration max_age_duration = 2
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
// This sets the maximum size of total evidence in bytes that can be committed in a single block.
// and should fall comfortably under the max block bytes.

View File

@ -66,19 +66,19 @@ message Header {
BlockID last_block_id = 5 [(gogoproto.nullable) = false];
// hashes of block data
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
// hashes from the app output from the prev block
bytes validators_hash = 8; // validators for the current block
bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
bytes validators_hash = 8; // validators for the current block
bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
// consensus info
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
}
// Data contains the set of transactions included in the block
@ -95,13 +95,11 @@ message Vote {
SignedMsgType type = 1;
int64 height = 2;
int32 round = 3;
BlockID block_id = 4
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
google.protobuf.Timestamp timestamp = 5
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
bytes signature = 8;
BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
bytes signature = 8;
}
// Commit contains the evidence that a block was committed by a set of validators.
@ -116,9 +114,8 @@ message Commit {
message CommitSig {
BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
}
message Proposal {
@ -127,9 +124,8 @@ message Proposal {
int32 round = 3;
int32 pol_round = 4;
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
google.protobuf.Timestamp timestamp = 6
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 7;
google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 7;
}
message SignedHeader {

View File

@ -34,12 +34,12 @@ package google.protobuf;
import "gogoproto/gogo.proto";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option go_package = "types";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option go_package = "types";
option java_package = "com.google.protobuf";
option java_outer_classname = "AnyProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
// `Any` contains an arbitrary serialized protocol buffer message along with a
// URL that describes the type of the serialized message.
@ -155,10 +155,10 @@ message Any {
// Must be a valid serialized protocol buffer of the above specified type.
bytes value = 2;
option (gogoproto.typedecl) = false;
option (gogoproto.typedecl) = false;
option (gogoproto.goproto_stringer) = false;
option (gogoproto.gostring) = false;
option (gogoproto.stringer) = false;
option (gogoproto.gostring) = false;
option (gogoproto.stringer) = false;
}
option (gogoproto.goproto_registration) = false;

View File

@ -13,20 +13,20 @@ enum Enumeration {
Two = 1;
}
// A is used for testing value renderers.
// A is used for testing value renderers.
message A {
// Fields that are parseable by SIGN_MODE_TEXTUAL.
uint32 UINT32 = 1;
uint64 UINT64 = 2;
int32 INT32 = 3;
int64 INT64 = 4;
string SDKINT = 5 [(cosmos_proto.scalar) = "cosmos.Int"];
string SDKDEC = 6 [(cosmos_proto.scalar) = "cosmos.Dec"];
cosmos.base.v1beta1.Coin COIN = 7;
repeated cosmos.base.v1beta1.Coin COINS = 8;
bytes BYTES = 9;
google.protobuf.Timestamp TIMESTAMP = 10;
google.protobuf.Duration DURATION = 11;
uint32 UINT32 = 1;
uint64 UINT64 = 2;
int32 INT32 = 3;
int64 INT64 = 4;
string SDKINT = 5 [(cosmos_proto.scalar) = "cosmos.Int"];
string SDKDEC = 6 [(cosmos_proto.scalar) = "cosmos.Dec"];
cosmos.base.v1beta1.Coin COIN = 7;
repeated cosmos.base.v1beta1.Coin COINS = 8;
bytes BYTES = 9;
google.protobuf.Timestamp TIMESTAMP = 10;
google.protobuf.Duration DURATION = 11;
// Fields that are not handled by SIGN_MODE_TEXTUAL.
sint32 SINT32 = 101;
@ -42,16 +42,16 @@ message A {
// Foo is a sample message type used for testing message rendering.
message Foo {
string full_name = 1;
string nickname = 2;
google.protobuf.Timestamp mtime = 3;
Foo left = 4;
Foo right = 5;
Bar bar = 8; // skip some field numbers
string full_name = 1;
string nickname = 2;
google.protobuf.Timestamp mtime = 3;
Foo left = 4;
Foo right = 5;
Bar bar = 8; // skip some field numbers
}
// Bar is a sample message type used for testing message rendering.
message Bar {
string bar_id = 1;
bytes data = 2;
bytes data = 2;
}