From c1844ef3a6bcca7b47bc1edb967fd68392fc9cfa Mon Sep 17 00:00:00 2001 From: Daisuke Iuchi <42408108+da1suk8@users.noreply.github.com> Date: Thu, 28 Mar 2024 05:11:27 +0900 Subject: [PATCH] build: make proto --- proto/cosmwasm/wasm/v1/query.proto | 3 +- proto/lbm/wasm/v1/query.proto | 3 +- .../base/query/v1beta1/pagination.proto | 3 +- .../proto/cosmos/base/v1beta1/coin.proto | 20 +- third_party/proto/cosmos_proto/cosmos.proto | 8 +- third_party/proto/gogoproto/gogo.proto | 172 +++++----- third_party/proto/google/api/http.proto | 23 +- third_party/proto/ostracon/abci/types.proto | 155 +++++---- third_party/proto/ostracon/types/block.proto | 10 +- third_party/proto/ostracon/types/types.proto | 5 +- .../proto/ostracon/version/types.proto | 8 +- third_party/proto/tendermint/abci/types.proto | 313 +++++++++--------- .../proto/tendermint/blockchain/types.proto | 28 +- .../proto/tendermint/consensus/types.proto | 93 +++--- .../proto/tendermint/consensus/wal.proto | 27 +- .../proto/tendermint/crypto/keys.proto | 4 +- .../proto/tendermint/crypto/proof.proto | 20 +- .../proto/tendermint/libs/bits/types.proto | 2 +- .../proto/tendermint/mempool/types.proto | 8 +- third_party/proto/tendermint/p2p/pex.proto | 4 +- third_party/proto/tendermint/p2p/types.proto | 28 +- .../proto/tendermint/privval/types.proto | 48 ++- .../proto/tendermint/state/types.proto | 50 +-- .../proto/tendermint/statesync/types.proto | 28 +- .../proto/tendermint/store/types.proto | 2 +- .../proto/tendermint/types/block.proto | 8 +- .../proto/tendermint/types/canonical.proto | 34 +- .../proto/tendermint/types/events.proto | 6 +- .../proto/tendermint/types/evidence.proto | 30 +- .../proto/tendermint/types/params.proto | 20 +- .../proto/tendermint/types/types.proto | 142 ++++---- .../proto/tendermint/types/validator.proto | 18 +- 32 files changed, 680 insertions(+), 643 deletions(-) diff --git a/proto/cosmwasm/wasm/v1/query.proto b/proto/cosmwasm/wasm/v1/query.proto index 29d928c935..9131a60809 100644 --- a/proto/cosmwasm/wasm/v1/query.proto +++ b/proto/cosmwasm/wasm/v1/query.proto @@ -107,7 +107,8 @@ message QueryContractHistoryRequest { // QueryContractHistoryResponse is the response type for the // Query/ContractHistory RPC method message QueryContractHistoryResponse { - // return in the order of timestamps according to when the contract was updated + // return in the order of timestamps according to when the contract was + // updated repeated ContractCodeHistoryEntry entries = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. diff --git a/proto/lbm/wasm/v1/query.proto b/proto/lbm/wasm/v1/query.proto index 5f7eaea8b8..d2e405cc57 100644 --- a/proto/lbm/wasm/v1/query.proto +++ b/proto/lbm/wasm/v1/query.proto @@ -34,7 +34,8 @@ message QueryInactiveContractsRequest { // QueryInactiveContractsResponse is the response type for the // Query/InactiveContract RPC method. message QueryInactiveContractsResponse { - // addresses is the inactive address list of strings, in ascending order of byte format + // addresses is the inactive address list of strings, in ascending order of + // byte format repeated string addresses = 1; // pagination defines the pagination in the response diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto index 7cbc7660c5..77026f616e 100644 --- a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto @@ -31,7 +31,8 @@ message PageRequest { // is set. bool count_total = 4; - // reverse is set to true if results are to be returned in the descending order. + // reverse is set to true if results are to be returned in the descending + // order. // // Since: cosmos-sdk 0.43 bool reverse = 5; diff --git a/third_party/proto/cosmos/base/v1beta1/coin.proto b/third_party/proto/cosmos/base/v1beta1/coin.proto index 032fe55240..309656eadf 100644 --- a/third_party/proto/cosmos/base/v1beta1/coin.proto +++ b/third_party/proto/cosmos/base/v1beta1/coin.proto @@ -3,9 +3,9 @@ package cosmos.base.v1beta1; import "gogoproto/gogo.proto"; -option go_package = "github.com/Finschia/finschia-sdk/types"; +option go_package = "github.com/Finschia/finschia-sdk/types"; option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; +option (gogoproto.stringer_all) = false; // Coin defines a token with a denomination and an amount. // @@ -14,8 +14,9 @@ option (gogoproto.stringer_all) = false; message Coin { option (gogoproto.equal) = true; - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string denom = 1; + string amount = 2 + [ (gogoproto.customtype) = "Int", (gogoproto.nullable) = false ]; } // DecCoin defines a token with a denomination and a decimal amount. @@ -25,16 +26,19 @@ message Coin { message DecCoin { option (gogoproto.equal) = true; - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string denom = 1; + string amount = 2 + [ (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false ]; } // IntProto defines a Protobuf wrapper around an Int object. message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string int = 1 + [ (gogoproto.customtype) = "Int", (gogoproto.nullable) = false ]; } // DecProto defines a Protobuf wrapper around a Dec object. message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string dec = 1 + [ (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false ]; } diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto index 167b170757..d4719a38ff 100644 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -6,11 +6,9 @@ import "google/protobuf/descriptor.proto"; option go_package = "github.com/regen-network/cosmos-proto"; extend google.protobuf.MessageOptions { - string interface_type = 93001; + string interface_type = 93001; - string implements_interface = 93002; + string implements_interface = 93002; } -extend google.protobuf.FieldOptions { - string accepts_interface = 93001; -} +extend google.protobuf.FieldOptions { string accepts_interface = 93001; } diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto index 49e78f99fe..91ff471857 100644 --- a/third_party/proto/gogoproto/gogo.proto +++ b/third_party/proto/gogoproto/gogo.proto @@ -36,110 +36,110 @@ option java_outer_classname = "GoGoProtos"; option go_package = "github.com/gogo/protobuf/gogoproto"; extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; } extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; + optional string enumvalue_customname = 66001; } extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; } extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; - optional bool sizer = 64020; + optional bool sizer = 64020; - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; - optional bool protosizer = 64028; - optional bool compare = 64029; + optional bool protosizer = 64028; + optional bool compare = 64029; - optional bool typedecl = 64030; + optional bool typedecl = 64030; - optional bool messagename = 64033; + optional bool messagename = 64033; - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; } extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; } diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto index 2bd3a19bfa..f5388aafaa 100644 --- a/third_party/proto/google/api/http.proto +++ b/third_party/proto/google/api/http.proto @@ -23,7 +23,6 @@ option java_outer_classname = "HttpProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; - // Defines the HTTP configuration for an API service. It contains a list of // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method // to one or more HTTP REST API methods. @@ -57,7 +56,8 @@ message Http { // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// option (google.api.http).get = +// "/v1/messages/{message_id}/{sub.subfield}"; // } // } // message GetMessageRequest { @@ -84,7 +84,8 @@ message Http { // // HTTP | RPC // -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: +// SubMessage(subfield: "foo"))` // // In general, not only fields but also field paths can be referenced // from a path pattern. Fields mapped to the path pattern cannot be @@ -114,7 +115,9 @@ message Http { // // HTTP | RPC // -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` // // Note that fields which are mapped to HTTP parameters must have a // primitive type or a repeated primitive type. Message types are not @@ -146,7 +149,8 @@ message Http { // // HTTP | RPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define that // every field not bound by the path template should be mapped to the @@ -171,7 +175,8 @@ message Http { // // HTTP | RPC // -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible to // have HTTP parameters, as all fields not bound by the path end in @@ -204,7 +209,8 @@ message Http { // HTTP | RPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` // // # Rules for HTTP mapping // @@ -262,7 +268,8 @@ message Http { message HttpRule { // Selects methods to which this rule applies. // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. string selector = 1; // Determines the URL pattern is matched by this rules. This pattern can be diff --git a/third_party/proto/ostracon/abci/types.proto b/third_party/proto/ostracon/abci/types.proto index 145b1ad726..e326a6c569 100644 --- a/third_party/proto/ostracon/abci/types.proto +++ b/third_party/proto/ostracon/abci/types.proto @@ -23,115 +23,130 @@ import "gogoproto/gogo.proto"; message Request { oneof value { - tendermint.abci.RequestEcho echo = 1; - tendermint.abci.RequestFlush flush = 2; - tendermint.abci.RequestInfo info = 3; - tendermint.abci.RequestSetOption set_option = 4; - tendermint.abci.RequestInitChain init_chain = 5; - tendermint.abci.RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - tendermint.abci.RequestCheckTx check_tx = 8; - tendermint.abci.RequestDeliverTx deliver_tx = 9; - tendermint.abci.RequestEndBlock end_block = 10; - tendermint.abci.RequestCommit commit = 11; - tendermint.abci.RequestListSnapshots list_snapshots = 12; - tendermint.abci.RequestOfferSnapshot offer_snapshot = 13; - tendermint.abci.RequestLoadSnapshotChunk load_snapshot_chunk = 14; + tendermint.abci.RequestEcho echo = 1; + tendermint.abci.RequestFlush flush = 2; + tendermint.abci.RequestInfo info = 3; + tendermint.abci.RequestSetOption set_option = 4; + tendermint.abci.RequestInitChain init_chain = 5; + tendermint.abci.RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + tendermint.abci.RequestCheckTx check_tx = 8; + tendermint.abci.RequestDeliverTx deliver_tx = 9; + tendermint.abci.RequestEndBlock end_block = 10; + tendermint.abci.RequestCommit commit = 11; + tendermint.abci.RequestListSnapshots list_snapshots = 12; + tendermint.abci.RequestOfferSnapshot offer_snapshot = 13; + tendermint.abci.RequestLoadSnapshotChunk load_snapshot_chunk = 14; tendermint.abci.RequestApplySnapshotChunk apply_snapshot_chunk = 15; - RequestBeginRecheckTx begin_recheck_tx = 1000; // 16~99 are reserved for merging original tendermint - RequestEndRecheckTx end_recheck_tx = 1001; + RequestBeginRecheckTx begin_recheck_tx = + 1000; // 16~99 are reserved for merging original tendermint + RequestEndRecheckTx end_recheck_tx = 1001; } } message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - tendermint.abci.LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated tendermint.abci.Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + bytes hash = 1; + tendermint.types.Header header = 2 [ (gogoproto.nullable) = false ]; + tendermint.abci.LastCommitInfo last_commit_info = 3 + [ (gogoproto.nullable) = false ]; + repeated tendermint.abci.Evidence byzantine_validators = 4 + [ (gogoproto.nullable) = false ]; // *** Ostracon Extended Fields *** - ostracon.types.Entropy entropy = 1000 [(gogoproto.nullable) = false]; + ostracon.types.Entropy entropy = 1000 [ (gogoproto.nullable) = false ]; } message RequestBeginRecheckTx { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; + tendermint.types.Header header = 1 [ (gogoproto.nullable) = false ]; } -message RequestEndRecheckTx { - int64 height = 1; -} +message RequestEndRecheckTx { int64 height = 1; } //---------------------------------------- // Response types message Response { oneof value { - tendermint.abci.ResponseException exception = 1; - tendermint.abci.ResponseEcho echo = 2; - tendermint.abci.ResponseFlush flush = 3; - tendermint.abci.ResponseInfo info = 4; - tendermint.abci.ResponseSetOption set_option = 5; - tendermint.abci.ResponseInitChain init_chain = 6; - tendermint.abci.ResponseQuery query = 7; - tendermint.abci.ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - tendermint.abci.ResponseDeliverTx deliver_tx = 10; - tendermint.abci.ResponseEndBlock end_block = 11; - tendermint.abci.ResponseCommit commit = 12; - tendermint.abci.ResponseListSnapshots list_snapshots = 13; - tendermint.abci.ResponseOfferSnapshot offer_snapshot = 14; - tendermint.abci.ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + tendermint.abci.ResponseException exception = 1; + tendermint.abci.ResponseEcho echo = 2; + tendermint.abci.ResponseFlush flush = 3; + tendermint.abci.ResponseInfo info = 4; + tendermint.abci.ResponseSetOption set_option = 5; + tendermint.abci.ResponseInitChain init_chain = 6; + tendermint.abci.ResponseQuery query = 7; + tendermint.abci.ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + tendermint.abci.ResponseDeliverTx deliver_tx = 10; + tendermint.abci.ResponseEndBlock end_block = 11; + tendermint.abci.ResponseCommit commit = 12; + tendermint.abci.ResponseListSnapshots list_snapshots = 13; + tendermint.abci.ResponseOfferSnapshot offer_snapshot = 14; + tendermint.abci.ResponseLoadSnapshotChunk load_snapshot_chunk = 15; tendermint.abci.ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - ResponseBeginRecheckTx begin_recheck_tx = 1000; // 17~99 are reserved for merging original tendermint - ResponseEndRecheckTx end_recheck_tx = 1001; + ResponseBeginRecheckTx begin_recheck_tx = + 1000; // 17~99 are reserved for merging original tendermint + ResponseEndRecheckTx end_recheck_tx = 1001; } } message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - 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 tendermint.abci.Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + uint32 code = 1; + bytes data = 2; + 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 tendermint.abci.Event events = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "events,omitempty" + ]; string codespace = 8; - string sender = 9; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first - int64 priority = 10; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first + string sender = 9; // MEMO: not used, just reservation to implement + // https://github.com/tendermint/tendermint/pull/6740 first + int64 priority = + 10; // MEMO: not used, just reservation to implement + // https://github.com/tendermint/tendermint/pull/6740 first // mempool_error is set by Ostracon. // ABCI applictions creating a ResponseCheckTX should not set mempool_error. string mempool_error = 11; } -message ResponseBeginRecheckTx { - uint32 code = 1; -} +message ResponseBeginRecheckTx { uint32 code = 1; } -message ResponseEndRecheckTx { - uint32 code = 1; -} +message ResponseEndRecheckTx { uint32 code = 1; } //---------------------------------------- // Service Definition service ABCIApplication { rpc Echo(tendermint.abci.RequestEcho) returns (tendermint.abci.ResponseEcho); - rpc Flush(tendermint.abci.RequestFlush) returns (tendermint.abci.ResponseFlush); + rpc Flush(tendermint.abci.RequestFlush) + returns (tendermint.abci.ResponseFlush); rpc Info(tendermint.abci.RequestInfo) returns (tendermint.abci.ResponseInfo); - rpc SetOption(tendermint.abci.RequestSetOption) returns (tendermint.abci.ResponseSetOption); - rpc DeliverTx(tendermint.abci.RequestDeliverTx) returns (tendermint.abci.ResponseDeliverTx); + rpc SetOption(tendermint.abci.RequestSetOption) + returns (tendermint.abci.ResponseSetOption); + rpc DeliverTx(tendermint.abci.RequestDeliverTx) + returns (tendermint.abci.ResponseDeliverTx); rpc CheckTx(tendermint.abci.RequestCheckTx) returns (ResponseCheckTx); - rpc Query(tendermint.abci.RequestQuery) returns (tendermint.abci.ResponseQuery); - rpc Commit(tendermint.abci.RequestCommit) returns (tendermint.abci.ResponseCommit); - rpc InitChain(tendermint.abci.RequestInitChain) returns (tendermint.abci.ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (tendermint.abci.ResponseBeginBlock); - rpc EndBlock(tendermint.abci.RequestEndBlock) returns (tendermint.abci.ResponseEndBlock); - rpc ListSnapshots(tendermint.abci.RequestListSnapshots) returns (tendermint.abci.ResponseListSnapshots); - rpc OfferSnapshot(tendermint.abci.RequestOfferSnapshot) returns (tendermint.abci.ResponseOfferSnapshot); - rpc LoadSnapshotChunk(tendermint.abci.RequestLoadSnapshotChunk) returns (tendermint.abci.ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(tendermint.abci.RequestApplySnapshotChunk) returns (tendermint.abci.ResponseApplySnapshotChunk); + rpc Query(tendermint.abci.RequestQuery) + returns (tendermint.abci.ResponseQuery); + rpc Commit(tendermint.abci.RequestCommit) + returns (tendermint.abci.ResponseCommit); + rpc InitChain(tendermint.abci.RequestInitChain) + returns (tendermint.abci.ResponseInitChain); + rpc BeginBlock(RequestBeginBlock) + returns (tendermint.abci.ResponseBeginBlock); + rpc EndBlock(tendermint.abci.RequestEndBlock) + returns (tendermint.abci.ResponseEndBlock); + rpc ListSnapshots(tendermint.abci.RequestListSnapshots) + returns (tendermint.abci.ResponseListSnapshots); + rpc OfferSnapshot(tendermint.abci.RequestOfferSnapshot) + returns (tendermint.abci.ResponseOfferSnapshot); + rpc LoadSnapshotChunk(tendermint.abci.RequestLoadSnapshotChunk) + returns (tendermint.abci.ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(tendermint.abci.RequestApplySnapshotChunk) + returns (tendermint.abci.ResponseApplySnapshotChunk); rpc BeginRecheckTx(RequestBeginRecheckTx) returns (ResponseBeginRecheckTx); rpc EndRecheckTx(RequestEndRecheckTx) returns (ResponseEndRecheckTx); } diff --git a/third_party/proto/ostracon/types/block.proto b/third_party/proto/ostracon/types/block.proto index 80349365d9..48964c2910 100644 --- a/third_party/proto/ostracon/types/block.proto +++ b/third_party/proto/ostracon/types/block.proto @@ -9,11 +9,11 @@ import "tendermint/types/evidence.proto"; import "tendermint/types/types.proto"; message Block { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - tendermint.types.Commit last_commit = 4; + tendermint.types.Header header = 1 [ (gogoproto.nullable) = false ]; + tendermint.types.Data data = 2 [ (gogoproto.nullable) = false ]; + tendermint.types.EvidenceList evidence = 3 [ (gogoproto.nullable) = false ]; + tendermint.types.Commit last_commit = 4; // *** Ostracon Extended Fields *** - ostracon.types.Entropy entropy = 1000 [(gogoproto.nullable) = false]; + ostracon.types.Entropy entropy = 1000 [ (gogoproto.nullable) = false ]; } diff --git a/third_party/proto/ostracon/types/types.proto b/third_party/proto/ostracon/types/types.proto index e95620de2c..856c584222 100644 --- a/third_party/proto/ostracon/types/types.proto +++ b/third_party/proto/ostracon/types/types.proto @@ -6,8 +6,9 @@ option go_package = "github.com/Finschia/ostracon/proto/ostracon/types"; // -------------------------------- // Entropy represents height-specific complexity and used in proposer-election. -// Entropy contains vrf proof and generated round. The relationship of each field is as follows. -// Entropy.proof = VRFProof(last_proof_hash, current_height, Entropy.round) +// Entropy contains vrf proof and generated round. The relationship of each +// field is as follows. Entropy.proof = VRFProof(last_proof_hash, +// current_height, Entropy.round) message Entropy { int32 round = 1; bytes proof = 2; diff --git a/third_party/proto/ostracon/version/types.proto b/third_party/proto/ostracon/version/types.proto index 0bc8952105..6fac1d4600 100644 --- a/third_party/proto/ostracon/version/types.proto +++ b/third_party/proto/ostracon/version/types.proto @@ -13,12 +13,12 @@ message App { string software = 2; } -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. +// Consensus captures the consensus rules for processing a block in the +// blockchain, including all blockchain data structures and the rules of the +// application's state transition machine. message Consensus { option (gogoproto.equal) = true; uint64 block = 1; - uint64 app = 2; + uint64 app = 2; } diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index 8e3a909363..36503cbfdf 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -21,107 +21,100 @@ import "gogoproto/gogo.proto"; message Request { oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; + RequestEcho echo = 1; + RequestFlush flush = 2; + RequestInfo info = 3; + RequestSetOption set_option = 4; + RequestInitChain init_chain = 5; + RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + RequestCheckTx check_tx = 8; + RequestDeliverTx deliver_tx = 9; + RequestEndBlock end_block = 10; + RequestCommit commit = 11; + RequestListSnapshots list_snapshots = 12; + RequestOfferSnapshot offer_snapshot = 13; + RequestLoadSnapshotChunk load_snapshot_chunk = 14; RequestApplySnapshotChunk apply_snapshot_chunk = 15; } } -message RequestEcho { - string message = 1; -} +message RequestEcho { string message = 1; } message RequestFlush {} message RequestInfo { - string version = 1; + string version = 1; uint64 block_version = 2; - uint64 p2p_version = 3; + uint64 p2p_version = 3; } // nondeterministic message RequestSetOption { - string key = 1; + string key = 1; string value = 2; } message RequestInitChain { google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [ (gogoproto.nullable) = false ]; + bytes app_state_bytes = 5; + int64 initial_height = 6; } message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; + bytes data = 1; + string path = 2; + int64 height = 3; + bool prove = 4; } message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + bytes hash = 1; + tendermint.types.Header header = 2 [ (gogoproto.nullable) = false ]; + LastCommitInfo last_commit_info = 3 [ (gogoproto.nullable) = false ]; + repeated Evidence byzantine_validators = 4 [ (gogoproto.nullable) = false ]; } enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; + NEW = 0 [ (gogoproto.enumvalue_customname) = "New" ]; + RECHECK = 1 [ (gogoproto.enumvalue_customname) = "Recheck" ]; } message RequestCheckTx { - bytes tx = 1; + bytes tx = 1; CheckTxType type = 2; } -message RequestDeliverTx { - bytes tx = 1; -} +message RequestDeliverTx { bytes tx = 1; } -message RequestEndBlock { - int64 height = 1; -} +message RequestEndBlock { int64 height = 1; } message RequestCommit {} // lists available snapshots -message RequestListSnapshots { -} +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 message RequestLoadSnapshotChunk { uint64 height = 1; uint32 format = 2; - uint32 chunk = 3; + uint32 chunk = 3; } // Applies a snapshot chunk message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; + uint32 index = 1; + bytes chunk = 2; string sender = 3; } @@ -130,43 +123,39 @@ message RequestApplySnapshotChunk { message Response { oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + ResponseException exception = 1; + ResponseEcho echo = 2; + ResponseFlush flush = 3; + ResponseInfo info = 4; + ResponseSetOption set_option = 5; + ResponseInitChain init_chain = 6; + ResponseQuery query = 7; + ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + ResponseDeliverTx deliver_tx = 10; + ResponseEndBlock end_block = 11; + ResponseCommit commit = 12; + ResponseListSnapshots list_snapshots = 13; + ResponseOfferSnapshot offer_snapshot = 14; + ResponseLoadSnapshotChunk load_snapshot_chunk = 15; ResponseApplySnapshotChunk apply_snapshot_chunk = 16; } } // nondeterministic -message ResponseException { - string error = 1; -} +message ResponseException { string error = 1; } -message ResponseEcho { - string message = 1; -} +message ResponseEcho { string message = 1; } message ResponseFlush {} message ResponseInfo { string data = 1; - string version = 2; + string version = 2; uint64 app_version = 3; - int64 last_block_height = 4; + int64 last_block_height = 4; bytes last_block_app_hash = 5; } @@ -174,105 +163,109 @@ message ResponseInfo { message ResponseSetOption { uint32 code = 1; // bytes data = 2; - string log = 3; + string log = 3; string info = 4; } message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; + ConsensusParams consensus_params = 1; + repeated ValidatorUpdate validators = 2 [ (gogoproto.nullable) = false ]; + bytes app_hash = 3; } message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; + int64 height = 9; + string codespace = 10; } 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 - 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"]; + uint32 code = 1; + bytes data = 2; + 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; } message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - 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 + uint32 code = 1; + bytes data = 2; + 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 string codespace = 8; } message ResponseEndBlock { repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; + [ (gogoproto.nullable) = false ]; 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 { // reserve 1 - bytes data = 2; + bytes data = 2; int64 retain_height = 3; } -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} +message ResponseListSnapshots { repeated Snapshot snapshots = 1; } 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 } } -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} +message ResponseLoadSnapshotChunk { bytes chunk = 1; } 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 + Result result = 1; + 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 } } @@ -282,10 +275,10 @@ message ResponseApplySnapshotChunk { // ConsensusParams contains all consensus-relevant parameters // that can be adjusted by the abci app message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; + BlockParams block = 1; + tendermint.types.EvidenceParams evidence = 2; tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; + tendermint.types.VersionParams version = 4; } // BlockParams contains limits on the block size. @@ -297,36 +290,36 @@ message BlockParams { } message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; + int32 round = 1; + repeated VoteInfo votes = 2 [ (gogoproto.nullable) = false ]; } // Event allows application developers to attach additional information to // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. // Later, transactions may be queried using these events. message Event { - string type = 1; + string type = 1; repeated EventAttribute attributes = 2 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" + (gogoproto.jsontag) = "attributes,omitempty" ]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { - bytes key = 1; + bytes key = 1; bytes value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. // // One usage is indexing transaction results. message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + uint32 index = 2; + bytes tx = 3; + ResponseDeliverTx result = 4 [ (gogoproto.nullable) = false ]; } //---------------------------------------- @@ -334,40 +327,38 @@ 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 message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; + tendermint.crypto.PublicKey pub_key = 1 [ (gogoproto.nullable) = false ]; + int64 power = 2; } // VoteInfo message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; + Validator validator = 1 [ (gogoproto.nullable) = false ]; + bool signed_last_block = 2; } enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; + UNKNOWN = 0; + DUPLICATE_VOTE = 1; LIGHT_CLIENT_ATTACK = 2; } message Evidence { EvidenceType type = 1; // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; + Validator validator = 2 [ (gogoproto.nullable) = false ]; // 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 @@ -378,11 +369,11 @@ message Evidence { // 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 } //---------------------------------------- @@ -402,6 +393,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); } diff --git a/third_party/proto/tendermint/blockchain/types.proto b/third_party/proto/tendermint/blockchain/types.proto index f5c143cf5b..29fb1fffaf 100644 --- a/third_party/proto/tendermint/blockchain/types.proto +++ b/third_party/proto/tendermint/blockchain/types.proto @@ -6,36 +6,30 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/blockchai import "tendermint/types/block.proto"; // BlockRequest requests a block for a specific height -message BlockRequest { - int64 height = 1; -} +message BlockRequest { int64 height = 1; } -// NoBlockResponse informs the node that the peer does not have block at the requested height -message NoBlockResponse { - int64 height = 1; -} +// NoBlockResponse informs the node that the peer does not have block at the +// requested height +message NoBlockResponse { int64 height = 1; } // BlockResponse returns block to the requested -message BlockResponse { - tendermint.types.Block block = 1; -} +message BlockResponse { tendermint.types.Block block = 1; } // StatusRequest requests the status of a peer. -message StatusRequest { -} +message StatusRequest {} // StatusResponse is a peer response to inform their status. message StatusResponse { int64 height = 1; - int64 base = 2; + int64 base = 2; } message Message { oneof sum { - BlockRequest block_request = 1; + BlockRequest block_request = 1; NoBlockResponse no_block_response = 2; - BlockResponse block_response = 3; - StatusRequest status_request = 4; - StatusResponse status_response = 5; + BlockResponse block_response = 3; + StatusRequest status_request = 4; + StatusResponse status_response = 5; } } diff --git a/third_party/proto/tendermint/consensus/types.proto b/third_party/proto/tendermint/consensus/types.proto index 6e1f413711..102c2f9d5c 100644 --- a/third_party/proto/tendermint/consensus/types.proto +++ b/third_party/proto/tendermint/consensus/types.proto @@ -10,83 +10,88 @@ import "tendermint/libs/bits/types.proto"; // NewRoundStep is sent for every step taken in the ConsensusState. // For every height/round/step transition message NewRoundStep { - int64 height = 1; - int32 round = 2; - uint32 step = 3; - int64 seconds_since_start_time = 4; - int32 last_commit_round = 5; + int64 height = 1; + int32 round = 2; + uint32 step = 3; + int64 seconds_since_start_time = 4; + int32 last_commit_round = 5; } -// NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. +// NewValidBlock is sent when a validator observes a valid block B in some round +// r, +// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in +// the round r. // In case the block is also committed, then IsCommit flag is set to true. message NewValidBlock { - int64 height = 1; - int32 round = 2; - tendermint.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false]; - tendermint.libs.bits.BitArray block_parts = 4; - bool is_commit = 5; + int64 height = 1; + int32 round = 2; + tendermint.types.PartSetHeader block_part_set_header = 3 + [ (gogoproto.nullable) = false ]; + tendermint.libs.bits.BitArray block_parts = 4; + bool is_commit = 5; } // Proposal is sent when a new block is proposed. message Proposal { - tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; + tendermint.types.Proposal proposal = 1 [ (gogoproto.nullable) = false ]; } // ProposalPOL is sent when a previous proposal is re-proposed. message ProposalPOL { - int64 height = 1; - int32 proposal_pol_round = 2; - tendermint.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 proposal_pol_round = 2; + tendermint.libs.bits.BitArray proposal_pol = 3 + [ (gogoproto.nullable) = false ]; } // BlockPart is sent when gossipping a piece of the proposed block. message BlockPart { - int64 height = 1; - int32 round = 2; - tendermint.types.Part part = 3 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + tendermint.types.Part part = 3 [ (gogoproto.nullable) = false ]; } // Vote is sent when voting for a proposal (or lack thereof). -message Vote { - tendermint.types.Vote vote = 1; -} +message Vote { tendermint.types.Vote vote = 1; } // HasVote is sent to indicate that a particular vote has been received. message HasVote { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - int32 index = 4; + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + int32 index = 4; } // VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. message VoteSetMaj23 { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + tendermint.types.BlockID block_id = 4 + [ (gogoproto.customname) = "BlockID", (gogoproto.nullable) = false ]; } -// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. +// VoteSetBits is sent to communicate the bit-array of votes seen for the +// BlockID. message VoteSetBits { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - tendermint.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + tendermint.types.BlockID block_id = 4 + [ (gogoproto.customname) = "BlockID", (gogoproto.nullable) = false ]; + tendermint.libs.bits.BitArray votes = 5 [ (gogoproto.nullable) = false ]; } message Message { oneof sum { - NewRoundStep new_round_step = 1; + NewRoundStep new_round_step = 1; NewValidBlock new_valid_block = 2; - Proposal proposal = 3; - ProposalPOL proposal_pol = 4; - BlockPart block_part = 5; - Vote vote = 6; - HasVote has_vote = 7; - VoteSetMaj23 vote_set_maj23 = 8; - VoteSetBits vote_set_bits = 9; + Proposal proposal = 3; + ProposalPOL proposal_pol = 4; + BlockPart block_part = 5; + Vote vote = 6; + HasVote has_vote = 7; + VoteSetMaj23 vote_set_maj23 = 8; + VoteSetBits vote_set_bits = 9; } } diff --git a/third_party/proto/tendermint/consensus/wal.proto b/third_party/proto/tendermint/consensus/wal.proto index 44afa2c0c3..b1bd5f92ea 100644 --- a/third_party/proto/tendermint/consensus/wal.proto +++ b/third_party/proto/tendermint/consensus/wal.proto @@ -11,36 +11,35 @@ import "google/protobuf/timestamp.proto"; // MsgInfo are msgs from the reactor which may update the state message MsgInfo { - Message msg = 1 [(gogoproto.nullable) = false]; - string peer_id = 2 [(gogoproto.customname) = "PeerID"]; + Message msg = 1 [ (gogoproto.nullable) = false ]; + string peer_id = 2 [ (gogoproto.customname) = "PeerID" ]; } // TimeoutInfo internally generated messages which may update the state message TimeoutInfo { google.protobuf.Duration duration = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - int64 height = 2; - int32 round = 3; - uint32 step = 4; + [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + int64 height = 2; + int32 round = 3; + uint32 step = 4; } // EndHeight marks the end of the given height inside WAL. // @internal used by scripts/wal2json util. -message EndHeight { - int64 height = 1; -} +message EndHeight { int64 height = 1; } message WALMessage { oneof sum { tendermint.types.EventDataRoundState event_data_round_state = 1; - MsgInfo msg_info = 2; - TimeoutInfo timeout_info = 3; - EndHeight end_height = 4; + MsgInfo msg_info = 2; + TimeoutInfo timeout_info = 3; + EndHeight end_height = 4; } } // TimedWALMessage wraps WALMessage and adds Time for debugging purposes. message TimedWALMessage { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - WALMessage msg = 2; + google.protobuf.Timestamp time = 1 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + WALMessage msg = 2; } diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index 16fd7adf3e..8b1b225095 100644 --- a/third_party/proto/tendermint/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -8,10 +8,10 @@ import "gogoproto/gogo.proto"; // PublicKey defines the keys available for use with Tendermint Validators message PublicKey { option (gogoproto.compare) = true; - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; oneof sum { - bytes ed25519 = 1; + bytes ed25519 = 1; bytes secp256k1 = 2; } } diff --git a/third_party/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto index 975df76853..58657a7852 100644 --- a/third_party/proto/tendermint/crypto/proof.proto +++ b/third_party/proto/tendermint/crypto/proof.proto @@ -6,10 +6,10 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; + int64 total = 1; + int64 index = 2; + bytes leaf_hash = 3; + repeated bytes aunts = 4; } message ValueOp { @@ -21,8 +21,8 @@ message ValueOp { } message DominoOp { - string key = 1; - string input = 2; + string key = 1; + string input = 2; string output = 3; } @@ -31,11 +31,9 @@ message DominoOp { // for example neighbouring node hash message ProofOp { string type = 1; - bytes key = 2; - bytes data = 3; + bytes key = 2; + bytes data = 3; } // ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} +message ProofOps { repeated ProofOp ops = 1 [ (gogoproto.nullable) = false ]; } diff --git a/third_party/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto index 3111d113a5..4cae6efde7 100644 --- a/third_party/proto/tendermint/libs/bits/types.proto +++ b/third_party/proto/tendermint/libs/bits/types.proto @@ -4,6 +4,6 @@ package tendermint.libs.bits; option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; message BitArray { - int64 bits = 1; + int64 bits = 1; repeated uint64 elems = 2; } diff --git a/third_party/proto/tendermint/mempool/types.proto b/third_party/proto/tendermint/mempool/types.proto index b55d9717b1..375f81ba4f 100644 --- a/third_party/proto/tendermint/mempool/types.proto +++ b/third_party/proto/tendermint/mempool/types.proto @@ -3,12 +3,8 @@ package tendermint.mempool; option go_package = "github.com/tendermint/tendermint/proto/tendermint/mempool"; -message Txs { - repeated bytes txs = 1; -} +message Txs { repeated bytes txs = 1; } message Message { - oneof sum { - Txs txs = 1; - } + oneof sum { Txs txs = 1; } } diff --git a/third_party/proto/tendermint/p2p/pex.proto b/third_party/proto/tendermint/p2p/pex.proto index dfe238dbe6..39b9383f6a 100644 --- a/third_party/proto/tendermint/p2p/pex.proto +++ b/third_party/proto/tendermint/p2p/pex.proto @@ -9,12 +9,12 @@ import "gogoproto/gogo.proto"; message PexRequest {} message PexAddrs { - repeated NetAddress addrs = 1 [(gogoproto.nullable) = false]; + repeated NetAddress addrs = 1 [ (gogoproto.nullable) = false ]; } message Message { oneof sum { PexRequest pex_request = 1; - PexAddrs pex_addrs = 2; + PexAddrs pex_addrs = 2; } } diff --git a/third_party/proto/tendermint/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto index 0d42ea4002..9652388485 100644 --- a/third_party/proto/tendermint/p2p/types.proto +++ b/third_party/proto/tendermint/p2p/types.proto @@ -6,29 +6,29 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; import "gogoproto/gogo.proto"; message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; + string id = 1 [ (gogoproto.customname) = "ID" ]; + string ip = 2 [ (gogoproto.customname) = "IP" ]; uint32 port = 3; } message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; + uint64 p2p = 1 [ (gogoproto.customname) = "P2P" ]; uint64 block = 2; - uint64 app = 3; + uint64 app = 3; } message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; + ProtocolVersion protocol_version = 1 [ (gogoproto.nullable) = false ]; + string default_node_id = 2 [ (gogoproto.customname) = "DefaultNodeID" ]; + string listen_addr = 3; + string network = 4; + string version = 5; + bytes channels = 6; + string moniker = 7; + DefaultNodeInfoOther other = 8 [ (gogoproto.nullable) = false ]; } message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; + string tx_index = 1; + string rpc_address = 2 [ (gogoproto.customname) = "RPCAddress" ]; } diff --git a/third_party/proto/tendermint/privval/types.proto b/third_party/proto/tendermint/privval/types.proto index 0fc8b61dc9..4a78003bb9 100644 --- a/third_party/proto/tendermint/privval/types.proto +++ b/third_party/proto/tendermint/privval/types.proto @@ -8,52 +8,50 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval"; enum Errors { - ERRORS_UNKNOWN = 0; + ERRORS_UNKNOWN = 0; ERRORS_UNEXPECTED_RESPONSE = 1; - ERRORS_NO_CONNECTION = 2; - ERRORS_CONNECTION_TIMEOUT = 3; - ERRORS_READ_TIMEOUT = 4; - ERRORS_WRITE_TIMEOUT = 5; + ERRORS_NO_CONNECTION = 2; + ERRORS_CONNECTION_TIMEOUT = 3; + ERRORS_READ_TIMEOUT = 4; + ERRORS_WRITE_TIMEOUT = 5; } message RemoteSignerError { - int32 code = 1; + int32 code = 1; string description = 2; } // PubKeyRequest requests the consensus public key from the remote signer. -message PubKeyRequest { - string chain_id = 1; -} +message PubKeyRequest { string chain_id = 1; } // PubKeyResponse is a response message containing the public key. message PubKeyResponse { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; + tendermint.crypto.PublicKey pub_key = 1 [ (gogoproto.nullable) = false ]; + RemoteSignerError error = 2; } // SignVoteRequest is a request to sign a vote message SignVoteRequest { - tendermint.types.Vote vote = 1; - string chain_id = 2; + tendermint.types.Vote vote = 1; + string chain_id = 2; } // SignedVoteResponse is a response containing a signed vote or an error message SignedVoteResponse { - tendermint.types.Vote vote = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; + tendermint.types.Vote vote = 1 [ (gogoproto.nullable) = false ]; + RemoteSignerError error = 2; } // SignProposalRequest is a request to sign a proposal message SignProposalRequest { tendermint.types.Proposal proposal = 1; - string chain_id = 2; + string chain_id = 2; } // SignedProposalResponse is response containing a signed proposal or an error message SignedProposalResponse { - tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; + tendermint.types.Proposal proposal = 1 [ (gogoproto.nullable) = false ]; + RemoteSignerError error = 2; } // PingRequest is a request to confirm that the connection is alive. @@ -64,13 +62,13 @@ message PingResponse {} message Message { oneof sum { - PubKeyRequest pub_key_request = 1; - PubKeyResponse pub_key_response = 2; - SignVoteRequest sign_vote_request = 3; - SignedVoteResponse signed_vote_response = 4; - SignProposalRequest sign_proposal_request = 5; + PubKeyRequest pub_key_request = 1; + PubKeyResponse pub_key_response = 2; + SignVoteRequest sign_vote_request = 3; + SignedVoteResponse signed_vote_response = 4; + SignProposalRequest sign_proposal_request = 5; SignedProposalResponse signed_proposal_response = 6; - PingRequest ping_request = 7; - PingResponse ping_response = 8; + PingRequest ping_request = 7; + PingResponse ping_response = 8; } } diff --git a/third_party/proto/tendermint/state/types.proto b/third_party/proto/tendermint/state/types.proto index 919da91e52..1d076515ac 100644 --- a/third_party/proto/tendermint/state/types.proto +++ b/third_party/proto/tendermint/state/types.proto @@ -16,40 +16,43 @@ import "google/protobuf/timestamp.proto"; // It is persisted to disk for each height before calling Commit. message ABCIResponses { repeated tendermint.abci.ResponseDeliverTx deliver_txs = 1; - tendermint.abci.ResponseEndBlock end_block = 2; - tendermint.abci.ResponseBeginBlock begin_block = 3; + tendermint.abci.ResponseEndBlock end_block = 2; + tendermint.abci.ResponseBeginBlock begin_block = 3; } -// ValidatorsInfo represents the latest validator set, or the last height it changed +// ValidatorsInfo represents the latest validator set, or the last height it +// changed message ValidatorsInfo { - tendermint.types.ValidatorSet validator_set = 1; - int64 last_height_changed = 2; + tendermint.types.ValidatorSet validator_set = 1; + int64 last_height_changed = 2; } -// ConsensusParamsInfo represents the latest consensus params, or the last height it changed +// ConsensusParamsInfo represents the latest consensus params, or the last +// height it changed message ConsensusParamsInfo { - tendermint.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false]; - int64 last_height_changed = 2; + tendermint.types.ConsensusParams consensus_params = 1 + [ (gogoproto.nullable) = false ]; + int64 last_height_changed = 2; } message Version { - tendermint.version.Consensus consensus = 1 [(gogoproto.nullable) = false]; - string software = 2; + tendermint.version.Consensus consensus = 1 [ (gogoproto.nullable) = false ]; + string software = 2; } message State { - Version version = 1 [(gogoproto.nullable) = false]; + Version version = 1 [ (gogoproto.nullable) = false ]; // immutable - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 initial_height = 14; + string chain_id = 2 [ (gogoproto.customname) = "ChainID" ]; + int64 initial_height = 14; // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - int64 last_block_height = 3; - tendermint.types.BlockID last_block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; + int64 last_block_height = 3; + tendermint.types.BlockID last_block_id = 4 + [ (gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID" ]; google.protobuf.Timestamp last_block_time = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; // LastValidators is used to validate block.LastCommit. // Validators are persisted to the database separately every time they change, @@ -57,15 +60,16 @@ message State { // Note that if s.LastBlockHeight causes a valset change, // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 // Extra +1 due to nextValSet delay. - tendermint.types.ValidatorSet next_validators = 6; - tendermint.types.ValidatorSet validators = 7; - tendermint.types.ValidatorSet last_validators = 8; - int64 last_height_validators_changed = 9; + tendermint.types.ValidatorSet next_validators = 6; + tendermint.types.ValidatorSet validators = 7; + tendermint.types.ValidatorSet last_validators = 8; + int64 last_height_validators_changed = 9; // Consensus parameters used for validating blocks. // Changes returned by EndBlock and updated after Commit. - tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; - int64 last_height_consensus_params_changed = 11; + tendermint.types.ConsensusParams consensus_params = 10 + [ (gogoproto.nullable) = false ]; + int64 last_height_consensus_params_changed = 11; // Merkle root of the results from executing prev block bytes last_results_hash = 12; diff --git a/third_party/proto/tendermint/statesync/types.proto b/third_party/proto/tendermint/statesync/types.proto index 8d4a714c1d..fb6a572bfe 100644 --- a/third_party/proto/tendermint/statesync/types.proto +++ b/third_party/proto/tendermint/statesync/types.proto @@ -5,33 +5,33 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/statesync message Message { oneof sum { - SnapshotsRequest snapshots_request = 1; + SnapshotsRequest snapshots_request = 1; SnapshotsResponse snapshots_response = 2; - ChunkRequest chunk_request = 3; - ChunkResponse chunk_response = 4; + ChunkRequest chunk_request = 3; + ChunkResponse chunk_response = 4; } } message SnapshotsRequest {} message SnapshotsResponse { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - bytes metadata = 5; + uint64 height = 1; + uint32 format = 2; + uint32 chunks = 3; + bytes hash = 4; + bytes metadata = 5; } message ChunkRequest { uint64 height = 1; uint32 format = 2; - uint32 index = 3; + uint32 index = 3; } message ChunkResponse { - uint64 height = 1; - uint32 format = 2; - uint32 index = 3; - bytes chunk = 4; - bool missing = 5; + uint64 height = 1; + uint32 format = 2; + uint32 index = 3; + bytes chunk = 4; + bool missing = 5; } diff --git a/third_party/proto/tendermint/store/types.proto b/third_party/proto/tendermint/store/types.proto index af2f97ad08..b3027ecd9c 100644 --- a/third_party/proto/tendermint/store/types.proto +++ b/third_party/proto/tendermint/store/types.proto @@ -4,6 +4,6 @@ package tendermint.store; option go_package = "github.com/tendermint/tendermint/proto/tendermint/store"; message BlockStoreState { - int64 base = 1; + int64 base = 1; int64 height = 2; } diff --git a/third_party/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto index 84e9bb15d8..8f769eb228 100644 --- a/third_party/proto/tendermint/types/block.proto +++ b/third_party/proto/tendermint/types/block.proto @@ -8,8 +8,8 @@ import "tendermint/types/types.proto"; import "tendermint/types/evidence.proto"; message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; + Header header = 1 [ (gogoproto.nullable) = false ]; + Data data = 2 [ (gogoproto.nullable) = false ]; + tendermint.types.EvidenceList evidence = 3 [ (gogoproto.nullable) = false ]; + Commit last_commit = 4; } diff --git a/third_party/proto/tendermint/types/canonical.proto b/third_party/proto/tendermint/types/canonical.proto index e88fd6ffe3..20ee5d555a 100644 --- a/third_party/proto/tendermint/types/canonical.proto +++ b/third_party/proto/tendermint/types/canonical.proto @@ -8,30 +8,32 @@ import "tendermint/types/types.proto"; import "google/protobuf/timestamp.proto"; message CanonicalBlockID { - bytes hash = 1; - CanonicalPartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; + bytes hash = 1; + CanonicalPartSetHeader part_set_header = 2 [ (gogoproto.nullable) = false ]; } message CanonicalPartSetHeader { uint32 total = 1; - bytes hash = 2; + bytes hash = 2; } message CanonicalProposal { - SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here - sfixed64 round = 3; // canonicalization requires fixed size encoding here - int64 pol_round = 4 [(gogoproto.customname) = "POLRound"]; - CanonicalBlockID block_id = 5 [(gogoproto.customname) = "BlockID"]; - google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 7 [(gogoproto.customname) = "ChainID"]; + SignedMsgType type = 1; // type alias for byte + sfixed64 height = 2; // canonicalization requires fixed size encoding here + sfixed64 round = 3; // canonicalization requires fixed size encoding here + int64 pol_round = 4 [ (gogoproto.customname) = "POLRound" ]; + CanonicalBlockID block_id = 5 [ (gogoproto.customname) = "BlockID" ]; + google.protobuf.Timestamp timestamp = 6 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + string chain_id = 7 [ (gogoproto.customname) = "ChainID" ]; } message CanonicalVote { - SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here - sfixed64 round = 3; // canonicalization requires fixed size encoding here - CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"]; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 6 [(gogoproto.customname) = "ChainID"]; + SignedMsgType type = 1; // type alias for byte + sfixed64 height = 2; // canonicalization requires fixed size encoding here + sfixed64 round = 3; // canonicalization requires fixed size encoding here + CanonicalBlockID block_id = 4 [ (gogoproto.customname) = "BlockID" ]; + google.protobuf.Timestamp timestamp = 5 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + string chain_id = 6 [ (gogoproto.customname) = "ChainID" ]; } diff --git a/third_party/proto/tendermint/types/events.proto b/third_party/proto/tendermint/types/events.proto index a1e5cc498d..34455e7209 100644 --- a/third_party/proto/tendermint/types/events.proto +++ b/third_party/proto/tendermint/types/events.proto @@ -4,7 +4,7 @@ package tendermint.types; option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; message EventDataRoundState { - int64 height = 1; - int32 round = 2; - string step = 3; + int64 height = 1; + int32 round = 2; + string step = 3; } diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto index 3b234571ba..b96e8c918f 100644 --- a/third_party/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -10,29 +10,33 @@ import "tendermint/types/validator.proto"; message Evidence { oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; + DuplicateVoteEvidence duplicate_vote_evidence = 1; LightClientAttackEvidence light_client_attack_evidence = 2; } } -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting +// votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; } -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +// LightClientAttackEvidence contains evidence of a set of validators attempting +// to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + 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]; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; } message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; + repeated Evidence evidence = 1 [ (gogoproto.nullable) = false ]; } diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto index 0de7d846fb..38ab12fa67 100644 --- a/third_party/proto/tendermint/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -11,10 +11,10 @@ option (gogoproto.equal_all) = true; // ConsensusParams contains consensus critical parameters that determine the // validity of blocks. message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; + BlockParams block = 1 [ (gogoproto.nullable) = false ]; + EvidenceParams evidence = 2 [ (gogoproto.nullable) = false ]; + ValidatorParams validator = 3 [ (gogoproto.nullable) = false ]; + VersionParams version = 4 [ (gogoproto.nullable) = false ]; } // BlockParams contains limits on the block size. @@ -46,10 +46,10 @@ message EvidenceParams { // 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]; + [ (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. + // 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. // Default is 1048576 or 1MB int64 max_bytes = 3; } @@ -58,7 +58,7 @@ message EvidenceParams { // NOTE: uses ABCI pubkey naming, not Amino names. message ValidatorParams { option (gogoproto.populate) = true; - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; repeated string pub_key_types = 1; } @@ -66,7 +66,7 @@ message ValidatorParams { // VersionParams contains the ABCI application version. message VersionParams { option (gogoproto.populate) = true; - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; uint64 app_version = 1; } @@ -76,5 +76,5 @@ message VersionParams { // It is hashed into the Header.ConsensusHash. message HashedParams { int64 block_max_bytes = 1; - int64 block_max_gas = 2; + int64 block_max_gas = 2; } diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto index 7f7ea74cac..f681bc4c4f 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -12,44 +12,51 @@ import "tendermint/types/validator.proto"; // BlockIdFlag indicates which BlcokID the signature is for enum BlockIDFlag { option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; + option (gogoproto.goproto_enum_prefix) = false; + + BLOCK_ID_FLAG_UNKNOWN = 0 + [ (gogoproto.enumvalue_customname) = "BlockIDFlagUnknown" ]; + BLOCK_ID_FLAG_ABSENT = 1 + [ (gogoproto.enumvalue_customname) = "BlockIDFlagAbsent" ]; + BLOCK_ID_FLAG_COMMIT = 2 + [ (gogoproto.enumvalue_customname) = "BlockIDFlagCommit" ]; + BLOCK_ID_FLAG_NIL = 3 [ (gogoproto.enumvalue_customname) = "BlockIDFlagNil" ]; } // SignedMsgType is a type of signed message in the consensus. enum SignedMsgType { option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_prefix) = false; - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; + SIGNED_MSG_TYPE_UNKNOWN = 0 + [ (gogoproto.enumvalue_customname) = "UnknownType" ]; // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; + SIGNED_MSG_TYPE_PREVOTE = 1 + [ (gogoproto.enumvalue_customname) = "PrevoteType" ]; + SIGNED_MSG_TYPE_PRECOMMIT = 2 + [ (gogoproto.enumvalue_customname) = "PrecommitType" ]; // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; + SIGNED_MSG_TYPE_PROPOSAL = 32 + [ (gogoproto.enumvalue_customname) = "ProposalType" ]; } // PartsetHeader message PartSetHeader { uint32 total = 1; - bytes hash = 2; + bytes hash = 2; } message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; + uint32 index = 1; + bytes bytes = 2; + tendermint.crypto.Proof proof = 3 [ (gogoproto.nullable) = false ]; } // BlockID message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; + bytes hash = 1; + PartSetHeader part_set_header = 2 [ (gogoproto.nullable) = false ]; } // -------------------------------- @@ -57,28 +64,30 @@ message BlockID { // Header defines the structure of a Tendermint block header. message Header { // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.version.Consensus version = 1 [ (gogoproto.nullable) = false ]; + string chain_id = 2 [ (gogoproto.customname) = "ChainID" ]; + int64 height = 3; + google.protobuf.Timestamp time = 4 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + 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 @@ -92,43 +101,48 @@ message Data { // Vote represents a prevote, precommit, or commit vote from validators for // consensus. 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. + 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]; + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; + int32 validator_index = 7; + bytes signature = 8; } -// Commit contains the evidence that a block was committed by a set of validators. +// Commit contains the evidence that a block was committed by a set of +// validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 + [ (gogoproto.nullable) = false, (gogoproto.customname) = "BlockID" ]; + repeated CommitSig signatures = 4 [ (gogoproto.nullable) = false ]; } // CommitSig is a part of the Vote included in a Commit. message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + BlockIDFlag block_id_flag = 1; + bytes validator_address = 2; + google.protobuf.Timestamp timestamp = 3 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; bytes signature = 4; } message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + SignedMsgType type = 1; + int64 height = 2; + 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]; + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; bytes signature = 7; } @@ -138,20 +152,22 @@ message SignedHeader { } message LightBlock { - SignedHeader signed_header = 1; + SignedHeader signed_header = 1; tendermint.types.ValidatorSet validator_set = 2; } message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; + BlockID block_id = 1 + [ (gogoproto.customname) = "BlockID", (gogoproto.nullable) = false ]; + int64 block_size = 2; + Header header = 3 [ (gogoproto.nullable) = false ]; + int64 num_txs = 4; } -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. +// TxProof represents a Merkle proof of the presence of a transaction in the +// Merkle tree. message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; + bytes root_hash = 1; + bytes data = 2; + tendermint.crypto.Proof proof = 3; } diff --git a/third_party/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto index 49860b96d6..5e6dc8baee 100644 --- a/third_party/proto/tendermint/types/validator.proto +++ b/third_party/proto/tendermint/types/validator.proto @@ -7,19 +7,19 @@ import "gogoproto/gogo.proto"; import "tendermint/crypto/keys.proto"; message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; + repeated Validator validators = 1; + Validator proposer = 2; + int64 total_voting_power = 3; } message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; + bytes address = 1; + tendermint.crypto.PublicKey pub_key = 2 [ (gogoproto.nullable) = false ]; + int64 voting_power = 3; + int64 proposer_priority = 4; } message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; + tendermint.crypto.PublicKey pub_key = 1; + int64 voting_power = 2; }