diff --git a/.github/workflows/buf-lint.yml b/.github/workflows/buf-lint.yml index ac695f9cc5c3..6fdf938ff3e8 100644 --- a/.github/workflows/buf-lint.yml +++ b/.github/workflows/buf-lint.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.11.0 + - uses: bufbuild/buf-setup-action@v1.19.0 with: github_token: ${{ github.token }} - uses: bufbuild/buf-lint-action@v1 diff --git a/go.mod b/go.mod index b6c09c773f7c..413347fdb575 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( gonum.org/v1/gonum v0.11.0 google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c google.golang.org/grpc v1.50.1 - google.golang.org/protobuf v1.28.1 + google.golang.org/protobuf v1.30.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) diff --git a/go.sum b/go.sum index 8efb22365e9b..836fb8c766af 100644 --- a/go.sum +++ b/go.sum @@ -864,8 +864,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/README.md b/proto/README.md index 81412ec3359f..a0013e8cc0a7 100644 --- a/proto/README.md +++ b/proto/README.md @@ -2,17 +2,36 @@ Now Serving: **Protocol Version 26** -Protobuf files are hosted at [https://buf.build/ava-labs/avalanche](https://buf.build/ava-labs/avalanche) and can be used as dependencies in other projects. +Protobuf files are hosted at +[https://buf.build/ava-labs/avalanche](https://buf.build/ava-labs/avalanche) and +can be used as dependencies in other projects. -Protobuf linting and generation for this project is managed by [buf](https://github.com/bufbuild/buf). +Protobuf linting and generation for this project is managed by +[buf](https://github.com/bufbuild/buf). -Please find installation instructions on [https://docs.buf.build/installation/](https://docs.buf.build/installation/) or use `Dockerfile.buf` provided in the `proto/` directory of AvalancheGo. +Please find installation instructions on +[https://docs.buf.build/installation/](https://docs.buf.build/installation/) or +use `Dockerfile.buf` provided in the `proto/` directory of AvalancheGo. -Any changes made to proto definition can be updated by running `protobuf_codegen.sh` located in the `scripts/` directory of AvalancheGo. +Any changes made to proto definition can be updated by running +`protobuf_codegen.sh` located in the `scripts/` directory of AvalancheGo. -Introduction to `buf` [https://docs.buf.build/tour/introduction](https://docs.buf.build/tour/introduction) +Introduction to `buf` +[https://docs.buf.build/tour/introduction](https://docs.buf.build/tour/introduction) ## Protocol Version Compatibility -The protobuf definitions and generated code are versioned based on the [RPCChainVMProtocol](../version/version.go#L13) defined for the RPCChainVM. -Many versions of an Avalanche client can use the same [RPCChainVMProtocol](../version/version.go#L13). But each Avalanche client and subnet vm must use the same protocol version to be compatible. +The protobuf definitions and generated code are versioned based on the +[RPCChainVMProtocol](../version/version.go#L13) defined for the RPCChainVM. +Many versions of an Avalanche client can use the same +[RPCChainVMProtocol](../version/version.go#L13). But each Avalanche client and +subnet vm must use the same protocol version to be compatible. + +## Publishing to Buf Schema Registry + +- Checkout appropriate tag in AvalancheGo `git checkout v1.10.1` +- Change to proto/ directory `cd proto`. +- Publish new tag to buf registry. `buf push -t v26` + +Note: Publishing requires auth to the ava-labs org in buf +https://buf.build/ava-labs/repositories \ No newline at end of file diff --git a/proto/pb/aliasreader/aliasreader.pb.go b/proto/pb/aliasreader/aliasreader.pb.go index 568868607957..20084292d030 100644 --- a/proto/pb/aliasreader/aliasreader.pb.go +++ b/proto/pb/aliasreader/aliasreader.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: aliasreader/aliasreader.proto diff --git a/proto/pb/aliasreader/aliasreader_grpc.pb.go b/proto/pb/aliasreader/aliasreader_grpc.pb.go index 030e6851d622..9c4238736006 100644 --- a/proto/pb/aliasreader/aliasreader_grpc.pb.go +++ b/proto/pb/aliasreader/aliasreader_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: aliasreader/aliasreader.proto @@ -18,6 +18,12 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + AliasReader_Lookup_FullMethodName = "/aliasreader.AliasReader/Lookup" + AliasReader_PrimaryAlias_FullMethodName = "/aliasreader.AliasReader/PrimaryAlias" + AliasReader_Aliases_FullMethodName = "/aliasreader.AliasReader/Aliases" +) + // AliasReaderClient is the client API for AliasReader service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -37,7 +43,7 @@ func NewAliasReaderClient(cc grpc.ClientConnInterface) AliasReaderClient { func (c *aliasReaderClient) Lookup(ctx context.Context, in *Alias, opts ...grpc.CallOption) (*ID, error) { out := new(ID) - err := c.cc.Invoke(ctx, "/aliasreader.AliasReader/Lookup", in, out, opts...) + err := c.cc.Invoke(ctx, AliasReader_Lookup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -46,7 +52,7 @@ func (c *aliasReaderClient) Lookup(ctx context.Context, in *Alias, opts ...grpc. func (c *aliasReaderClient) PrimaryAlias(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Alias, error) { out := new(Alias) - err := c.cc.Invoke(ctx, "/aliasreader.AliasReader/PrimaryAlias", in, out, opts...) + err := c.cc.Invoke(ctx, AliasReader_PrimaryAlias_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -55,7 +61,7 @@ func (c *aliasReaderClient) PrimaryAlias(ctx context.Context, in *ID, opts ...gr func (c *aliasReaderClient) Aliases(ctx context.Context, in *ID, opts ...grpc.CallOption) (*AliasList, error) { out := new(AliasList) - err := c.cc.Invoke(ctx, "/aliasreader.AliasReader/Aliases", in, out, opts...) + err := c.cc.Invoke(ctx, AliasReader_Aliases_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -108,7 +114,7 @@ func _AliasReader_Lookup_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aliasreader.AliasReader/Lookup", + FullMethod: AliasReader_Lookup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AliasReaderServer).Lookup(ctx, req.(*Alias)) @@ -126,7 +132,7 @@ func _AliasReader_PrimaryAlias_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aliasreader.AliasReader/PrimaryAlias", + FullMethod: AliasReader_PrimaryAlias_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AliasReaderServer).PrimaryAlias(ctx, req.(*ID)) @@ -144,7 +150,7 @@ func _AliasReader_Aliases_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aliasreader.AliasReader/Aliases", + FullMethod: AliasReader_Aliases_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AliasReaderServer).Aliases(ctx, req.(*ID)) diff --git a/proto/pb/appsender/appsender.pb.go b/proto/pb/appsender/appsender.pb.go index 609d30a186c8..7bae1df845a2 100644 --- a/proto/pb/appsender/appsender.pb.go +++ b/proto/pb/appsender/appsender.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: appsender/appsender.proto diff --git a/proto/pb/appsender/appsender_grpc.pb.go b/proto/pb/appsender/appsender_grpc.pb.go index 4ef890e65d3c..edfc5d1db862 100644 --- a/proto/pb/appsender/appsender_grpc.pb.go +++ b/proto/pb/appsender/appsender_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: appsender/appsender.proto @@ -19,6 +19,15 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + AppSender_SendAppRequest_FullMethodName = "/appsender.AppSender/SendAppRequest" + AppSender_SendAppResponse_FullMethodName = "/appsender.AppSender/SendAppResponse" + AppSender_SendAppGossip_FullMethodName = "/appsender.AppSender/SendAppGossip" + AppSender_SendAppGossipSpecific_FullMethodName = "/appsender.AppSender/SendAppGossipSpecific" + AppSender_SendCrossChainAppRequest_FullMethodName = "/appsender.AppSender/SendCrossChainAppRequest" + AppSender_SendCrossChainAppResponse_FullMethodName = "/appsender.AppSender/SendCrossChainAppResponse" +) + // AppSenderClient is the client API for AppSender service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -41,7 +50,7 @@ func NewAppSenderClient(cc grpc.ClientConnInterface) AppSenderClient { func (c *appSenderClient) SendAppRequest(ctx context.Context, in *SendAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendAppRequest", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendAppRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -50,7 +59,7 @@ func (c *appSenderClient) SendAppRequest(ctx context.Context, in *SendAppRequest func (c *appSenderClient) SendAppResponse(ctx context.Context, in *SendAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendAppResponse", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendAppResponse_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -59,7 +68,7 @@ func (c *appSenderClient) SendAppResponse(ctx context.Context, in *SendAppRespon func (c *appSenderClient) SendAppGossip(ctx context.Context, in *SendAppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendAppGossip", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendAppGossip_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -68,7 +77,7 @@ func (c *appSenderClient) SendAppGossip(ctx context.Context, in *SendAppGossipMs func (c *appSenderClient) SendAppGossipSpecific(ctx context.Context, in *SendAppGossipSpecificMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendAppGossipSpecific", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendAppGossipSpecific_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,7 +86,7 @@ func (c *appSenderClient) SendAppGossipSpecific(ctx context.Context, in *SendApp func (c *appSenderClient) SendCrossChainAppRequest(ctx context.Context, in *SendCrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendCrossChainAppRequest", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendCrossChainAppRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -86,7 +95,7 @@ func (c *appSenderClient) SendCrossChainAppRequest(ctx context.Context, in *Send func (c *appSenderClient) SendCrossChainAppResponse(ctx context.Context, in *SendCrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/appsender.AppSender/SendCrossChainAppResponse", in, out, opts...) + err := c.cc.Invoke(ctx, AppSender_SendCrossChainAppResponse_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -151,7 +160,7 @@ func _AppSender_SendAppRequest_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendAppRequest", + FullMethod: AppSender_SendAppRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendAppRequest(ctx, req.(*SendAppRequestMsg)) @@ -169,7 +178,7 @@ func _AppSender_SendAppResponse_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendAppResponse", + FullMethod: AppSender_SendAppResponse_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendAppResponse(ctx, req.(*SendAppResponseMsg)) @@ -187,7 +196,7 @@ func _AppSender_SendAppGossip_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendAppGossip", + FullMethod: AppSender_SendAppGossip_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendAppGossip(ctx, req.(*SendAppGossipMsg)) @@ -205,7 +214,7 @@ func _AppSender_SendAppGossipSpecific_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendAppGossipSpecific", + FullMethod: AppSender_SendAppGossipSpecific_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendAppGossipSpecific(ctx, req.(*SendAppGossipSpecificMsg)) @@ -223,7 +232,7 @@ func _AppSender_SendCrossChainAppRequest_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendCrossChainAppRequest", + FullMethod: AppSender_SendCrossChainAppRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendCrossChainAppRequest(ctx, req.(*SendCrossChainAppRequestMsg)) @@ -241,7 +250,7 @@ func _AppSender_SendCrossChainAppResponse_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/appsender.AppSender/SendCrossChainAppResponse", + FullMethod: AppSender_SendCrossChainAppResponse_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AppSenderServer).SendCrossChainAppResponse(ctx, req.(*SendCrossChainAppResponseMsg)) diff --git a/proto/pb/http/http.pb.go b/proto/pb/http/http.pb.go index fca441324fd7..76b6d916d9bb 100644 --- a/proto/pb/http/http.pb.go +++ b/proto/pb/http/http.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: http/http.proto diff --git a/proto/pb/http/http_grpc.pb.go b/proto/pb/http/http_grpc.pb.go index bdea7061b957..f83ec6c1caa6 100644 --- a/proto/pb/http/http_grpc.pb.go +++ b/proto/pb/http/http_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: http/http.proto @@ -19,6 +19,11 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + HTTP_Handle_FullMethodName = "/http.HTTP/Handle" + HTTP_HandleSimple_FullMethodName = "/http.HTTP/HandleSimple" +) + // HTTPClient is the client API for HTTP service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -43,7 +48,7 @@ func NewHTTPClient(cc grpc.ClientConnInterface) HTTPClient { func (c *hTTPClient) Handle(ctx context.Context, in *HTTPRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/http.HTTP/Handle", in, out, opts...) + err := c.cc.Invoke(ctx, HTTP_Handle_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -52,7 +57,7 @@ func (c *hTTPClient) Handle(ctx context.Context, in *HTTPRequest, opts ...grpc.C func (c *hTTPClient) HandleSimple(ctx context.Context, in *HandleSimpleHTTPRequest, opts ...grpc.CallOption) (*HandleSimpleHTTPResponse, error) { out := new(HandleSimpleHTTPResponse) - err := c.cc.Invoke(ctx, "/http.HTTP/HandleSimple", in, out, opts...) + err := c.cc.Invoke(ctx, HTTP_HandleSimple_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -107,7 +112,7 @@ func _HTTP_Handle_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.HTTP/Handle", + FullMethod: HTTP_Handle_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HTTPServer).Handle(ctx, req.(*HTTPRequest)) @@ -125,7 +130,7 @@ func _HTTP_HandleSimple_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.HTTP/HandleSimple", + FullMethod: HTTP_HandleSimple_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HTTPServer).HandleSimple(ctx, req.(*HandleSimpleHTTPRequest)) diff --git a/proto/pb/http/responsewriter/responsewriter.pb.go b/proto/pb/http/responsewriter/responsewriter.pb.go index 348a1086d76c..a49113f3bb5a 100644 --- a/proto/pb/http/responsewriter/responsewriter.pb.go +++ b/proto/pb/http/responsewriter/responsewriter.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: http/responsewriter/responsewriter.proto diff --git a/proto/pb/http/responsewriter/responsewriter_grpc.pb.go b/proto/pb/http/responsewriter/responsewriter_grpc.pb.go index 8e3f438c1ca0..751770738751 100644 --- a/proto/pb/http/responsewriter/responsewriter_grpc.pb.go +++ b/proto/pb/http/responsewriter/responsewriter_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: http/responsewriter/responsewriter.proto @@ -19,6 +19,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Writer_Write_FullMethodName = "/http.responsewriter.Writer/Write" + Writer_WriteHeader_FullMethodName = "/http.responsewriter.Writer/WriteHeader" + Writer_Flush_FullMethodName = "/http.responsewriter.Writer/Flush" + Writer_Hijack_FullMethodName = "/http.responsewriter.Writer/Hijack" +) + // WriterClient is the client API for Writer service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -44,7 +51,7 @@ func NewWriterClient(cc grpc.ClientConnInterface) WriterClient { func (c *writerClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { out := new(WriteResponse) - err := c.cc.Invoke(ctx, "/http.responsewriter.Writer/Write", in, out, opts...) + err := c.cc.Invoke(ctx, Writer_Write_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -53,7 +60,7 @@ func (c *writerClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc func (c *writerClient) WriteHeader(ctx context.Context, in *WriteHeaderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/http.responsewriter.Writer/WriteHeader", in, out, opts...) + err := c.cc.Invoke(ctx, Writer_WriteHeader_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -62,7 +69,7 @@ func (c *writerClient) WriteHeader(ctx context.Context, in *WriteHeaderRequest, func (c *writerClient) Flush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/http.responsewriter.Writer/Flush", in, out, opts...) + err := c.cc.Invoke(ctx, Writer_Flush_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -71,7 +78,7 @@ func (c *writerClient) Flush(ctx context.Context, in *emptypb.Empty, opts ...grp func (c *writerClient) Hijack(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HijackResponse, error) { out := new(HijackResponse) - err := c.cc.Invoke(ctx, "/http.responsewriter.Writer/Hijack", in, out, opts...) + err := c.cc.Invoke(ctx, Writer_Hijack_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -133,7 +140,7 @@ func _Writer_Write_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.responsewriter.Writer/Write", + FullMethod: Writer_Write_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriterServer).Write(ctx, req.(*WriteRequest)) @@ -151,7 +158,7 @@ func _Writer_WriteHeader_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.responsewriter.Writer/WriteHeader", + FullMethod: Writer_WriteHeader_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriterServer).WriteHeader(ctx, req.(*WriteHeaderRequest)) @@ -169,7 +176,7 @@ func _Writer_Flush_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.responsewriter.Writer/Flush", + FullMethod: Writer_Flush_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriterServer).Flush(ctx, req.(*emptypb.Empty)) @@ -187,7 +194,7 @@ func _Writer_Hijack_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/http.responsewriter.Writer/Hijack", + FullMethod: Writer_Hijack_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriterServer).Hijack(ctx, req.(*emptypb.Empty)) diff --git a/proto/pb/io/reader/reader.pb.go b/proto/pb/io/reader/reader.pb.go index fc1d0d12ddbe..34977aa39422 100644 --- a/proto/pb/io/reader/reader.pb.go +++ b/proto/pb/io/reader/reader.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: io/reader/reader.proto diff --git a/proto/pb/io/reader/reader_grpc.pb.go b/proto/pb/io/reader/reader_grpc.pb.go index 55e3e2db52f7..d3cf973083d3 100644 --- a/proto/pb/io/reader/reader_grpc.pb.go +++ b/proto/pb/io/reader/reader_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: io/reader/reader.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Reader_Read_FullMethodName = "/io.reader.Reader/Read" +) + // ReaderClient is the client API for Reader service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -35,7 +39,7 @@ func NewReaderClient(cc grpc.ClientConnInterface) ReaderClient { func (c *readerClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) { out := new(ReadResponse) - err := c.cc.Invoke(ctx, "/io.reader.Reader/Read", in, out, opts...) + err := c.cc.Invoke(ctx, Reader_Read_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _Reader_Read_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/io.reader.Reader/Read", + FullMethod: Reader_Read_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReaderServer).Read(ctx, req.(*ReadRequest)) diff --git a/proto/pb/io/writer/writer.pb.go b/proto/pb/io/writer/writer.pb.go index afd1092ff713..850afaa8c2cf 100644 --- a/proto/pb/io/writer/writer.pb.go +++ b/proto/pb/io/writer/writer.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: io/writer/writer.proto diff --git a/proto/pb/io/writer/writer_grpc.pb.go b/proto/pb/io/writer/writer_grpc.pb.go index f61c741fa1f7..f1276425d5c1 100644 --- a/proto/pb/io/writer/writer_grpc.pb.go +++ b/proto/pb/io/writer/writer_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: io/writer/writer.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Writer_Write_FullMethodName = "/io.writer.Writer/Write" +) + // WriterClient is the client API for Writer service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -36,7 +40,7 @@ func NewWriterClient(cc grpc.ClientConnInterface) WriterClient { func (c *writerClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { out := new(WriteResponse) - err := c.cc.Invoke(ctx, "/io.writer.Writer/Write", in, out, opts...) + err := c.cc.Invoke(ctx, Writer_Write_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -82,7 +86,7 @@ func _Writer_Write_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/io.writer.Writer/Write", + FullMethod: Writer_Write_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriterServer).Write(ctx, req.(*WriteRequest)) diff --git a/proto/pb/keystore/keystore.pb.go b/proto/pb/keystore/keystore.pb.go index d9d75e739695..ed9d3813f6c3 100644 --- a/proto/pb/keystore/keystore.pb.go +++ b/proto/pb/keystore/keystore.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: keystore/keystore.proto diff --git a/proto/pb/keystore/keystore_grpc.pb.go b/proto/pb/keystore/keystore_grpc.pb.go index a44bddf2cac7..728bf23c0420 100644 --- a/proto/pb/keystore/keystore_grpc.pb.go +++ b/proto/pb/keystore/keystore_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: keystore/keystore.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Keystore_GetDatabase_FullMethodName = "/keystore.Keystore/GetDatabase" +) + // KeystoreClient is the client API for Keystore service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -35,7 +39,7 @@ func NewKeystoreClient(cc grpc.ClientConnInterface) KeystoreClient { func (c *keystoreClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*GetDatabaseResponse, error) { out := new(GetDatabaseResponse) - err := c.cc.Invoke(ctx, "/keystore.Keystore/GetDatabase", in, out, opts...) + err := c.cc.Invoke(ctx, Keystore_GetDatabase_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _Keystore_GetDatabase_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/keystore.Keystore/GetDatabase", + FullMethod: Keystore_GetDatabase_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(KeystoreServer).GetDatabase(ctx, req.(*GetDatabaseRequest)) diff --git a/proto/pb/message/tx.pb.go b/proto/pb/message/tx.pb.go index 5b1932e4486b..4320fdc0d12b 100644 --- a/proto/pb/message/tx.pb.go +++ b/proto/pb/message/tx.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: message/tx.proto diff --git a/proto/pb/messenger/messenger.pb.go b/proto/pb/messenger/messenger.pb.go index 15c43300f445..830de252a04e 100644 --- a/proto/pb/messenger/messenger.pb.go +++ b/proto/pb/messenger/messenger.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: messenger/messenger.proto diff --git a/proto/pb/messenger/messenger_grpc.pb.go b/proto/pb/messenger/messenger_grpc.pb.go index b7073a03fc63..d03d1819e43f 100644 --- a/proto/pb/messenger/messenger_grpc.pb.go +++ b/proto/pb/messenger/messenger_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: messenger/messenger.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Messenger_Notify_FullMethodName = "/messenger.Messenger/Notify" +) + // MessengerClient is the client API for Messenger service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -35,7 +39,7 @@ func NewMessengerClient(cc grpc.ClientConnInterface) MessengerClient { func (c *messengerClient) Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) { out := new(NotifyResponse) - err := c.cc.Invoke(ctx, "/messenger.Messenger/Notify", in, out, opts...) + err := c.cc.Invoke(ctx, Messenger_Notify_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _Messenger_Notify_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/messenger.Messenger/Notify", + FullMethod: Messenger_Notify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MessengerServer).Notify(ctx, req.(*NotifyRequest)) diff --git a/proto/pb/net/conn/conn.pb.go b/proto/pb/net/conn/conn.pb.go index b40c1608cabe..8882e8de45ff 100644 --- a/proto/pb/net/conn/conn.pb.go +++ b/proto/pb/net/conn/conn.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: net/conn/conn.proto diff --git a/proto/pb/net/conn/conn_grpc.pb.go b/proto/pb/net/conn/conn_grpc.pb.go index 3239ef83e816..d640fb075f77 100644 --- a/proto/pb/net/conn/conn_grpc.pb.go +++ b/proto/pb/net/conn/conn_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: net/conn/conn.proto @@ -19,6 +19,15 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Conn_Read_FullMethodName = "/net.conn.Conn/Read" + Conn_Write_FullMethodName = "/net.conn.Conn/Write" + Conn_Close_FullMethodName = "/net.conn.Conn/Close" + Conn_SetDeadline_FullMethodName = "/net.conn.Conn/SetDeadline" + Conn_SetReadDeadline_FullMethodName = "/net.conn.Conn/SetReadDeadline" + Conn_SetWriteDeadline_FullMethodName = "/net.conn.Conn/SetWriteDeadline" +) + // ConnClient is the client API for Conn service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -50,7 +59,7 @@ func NewConnClient(cc grpc.ClientConnInterface) ConnClient { func (c *connClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) { out := new(ReadResponse) - err := c.cc.Invoke(ctx, "/net.conn.Conn/Read", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_Read_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -59,7 +68,7 @@ func (c *connClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.Cal func (c *connClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { out := new(WriteResponse) - err := c.cc.Invoke(ctx, "/net.conn.Conn/Write", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_Write_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -68,7 +77,7 @@ func (c *connClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.C func (c *connClient) Close(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/net.conn.Conn/Close", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_Close_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,7 +86,7 @@ func (c *connClient) Close(ctx context.Context, in *emptypb.Empty, opts ...grpc. func (c *connClient) SetDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/net.conn.Conn/SetDeadline", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_SetDeadline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -86,7 +95,7 @@ func (c *connClient) SetDeadline(ctx context.Context, in *SetDeadlineRequest, op func (c *connClient) SetReadDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/net.conn.Conn/SetReadDeadline", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_SetReadDeadline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -95,7 +104,7 @@ func (c *connClient) SetReadDeadline(ctx context.Context, in *SetDeadlineRequest func (c *connClient) SetWriteDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/net.conn.Conn/SetWriteDeadline", in, out, opts...) + err := c.cc.Invoke(ctx, Conn_SetWriteDeadline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -169,7 +178,7 @@ func _Conn_Read_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/Read", + FullMethod: Conn_Read_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).Read(ctx, req.(*ReadRequest)) @@ -187,7 +196,7 @@ func _Conn_Write_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/Write", + FullMethod: Conn_Write_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).Write(ctx, req.(*WriteRequest)) @@ -205,7 +214,7 @@ func _Conn_Close_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/Close", + FullMethod: Conn_Close_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).Close(ctx, req.(*emptypb.Empty)) @@ -223,7 +232,7 @@ func _Conn_SetDeadline_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/SetDeadline", + FullMethod: Conn_SetDeadline_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).SetDeadline(ctx, req.(*SetDeadlineRequest)) @@ -241,7 +250,7 @@ func _Conn_SetReadDeadline_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/SetReadDeadline", + FullMethod: Conn_SetReadDeadline_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).SetReadDeadline(ctx, req.(*SetDeadlineRequest)) @@ -259,7 +268,7 @@ func _Conn_SetWriteDeadline_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.conn.Conn/SetWriteDeadline", + FullMethod: Conn_SetWriteDeadline_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConnServer).SetWriteDeadline(ctx, req.(*SetDeadlineRequest)) diff --git a/proto/pb/p2p/p2p.pb.go b/proto/pb/p2p/p2p.pb.go index ce211db29a60..ac74a80f3a3d 100644 --- a/proto/pb/p2p/p2p.pb.go +++ b/proto/pb/p2p/p2p.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: p2p/p2p.proto diff --git a/proto/pb/rpcdb/rpcdb.pb.go b/proto/pb/rpcdb/rpcdb.pb.go index d7cfa7b6cfbb..246732f1bba3 100644 --- a/proto/pb/rpcdb/rpcdb.pb.go +++ b/proto/pb/rpcdb/rpcdb.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: rpcdb/rpcdb.proto diff --git a/proto/pb/rpcdb/rpcdb_grpc.pb.go b/proto/pb/rpcdb/rpcdb_grpc.pb.go index f46a3020577f..cba030911743 100644 --- a/proto/pb/rpcdb/rpcdb_grpc.pb.go +++ b/proto/pb/rpcdb/rpcdb_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: rpcdb/rpcdb.proto @@ -19,6 +19,21 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Database_Has_FullMethodName = "/rpcdb.Database/Has" + Database_Get_FullMethodName = "/rpcdb.Database/Get" + Database_Put_FullMethodName = "/rpcdb.Database/Put" + Database_Delete_FullMethodName = "/rpcdb.Database/Delete" + Database_Compact_FullMethodName = "/rpcdb.Database/Compact" + Database_Close_FullMethodName = "/rpcdb.Database/Close" + Database_HealthCheck_FullMethodName = "/rpcdb.Database/HealthCheck" + Database_WriteBatch_FullMethodName = "/rpcdb.Database/WriteBatch" + Database_NewIteratorWithStartAndPrefix_FullMethodName = "/rpcdb.Database/NewIteratorWithStartAndPrefix" + Database_IteratorNext_FullMethodName = "/rpcdb.Database/IteratorNext" + Database_IteratorError_FullMethodName = "/rpcdb.Database/IteratorError" + Database_IteratorRelease_FullMethodName = "/rpcdb.Database/IteratorRelease" +) + // DatabaseClient is the client API for Database service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -47,7 +62,7 @@ func NewDatabaseClient(cc grpc.ClientConnInterface) DatabaseClient { func (c *databaseClient) Has(ctx context.Context, in *HasRequest, opts ...grpc.CallOption) (*HasResponse, error) { out := new(HasResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Has", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Has_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -56,7 +71,7 @@ func (c *databaseClient) Has(ctx context.Context, in *HasRequest, opts ...grpc.C func (c *databaseClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { out := new(GetResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Get", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Get_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -65,7 +80,7 @@ func (c *databaseClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.C func (c *databaseClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) { out := new(PutResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Put", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Put_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -74,7 +89,7 @@ func (c *databaseClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.C func (c *databaseClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Delete", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Delete_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -83,7 +98,7 @@ func (c *databaseClient) Delete(ctx context.Context, in *DeleteRequest, opts ... func (c *databaseClient) Compact(ctx context.Context, in *CompactRequest, opts ...grpc.CallOption) (*CompactResponse, error) { out := new(CompactResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Compact", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Compact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -92,7 +107,7 @@ func (c *databaseClient) Compact(ctx context.Context, in *CompactRequest, opts . func (c *databaseClient) Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error) { out := new(CloseResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/Close", in, out, opts...) + err := c.cc.Invoke(ctx, Database_Close_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -101,7 +116,7 @@ func (c *databaseClient) Close(ctx context.Context, in *CloseRequest, opts ...gr func (c *databaseClient) HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/HealthCheck", in, out, opts...) + err := c.cc.Invoke(ctx, Database_HealthCheck_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -110,7 +125,7 @@ func (c *databaseClient) HealthCheck(ctx context.Context, in *emptypb.Empty, opt func (c *databaseClient) WriteBatch(ctx context.Context, in *WriteBatchRequest, opts ...grpc.CallOption) (*WriteBatchResponse, error) { out := new(WriteBatchResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/WriteBatch", in, out, opts...) + err := c.cc.Invoke(ctx, Database_WriteBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -119,7 +134,7 @@ func (c *databaseClient) WriteBatch(ctx context.Context, in *WriteBatchRequest, func (c *databaseClient) NewIteratorWithStartAndPrefix(ctx context.Context, in *NewIteratorWithStartAndPrefixRequest, opts ...grpc.CallOption) (*NewIteratorWithStartAndPrefixResponse, error) { out := new(NewIteratorWithStartAndPrefixResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/NewIteratorWithStartAndPrefix", in, out, opts...) + err := c.cc.Invoke(ctx, Database_NewIteratorWithStartAndPrefix_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -128,7 +143,7 @@ func (c *databaseClient) NewIteratorWithStartAndPrefix(ctx context.Context, in * func (c *databaseClient) IteratorNext(ctx context.Context, in *IteratorNextRequest, opts ...grpc.CallOption) (*IteratorNextResponse, error) { out := new(IteratorNextResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/IteratorNext", in, out, opts...) + err := c.cc.Invoke(ctx, Database_IteratorNext_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -137,7 +152,7 @@ func (c *databaseClient) IteratorNext(ctx context.Context, in *IteratorNextReque func (c *databaseClient) IteratorError(ctx context.Context, in *IteratorErrorRequest, opts ...grpc.CallOption) (*IteratorErrorResponse, error) { out := new(IteratorErrorResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/IteratorError", in, out, opts...) + err := c.cc.Invoke(ctx, Database_IteratorError_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -146,7 +161,7 @@ func (c *databaseClient) IteratorError(ctx context.Context, in *IteratorErrorReq func (c *databaseClient) IteratorRelease(ctx context.Context, in *IteratorReleaseRequest, opts ...grpc.CallOption) (*IteratorReleaseResponse, error) { out := new(IteratorReleaseResponse) - err := c.cc.Invoke(ctx, "/rpcdb.Database/IteratorRelease", in, out, opts...) + err := c.cc.Invoke(ctx, Database_IteratorRelease_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -235,7 +250,7 @@ func _Database_Has_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Has", + FullMethod: Database_Has_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Has(ctx, req.(*HasRequest)) @@ -253,7 +268,7 @@ func _Database_Get_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Get", + FullMethod: Database_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Get(ctx, req.(*GetRequest)) @@ -271,7 +286,7 @@ func _Database_Put_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Put", + FullMethod: Database_Put_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Put(ctx, req.(*PutRequest)) @@ -289,7 +304,7 @@ func _Database_Delete_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Delete", + FullMethod: Database_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Delete(ctx, req.(*DeleteRequest)) @@ -307,7 +322,7 @@ func _Database_Compact_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Compact", + FullMethod: Database_Compact_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Compact(ctx, req.(*CompactRequest)) @@ -325,7 +340,7 @@ func _Database_Close_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/Close", + FullMethod: Database_Close_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).Close(ctx, req.(*CloseRequest)) @@ -343,7 +358,7 @@ func _Database_HealthCheck_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/HealthCheck", + FullMethod: Database_HealthCheck_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).HealthCheck(ctx, req.(*emptypb.Empty)) @@ -361,7 +376,7 @@ func _Database_WriteBatch_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/WriteBatch", + FullMethod: Database_WriteBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).WriteBatch(ctx, req.(*WriteBatchRequest)) @@ -379,7 +394,7 @@ func _Database_NewIteratorWithStartAndPrefix_Handler(srv interface{}, ctx contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/NewIteratorWithStartAndPrefix", + FullMethod: Database_NewIteratorWithStartAndPrefix_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).NewIteratorWithStartAndPrefix(ctx, req.(*NewIteratorWithStartAndPrefixRequest)) @@ -397,7 +412,7 @@ func _Database_IteratorNext_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/IteratorNext", + FullMethod: Database_IteratorNext_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).IteratorNext(ctx, req.(*IteratorNextRequest)) @@ -415,7 +430,7 @@ func _Database_IteratorError_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/IteratorError", + FullMethod: Database_IteratorError_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).IteratorError(ctx, req.(*IteratorErrorRequest)) @@ -433,7 +448,7 @@ func _Database_IteratorRelease_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpcdb.Database/IteratorRelease", + FullMethod: Database_IteratorRelease_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DatabaseServer).IteratorRelease(ctx, req.(*IteratorReleaseRequest)) diff --git a/proto/pb/sharedmemory/sharedmemory.pb.go b/proto/pb/sharedmemory/sharedmemory.pb.go index 02d4fbb63aec..5de7c788691c 100644 --- a/proto/pb/sharedmemory/sharedmemory.pb.go +++ b/proto/pb/sharedmemory/sharedmemory.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: sharedmemory/sharedmemory.proto diff --git a/proto/pb/sharedmemory/sharedmemory_grpc.pb.go b/proto/pb/sharedmemory/sharedmemory_grpc.pb.go index 51382a4c533e..38b3c949cda0 100644 --- a/proto/pb/sharedmemory/sharedmemory_grpc.pb.go +++ b/proto/pb/sharedmemory/sharedmemory_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: sharedmemory/sharedmemory.proto @@ -18,6 +18,12 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + SharedMemory_Get_FullMethodName = "/sharedmemory.SharedMemory/Get" + SharedMemory_Indexed_FullMethodName = "/sharedmemory.SharedMemory/Indexed" + SharedMemory_Apply_FullMethodName = "/sharedmemory.SharedMemory/Apply" +) + // SharedMemoryClient is the client API for SharedMemory service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -37,7 +43,7 @@ func NewSharedMemoryClient(cc grpc.ClientConnInterface) SharedMemoryClient { func (c *sharedMemoryClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { out := new(GetResponse) - err := c.cc.Invoke(ctx, "/sharedmemory.SharedMemory/Get", in, out, opts...) + err := c.cc.Invoke(ctx, SharedMemory_Get_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -46,7 +52,7 @@ func (c *sharedMemoryClient) Get(ctx context.Context, in *GetRequest, opts ...gr func (c *sharedMemoryClient) Indexed(ctx context.Context, in *IndexedRequest, opts ...grpc.CallOption) (*IndexedResponse, error) { out := new(IndexedResponse) - err := c.cc.Invoke(ctx, "/sharedmemory.SharedMemory/Indexed", in, out, opts...) + err := c.cc.Invoke(ctx, SharedMemory_Indexed_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -55,7 +61,7 @@ func (c *sharedMemoryClient) Indexed(ctx context.Context, in *IndexedRequest, op func (c *sharedMemoryClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) { out := new(ApplyResponse) - err := c.cc.Invoke(ctx, "/sharedmemory.SharedMemory/Apply", in, out, opts...) + err := c.cc.Invoke(ctx, SharedMemory_Apply_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -108,7 +114,7 @@ func _SharedMemory_Get_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sharedmemory.SharedMemory/Get", + FullMethod: SharedMemory_Get_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SharedMemoryServer).Get(ctx, req.(*GetRequest)) @@ -126,7 +132,7 @@ func _SharedMemory_Indexed_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sharedmemory.SharedMemory/Indexed", + FullMethod: SharedMemory_Indexed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SharedMemoryServer).Indexed(ctx, req.(*IndexedRequest)) @@ -144,7 +150,7 @@ func _SharedMemory_Apply_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sharedmemory.SharedMemory/Apply", + FullMethod: SharedMemory_Apply_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SharedMemoryServer).Apply(ctx, req.(*ApplyRequest)) diff --git a/proto/pb/sync/sync.pb.go b/proto/pb/sync/sync.pb.go index 7d17044b00e8..eed82c41a71c 100644 --- a/proto/pb/sync/sync.pb.go +++ b/proto/pb/sync/sync.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: sync/sync.proto @@ -20,6 +20,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Request represents a request for information during syncing. type Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -101,14 +102,16 @@ func (*Request_RangeProofRequest) isRequest_Message() {} func (*Request_ChangeProofRequest) isRequest_Message() {} +// A RangeProofRequest requests the key-value pairs in a given key range +// at a specific revision. type RangeProofRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Start []byte `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` - End []byte `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` + RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` + StartKey []byte `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` + EndKey []byte `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` KeyLimit uint32 `protobuf:"varint,4,opt,name=key_limit,json=keyLimit,proto3" json:"key_limit,omitempty"` BytesLimit uint32 `protobuf:"varint,5,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` } @@ -145,23 +148,23 @@ func (*RangeProofRequest) Descriptor() ([]byte, []int) { return file_sync_sync_proto_rawDescGZIP(), []int{1} } -func (x *RangeProofRequest) GetRoot() []byte { +func (x *RangeProofRequest) GetRootHash() []byte { if x != nil { - return x.Root + return x.RootHash } return nil } -func (x *RangeProofRequest) GetStart() []byte { +func (x *RangeProofRequest) GetStartKey() []byte { if x != nil { - return x.Start + return x.StartKey } return nil } -func (x *RangeProofRequest) GetEnd() []byte { +func (x *RangeProofRequest) GetEndKey() []byte { if x != nil { - return x.End + return x.EndKey } return nil } @@ -180,17 +183,18 @@ func (x *RangeProofRequest) GetBytesLimit() uint32 { return 0 } +// A ChangeProofRequest requests the changes between two revisions. type ChangeProofRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartRoot []byte `protobuf:"bytes,1,opt,name=start_root,json=startRoot,proto3" json:"start_root,omitempty"` - EndRoot []byte `protobuf:"bytes,2,opt,name=end_root,json=endRoot,proto3" json:"end_root,omitempty"` - Start []byte `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` - End []byte `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` - KeyLimit uint32 `protobuf:"varint,5,opt,name=key_limit,json=keyLimit,proto3" json:"key_limit,omitempty"` - BytesLimit uint32 `protobuf:"varint,6,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` + StartRootHash []byte `protobuf:"bytes,1,opt,name=start_root_hash,json=startRootHash,proto3" json:"start_root_hash,omitempty"` + EndRootHash []byte `protobuf:"bytes,2,opt,name=end_root_hash,json=endRootHash,proto3" json:"end_root_hash,omitempty"` + StartKey []byte `protobuf:"bytes,3,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` + EndKey []byte `protobuf:"bytes,4,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` + KeyLimit uint32 `protobuf:"varint,5,opt,name=key_limit,json=keyLimit,proto3" json:"key_limit,omitempty"` + BytesLimit uint32 `protobuf:"varint,6,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` } func (x *ChangeProofRequest) Reset() { @@ -225,30 +229,30 @@ func (*ChangeProofRequest) Descriptor() ([]byte, []int) { return file_sync_sync_proto_rawDescGZIP(), []int{2} } -func (x *ChangeProofRequest) GetStartRoot() []byte { +func (x *ChangeProofRequest) GetStartRootHash() []byte { if x != nil { - return x.StartRoot + return x.StartRootHash } return nil } -func (x *ChangeProofRequest) GetEndRoot() []byte { +func (x *ChangeProofRequest) GetEndRootHash() []byte { if x != nil { - return x.EndRoot + return x.EndRootHash } return nil } -func (x *ChangeProofRequest) GetStart() []byte { +func (x *ChangeProofRequest) GetStartKey() []byte { if x != nil { - return x.Start + return x.StartKey } return nil } -func (x *ChangeProofRequest) GetEnd() []byte { +func (x *ChangeProofRequest) GetEndKey() []byte { if x != nil { - return x.End + return x.EndKey } return nil } @@ -267,6 +271,518 @@ func (x *ChangeProofRequest) GetBytesLimit() uint32 { return 0 } +// KeyValue represents a single key and its value. +type KeyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *KeyValue) Reset() { + *x = KeyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValue) ProtoMessage() {} + +func (x *KeyValue) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead. +func (*KeyValue) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{3} +} + +func (x *KeyValue) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *KeyValue) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// KeyChange is a change for a key from one revision to another. +// If the value is None, the key was deleted. +type KeyChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *MaybeBytes `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *KeyChange) Reset() { + *x = KeyChange{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyChange) ProtoMessage() {} + +func (x *KeyChange) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyChange.ProtoReflect.Descriptor instead. +func (*KeyChange) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{4} +} + +func (x *KeyChange) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *KeyChange) GetValue() *MaybeBytes { + if x != nil { + return x.Value + } + return nil +} + +// SerializedPath is the serialized representation of a path. +type SerializedPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NibbleLength uint32 `protobuf:"varint,1,opt,name=nibble_length,json=nibbleLength,proto3" json:"nibble_length,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *SerializedPath) Reset() { + *x = SerializedPath{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SerializedPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SerializedPath) ProtoMessage() {} + +func (x *SerializedPath) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SerializedPath.ProtoReflect.Descriptor instead. +func (*SerializedPath) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{5} +} + +func (x *SerializedPath) GetNibbleLength() uint32 { + if x != nil { + return x.NibbleLength + } + return 0 +} + +func (x *SerializedPath) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// MaybeBytes is an option wrapping bytes. +type MaybeBytes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // If false, this is None. + IsNothing bool `protobuf:"varint,2,opt,name=is_nothing,json=isNothing,proto3" json:"is_nothing,omitempty"` +} + +func (x *MaybeBytes) Reset() { + *x = MaybeBytes{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MaybeBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaybeBytes) ProtoMessage() {} + +func (x *MaybeBytes) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaybeBytes.ProtoReflect.Descriptor instead. +func (*MaybeBytes) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{6} +} + +func (x *MaybeBytes) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *MaybeBytes) GetIsNothing() bool { + if x != nil { + return x.IsNothing + } + return false +} + +// ProofNode is a node in a merkle proof. +type ProofNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *SerializedPath `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + ValueOrHash *MaybeBytes `protobuf:"bytes,2,opt,name=value_or_hash,json=valueOrHash,proto3" json:"value_or_hash,omitempty"` + Children map[uint32][]byte `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ProofNode) Reset() { + *x = ProofNode{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProofNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProofNode) ProtoMessage() {} + +func (x *ProofNode) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProofNode.ProtoReflect.Descriptor instead. +func (*ProofNode) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{7} +} + +func (x *ProofNode) GetKey() *SerializedPath { + if x != nil { + return x.Key + } + return nil +} + +func (x *ProofNode) GetValueOrHash() *MaybeBytes { + if x != nil { + return x.ValueOrHash + } + return nil +} + +func (x *ProofNode) GetChildren() map[uint32][]byte { + if x != nil { + return x.Children + } + return nil +} + +// RangeProof is the response to a RangeProofRequest. +type RangeProof struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start []*ProofNode `protobuf:"bytes,1,rep,name=start,proto3" json:"start,omitempty"` + End []*ProofNode `protobuf:"bytes,2,rep,name=end,proto3" json:"end,omitempty"` + KeyValues []*KeyValue `protobuf:"bytes,3,rep,name=key_values,json=keyValues,proto3" json:"key_values,omitempty"` +} + +func (x *RangeProof) Reset() { + *x = RangeProof{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RangeProof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RangeProof) ProtoMessage() {} + +func (x *RangeProof) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RangeProof.ProtoReflect.Descriptor instead. +func (*RangeProof) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{8} +} + +func (x *RangeProof) GetStart() []*ProofNode { + if x != nil { + return x.Start + } + return nil +} + +func (x *RangeProof) GetEnd() []*ProofNode { + if x != nil { + return x.End + } + return nil +} + +func (x *RangeProof) GetKeyValues() []*KeyValue { + if x != nil { + return x.KeyValues + } + return nil +} + +// ChangeProof is a possible response to a ChangeProofRequest. +// It only consists of a proof of the smallest changed key, +// the highest changed key, and the keys that have changed +// between those. Some keys may be deleted (hence +// the use of KeyChange instead of KeyValue). +type ChangeProof struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HadRootsInHistory bool `protobuf:"varint,1,opt,name=had_roots_in_history,json=hadRootsInHistory,proto3" json:"had_roots_in_history,omitempty"` // TODO remove + StartProof []*ProofNode `protobuf:"bytes,2,rep,name=start_proof,json=startProof,proto3" json:"start_proof,omitempty"` + EndProof []*ProofNode `protobuf:"bytes,3,rep,name=end_proof,json=endProof,proto3" json:"end_proof,omitempty"` + KeyChanges []*KeyChange `protobuf:"bytes,4,rep,name=key_changes,json=keyChanges,proto3" json:"key_changes,omitempty"` +} + +func (x *ChangeProof) Reset() { + *x = ChangeProof{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeProof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeProof) ProtoMessage() {} + +func (x *ChangeProof) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeProof.ProtoReflect.Descriptor instead. +func (*ChangeProof) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{9} +} + +func (x *ChangeProof) GetHadRootsInHistory() bool { + if x != nil { + return x.HadRootsInHistory + } + return false +} + +func (x *ChangeProof) GetStartProof() []*ProofNode { + if x != nil { + return x.StartProof + } + return nil +} + +func (x *ChangeProof) GetEndProof() []*ProofNode { + if x != nil { + return x.EndProof + } + return nil +} + +func (x *ChangeProof) GetKeyChanges() []*KeyChange { + if x != nil { + return x.KeyChanges + } + return nil +} + +// ChangeProofResponse is the response for a ChangeProofRequest. +type ChangeProofResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *ChangeProofResponse_ChangeProof + // *ChangeProofResponse_RangeProof + Response isChangeProofResponse_Response `protobuf_oneof:"response"` +} + +func (x *ChangeProofResponse) Reset() { + *x = ChangeProofResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_sync_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeProofResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeProofResponse) ProtoMessage() {} + +func (x *ChangeProofResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_sync_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeProofResponse.ProtoReflect.Descriptor instead. +func (*ChangeProofResponse) Descriptor() ([]byte, []int) { + return file_sync_sync_proto_rawDescGZIP(), []int{10} +} + +func (m *ChangeProofResponse) GetResponse() isChangeProofResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *ChangeProofResponse) GetChangeProof() *ChangeProof { + if x, ok := x.GetResponse().(*ChangeProofResponse_ChangeProof); ok { + return x.ChangeProof + } + return nil +} + +func (x *ChangeProofResponse) GetRangeProof() *RangeProof { + if x, ok := x.GetResponse().(*ChangeProofResponse_RangeProof); ok { + return x.RangeProof + } + return nil +} + +type isChangeProofResponse_Response interface { + isChangeProofResponse_Response() +} + +type ChangeProofResponse_ChangeProof struct { + ChangeProof *ChangeProof `protobuf:"bytes,1,opt,name=change_proof,json=changeProof,proto3,oneof"` +} + +type ChangeProofResponse_RangeProof struct { + RangeProof *RangeProof `protobuf:"bytes,2,opt,name=range_proof,json=rangeProof,proto3,oneof"` +} + +func (*ChangeProofResponse_ChangeProof) isChangeProofResponse_Response() {} + +func (*ChangeProofResponse_RangeProof) isChangeProofResponse_Response() {} + var File_sync_sync_proto protoreflect.FileDescriptor var file_sync_sync_proto_rawDesc = []byte{ @@ -282,31 +798,96 @@ var file_sync_sync_proto_rawDesc = []byte{ 0x79, 0x6e, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x11, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, 0x6f, 0x6f, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6b, 0x65, - 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x65, 0x6e, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x11, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, + 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x2f, - 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, - 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, - 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xd4, + 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, + 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x17, + 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x09, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4d, + 0x61, 0x79, 0x62, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x4b, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x69, 0x62, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x69, 0x62, 0x62, 0x6c, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x41, 0x0a, + 0x0a, 0x4d, 0x61, 0x79, 0x62, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, + 0x22, 0xe1, 0x01, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x26, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4d, 0x61, 0x79, 0x62, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, + 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x39, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x6f, 0x64, 0x65, 0x2e, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x2d, 0x0a, + 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xd0, 0x01, 0x0a, + 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x14, + 0x68, 0x61, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x68, 0x61, 0x64, 0x52, + 0x6f, 0x6f, 0x74, 0x73, 0x49, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x30, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, + 0x2c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x30, 0x0a, + 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, + 0x8e, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, + 0x33, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, + 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -321,20 +902,41 @@ func file_sync_sync_proto_rawDescGZIP() []byte { return file_sync_sync_proto_rawDescData } -var file_sync_sync_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_sync_sync_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_sync_sync_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: sync.Request - (*RangeProofRequest)(nil), // 1: sync.RangeProofRequest - (*ChangeProofRequest)(nil), // 2: sync.ChangeProofRequest + (*Request)(nil), // 0: sync.Request + (*RangeProofRequest)(nil), // 1: sync.RangeProofRequest + (*ChangeProofRequest)(nil), // 2: sync.ChangeProofRequest + (*KeyValue)(nil), // 3: sync.KeyValue + (*KeyChange)(nil), // 4: sync.KeyChange + (*SerializedPath)(nil), // 5: sync.SerializedPath + (*MaybeBytes)(nil), // 6: sync.MaybeBytes + (*ProofNode)(nil), // 7: sync.ProofNode + (*RangeProof)(nil), // 8: sync.RangeProof + (*ChangeProof)(nil), // 9: sync.ChangeProof + (*ChangeProofResponse)(nil), // 10: sync.ChangeProofResponse + nil, // 11: sync.ProofNode.ChildrenEntry } var file_sync_sync_proto_depIdxs = []int32{ - 1, // 0: sync.Request.range_proof_request:type_name -> sync.RangeProofRequest - 2, // 1: sync.Request.change_proof_request:type_name -> sync.ChangeProofRequest - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 1, // 0: sync.Request.range_proof_request:type_name -> sync.RangeProofRequest + 2, // 1: sync.Request.change_proof_request:type_name -> sync.ChangeProofRequest + 6, // 2: sync.KeyChange.value:type_name -> sync.MaybeBytes + 5, // 3: sync.ProofNode.key:type_name -> sync.SerializedPath + 6, // 4: sync.ProofNode.value_or_hash:type_name -> sync.MaybeBytes + 11, // 5: sync.ProofNode.children:type_name -> sync.ProofNode.ChildrenEntry + 7, // 6: sync.RangeProof.start:type_name -> sync.ProofNode + 7, // 7: sync.RangeProof.end:type_name -> sync.ProofNode + 3, // 8: sync.RangeProof.key_values:type_name -> sync.KeyValue + 7, // 9: sync.ChangeProof.start_proof:type_name -> sync.ProofNode + 7, // 10: sync.ChangeProof.end_proof:type_name -> sync.ProofNode + 4, // 11: sync.ChangeProof.key_changes:type_name -> sync.KeyChange + 9, // 12: sync.ChangeProofResponse.change_proof:type_name -> sync.ChangeProof + 8, // 13: sync.ChangeProofResponse.range_proof:type_name -> sync.RangeProof + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_sync_sync_proto_init() } @@ -379,18 +981,118 @@ func file_sync_sync_proto_init() { return nil } } + file_sync_sync_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SerializedPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MaybeBytes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProofNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RangeProof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeProof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_sync_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeProofResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_sync_sync_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Request_RangeProofRequest)(nil), (*Request_ChangeProofRequest)(nil), } + file_sync_sync_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*ChangeProofResponse_ChangeProof)(nil), + (*ChangeProofResponse_RangeProof)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_sync_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/pb/validatorstate/validator_state.pb.go b/proto/pb/validatorstate/validator_state.pb.go index 7f89e25ae4a8..84ddc0ab3100 100644 --- a/proto/pb/validatorstate/validator_state.pb.go +++ b/proto/pb/validatorstate/validator_state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: validatorstate/validator_state.proto diff --git a/proto/pb/validatorstate/validator_state_grpc.pb.go b/proto/pb/validatorstate/validator_state_grpc.pb.go index 1b328a7f0bb6..8dc2137aad90 100644 --- a/proto/pb/validatorstate/validator_state_grpc.pb.go +++ b/proto/pb/validatorstate/validator_state_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: validatorstate/validator_state.proto @@ -19,6 +19,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ValidatorState_GetMinimumHeight_FullMethodName = "/validatorstate.ValidatorState/GetMinimumHeight" + ValidatorState_GetCurrentHeight_FullMethodName = "/validatorstate.ValidatorState/GetCurrentHeight" + ValidatorState_GetSubnetID_FullMethodName = "/validatorstate.ValidatorState/GetSubnetID" + ValidatorState_GetValidatorSet_FullMethodName = "/validatorstate.ValidatorState/GetValidatorSet" +) + // ValidatorStateClient is the client API for ValidatorState service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -45,7 +52,7 @@ func NewValidatorStateClient(cc grpc.ClientConnInterface) ValidatorStateClient { func (c *validatorStateClient) GetMinimumHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMinimumHeightResponse, error) { out := new(GetMinimumHeightResponse) - err := c.cc.Invoke(ctx, "/validatorstate.ValidatorState/GetMinimumHeight", in, out, opts...) + err := c.cc.Invoke(ctx, ValidatorState_GetMinimumHeight_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -54,7 +61,7 @@ func (c *validatorStateClient) GetMinimumHeight(ctx context.Context, in *emptypb func (c *validatorStateClient) GetCurrentHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCurrentHeightResponse, error) { out := new(GetCurrentHeightResponse) - err := c.cc.Invoke(ctx, "/validatorstate.ValidatorState/GetCurrentHeight", in, out, opts...) + err := c.cc.Invoke(ctx, ValidatorState_GetCurrentHeight_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -63,7 +70,7 @@ func (c *validatorStateClient) GetCurrentHeight(ctx context.Context, in *emptypb func (c *validatorStateClient) GetSubnetID(ctx context.Context, in *GetSubnetIDRequest, opts ...grpc.CallOption) (*GetSubnetIDResponse, error) { out := new(GetSubnetIDResponse) - err := c.cc.Invoke(ctx, "/validatorstate.ValidatorState/GetSubnetID", in, out, opts...) + err := c.cc.Invoke(ctx, ValidatorState_GetSubnetID_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -72,7 +79,7 @@ func (c *validatorStateClient) GetSubnetID(ctx context.Context, in *GetSubnetIDR func (c *validatorStateClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetRequest, opts ...grpc.CallOption) (*GetValidatorSetResponse, error) { out := new(GetValidatorSetResponse) - err := c.cc.Invoke(ctx, "/validatorstate.ValidatorState/GetValidatorSet", in, out, opts...) + err := c.cc.Invoke(ctx, ValidatorState_GetValidatorSet_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -135,7 +142,7 @@ func _ValidatorState_GetMinimumHeight_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/validatorstate.ValidatorState/GetMinimumHeight", + FullMethod: ValidatorState_GetMinimumHeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ValidatorStateServer).GetMinimumHeight(ctx, req.(*emptypb.Empty)) @@ -153,7 +160,7 @@ func _ValidatorState_GetCurrentHeight_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/validatorstate.ValidatorState/GetCurrentHeight", + FullMethod: ValidatorState_GetCurrentHeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ValidatorStateServer).GetCurrentHeight(ctx, req.(*emptypb.Empty)) @@ -171,7 +178,7 @@ func _ValidatorState_GetSubnetID_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/validatorstate.ValidatorState/GetSubnetID", + FullMethod: ValidatorState_GetSubnetID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ValidatorStateServer).GetSubnetID(ctx, req.(*GetSubnetIDRequest)) @@ -189,7 +196,7 @@ func _ValidatorState_GetValidatorSet_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/validatorstate.ValidatorState/GetValidatorSet", + FullMethod: ValidatorState_GetValidatorSet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ValidatorStateServer).GetValidatorSet(ctx, req.(*GetValidatorSetRequest)) diff --git a/proto/pb/vm/runtime/runtime.pb.go b/proto/pb/vm/runtime/runtime.pb.go index c8a90fc715c5..2a5f15dbfed3 100644 --- a/proto/pb/vm/runtime/runtime.pb.go +++ b/proto/pb/vm/runtime/runtime.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: vm/runtime/runtime.proto diff --git a/proto/pb/vm/runtime/runtime_grpc.pb.go b/proto/pb/vm/runtime/runtime_grpc.pb.go index be32d6786b97..4fd1b2d64ef7 100644 --- a/proto/pb/vm/runtime/runtime_grpc.pb.go +++ b/proto/pb/vm/runtime/runtime_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: vm/runtime/runtime.proto @@ -19,6 +19,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Runtime_Initialize_FullMethodName = "/vm.runtime.Runtime/Initialize" +) + // RuntimeClient is the client API for Runtime service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -37,7 +41,7 @@ func NewRuntimeClient(cc grpc.ClientConnInterface) RuntimeClient { func (c *runtimeClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.runtime.Runtime/Initialize", in, out, opts...) + err := c.cc.Invoke(ctx, Runtime_Initialize_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -83,7 +87,7 @@ func _Runtime_Initialize_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.runtime.Runtime/Initialize", + FullMethod: Runtime_Initialize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RuntimeServer).Initialize(ctx, req.(*InitializeRequest)) diff --git a/proto/pb/vm/vm.pb.go b/proto/pb/vm/vm.pb.go index bf9ae4d0630f..4967ecf87235 100644 --- a/proto/pb/vm/vm.pb.go +++ b/proto/pb/vm/vm.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: vm/vm.proto diff --git a/proto/pb/vm/vm_grpc.pb.go b/proto/pb/vm/vm_grpc.pb.go index 25c3859b0323..5250af11f86f 100644 --- a/proto/pb/vm/vm_grpc.pb.go +++ b/proto/pb/vm/vm_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: vm/vm.proto @@ -19,6 +19,43 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + VM_Initialize_FullMethodName = "/vm.VM/Initialize" + VM_SetState_FullMethodName = "/vm.VM/SetState" + VM_Shutdown_FullMethodName = "/vm.VM/Shutdown" + VM_CreateHandlers_FullMethodName = "/vm.VM/CreateHandlers" + VM_CreateStaticHandlers_FullMethodName = "/vm.VM/CreateStaticHandlers" + VM_Connected_FullMethodName = "/vm.VM/Connected" + VM_Disconnected_FullMethodName = "/vm.VM/Disconnected" + VM_BuildBlock_FullMethodName = "/vm.VM/BuildBlock" + VM_ParseBlock_FullMethodName = "/vm.VM/ParseBlock" + VM_GetBlock_FullMethodName = "/vm.VM/GetBlock" + VM_SetPreference_FullMethodName = "/vm.VM/SetPreference" + VM_Health_FullMethodName = "/vm.VM/Health" + VM_Version_FullMethodName = "/vm.VM/Version" + VM_AppRequest_FullMethodName = "/vm.VM/AppRequest" + VM_AppRequestFailed_FullMethodName = "/vm.VM/AppRequestFailed" + VM_AppResponse_FullMethodName = "/vm.VM/AppResponse" + VM_AppGossip_FullMethodName = "/vm.VM/AppGossip" + VM_Gather_FullMethodName = "/vm.VM/Gather" + VM_CrossChainAppRequest_FullMethodName = "/vm.VM/CrossChainAppRequest" + VM_CrossChainAppRequestFailed_FullMethodName = "/vm.VM/CrossChainAppRequestFailed" + VM_CrossChainAppResponse_FullMethodName = "/vm.VM/CrossChainAppResponse" + VM_GetAncestors_FullMethodName = "/vm.VM/GetAncestors" + VM_BatchedParseBlock_FullMethodName = "/vm.VM/BatchedParseBlock" + VM_VerifyHeightIndex_FullMethodName = "/vm.VM/VerifyHeightIndex" + VM_GetBlockIDAtHeight_FullMethodName = "/vm.VM/GetBlockIDAtHeight" + VM_StateSyncEnabled_FullMethodName = "/vm.VM/StateSyncEnabled" + VM_GetOngoingSyncStateSummary_FullMethodName = "/vm.VM/GetOngoingSyncStateSummary" + VM_GetLastStateSummary_FullMethodName = "/vm.VM/GetLastStateSummary" + VM_ParseStateSummary_FullMethodName = "/vm.VM/ParseStateSummary" + VM_GetStateSummary_FullMethodName = "/vm.VM/GetStateSummary" + VM_BlockVerify_FullMethodName = "/vm.VM/BlockVerify" + VM_BlockAccept_FullMethodName = "/vm.VM/BlockAccept" + VM_BlockReject_FullMethodName = "/vm.VM/BlockReject" + VM_StateSummaryAccept_FullMethodName = "/vm.VM/StateSummaryAccept" +) + // VMClient is the client API for VM service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -106,7 +143,7 @@ func NewVMClient(cc grpc.ClientConnInterface) VMClient { func (c *vMClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) { out := new(InitializeResponse) - err := c.cc.Invoke(ctx, "/vm.VM/Initialize", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Initialize_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -115,7 +152,7 @@ func (c *vMClient) Initialize(ctx context.Context, in *InitializeRequest, opts . func (c *vMClient) SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) { out := new(SetStateResponse) - err := c.cc.Invoke(ctx, "/vm.VM/SetState", in, out, opts...) + err := c.cc.Invoke(ctx, VM_SetState_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -124,7 +161,7 @@ func (c *vMClient) SetState(ctx context.Context, in *SetStateRequest, opts ...gr func (c *vMClient) Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/Shutdown", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Shutdown_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -133,7 +170,7 @@ func (c *vMClient) Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) { out := new(CreateHandlersResponse) - err := c.cc.Invoke(ctx, "/vm.VM/CreateHandlers", in, out, opts...) + err := c.cc.Invoke(ctx, VM_CreateHandlers_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -142,7 +179,7 @@ func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts . func (c *vMClient) CreateStaticHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateStaticHandlersResponse, error) { out := new(CreateStaticHandlersResponse) - err := c.cc.Invoke(ctx, "/vm.VM/CreateStaticHandlers", in, out, opts...) + err := c.cc.Invoke(ctx, VM_CreateStaticHandlers_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -151,7 +188,7 @@ func (c *vMClient) CreateStaticHandlers(ctx context.Context, in *emptypb.Empty, func (c *vMClient) Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/Connected", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Connected_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -160,7 +197,7 @@ func (c *vMClient) Connected(ctx context.Context, in *ConnectedRequest, opts ... func (c *vMClient) Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/Disconnected", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Disconnected_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -169,7 +206,7 @@ func (c *vMClient) Disconnected(ctx context.Context, in *DisconnectedRequest, op func (c *vMClient) BuildBlock(ctx context.Context, in *BuildBlockRequest, opts ...grpc.CallOption) (*BuildBlockResponse, error) { out := new(BuildBlockResponse) - err := c.cc.Invoke(ctx, "/vm.VM/BuildBlock", in, out, opts...) + err := c.cc.Invoke(ctx, VM_BuildBlock_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -178,7 +215,7 @@ func (c *vMClient) BuildBlock(ctx context.Context, in *BuildBlockRequest, opts . func (c *vMClient) ParseBlock(ctx context.Context, in *ParseBlockRequest, opts ...grpc.CallOption) (*ParseBlockResponse, error) { out := new(ParseBlockResponse) - err := c.cc.Invoke(ctx, "/vm.VM/ParseBlock", in, out, opts...) + err := c.cc.Invoke(ctx, VM_ParseBlock_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -187,7 +224,7 @@ func (c *vMClient) ParseBlock(ctx context.Context, in *ParseBlockRequest, opts . func (c *vMClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) { out := new(GetBlockResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetBlock", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetBlock_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -196,7 +233,7 @@ func (c *vMClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...gr func (c *vMClient) SetPreference(ctx context.Context, in *SetPreferenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/SetPreference", in, out, opts...) + err := c.cc.Invoke(ctx, VM_SetPreference_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -205,7 +242,7 @@ func (c *vMClient) SetPreference(ctx context.Context, in *SetPreferenceRequest, func (c *vMClient) Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) { out := new(HealthResponse) - err := c.cc.Invoke(ctx, "/vm.VM/Health", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Health_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -214,7 +251,7 @@ func (c *vMClient) Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.C func (c *vMClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { out := new(VersionResponse) - err := c.cc.Invoke(ctx, "/vm.VM/Version", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Version_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -223,7 +260,7 @@ func (c *vMClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc. func (c *vMClient) AppRequest(ctx context.Context, in *AppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/AppRequest", in, out, opts...) + err := c.cc.Invoke(ctx, VM_AppRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -232,7 +269,7 @@ func (c *vMClient) AppRequest(ctx context.Context, in *AppRequestMsg, opts ...gr func (c *vMClient) AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/AppRequestFailed", in, out, opts...) + err := c.cc.Invoke(ctx, VM_AppRequestFailed_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -241,7 +278,7 @@ func (c *vMClient) AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg func (c *vMClient) AppResponse(ctx context.Context, in *AppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/AppResponse", in, out, opts...) + err := c.cc.Invoke(ctx, VM_AppResponse_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -250,7 +287,7 @@ func (c *vMClient) AppResponse(ctx context.Context, in *AppResponseMsg, opts ... func (c *vMClient) AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/AppGossip", in, out, opts...) + err := c.cc.Invoke(ctx, VM_AppGossip_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -259,7 +296,7 @@ func (c *vMClient) AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc func (c *vMClient) Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) { out := new(GatherResponse) - err := c.cc.Invoke(ctx, "/vm.VM/Gather", in, out, opts...) + err := c.cc.Invoke(ctx, VM_Gather_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -268,7 +305,7 @@ func (c *vMClient) Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.C func (c *vMClient) CrossChainAppRequest(ctx context.Context, in *CrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/CrossChainAppRequest", in, out, opts...) + err := c.cc.Invoke(ctx, VM_CrossChainAppRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -277,7 +314,7 @@ func (c *vMClient) CrossChainAppRequest(ctx context.Context, in *CrossChainAppRe func (c *vMClient) CrossChainAppRequestFailed(ctx context.Context, in *CrossChainAppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/CrossChainAppRequestFailed", in, out, opts...) + err := c.cc.Invoke(ctx, VM_CrossChainAppRequestFailed_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -286,7 +323,7 @@ func (c *vMClient) CrossChainAppRequestFailed(ctx context.Context, in *CrossChai func (c *vMClient) CrossChainAppResponse(ctx context.Context, in *CrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/CrossChainAppResponse", in, out, opts...) + err := c.cc.Invoke(ctx, VM_CrossChainAppResponse_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -295,7 +332,7 @@ func (c *vMClient) CrossChainAppResponse(ctx context.Context, in *CrossChainAppR func (c *vMClient) GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) { out := new(GetAncestorsResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetAncestors", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetAncestors_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -304,7 +341,7 @@ func (c *vMClient) GetAncestors(ctx context.Context, in *GetAncestorsRequest, op func (c *vMClient) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) { out := new(BatchedParseBlockResponse) - err := c.cc.Invoke(ctx, "/vm.VM/BatchedParseBlock", in, out, opts...) + err := c.cc.Invoke(ctx, VM_BatchedParseBlock_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -313,7 +350,7 @@ func (c *vMClient) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockR func (c *vMClient) VerifyHeightIndex(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VerifyHeightIndexResponse, error) { out := new(VerifyHeightIndexResponse) - err := c.cc.Invoke(ctx, "/vm.VM/VerifyHeightIndex", in, out, opts...) + err := c.cc.Invoke(ctx, VM_VerifyHeightIndex_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -322,7 +359,7 @@ func (c *vMClient) VerifyHeightIndex(ctx context.Context, in *emptypb.Empty, opt func (c *vMClient) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) { out := new(GetBlockIDAtHeightResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetBlockIDAtHeight", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetBlockIDAtHeight_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -331,7 +368,7 @@ func (c *vMClient) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeigh func (c *vMClient) StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateSyncEnabledResponse, error) { out := new(StateSyncEnabledResponse) - err := c.cc.Invoke(ctx, "/vm.VM/StateSyncEnabled", in, out, opts...) + err := c.cc.Invoke(ctx, VM_StateSyncEnabled_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -340,7 +377,7 @@ func (c *vMClient) StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts func (c *vMClient) GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOngoingSyncStateSummaryResponse, error) { out := new(GetOngoingSyncStateSummaryResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetOngoingSyncStateSummary", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetOngoingSyncStateSummary_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -349,7 +386,7 @@ func (c *vMClient) GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.E func (c *vMClient) GetLastStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLastStateSummaryResponse, error) { out := new(GetLastStateSummaryResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetLastStateSummary", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetLastStateSummary_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -358,7 +395,7 @@ func (c *vMClient) GetLastStateSummary(ctx context.Context, in *emptypb.Empty, o func (c *vMClient) ParseStateSummary(ctx context.Context, in *ParseStateSummaryRequest, opts ...grpc.CallOption) (*ParseStateSummaryResponse, error) { out := new(ParseStateSummaryResponse) - err := c.cc.Invoke(ctx, "/vm.VM/ParseStateSummary", in, out, opts...) + err := c.cc.Invoke(ctx, VM_ParseStateSummary_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -367,7 +404,7 @@ func (c *vMClient) ParseStateSummary(ctx context.Context, in *ParseStateSummaryR func (c *vMClient) GetStateSummary(ctx context.Context, in *GetStateSummaryRequest, opts ...grpc.CallOption) (*GetStateSummaryResponse, error) { out := new(GetStateSummaryResponse) - err := c.cc.Invoke(ctx, "/vm.VM/GetStateSummary", in, out, opts...) + err := c.cc.Invoke(ctx, VM_GetStateSummary_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -376,7 +413,7 @@ func (c *vMClient) GetStateSummary(ctx context.Context, in *GetStateSummaryReque func (c *vMClient) BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts ...grpc.CallOption) (*BlockVerifyResponse, error) { out := new(BlockVerifyResponse) - err := c.cc.Invoke(ctx, "/vm.VM/BlockVerify", in, out, opts...) + err := c.cc.Invoke(ctx, VM_BlockVerify_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -385,7 +422,7 @@ func (c *vMClient) BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts func (c *vMClient) BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/BlockAccept", in, out, opts...) + err := c.cc.Invoke(ctx, VM_BlockAccept_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -394,7 +431,7 @@ func (c *vMClient) BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts func (c *vMClient) BlockReject(ctx context.Context, in *BlockRejectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/vm.VM/BlockReject", in, out, opts...) + err := c.cc.Invoke(ctx, VM_BlockReject_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -403,7 +440,7 @@ func (c *vMClient) BlockReject(ctx context.Context, in *BlockRejectRequest, opts func (c *vMClient) StateSummaryAccept(ctx context.Context, in *StateSummaryAcceptRequest, opts ...grpc.CallOption) (*StateSummaryAcceptResponse, error) { out := new(StateSummaryAcceptResponse) - err := c.cc.Invoke(ctx, "/vm.VM/StateSummaryAccept", in, out, opts...) + err := c.cc.Invoke(ctx, VM_StateSummaryAccept_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -617,7 +654,7 @@ func _VM_Initialize_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Initialize", + FullMethod: VM_Initialize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Initialize(ctx, req.(*InitializeRequest)) @@ -635,7 +672,7 @@ func _VM_SetState_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/SetState", + FullMethod: VM_SetState_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).SetState(ctx, req.(*SetStateRequest)) @@ -653,7 +690,7 @@ func _VM_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Shutdown", + FullMethod: VM_Shutdown_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Shutdown(ctx, req.(*emptypb.Empty)) @@ -671,7 +708,7 @@ func _VM_CreateHandlers_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/CreateHandlers", + FullMethod: VM_CreateHandlers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).CreateHandlers(ctx, req.(*emptypb.Empty)) @@ -689,7 +726,7 @@ func _VM_CreateStaticHandlers_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/CreateStaticHandlers", + FullMethod: VM_CreateStaticHandlers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).CreateStaticHandlers(ctx, req.(*emptypb.Empty)) @@ -707,7 +744,7 @@ func _VM_Connected_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Connected", + FullMethod: VM_Connected_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Connected(ctx, req.(*ConnectedRequest)) @@ -725,7 +762,7 @@ func _VM_Disconnected_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Disconnected", + FullMethod: VM_Disconnected_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Disconnected(ctx, req.(*DisconnectedRequest)) @@ -743,7 +780,7 @@ func _VM_BuildBlock_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/BuildBlock", + FullMethod: VM_BuildBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).BuildBlock(ctx, req.(*BuildBlockRequest)) @@ -761,7 +798,7 @@ func _VM_ParseBlock_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/ParseBlock", + FullMethod: VM_ParseBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).ParseBlock(ctx, req.(*ParseBlockRequest)) @@ -779,7 +816,7 @@ func _VM_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetBlock", + FullMethod: VM_GetBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetBlock(ctx, req.(*GetBlockRequest)) @@ -797,7 +834,7 @@ func _VM_SetPreference_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/SetPreference", + FullMethod: VM_SetPreference_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).SetPreference(ctx, req.(*SetPreferenceRequest)) @@ -815,7 +852,7 @@ func _VM_Health_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Health", + FullMethod: VM_Health_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Health(ctx, req.(*emptypb.Empty)) @@ -833,7 +870,7 @@ func _VM_Version_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Version", + FullMethod: VM_Version_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Version(ctx, req.(*emptypb.Empty)) @@ -851,7 +888,7 @@ func _VM_AppRequest_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/AppRequest", + FullMethod: VM_AppRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).AppRequest(ctx, req.(*AppRequestMsg)) @@ -869,7 +906,7 @@ func _VM_AppRequestFailed_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/AppRequestFailed", + FullMethod: VM_AppRequestFailed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).AppRequestFailed(ctx, req.(*AppRequestFailedMsg)) @@ -887,7 +924,7 @@ func _VM_AppResponse_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/AppResponse", + FullMethod: VM_AppResponse_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).AppResponse(ctx, req.(*AppResponseMsg)) @@ -905,7 +942,7 @@ func _VM_AppGossip_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/AppGossip", + FullMethod: VM_AppGossip_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).AppGossip(ctx, req.(*AppGossipMsg)) @@ -923,7 +960,7 @@ func _VM_Gather_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/Gather", + FullMethod: VM_Gather_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).Gather(ctx, req.(*emptypb.Empty)) @@ -941,7 +978,7 @@ func _VM_CrossChainAppRequest_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/CrossChainAppRequest", + FullMethod: VM_CrossChainAppRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).CrossChainAppRequest(ctx, req.(*CrossChainAppRequestMsg)) @@ -959,7 +996,7 @@ func _VM_CrossChainAppRequestFailed_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/CrossChainAppRequestFailed", + FullMethod: VM_CrossChainAppRequestFailed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).CrossChainAppRequestFailed(ctx, req.(*CrossChainAppRequestFailedMsg)) @@ -977,7 +1014,7 @@ func _VM_CrossChainAppResponse_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/CrossChainAppResponse", + FullMethod: VM_CrossChainAppResponse_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).CrossChainAppResponse(ctx, req.(*CrossChainAppResponseMsg)) @@ -995,7 +1032,7 @@ func _VM_GetAncestors_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetAncestors", + FullMethod: VM_GetAncestors_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetAncestors(ctx, req.(*GetAncestorsRequest)) @@ -1013,7 +1050,7 @@ func _VM_BatchedParseBlock_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/BatchedParseBlock", + FullMethod: VM_BatchedParseBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).BatchedParseBlock(ctx, req.(*BatchedParseBlockRequest)) @@ -1031,7 +1068,7 @@ func _VM_VerifyHeightIndex_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/VerifyHeightIndex", + FullMethod: VM_VerifyHeightIndex_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).VerifyHeightIndex(ctx, req.(*emptypb.Empty)) @@ -1049,7 +1086,7 @@ func _VM_GetBlockIDAtHeight_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetBlockIDAtHeight", + FullMethod: VM_GetBlockIDAtHeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetBlockIDAtHeight(ctx, req.(*GetBlockIDAtHeightRequest)) @@ -1067,7 +1104,7 @@ func _VM_StateSyncEnabled_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/StateSyncEnabled", + FullMethod: VM_StateSyncEnabled_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).StateSyncEnabled(ctx, req.(*emptypb.Empty)) @@ -1085,7 +1122,7 @@ func _VM_GetOngoingSyncStateSummary_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetOngoingSyncStateSummary", + FullMethod: VM_GetOngoingSyncStateSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetOngoingSyncStateSummary(ctx, req.(*emptypb.Empty)) @@ -1103,7 +1140,7 @@ func _VM_GetLastStateSummary_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetLastStateSummary", + FullMethod: VM_GetLastStateSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetLastStateSummary(ctx, req.(*emptypb.Empty)) @@ -1121,7 +1158,7 @@ func _VM_ParseStateSummary_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/ParseStateSummary", + FullMethod: VM_ParseStateSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).ParseStateSummary(ctx, req.(*ParseStateSummaryRequest)) @@ -1139,7 +1176,7 @@ func _VM_GetStateSummary_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/GetStateSummary", + FullMethod: VM_GetStateSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).GetStateSummary(ctx, req.(*GetStateSummaryRequest)) @@ -1157,7 +1194,7 @@ func _VM_BlockVerify_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/BlockVerify", + FullMethod: VM_BlockVerify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).BlockVerify(ctx, req.(*BlockVerifyRequest)) @@ -1175,7 +1212,7 @@ func _VM_BlockAccept_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/BlockAccept", + FullMethod: VM_BlockAccept_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).BlockAccept(ctx, req.(*BlockAcceptRequest)) @@ -1193,7 +1230,7 @@ func _VM_BlockReject_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/BlockReject", + FullMethod: VM_BlockReject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).BlockReject(ctx, req.(*BlockRejectRequest)) @@ -1211,7 +1248,7 @@ func _VM_StateSummaryAccept_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vm.VM/StateSummaryAccept", + FullMethod: VM_StateSummaryAccept_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VMServer).StateSummaryAccept(ctx, req.(*StateSummaryAcceptRequest)) diff --git a/proto/pb/warp/message.pb.go b/proto/pb/warp/message.pb.go index cfc355c67378..954689132fc3 100644 --- a/proto/pb/warp/message.pb.go +++ b/proto/pb/warp/message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: warp/message.proto diff --git a/proto/pb/warp/message_grpc.pb.go b/proto/pb/warp/message_grpc.pb.go index fa092303cb47..91c5152f8a74 100644 --- a/proto/pb/warp/message_grpc.pb.go +++ b/proto/pb/warp/message_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: warp/message.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Signer_Sign_FullMethodName = "/warp.Signer/Sign" +) + // SignerClient is the client API for Signer service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -35,7 +39,7 @@ func NewSignerClient(cc grpc.ClientConnInterface) SignerClient { func (c *signerClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) { out := new(SignResponse) - err := c.cc.Invoke(ctx, "/warp.Signer/Sign", in, out, opts...) + err := c.cc.Invoke(ctx, Signer_Sign_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _Signer_Sign_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/warp.Signer/Sign", + FullMethod: Signer_Sign_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SignerServer).Sign(ctx, req.(*SignRequest)) diff --git a/proto/sync/sync.proto b/proto/sync/sync.proto index ca852b87a876..6a2dfc031900 100644 --- a/proto/sync/sync.proto +++ b/proto/sync/sync.proto @@ -74,7 +74,7 @@ message RangeProof { // ChangeProof is a possible response to a ChangeProofRequest. // It only consists of a proof of the smallest changed key, -// the highest changed key, and the keys that have changed +// the highest changed key, and the keys that have changed // between those. Some keys may be deleted (hence // the use of KeyChange instead of KeyValue). message ChangeProof { diff --git a/scripts/protobuf_codegen.sh b/scripts/protobuf_codegen.sh index 707ea5e8c1c0..f9f2828f0aa3 100755 --- a/scripts/protobuf_codegen.sh +++ b/scripts/protobuf_codegen.sh @@ -9,7 +9,7 @@ fi # any version changes here should also be bumped in Dockerfile.buf # ref. https://docs.buf.build/installation # ref. https://github.com/bufbuild/buf/releases -BUF_VERSION='1.11.0' +BUF_VERSION='1.19.0' if [[ $(buf --version | cut -f2 -d' ') != "${BUF_VERSION}" ]]; then echo "could not find buf ${BUF_VERSION}, is it installed + in PATH?" exit 255 @@ -18,7 +18,7 @@ fi ## install "protoc-gen-go" # any version changes here should also be bumped in Dockerfile.buf # ref. https://github.com/protocolbuffers/protobuf-go/releases -PROTOC_GEN_GO_VERSION='v1.28.1' +PROTOC_GEN_GO_VERSION='v1.30.0' go install -v google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION} if [[ $(protoc-gen-go --version | cut -f2 -d' ') != "${PROTOC_GEN_GO_VERSION}" ]]; then # e.g., protoc-gen-go v1.28.1 @@ -30,10 +30,10 @@ fi # any version changes here should also be bumped in Dockerfile.buf # ref. https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc # ref. https://github.com/grpc/grpc-go/blob/master/cmd/protoc-gen-go-grpc/main.go -PROTOC_GEN_GO_GRPC_VERSION='1.2.0' +PROTOC_GEN_GO_GRPC_VERSION='1.3.0' go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION} if [[ $(protoc-gen-go-grpc --version | cut -f2 -d' ') != "${PROTOC_GEN_GO_GRPC_VERSION}" ]]; then - # e.g., protoc-gen-go-grpc 1.2.0 + # e.g., protoc-gen-go-grpc 1.3.0 echo "could not find protoc-gen-go-grpc ${PROTOC_GEN_GO_GRPC_VERSION}, is it installed + in PATH?" exit 255 fi diff --git a/x/sync/client.go b/x/sync/client.go index 6502893e62f4..e7cc96c49183 100644 --- a/x/sync/client.go +++ b/x/sync/client.go @@ -96,12 +96,12 @@ func (c *client) GetChangeProof(ctx context.Context, req *syncpb.ChangeProofRequ return nil, fmt.Errorf("%w: (%d) > %d)", errTooManyKeys, len(changeProof.KeyChanges), req.KeyLimit) } - endRoot, err := ids.ToID(req.EndRoot) + endRoot, err := ids.ToID(req.EndRootHash) if err != nil { return nil, err } - if err := db.VerifyChangeProof(ctx, changeProof, req.Start, req.End, endRoot); err != nil { + if err := db.VerifyChangeProof(ctx, changeProof, req.StartKey, req.EndKey, endRoot); err != nil { return nil, fmt.Errorf("%s due to %w", errInvalidRangeProof, err) } return changeProof, nil @@ -137,15 +137,15 @@ func (c *client) GetRangeProof(ctx context.Context, req *syncpb.RangeProofReques return nil, fmt.Errorf("%w: (%d) > %d)", errTooManyKeys, len(rangeProof.KeyValues), req.KeyLimit) } - root, err := ids.ToID(req.Root) + root, err := ids.ToID(req.RootHash) if err != nil { return nil, err } if err := rangeProof.Verify( ctx, - req.Start, - req.End, + req.StartKey, + req.EndKey, root, ); err != nil { return nil, fmt.Errorf("%s due to %w", errInvalidRangeProof, err) diff --git a/x/sync/client_test.go b/x/sync/client_test.go index f68685432e7f..b8a6561e5361 100644 --- a/x/sync/client_test.go +++ b/x/sync/client_test.go @@ -135,7 +135,7 @@ func TestGetRangeProof(t *testing.T) { "proof restricted by BytesLimit": { db: smallTrieDB, request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: 10000, }, @@ -143,7 +143,7 @@ func TestGetRangeProof(t *testing.T) { "full response for small (single request) trie": { db: smallTrieDB, request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -152,7 +152,7 @@ func TestGetRangeProof(t *testing.T) { "too many leaves in response": { db: smallTrieDB, request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -164,7 +164,7 @@ func TestGetRangeProof(t *testing.T) { "partial response to request for entire trie (full leaf limit)": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -173,8 +173,8 @@ func TestGetRangeProof(t *testing.T) { "full response from near end of trie to end of trie (less than leaf limit)": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], - Start: largeTrieKeys[len(largeTrieKeys)-30], // Set start 30 keys from the end of the large trie + RootHash: largeTrieRoot[:], + StartKey: largeTrieKeys[len(largeTrieKeys)-30], // Set start 30 keys from the end of the large trie KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -183,9 +183,9 @@ func TestGetRangeProof(t *testing.T) { "full response for intermediate range of trie (less than leaf limit)": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], - Start: largeTrieKeys[1000], // Set the range for 1000 leafs in an intermediate range of the trie - End: largeTrieKeys[1099], // (inclusive range) + RootHash: largeTrieRoot[:], + StartKey: largeTrieKeys[1000], // Set the range for 1000 leafs in an intermediate range of the trie + EndKey: largeTrieKeys[1099], // (inclusive range) KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -194,7 +194,7 @@ func TestGetRangeProof(t *testing.T) { "removed first key in response": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -206,7 +206,7 @@ func TestGetRangeProof(t *testing.T) { "removed first key in response and replaced proof": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -225,7 +225,7 @@ func TestGetRangeProof(t *testing.T) { "removed last key in response": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -237,7 +237,7 @@ func TestGetRangeProof(t *testing.T) { "removed key from middle of response": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -249,7 +249,7 @@ func TestGetRangeProof(t *testing.T) { "all proof keys removed from response": { db: largeTrieDB, request: &syncpb.RangeProofRequest{ - Root: largeTrieRoot[:], + RootHash: largeTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -439,27 +439,27 @@ func TestGetChangeProof(t *testing.T) { }{ "proof restricted by BytesLimit": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: 10000, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: 10000, }, }, "full response for small (single request) trie": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, expectedResponseLen: defaultRequestKeyLimit, }, "too many keys in response": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, modifyResponse: func(response *merkledb.ChangeProof) { response.KeyChanges = append(response.KeyChanges, make([]merkledb.KeyChange, defaultRequestKeyLimit)...) @@ -468,19 +468,19 @@ func TestGetChangeProof(t *testing.T) { }, "partial response to request for entire trie (full leaf limit)": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, expectedResponseLen: defaultRequestKeyLimit, }, "removed first key in response": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, modifyResponse: func(response *merkledb.ChangeProof) { response.KeyChanges = response.KeyChanges[1:] @@ -489,10 +489,10 @@ func TestGetChangeProof(t *testing.T) { }, "removed last key in response": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, modifyResponse: func(response *merkledb.ChangeProof) { response.KeyChanges = response.KeyChanges[:len(response.KeyChanges)-2] @@ -501,10 +501,10 @@ func TestGetChangeProof(t *testing.T) { }, "removed key from middle of response": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, modifyResponse: func(response *merkledb.ChangeProof) { response.KeyChanges = append(response.KeyChanges[:100], response.KeyChanges[101:]...) @@ -513,10 +513,10 @@ func TestGetChangeProof(t *testing.T) { }, "all proof keys removed from response": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, modifyResponse: func(response *merkledb.ChangeProof) { response.StartProof = nil @@ -558,7 +558,7 @@ func TestRangeProofRetries(t *testing.T) { maxRequests := 4 request := &syncpb.RangeProofRequest{ - Root: root[:], + RootHash: root[:], KeyLimit: uint32(keyCount), BytesLimit: defaultRequestByteSizeLimit, } diff --git a/x/sync/network_server.go b/x/sync/network_server.go index 0041c87fe1d9..430245f78c08 100644 --- a/x/sync/network_server.go +++ b/x/sync/network_server.go @@ -155,9 +155,9 @@ func (s *NetworkServer) HandleChangeProofRequest( ) error { if req.BytesLimit == 0 || req.KeyLimit == 0 || - len(req.StartRoot) != hashing.HashLen || - len(req.EndRoot) != hashing.HashLen || - (len(req.End) > 0 && bytes.Compare(req.Start, req.End) > 0) { + len(req.StartRootHash) != hashing.HashLen || + len(req.EndRootHash) != hashing.HashLen || + (len(req.EndKey) > 0 && bytes.Compare(req.StartKey, req.EndKey) > 0) { s.log.Debug( "dropping invalid change proof request", zap.Stringer("nodeID", nodeID), @@ -179,15 +179,15 @@ func (s *NetworkServer) HandleChangeProofRequest( // attempt to get a proof within the bytes limit for keyLimit > 0 { - startRoot, err := ids.ToID(req.StartRoot) + startRoot, err := ids.ToID(req.StartRootHash) if err != nil { return err } - endRoot, err := ids.ToID(req.EndRoot) + endRoot, err := ids.ToID(req.EndRootHash) if err != nil { return err } - changeProof, err := s.db.GetChangeProof(ctx, startRoot, endRoot, req.Start, req.End, int(keyLimit)) + changeProof, err := s.db.GetChangeProof(ctx, startRoot, endRoot, req.StartKey, req.EndKey, int(keyLimit)) if err != nil { // handle expected errors so clients cannot cause servers to spam warning logs. if errors.Is(err, merkledb.ErrRootIDNotPresent) || errors.Is(err, merkledb.ErrStartRootNotFound) { @@ -226,8 +226,8 @@ func (s *NetworkServer) HandleRangeProofRequest( ) error { if req.BytesLimit == 0 || req.KeyLimit == 0 || - len(req.Root) != hashing.HashLen || - (len(req.End) > 0 && bytes.Compare(req.Start, req.End) > 0) { + len(req.RootHash) != hashing.HashLen || + (len(req.EndKey) > 0 && bytes.Compare(req.StartKey, req.EndKey) > 0) { s.log.Debug( "dropping invalid range proof request", zap.Stringer("nodeID", nodeID), @@ -247,11 +247,11 @@ func (s *NetworkServer) HandleRangeProofRequest( bytesLimit = maxByteSizeLimit } for keyLimit > 0 { - root, err := ids.ToID(req.Root) + root, err := ids.ToID(req.RootHash) if err != nil { return err } - rangeProof, err := s.db.GetRangeProofAtRoot(ctx, root, req.Start, req.End, int(keyLimit)) + rangeProof, err := s.db.GetRangeProofAtRoot(ctx, root, req.StartKey, req.EndKey, int(keyLimit)) if err != nil { // handle expected errors so clients cannot cause servers to spam warning logs. if errors.Is(err, merkledb.ErrRootIDNotPresent) { diff --git a/x/sync/network_server_test.go b/x/sync/network_server_test.go index 4e686cf6af32..9bc0dbb2d042 100644 --- a/x/sync/network_server_test.go +++ b/x/sync/network_server_test.go @@ -38,7 +38,7 @@ func Test_Server_GetRangeProof(t *testing.T) { }{ "proof too large": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: 1000, }, @@ -47,7 +47,7 @@ func Test_Server_GetRangeProof(t *testing.T) { }, "byteslimit is 0": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: 0, }, @@ -55,7 +55,7 @@ func Test_Server_GetRangeProof(t *testing.T) { }, "keylimit is 0": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: 0, }, @@ -63,17 +63,17 @@ func Test_Server_GetRangeProof(t *testing.T) { }, "keys out of order": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, - Start: []byte{1}, - End: []byte{0}, + StartKey: []byte{1}, + EndKey: []byte{0}, }, proofNil: true, }, "key limit too large": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: 2 * defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, }, @@ -81,7 +81,7 @@ func Test_Server_GetRangeProof(t *testing.T) { }, "bytes limit too large": { request: &syncpb.RangeProofRequest{ - Root: smallTrieRoot[:], + RootHash: smallTrieRoot[:], KeyLimit: defaultRequestKeyLimit, BytesLimit: 2 * defaultRequestByteSizeLimit, }, @@ -191,48 +191,48 @@ func Test_Server_GetChangeProof(t *testing.T) { }{ "byteslimit is 0": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: 0, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: 0, }, proofNil: true, }, "keylimit is 0": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: 0, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: 0, }, proofNil: true, }, "keys out of order": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, - Start: []byte{1}, - End: []byte{0}, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, + StartKey: []byte{1}, + EndKey: []byte{0}, }, proofNil: true, }, "key limit too large": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: 2 * defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: 2 * defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, expectedResponseLen: defaultRequestKeyLimit, }, "bytes limit too large": { request: &syncpb.ChangeProofRequest{ - StartRoot: startRoot[:], - EndRoot: endRoot[:], - KeyLimit: defaultRequestKeyLimit, - BytesLimit: 2 * defaultRequestByteSizeLimit, + StartRootHash: startRoot[:], + EndRootHash: endRoot[:], + KeyLimit: defaultRequestKeyLimit, + BytesLimit: 2 * defaultRequestByteSizeLimit, }, expectedMaxResponseBytes: defaultRequestByteSizeLimit, }, diff --git a/x/sync/sync_test.go b/x/sync/sync_test.go index b1138fb96940..6421551ad5b9 100644 --- a/x/sync/sync_test.go +++ b/x/sync/sync_test.go @@ -38,23 +38,23 @@ type mockClient struct { } func (client *mockClient) GetChangeProof(ctx context.Context, request *syncpb.ChangeProofRequest, _ merkledb.MerkleDB) (*merkledb.ChangeProof, error) { - startRoot, err := ids.ToID(request.StartRoot) + startRoot, err := ids.ToID(request.StartRootHash) if err != nil { return nil, err } - endRoot, err := ids.ToID(request.EndRoot) + endRoot, err := ids.ToID(request.EndRootHash) if err != nil { return nil, err } - return client.db.GetChangeProof(ctx, startRoot, endRoot, request.Start, request.End, int(request.KeyLimit)) + return client.db.GetChangeProof(ctx, startRoot, endRoot, request.StartKey, request.EndKey, int(request.KeyLimit)) } func (client *mockClient) GetRangeProof(ctx context.Context, request *syncpb.RangeProofRequest) (*merkledb.RangeProof, error) { - root, err := ids.ToID(request.Root) + root, err := ids.ToID(request.RootHash) if err != nil { return nil, err } - return client.db.GetRangeProofAtRoot(ctx, root, request.Start, request.End, int(request.KeyLimit)) + return client.db.GetRangeProofAtRoot(ctx, root, request.StartKey, request.EndKey, int(request.KeyLimit)) } func Test_Creation(t *testing.T) { @@ -893,11 +893,11 @@ func Test_Sync_Error_During_Sync(t *testing.T) { ).AnyTimes() client.EXPECT().GetChangeProof(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn( func(ctx context.Context, request *syncpb.ChangeProofRequest, _ merkledb.MerkleDB) (*merkledb.ChangeProof, error) { - startRoot, err := ids.ToID(request.StartRoot) + startRoot, err := ids.ToID(request.StartRootHash) require.NoError(err) - endRoot, err := ids.ToID(request.EndRoot) + endRoot, err := ids.ToID(request.EndRootHash) require.NoError(err) - return dbToSync.GetChangeProof(ctx, startRoot, endRoot, request.Start, request.End, int(request.KeyLimit)) + return dbToSync.GetChangeProof(ctx, startRoot, endRoot, request.StartKey, request.EndKey, int(request.KeyLimit)) }, ).AnyTimes() @@ -979,19 +979,19 @@ func Test_Sync_Result_Correct_Root_Update_Root_During(t *testing.T) { client.EXPECT().GetRangeProof(gomock.Any(), gomock.Any()).DoAndReturn( func(ctx context.Context, request *syncpb.RangeProofRequest) (*merkledb.RangeProof, error) { <-updatedRootChan - root, err := ids.ToID(request.Root) + root, err := ids.ToID(request.RootHash) require.NoError(err) - return dbToSync.GetRangeProofAtRoot(ctx, root, request.Start, request.End, int(request.KeyLimit)) + return dbToSync.GetRangeProofAtRoot(ctx, root, request.StartKey, request.EndKey, int(request.KeyLimit)) }, ).AnyTimes() client.EXPECT().GetChangeProof(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn( func(ctx context.Context, request *syncpb.ChangeProofRequest, _ merkledb.MerkleDB) (*merkledb.ChangeProof, error) { <-updatedRootChan - startRoot, err := ids.ToID(request.StartRoot) + startRoot, err := ids.ToID(request.StartRootHash) require.NoError(err) - endRoot, err := ids.ToID(request.EndRoot) + endRoot, err := ids.ToID(request.EndRootHash) require.NoError(err) - return dbToSync.GetChangeProof(ctx, startRoot, endRoot, request.Start, request.End, int(request.KeyLimit)) + return dbToSync.GetChangeProof(ctx, startRoot, endRoot, request.StartKey, request.EndKey, int(request.KeyLimit)) }, ).AnyTimes() diff --git a/x/sync/syncmanager.go b/x/sync/syncmanager.go index 066cd8ef5a99..e7d8b250567e 100644 --- a/x/sync/syncmanager.go +++ b/x/sync/syncmanager.go @@ -262,12 +262,12 @@ func (m *StateSyncManager) getAndApplyChangeProof(ctx context.Context, workItem changeProof, err := m.config.Client.GetChangeProof( ctx, &syncpb.ChangeProofRequest{ - StartRoot: workItem.LocalRootID[:], - EndRoot: rootID[:], - Start: workItem.start, - End: workItem.end, - KeyLimit: defaultRequestKeyLimit, - BytesLimit: defaultRequestByteSizeLimit, + StartRootHash: workItem.LocalRootID[:], + EndRootHash: rootID[:], + StartKey: workItem.start, + EndKey: workItem.end, + KeyLimit: defaultRequestKeyLimit, + BytesLimit: defaultRequestByteSizeLimit, }, m.config.SyncDB, ) @@ -311,9 +311,9 @@ func (m *StateSyncManager) getAndApplyRangeProof(ctx context.Context, workItem * rootID := m.getTargetRoot() proof, err := m.config.Client.GetRangeProof(ctx, &syncpb.RangeProofRequest{ - Root: rootID[:], - Start: workItem.start, - End: workItem.end, + RootHash: rootID[:], + StartKey: workItem.start, + EndKey: workItem.end, KeyLimit: defaultRequestKeyLimit, BytesLimit: defaultRequestByteSizeLimit, },