diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 5e4f0b047..44cfc274e 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: "1.18" - uses: actions/checkout@v3 @@ -42,11 +42,11 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: "1.18" - uses: actions/checkout@v3 with: - fetch-depth: 1 # we need a .git directory to run git diff + fetch-depth: 1 # we need a .git directory to run git diff - name: "Check protobuf generated code" run: | @@ -59,7 +59,7 @@ jobs: export GOBIN="${tools}/bin" go install github.com/bufbuild/buf/cmd/buf - go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest + go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest make proto-gen diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 54384a144..7f51ac1b9 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -42,6 +42,7 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi ### IMPROVEMENTS +- [proto] \#9356 Migrate from `gogo/protobuf` to `cosmos/gogoproto` (@julienrbrt) - [rpc] \#9276 Added `header` and `header_by_hash` queries to the RPC client (@samricotta) - [abci] \#5706 Added `AbciVersion` to `RequestInfo` allowing applications to check ABCI version when connecting to Tendermint. (@marbar3778) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94922657e..fb2c4b9d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,7 +106,7 @@ specify exactly the dependency you want to update, eg. ## Protobuf We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along -with [`gogoproto`](https://github.com/gogo/protobuf) to generate code for use +with [`gogoproto`](https://github.com/cosmos/gogoproto) to generate code for use across Tendermint Core. To generate proto stubs, lint, and check protos for breaking changes, you will @@ -142,7 +142,6 @@ If you are a VS Code user, you may want to add the following to your `.vscode/se "protoc": { "options": [ "--proto_path=${workspaceRoot}/proto", - "--proto_path=${workspaceRoot}/third_party/proto" ] } } diff --git a/Makefile b/Makefile index 20034fbc9..11dfffb51 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ mockery: check-proto-deps: ifeq (,$(shell which protoc-gen-gogofaster)) - @go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest + @go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest endif .PHONY: check-proto-deps @@ -174,6 +174,7 @@ proto-gen: check-proto-deps @echo "Generating Protobuf files" @go run github.com/bufbuild/buf/cmd/buf generate @mv ./proto/tendermint/abci/types.pb.go ./abci/types/ + @cp ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc .PHONY: proto-gen # These targets are provided for convenience and are intended for local diff --git a/abci/types/messages.go b/abci/types/messages.go index 702fdac0b..92a9616c5 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -3,8 +3,7 @@ package types import ( "io" - "github.com/gogo/protobuf/proto" - + "github.com/cosmos/gogoproto/proto" "github.com/tendermint/tendermint/libs/protoio" ) diff --git a/abci/types/messages_test.go b/abci/types/messages_test.go index 491d10c7f..17613769f 100644 --- a/abci/types/messages_test.go +++ b/abci/types/messages_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/abci/types/types.go b/abci/types/types.go index de3abfe5f..4b42d0e56 100644 --- a/abci/types/types.go +++ b/abci/types/types.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" - "github.com/gogo/protobuf/jsonpb" + "github.com/cosmos/gogoproto/jsonpb" ) const ( diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 7f87c7868..5f1bf8d3b 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -6,10 +6,11 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" types1 "github.com/tendermint/tendermint/proto/tendermint/types" grpc "google.golang.org/grpc" @@ -3681,10 +3682,10 @@ type ABCIApplicationClient interface { } type aBCIApplicationClient struct { - cc *grpc.ClientConn + cc grpc1.ClientConn } -func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient { +func NewABCIApplicationClient(cc grpc1.ClientConn) ABCIApplicationClient { return &aBCIApplicationClient{cc} } @@ -3905,7 +3906,7 @@ func (*UnimplementedABCIApplicationServer) ProcessProposal(ctx context.Context, return nil, status.Errorf(codes.Unimplemented, "method ProcessProposal not implemented") } -func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { +func RegisterABCIApplicationServer(s grpc1.Server, srv ABCIApplicationServer) { s.RegisterService(&_ABCIApplication_serviceDesc, srv) } @@ -4807,7 +4808,7 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err18 != nil { return 0, err18 } @@ -5229,7 +5230,7 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err22 != nil { return 0, err22 } @@ -5317,7 +5318,7 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n24, err24 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err24 != nil { return 0, err24 } @@ -6986,7 +6987,7 @@ func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n52, err52 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n52, err52 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err52 != nil { return 0, err52 } @@ -7335,7 +7336,7 @@ func (m *RequestInitChain) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.ChainId) if l > 0 { @@ -7547,7 +7548,7 @@ func (m *RequestPrepareProposal) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { @@ -7587,7 +7588,7 @@ func (m *RequestProcessProposal) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { @@ -8354,7 +8355,7 @@ func (m *Misbehavior) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) if m.TotalVotingPower != 0 { n += 1 + sovTypes(uint64(m.TotalVotingPower)) @@ -9346,7 +9347,7 @@ func (m *RequestInitChain) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10778,7 +10779,7 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11081,7 +11082,7 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -15396,7 +15397,7 @@ func (m *Misbehavior) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/blocksync/msgs.go b/blocksync/msgs.go index 081cbe4f8..e3d6e551c 100644 --- a/blocksync/msgs.go +++ b/blocksync/msgs.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" bcproto "github.com/tendermint/tendermint/proto/tendermint/blocksync" "github.com/tendermint/tendermint/types" diff --git a/blocksync/msgs_test.go b/blocksync/msgs_test.go index ca2502a0f..46983a2a1 100644 --- a/blocksync/msgs_test.go +++ b/blocksync/msgs_test.go @@ -5,7 +5,7 @@ import ( "math" "testing" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/buf.gen.yaml b/buf.gen.yaml index d972360bb..a36032410 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -3,7 +3,7 @@ plugins: - name: gogofaster out: ./proto/ opt: - - Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types + - Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types - Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration - plugins=grpc - paths=source_relative diff --git a/buf.yaml b/buf.yaml index d21611209..5f8376678 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,7 +1,6 @@ build: roots: - proto - - third_party/proto lint: use: - BASIC diff --git a/consensus/msgs.go b/consensus/msgs.go index 4de96b5f4..5d22905cd 100644 --- a/consensus/msgs.go +++ b/consensus/msgs.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/libs/bits" diff --git a/consensus/msgs_test.go b/consensus/msgs_test.go index 296f6b12a..7690c3364 100644 --- a/consensus/msgs_test.go +++ b/consensus/msgs_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/consensus/reactor.go b/consensus/reactor.go index c86f21c98..b0d3e3675 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/libs/bits" diff --git a/consensus/replay_test.go b/consensus/replay_test.go index e3b8775da..d9ec4d954 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" diff --git a/consensus/state.go b/consensus/state.go index b4c1a107a..0da336a56 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -10,7 +10,7 @@ import ( "sort" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" cfg "github.com/tendermint/tendermint/config" cstypes "github.com/tendermint/tendermint/consensus/types" diff --git a/consensus/wal.go b/consensus/wal.go index 80f5e6b07..adbcaa64b 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" auto "github.com/tendermint/tendermint/libs/autofile" tmjson "github.com/tendermint/tendermint/libs/json" diff --git a/docs/architecture/adr-009-ABCI-design.md b/docs/architecture/adr-009-ABCI-design.md index c1ad3a614..3876ffb3d 100644 --- a/docs/architecture/adr-009-ABCI-design.md +++ b/docs/architecture/adr-009-ABCI-design.md @@ -33,7 +33,7 @@ See the [references](#references) for more. The native proto library in Go generates inflexible and verbose code. Many in the Go community have adopted a fork called -[gogoproto](https://github.com/gogo/protobuf) that provides a +[gogoproto](https://github.com/cosmos/gogoproto) that provides a variety of features aimed to improve the developer experience. While `gogoproto` is nice, it creates an additional dependency, and compiling the protobuf types for other languages has been reported to fail when `gogoproto` is used. diff --git a/docs/architecture/adr-081-protobuf-mgmt.md b/docs/architecture/adr-081-protobuf-mgmt.md index 1199cff1b..23d734ef7 100644 --- a/docs/architecture/adr-081-protobuf-mgmt.md +++ b/docs/architecture/adr-081-protobuf-mgmt.md @@ -195,7 +195,7 @@ We currently aim to: [cosmos-sdk-buf-linting-ci]: https://github.com/cosmos/cosmos-sdk/blob/e6571906043b6751951a42b6546431b1c38b05bd/.github/workflows/proto.yml#L15 [\#8003]: https://github.com/tendermint/tendermint/issues/8003 [Nix]: https://nixos.org/ -[gogoprotobuf]: https://github.com/gogo/protobuf +[gogoprotobuf]: https://github.com/cosmos/gogoproto [Prototool]: https://github.com/uber/prototool [buf-docs-gen]: https://docs.buf.build/bsr/documentation [redo]: https://redo.readthedocs.io/en/latest/ diff --git a/evidence/pool.go b/evidence/pool.go index 7a5e4f3d5..6bec01598 100644 --- a/evidence/pool.go +++ b/evidence/pool.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - "github.com/gogo/protobuf/proto" - gogotypes "github.com/gogo/protobuf/types" + "github.com/cosmos/gogoproto/proto" + gogotypes "github.com/cosmos/gogoproto/types" dbm "github.com/tendermint/tm-db" clist "github.com/tendermint/tendermint/libs/clist" diff --git a/go.mod b/go.mod index 2bbd192b3..d851b8803 100644 --- a/go.mod +++ b/go.mod @@ -9,23 +9,29 @@ require ( github.com/btcsuite/btcd v0.22.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/bufbuild/buf v1.7.0 - github.com/cenkalti/backoff v2.2.1+incompatible // indirect + github.com/cosmos/gogoproto v1.4.1 github.com/creachadair/taskgroup v0.3.2 github.com/fortytw2/leaktest v1.3.0 github.com/go-kit/kit v0.12.0 github.com/go-kit/log v0.2.1 github.com/go-logfmt/logfmt v0.5.1 - github.com/gogo/protobuf v1.3.2 + github.com/gofrs/uuid v4.2.0+incompatible github.com/golang/protobuf v1.5.2 + github.com/golangci/golangci-lint v1.49.0 github.com/google/orderedcode v0.0.1 + github.com/google/uuid v1.3.0 github.com/gorilla/websocket v1.5.0 github.com/gtank/merlin v0.1.1 + github.com/informalsystems/tm-load-test v1.0.0 github.com/lib/pq v1.10.6 github.com/libp2p/go-buffer-pool v0.1.0 github.com/minio/highwayhash v1.0.2 github.com/ory/dockertest v3.3.5+incompatible github.com/pkg/errors v0.9.1 + github.com/pointlander/peg v1.0.1 github.com/prometheus/client_golang v1.13.0 + github.com/prometheus/client_model v0.2.0 + github.com/prometheus/common v0.37.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/rs/cors v1.8.2 github.com/sasha-s/go-deadlock v0.3.1 @@ -34,28 +40,12 @@ require ( github.com/spf13/viper v1.12.0 github.com/stretchr/testify v1.8.0 github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca -) - -require ( - github.com/gofrs/uuid v4.2.0+incompatible - github.com/google/uuid v1.3.0 github.com/tendermint/tm-db v0.6.6 + github.com/vektra/mockery/v2 v2.14.0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa golang.org/x/net v0.0.0-20220726230323-06994584191e - google.golang.org/grpc v1.49.0 -) - -require ( - github.com/golangci/golangci-lint v1.49.0 - github.com/pointlander/peg v1.0.1 - github.com/prometheus/common v0.37.0 -) - -require ( - github.com/informalsystems/tm-load-test v1.0.0 - github.com/prometheus/client_model v0.2.0 - github.com/vektra/mockery/v2 v2.14.0 gonum.org/v1/gonum v0.11.0 + google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 ) @@ -83,6 +73,7 @@ require ( github.com/breml/errchkjson v0.3.0 // indirect github.com/bufbuild/connect-go v0.2.0 // indirect github.com/butuzov/ireturn v0.1.1 // indirect + github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/charithe/durationcheck v0.0.9 // indirect @@ -125,6 +116,7 @@ require ( github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.3 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect diff --git a/go.sum b/go.sum index bcbfcd7fb..69e634d3c 100644 --- a/go.sum +++ b/go.sum @@ -228,6 +228,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/gogoproto v1.4.1 h1:WoyH+0/jbCTzpKNvyav5FL1ZTWsp1im1MxEpJEzKUB8= +github.com/cosmos/gogoproto v1.4.1/go.mod h1:Ac9lzL4vFpBMcptJROQ6dQ4M3pOEK5Z/l0Q9p+LoCr4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= diff --git a/libs/protoio/io.go b/libs/protoio/io.go index b12a1d482..6244afd97 100644 --- a/libs/protoio/io.go +++ b/libs/protoio/io.go @@ -33,7 +33,7 @@ package protoio import ( "io" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" ) type Writer interface { diff --git a/libs/protoio/io_test.go b/libs/protoio/io_test.go index 201739d52..1a33e7cea 100644 --- a/libs/protoio/io_test.go +++ b/libs/protoio/io_test.go @@ -37,8 +37,8 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/test" + "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/test" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/protoio" diff --git a/libs/protoio/reader.go b/libs/protoio/reader.go index 66eed707c..95b8d3455 100644 --- a/libs/protoio/reader.go +++ b/libs/protoio/reader.go @@ -36,7 +36,7 @@ import ( "fmt" "io" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" ) // NewDelimitedReader reads varint-delimited Protobuf messages from a reader. diff --git a/libs/protoio/writer.go b/libs/protoio/writer.go index d4c66798f..0eb65850c 100644 --- a/libs/protoio/writer.go +++ b/libs/protoio/writer.go @@ -35,7 +35,7 @@ import ( "encoding/binary" "io" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" ) // NewDelimitedWriter writes a varint-delimited Protobuf message to a writer. It is diff --git a/light/rpc/client.go b/light/rpc/client.go index 8eaf40a55..920641295 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -8,7 +8,7 @@ import ( "regexp" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/merkle" diff --git a/mempool/v0/clist_mempool_test.go b/mempool/v0/clist_mempool_test.go index bbb8ea309..5a6150d34 100644 --- a/mempool/v0/clist_mempool_test.go +++ b/mempool/v0/clist_mempool_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" - gogotypes "github.com/gogo/protobuf/types" + "github.com/cosmos/gogoproto/proto" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/p2p/conn/connection.go b/p2p/conn/connection.go index 318297a67..f52fe73f7 100644 --- a/p2p/conn/connection.go +++ b/p2p/conn/connection.go @@ -12,7 +12,7 @@ import ( "sync/atomic" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" flow "github.com/tendermint/tendermint/libs/flowrate" "github.com/tendermint/tendermint/libs/log" diff --git a/p2p/conn/connection_test.go b/p2p/conn/connection_test.go index f59df3dc8..0559fe7a5 100644 --- a/p2p/conn/connection_test.go +++ b/p2p/conn/connection_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" + "github.com/cosmos/gogoproto/proto" "github.com/fortytw2/leaktest" - "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/p2p/conn/evil_secret_connection_test.go b/p2p/conn/evil_secret_connection_test.go index 43e4d8743..320a60ba1 100644 --- a/p2p/conn/evil_secret_connection_test.go +++ b/p2p/conn/evil_secret_connection_test.go @@ -6,7 +6,7 @@ import ( "io" "testing" - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/gtank/merlin" "github.com/stretchr/testify/assert" "golang.org/x/crypto/chacha20poly1305" diff --git a/p2p/conn/secret_connection.go b/p2p/conn/secret_connection.go index 76a93af5f..626f2599c 100644 --- a/p2p/conn/secret_connection.go +++ b/p2p/conn/secret_connection.go @@ -13,7 +13,7 @@ import ( "net" "time" - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/gtank/merlin" pool "github.com/libp2p/go-buffer-pool" "golang.org/x/crypto/chacha20poly1305" diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 0c3ba218d..006f89cd7 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/tendermint/tendermint/libs/cmap" tmmath "github.com/tendermint/tendermint/libs/math" diff --git a/p2p/pex/pex_reactor_test.go b/p2p/pex/pex_reactor_test.go index a552bc098..d5e052e91 100644 --- a/p2p/pex/pex_reactor_test.go +++ b/p2p/pex/pex_reactor_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/privval/file.go b/privval/file.go index ea727e2ad..ad5623915 100644 --- a/privval/file.go +++ b/privval/file.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" diff --git a/privval/msgs.go b/privval/msgs.go index bcfed629b..372e58c84 100644 --- a/privval/msgs.go +++ b/privval/msgs.go @@ -3,7 +3,7 @@ package privval import ( "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" ) diff --git a/privval/msgs_test.go b/privval/msgs_test.go index afefa0e77..9a2cebf1c 100644 --- a/privval/msgs_test.go +++ b/privval/msgs_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" diff --git a/proto/buf.lock b/proto/buf.lock index 8c415e1af..f2b693698 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -2,6 +2,6 @@ version: v1 deps: - remote: buf.build - owner: gogo - repository: protobuf - commit: 4df00b267f944190a229ce3695781e99 + owner: cosmos + repository: gogo-proto + commit: 6652e3443c3b4504bb3bf82e73a7e409 diff --git a/proto/buf.yaml b/proto/buf.yaml index 816db10f7..c6e0660f1 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,6 +1,6 @@ version: v1 deps: - - buf.build/gogo/protobuf + - buf.build/cosmos/gogo-proto breaking: use: - FILE diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index adde41118..a03b6fbf2 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -4,7 +4,7 @@ package tendermint.abci; option go_package = "github.com/tendermint/tendermint/abci/types"; // For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md +// https://github.com/cosmos/gogoproto/blob/master/extensions.md import "tendermint/crypto/proof.proto"; import "tendermint/types/types.proto"; import "tendermint/crypto/keys.proto"; @@ -14,7 +14,7 @@ import "gogoproto/gogo.proto"; // This file is copied from http://github.com/tendermint/abci // NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues +// https://github.com/cosmos/gogoproto/blob/master/custom_types.md#warnings-and-issues //---------------------------------------- // Request types diff --git a/proto/tendermint/blocksync/types.pb.go b/proto/tendermint/blocksync/types.pb.go index fcbef7107..17d76a278 100644 --- a/proto/tendermint/blocksync/types.pb.go +++ b/proto/tendermint/blocksync/types.pb.go @@ -5,7 +5,7 @@ package blocksync import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" diff --git a/proto/tendermint/consensus/types.pb.go b/proto/tendermint/consensus/types.pb.go index 98550a3b2..83eb0d216 100644 --- a/proto/tendermint/consensus/types.pb.go +++ b/proto/tendermint/consensus/types.pb.go @@ -5,8 +5,8 @@ package consensus import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" bits "github.com/tendermint/tendermint/proto/tendermint/libs/bits" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" diff --git a/proto/tendermint/consensus/wal.pb.go b/proto/tendermint/consensus/wal.pb.go index fd80819cd..3a4494941 100644 --- a/proto/tendermint/consensus/wal.pb.go +++ b/proto/tendermint/consensus/wal.pb.go @@ -5,10 +5,10 @@ package consensus import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "github.com/golang/protobuf/ptypes/duration" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" @@ -484,7 +484,7 @@ func (m *TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) if err2 != nil { return 0, err2 } @@ -671,7 +671,7 @@ func (m *TimedWALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err8 != nil { return 0, err8 } @@ -714,7 +714,7 @@ func (m *TimeoutInfo) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovWal(uint64(l)) if m.Height != 0 { n += 1 + sovWal(uint64(m.Height)) @@ -806,7 +806,7 @@ func (m *TimedWALMessage) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovWal(uint64(l)) if m.Msg != nil { l = m.Msg.Size() @@ -994,7 +994,7 @@ func (m *TimeoutInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1393,7 +1393,7 @@ func (m *TimedWALMessage) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/crypto/keys.pb.go b/proto/tendermint/crypto/keys.pb.go index 70cfe16e0..bbd97d446 100644 --- a/proto/tendermint/crypto/keys.pb.go +++ b/proto/tendermint/crypto/keys.pb.go @@ -6,8 +6,8 @@ package crypto import ( bytes "bytes" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/crypto/proof.pb.go b/proto/tendermint/crypto/proof.pb.go index 82fb943fc..7a8315dc7 100644 --- a/proto/tendermint/crypto/proof.pb.go +++ b/proto/tendermint/crypto/proof.pb.go @@ -5,8 +5,8 @@ package crypto import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/libs/bits/types.pb.go b/proto/tendermint/libs/bits/types.pb.go index c0ebcb976..ccaee7053 100644 --- a/proto/tendermint/libs/bits/types.pb.go +++ b/proto/tendermint/libs/bits/types.pb.go @@ -5,7 +5,7 @@ package bits import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/mempool/types.pb.go b/proto/tendermint/mempool/types.pb.go index 11e259551..f7d16a64c 100644 --- a/proto/tendermint/mempool/types.pb.go +++ b/proto/tendermint/mempool/types.pb.go @@ -5,7 +5,7 @@ package mempool import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/p2p/conn.pb.go b/proto/tendermint/p2p/conn.pb.go index 47a3bb0cd..dccdbe4a0 100644 --- a/proto/tendermint/p2p/conn.pb.go +++ b/proto/tendermint/p2p/conn.pb.go @@ -5,8 +5,8 @@ package p2p import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" diff --git a/proto/tendermint/p2p/pex.pb.go b/proto/tendermint/p2p/pex.pb.go index b4a39fe98..19ff524d9 100644 --- a/proto/tendermint/p2p/pex.pb.go +++ b/proto/tendermint/p2p/pex.pb.go @@ -5,8 +5,8 @@ package p2p import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/p2p/types.pb.go b/proto/tendermint/p2p/types.pb.go index ed7116149..3f2ff71da 100644 --- a/proto/tendermint/p2p/types.pb.go +++ b/proto/tendermint/p2p/types.pb.go @@ -5,8 +5,8 @@ package p2p import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/privval/types.pb.go b/proto/tendermint/privval/types.pb.go index ef28890c8..de598e318 100644 --- a/proto/tendermint/privval/types.pb.go +++ b/proto/tendermint/privval/types.pb.go @@ -5,8 +5,8 @@ package privval import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" diff --git a/proto/tendermint/rpc/grpc/types.pb.go b/proto/tendermint/rpc/grpc/types.pb.go index b9cbee03f..6d0fecf0b 100644 --- a/proto/tendermint/rpc/grpc/types.pb.go +++ b/proto/tendermint/rpc/grpc/types.pb.go @@ -6,7 +6,8 @@ package coregrpc import ( context "context" fmt "fmt" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -245,10 +246,10 @@ type BroadcastAPIClient interface { } type broadcastAPIClient struct { - cc *grpc.ClientConn + cc grpc1.ClientConn } -func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { +func NewBroadcastAPIClient(cc grpc1.ClientConn) BroadcastAPIClient { return &broadcastAPIClient{cc} } @@ -287,7 +288,7 @@ func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *Re return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") } -func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { +func RegisterBroadcastAPIServer(s grpc1.Server, srv BroadcastAPIServer) { s.RegisterService(&_BroadcastAPI_serviceDesc, srv) } diff --git a/proto/tendermint/state/types.pb.go b/proto/tendermint/state/types.pb.go index 6b57ca1ae..d5620344b 100644 --- a/proto/tendermint/state/types.pb.go +++ b/proto/tendermint/state/types.pb.go @@ -5,10 +5,10 @@ package state import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" types "github.com/tendermint/tendermint/abci/types" types1 "github.com/tendermint/tendermint/proto/tendermint/types" version "github.com/tendermint/tendermint/proto/tendermint/version" @@ -843,7 +843,7 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) + n11, err11 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastBlockTime):]) if err11 != nil { return 0, err11 } @@ -998,7 +998,7 @@ func (m *State) Size() (n int) { } l = m.LastBlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastBlockTime) n += 1 + l + sovTypes(uint64(l)) if m.NextValidators != nil { l = m.NextValidators.Size() @@ -1798,7 +1798,7 @@ func (m *State) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/statesync/types.pb.go b/proto/tendermint/statesync/types.pb.go index 8391e0ead..147e0f7d4 100644 --- a/proto/tendermint/statesync/types.pb.go +++ b/proto/tendermint/statesync/types.pb.go @@ -5,7 +5,7 @@ package statesync import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/store/types.pb.go b/proto/tendermint/store/types.pb.go index 384fbe52a..85c7dec6c 100644 --- a/proto/tendermint/store/types.pb.go +++ b/proto/tendermint/store/types.pb.go @@ -5,7 +5,7 @@ package store import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/block.pb.go b/proto/tendermint/types/block.pb.go index f2077aad8..59c17fe40 100644 --- a/proto/tendermint/types/block.pb.go +++ b/proto/tendermint/types/block.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/canonical.pb.go b/proto/tendermint/types/canonical.pb.go index 709831043..5d3d4ce3a 100644 --- a/proto/tendermint/types/canonical.pb.go +++ b/proto/tendermint/types/canonical.pb.go @@ -6,10 +6,10 @@ package types import ( encoding_binary "encoding/binary" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" @@ -454,7 +454,7 @@ func (m *CanonicalProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err2 != nil { return 0, err2 } @@ -526,7 +526,7 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err4 != nil { return 0, err4 } @@ -630,7 +630,7 @@ func (m *CanonicalProposal) Size() (n int) { l = m.BlockID.Size() n += 1 + l + sovCanonical(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovCanonical(uint64(l)) l = len(m.ChainID) if l > 0 { @@ -658,7 +658,7 @@ func (m *CanonicalVote) Size() (n int) { l = m.BlockID.Size() n += 1 + l + sovCanonical(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovCanonical(uint64(l)) l = len(m.ChainID) if l > 0 { @@ -1045,7 +1045,7 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1235,7 +1235,7 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/events.pb.go b/proto/tendermint/types/events.pb.go index a9aa26a79..127efe976 100644 --- a/proto/tendermint/types/events.pb.go +++ b/proto/tendermint/types/events.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/evidence.pb.go b/proto/tendermint/types/evidence.pb.go index daab3dc34..37899ac8b 100644 --- a/proto/tendermint/types/evidence.pb.go +++ b/proto/tendermint/types/evidence.pb.go @@ -5,10 +5,10 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" @@ -451,7 +451,7 @@ func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err3 != nil { return 0, err3 } @@ -516,7 +516,7 @@ func (m *LightClientAttackEvidence) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err6 != nil { return 0, err6 } @@ -667,7 +667,7 @@ func (m *DuplicateVoteEvidence) Size() (n int) { if m.ValidatorPower != 0 { n += 1 + sovEvidence(uint64(m.ValidatorPower)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovEvidence(uint64(l)) return n } @@ -694,7 +694,7 @@ func (m *LightClientAttackEvidence) Size() (n int) { if m.TotalVotingPower != 0 { n += 1 + sovEvidence(uint64(m.TotalVotingPower)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovEvidence(uint64(l)) return n } @@ -1008,7 +1008,7 @@ func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1199,7 +1199,7 @@ func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/params.pb.go b/proto/tendermint/types/params.pb.go index 4a576f57d..3d57b852c 100644 --- a/proto/tendermint/types/params.pb.go +++ b/proto/tendermint/types/params.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "github.com/golang/protobuf/ptypes/duration" io "io" math "math" @@ -720,7 +720,7 @@ func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxAgeDuration):]) if err5 != nil { return 0, err5 } @@ -981,7 +981,7 @@ func (m *EvidenceParams) Size() (n int) { if m.MaxAgeNumBlocks != 0 { n += 1 + sovParams(uint64(m.MaxAgeNumBlocks)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxAgeDuration) n += 1 + l + sovParams(uint64(l)) if m.MaxBytes != 0 { n += 1 + sovParams(uint64(m.MaxBytes)) @@ -1396,7 +1396,7 @@ func (m *EvidenceParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index 73090558e..11edb847f 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -5,10 +5,10 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" version "github.com/tendermint/tendermint/proto/tendermint/version" io "io" @@ -1348,7 +1348,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) if err4 != nil { return 0, err4 } @@ -1452,7 +1452,7 @@ func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err6 != nil { return 0, err6 } @@ -1572,7 +1572,7 @@ func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err9 != nil { return 0, err9 } @@ -1622,7 +1622,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) if err10 != nil { return 0, err10 } @@ -1934,7 +1934,7 @@ func (m *Header) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = m.LastBlockId.Size() n += 1 + l + sovTypes(uint64(l)) @@ -2009,7 +2009,7 @@ func (m *Vote) Size() (n int) { } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.ValidatorAddress) if l > 0 { @@ -2061,7 +2061,7 @@ func (m *CommitSig) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { @@ -2090,7 +2090,7 @@ func (m *Proposal) Size() (n int) { } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { @@ -2677,7 +2677,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3271,7 +3271,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3649,7 +3649,7 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3875,7 +3875,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/validator.pb.go b/proto/tendermint/types/validator.pb.go index 23b30ed3c..c3d39b73c 100644 --- a/proto/tendermint/types/validator.pb.go +++ b/proto/tendermint/types/validator.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" diff --git a/proto/tendermint/version/types.pb.go b/proto/tendermint/version/types.pb.go index 415869b03..81aa55fdd 100644 --- a/proto/tendermint/version/types.pb.go +++ b/proto/tendermint/version/types.pb.go @@ -5,8 +5,8 @@ package version import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index b9cbee03f..6d0fecf0b 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -6,7 +6,8 @@ package coregrpc import ( context "context" fmt "fmt" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -245,10 +246,10 @@ type BroadcastAPIClient interface { } type broadcastAPIClient struct { - cc *grpc.ClientConn + cc grpc1.ClientConn } -func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { +func NewBroadcastAPIClient(cc grpc1.ClientConn) BroadcastAPIClient { return &broadcastAPIClient{cc} } @@ -287,7 +288,7 @@ func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *Re return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") } -func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { +func RegisterBroadcastAPIServer(s grpc1.Server, srv BroadcastAPIServer) { s.RegisterService(&_BroadcastAPI_serviceDesc, srv) } diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 06fa07dd9..95198cf4e 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -14,6 +14,6 @@ docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.18-alpine sh <<"EOF" apk add git make go install github.com/bufbuild/buf/cmd/buf -go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest +go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest make proto-gen EOF diff --git a/state/indexer/sink/psql/psql.go b/state/indexer/sink/psql/psql.go index 04e936c88..29d452a7c 100644 --- a/state/indexer/sink/psql/psql.go +++ b/state/indexer/sink/psql/psql.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/state/indexer/sink/psql/psql_test.go b/state/indexer/sink/psql/psql_test.go index af60b96ae..b42a30e96 100644 --- a/state/indexer/sink/psql/psql_test.go +++ b/state/indexer/sink/psql/psql_test.go @@ -12,7 +12,7 @@ import ( "time" "github.com/adlio/schema" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/ory/dockertest" "github.com/ory/dockertest/docker" "github.com/stretchr/testify/assert" diff --git a/state/state.go b/state/state.go index b1c4c2926..3e0d89392 100644 --- a/state/state.go +++ b/state/state.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" tmversion "github.com/tendermint/tendermint/proto/tendermint/version" diff --git a/state/store.go b/state/store.go index 44111ceee..e826f565d 100644 --- a/state/store.go +++ b/state/store.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index a0cb0f333..28a26664f 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index bbe210cb6..5ccae0bfd 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/statesync/messages.go b/statesync/messages.go index b07227bbf..901036a7a 100644 --- a/statesync/messages.go +++ b/statesync/messages.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" ) diff --git a/statesync/messages_test.go b/statesync/messages_test.go index 2a05f8d79..7bfdcb6ac 100644 --- a/statesync/messages_test.go +++ b/statesync/messages_test.go @@ -4,7 +4,7 @@ import ( "encoding/hex" "testing" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" diff --git a/store/store.go b/store/store.go index 312317021..866965ac6 100644 --- a/store/store.go +++ b/store/store.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" dbm "github.com/tendermint/tm-db" tmsync "github.com/tendermint/tendermint/libs/sync" diff --git a/store/store_test.go b/store/store_test.go index a7dcb7cf5..06dab4767 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" diff --git a/third_party/proto/gogoproto/README.md b/third_party/proto/gogoproto/README.md new file mode 100644 index 000000000..3852d578d --- /dev/null +++ b/third_party/proto/gogoproto/README.md @@ -0,0 +1,3 @@ +# Buf + +This file is now stored in the buf registry at [buf.build/cosmos/gogo-proto](https://buf.build/cosmos/gogo-proto). diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto deleted file mode 100644 index 27960ecfb..000000000 --- a/third_party/proto/gogoproto/gogo.proto +++ /dev/null @@ -1,147 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copied from https://github.com/gogo/protobuf/blob/master/gogoproto/gogo.proto -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -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; -} - -extend google.protobuf.EnumValueOptions { - 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; -} - -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 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 unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - 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; -} \ No newline at end of file diff --git a/tools/proto/Dockerfile b/tools/proto/Dockerfile index 500822690..bd2d486a3 100644 --- a/tools/proto/Dockerfile +++ b/tools/proto/Dockerfile @@ -6,12 +6,12 @@ RUN apk add --update --no-cache build-base curl git upx && \ rm -rf /var/cache/apk/* ENV GOLANG_PROTOBUF_VERSION=1.3.1 \ - GOGO_PROTOBUF_VERSION=1.3.2 + GOGOPROTO_VERSION=1.4.1 RUN GO111MODULE=on go get \ github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \ - github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} && \ + github.com/cosmos/gogoproto/protoc-gen-gogo@v${GOGOPROTO_VERSION} \ + github.com/cosmos/gogoproto/protoc-gen-gogofaster@v${GOGOPROTO_VERSION} && \ mv /go/bin/protoc-gen-go* /usr/local/bin/ diff --git a/types/block.go b/types/block.go index 82a956324..e4f4ae57f 100644 --- a/types/block.go +++ b/types/block.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/gogo/protobuf/proto" - gogotypes "github.com/gogo/protobuf/types" + "github.com/cosmos/gogoproto/proto" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/merkle" diff --git a/types/block_test.go b/types/block_test.go index ee8ce9c77..cbc4cf65a 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/types/encoding_helper.go b/types/encoding_helper.go index 630b088ce..69661cb31 100644 --- a/types/encoding_helper.go +++ b/types/encoding_helper.go @@ -1,7 +1,7 @@ package types import ( - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" "github.com/tendermint/tendermint/libs/bytes" ) diff --git a/types/proposal_test.go b/types/proposal_test.go index 71d4d62cc..e8d998cf7 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/types/vote_test.go b/types/vote_test.go index 51e20cd7a..927b9abc5 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require"