From 5abe96c6ae7b79239701ef2aadab536bd98fef80 Mon Sep 17 00:00:00 2001 From: dongsam Date: Thu, 25 Jul 2024 16:24:25 +0900 Subject: [PATCH] deps: proto-update-deps --- go.mod | 20 +- go.sum | 8 +- third_party/proto/cosmos_proto/cosmos.proto | 8 +- third_party/proto/gogoproto/gogo.proto | 172 +++++----- third_party/proto/tendermint/abci/types.proto | 313 +++++++++--------- .../proto/tendermint/crypto/keys.proto | 4 +- .../proto/tendermint/crypto/proof.proto | 20 +- .../proto/tendermint/types/types.proto | 142 ++++---- 8 files changed, 345 insertions(+), 342 deletions(-) diff --git a/go.mod b/go.mod index 547756c9e..2c9fdb1d1 100644 --- a/go.mod +++ b/go.mod @@ -22,27 +22,37 @@ require ( github.com/tendermint/tendermint v0.34.25 github.com/tendermint/tm-db v0.6.7 go.opencensus.io v0.24.0 - google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect google.golang.org/grpc v1.57.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) -require github.com/evmos/ethermint v0.19.3 +require ( + github.com/evmos/ethermint v0.19.3 + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e +) require ( github.com/btcsuite/btcd v0.22.1 // indirect github.com/cenkalti/backoff/v4 v4.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect github.com/cosmos/ibc-go/v3 v3.2.0 // indirect github.com/danieljoos/wincred v1.0.2 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/go-ole/go-ole v1.2.5 // indirect github.com/google/go-cmp v0.5.9 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/spf13/afero v1.8.2 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect + golang.org/x/sync v0.1.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect ) require ( @@ -62,7 +72,6 @@ require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect github.com/confio/ics23/go v0.7.0 // indirect github.com/cosmos/btcutil v1.0.4 // indirect @@ -80,7 +89,6 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect - github.com/dustin/go-humanize v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect @@ -120,7 +128,6 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect @@ -133,7 +140,6 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.34.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/prometheus/tsdb v0.10.0 // indirect @@ -143,7 +149,6 @@ require ( github.com/rs/zerolog v1.27.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.8.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.13.0 // indirect @@ -159,7 +164,6 @@ require ( golang.org/x/crypto v0.12.0 // indirect golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect diff --git a/go.sum b/go.sum index 455da4497..37d60e27d 100644 --- a/go.sum +++ b/go.sum @@ -1256,8 +1256,12 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 h1:znp6mq/drrY+6khTAlJUDNFFcDGV2ENLYKpMq8SyCds= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto index d4719a38f..167b17075 100644 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -6,9 +6,11 @@ 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 91ff47185..49e78f99f 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/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index 36503cbfd..8e3a90936 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -21,100 +21,107 @@ 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; } @@ -123,39 +130,43 @@ 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; } @@ -163,109 +174,105 @@ 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 } } @@ -275,10 +282,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. @@ -290,36 +297,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]; } //---------------------------------------- @@ -327,38 +334,40 @@ 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 @@ -369,11 +378,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 } //---------------------------------------- @@ -393,8 +402,6 @@ 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/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index 8b1b22509..16fd7adf3 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 58657a785..975df7685 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,9 +31,11 @@ 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/types/types.proto b/third_party/proto/tendermint/types/types.proto index f681bc4c4..7f7ea74ca 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -12,51 +12,44 @@ 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]; } // -------------------------------- @@ -64,30 +57,28 @@ 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 @@ -101,48 +92,43 @@ 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; } @@ -152,22 +138,20 @@ 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; }