From e194e144efbdd4f0df756e2d85bc531b5a7cddea Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 13 Jan 2020 20:21:29 +0000 Subject: [PATCH 1/3] [build] upgrade to 1.13 for travis build Signed-off-by: Leo Chen --- .travis.yml | 2 +- go.mod | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b9eabd67f..a8111a5eb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.12 + - 1.13 go_import_path: github.com/harmony-one/harmony install: - export GO111MODULE=on diff --git a/go.mod b/go.mod index 65efc47ddc..67831c530e 100644 --- a/go.mod +++ b/go.mod @@ -18,12 +18,12 @@ require ( github.com/garslo/gogen v0.0.0-20170307003452-d6ebae628c7c // indirect github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.1 - github.com/golangci/golangci-lint v1.17.1 + github.com/golangci/golangci-lint v1.22.2 github.com/gorilla/handlers v1.4.0 github.com/gorilla/mux v1.7.2 github.com/harmony-ek/gencodec v0.0.0-20190215044613-e6740dbdd846 github.com/harmony-one/bls v0.0.5 - github.com/harmony-one/taggedrlp v0.1.2 + github.com/harmony-one/taggedrlp v0.1.3 github.com/harmony-one/vdf v0.0.0-20190924175951-620379da8849 github.com/hashicorp/golang-lru v0.5.1 github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 From 6756a692938c228d1494ca1b1a61e570bc2938ad Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 13 Jan 2020 21:52:41 +0000 Subject: [PATCH 2/3] [go.mod] update go.mod to pass travis Signed-off-by: Leo Chen --- go.mod | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 67831c530e..e8b979b626 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/harmony-one/harmony -go 1.12 +go 1.13 require ( github.com/Workiva/go-datastructures v1.0.50 @@ -17,13 +17,13 @@ require ( github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a github.com/garslo/gogen v0.0.0-20170307003452-d6ebae628c7c // indirect github.com/golang/mock v1.3.1 - github.com/golang/protobuf v1.3.1 + github.com/golang/protobuf v1.3.2 github.com/golangci/golangci-lint v1.22.2 github.com/gorilla/handlers v1.4.0 github.com/gorilla/mux v1.7.2 github.com/harmony-ek/gencodec v0.0.0-20190215044613-e6740dbdd846 github.com/harmony-one/bls v0.0.5 - github.com/harmony-one/taggedrlp v0.1.3 + github.com/harmony-one/taggedrlp v0.1.4 github.com/harmony-one/vdf v0.0.0-20190924175951-620379da8849 github.com/hashicorp/golang-lru v0.5.1 github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 @@ -46,26 +46,23 @@ require ( github.com/natefinch/lumberjack v2.0.0+incompatible github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.8.1 - github.com/prometheus/client_golang v0.9.2 + github.com/prometheus/client_golang v0.9.3 github.com/prometheus/common v0.4.1 // indirect github.com/prometheus/procfs v0.0.3 // indirect github.com/rjeczalik/notify v0.9.2 github.com/rs/cors v1.7.0 // indirect github.com/rs/zerolog v1.14.3 github.com/shirou/gopsutil v2.18.12+incompatible - github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect github.com/spf13/cobra v0.0.5 - github.com/stretchr/testify v1.3.0 + github.com/stretchr/testify v1.4.0 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc - golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443 + golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 golang.org/x/lint v0.0.0-20190409202823-959b441ac422 - golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 // indirect - golang.org/x/tools v0.0.0-20190924052046-3ac2a5bbd98a - google.golang.org/appengine v1.4.0 // indirect + golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a google.golang.org/grpc v1.22.0 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 - gopkg.in/ini.v1 v1.42.0 + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 + gopkg.in/ini.v1 v1.51.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/urfave/cli.v1 v1.20.0 // indirect From 3a10a9feebbceb85d875b41489b3938dea5cc5f8 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 13 Jan 2020 22:09:49 +0000 Subject: [PATCH 3/3] [protobuf] update pb.go after protobuf upgrade to v1.3.2 Signed-off-by: Leo Chen --- api/client/service/proto/client.pb.go | 13 +++++++++++++ api/proto/message/message.pb.go | 10 ++++++++++ .../syncing/downloader/proto/downloader.pb.go | 10 ++++++++++ 3 files changed, 33 insertions(+) diff --git a/api/client/service/proto/client.pb.go b/api/client/service/proto/client.pb.go index cc2b024008..b14494dc80 100644 --- a/api/client/service/proto/client.pb.go +++ b/api/client/service/proto/client.pb.go @@ -8,6 +8,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" math "math" ) @@ -271,6 +273,17 @@ type ClientServiceServer interface { GetFreeToken(context.Context, *GetFreeTokenRequest) (*GetFreeTokenResponse, error) } +// UnimplementedClientServiceServer can be embedded to have forward compatible implementations. +type UnimplementedClientServiceServer struct { +} + +func (*UnimplementedClientServiceServer) FetchAccountState(ctx context.Context, req *FetchAccountStateRequest) (*FetchAccountStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchAccountState not implemented") +} +func (*UnimplementedClientServiceServer) GetFreeToken(ctx context.Context, req *GetFreeTokenRequest) (*GetFreeTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFreeToken not implemented") +} + func RegisterClientServiceServer(s *grpc.Server, srv ClientServiceServer) { s.RegisterService(&_ClientService_serviceDesc, srv) } diff --git a/api/proto/message/message.pb.go b/api/proto/message/message.pb.go index b4eb2e404a..0005111af5 100644 --- a/api/proto/message/message.pb.go +++ b/api/proto/message/message.pb.go @@ -8,6 +8,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" math "math" ) @@ -916,6 +918,14 @@ type ClientServiceServer interface { Process(context.Context, *Message) (*Response, error) } +// UnimplementedClientServiceServer can be embedded to have forward compatible implementations. +type UnimplementedClientServiceServer struct { +} + +func (*UnimplementedClientServiceServer) Process(ctx context.Context, req *Message) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method Process not implemented") +} + func RegisterClientServiceServer(s *grpc.Server, srv ClientServiceServer) { s.RegisterService(&_ClientService_serviceDesc, srv) } diff --git a/api/service/syncing/downloader/proto/downloader.pb.go b/api/service/syncing/downloader/proto/downloader.pb.go index 03e39db71c..2cd167c24c 100644 --- a/api/service/syncing/downloader/proto/downloader.pb.go +++ b/api/service/syncing/downloader/proto/downloader.pb.go @@ -8,6 +8,8 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" math "math" ) @@ -317,6 +319,14 @@ type DownloaderServer interface { Query(context.Context, *DownloaderRequest) (*DownloaderResponse, error) } +// UnimplementedDownloaderServer can be embedded to have forward compatible implementations. +type UnimplementedDownloaderServer struct { +} + +func (*UnimplementedDownloaderServer) Query(ctx context.Context, req *DownloaderRequest) (*DownloaderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") +} + func RegisterDownloaderServer(s *grpc.Server, srv DownloaderServer) { s.RegisterService(&_Downloader_serviceDesc, srv) }