From fee92bc72fad46b9bf889f9a7278d91e18cf6f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Fri, 23 Aug 2024 13:51:39 -0400 Subject: [PATCH 1/2] add sf.substreams.rpc.v2.EndpointInfo/Info service to endpoint if module is given to app --- app/tier1.go | 37 +- docs/release-notes/change-log.md | 1 + go.mod | 7 +- go.sum | 17 +- pb/sf/substreams/index/v1/keys.pb.go | 6 +- pb/sf/substreams/intern/v2/deltas.pb.go | 12 +- pb/sf/substreams/intern/v2/service.pb.go | 26 +- pb/sf/substreams/intern/v2/service_grpc.pb.go | 72 +-- pb/sf/substreams/options.pb.go | 6 +- .../pbsubstreamsrpcconnect/service.connect.go | 79 ++- pb/sf/substreams/rpc/v2/service.pb.go | 606 +++++++++--------- pb/sf/substreams/rpc/v2/service_grpc.pb.go | 173 +++-- .../substreams/sink/service/v1/service.pb.go | 44 +- .../sink/service/v1/service_grpc.pb.go | 49 +- pb/sf/substreams/v1/clock.pb.go | 8 +- pb/sf/substreams/v1/deltas.pb.go | 8 +- pb/sf/substreams/v1/modules.pb.go | 38 +- pb/sf/substreams/v1/package.pb.go | 12 +- proto/buf.lock | 8 + proto/buf.yaml | 2 +- proto/sf/substreams/rpc/v2/service.proto | 5 + service/server.go | 12 +- 22 files changed, 727 insertions(+), 501 deletions(-) create mode 100644 proto/buf.lock diff --git a/app/tier1.go b/app/tier1.go index ceacf7345..4b82a7282 100644 --- a/app/tier1.go +++ b/app/tier1.go @@ -6,6 +6,9 @@ import ( "net/url" "time" + "connectrpc.com/connect" + "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect" + ssconnect "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect" "github.com/streamingfast/substreams/reqctx" "github.com/streamingfast/bstream" @@ -15,6 +18,7 @@ import ( dauth "github.com/streamingfast/dauth" "github.com/streamingfast/dmetrics" "github.com/streamingfast/dstore" + pbfirehose "github.com/streamingfast/pbgo/sf/firehose/v2" "github.com/streamingfast/shutter" "github.com/streamingfast/substreams/client" "github.com/streamingfast/substreams/metrics" @@ -30,6 +34,12 @@ type Tier1Modules struct { HeadTimeDriftMetric *dmetrics.HeadTimeDrift HeadBlockNumberMetric *dmetrics.HeadBlockNum CheckPendingShutDown func() bool + InfoServer InfoServer +} + +type InfoServer interface { + Init(ctx context.Context, fhub *hub.ForkableHub, mergedBlocksStore dstore.Store, oneBlockStore dstore.Store, logger *zap.Logger) error + Info(ctx context.Context, request *pbfirehose.InfoRequest) (*pbfirehose.InfoResponse, error) } type Tier1Config struct { @@ -197,6 +207,16 @@ func (a *Tier1App) Run() error { }) go func() { + var infoServer ssconnect.EndpointInfoHandler + if a.modules.InfoServer != nil { + a.logger.Info("waiting until info server is ready") + infoServer = &InfoServerWrapper{a.modules.InfoServer} + if err := a.modules.InfoServer.Init(context.Background(), forkableHub, mergedBlocksStore, oneBlocksStore, a.logger); err != nil { + a.Shutdown(fmt.Errorf("cannot initialize info server: %w", err)) + return + } + } + if withLive { a.logger.Info("waiting until hub is real-time synced") select { @@ -210,7 +230,7 @@ func (a *Tier1App) Run() error { a.logger.Info("launching gRPC server", zap.Bool("live_support", withLive)) a.isReady.CompareAndSwap(false, true) - err := service.ListenTier1(a.config.GRPCListenAddr, svc, a.modules.Authenticator, a.logger, a.HealthCheck) + err := service.ListenTier1(a.config.GRPCListenAddr, svc, infoServer, a.modules.Authenticator, a.logger, a.HealthCheck) a.Shutdown(err) }() @@ -243,3 +263,18 @@ func (a *Tier1App) IsReady(ctx context.Context) bool { func (config *Tier1Config) Validate() error { return nil } + +var _ pbsubstreamsrpcconnect.EndpointInfoHandler = (*InfoServerWrapper)(nil) + +type InfoServerWrapper struct { + rpcInfoServer InfoServer +} + +// Info implements pbsubstreamsrpcconnect.EndpointInfoHandler. +func (i *InfoServerWrapper) Info(ctx context.Context, req *connect.Request[pbfirehose.InfoRequest]) (*connect.Response[pbfirehose.InfoResponse], error) { + resp, err := i.rpcInfoServer.Info(ctx, req.Msg) + if err != nil { + return nil, err + } + return connect.NewResponse(resp), nil +} diff --git a/docs/release-notes/change-log.md b/docs/release-notes/change-log.md index 30af9c853..6cb483f3b 100644 --- a/docs/release-notes/change-log.md +++ b/docs/release-notes/change-log.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +* Add `sf.substreams.rpc.v2.EndpointInfo/Info` endpoint (if the infoserver is given as a module, i.e. from firehose-core) * Add `substreams auth` command, to authenticate via `thegraph.market` and to get a dev API Key. * Rename `--discovery-endpoint` into `codegen-endpoint` in `substreams init` command. * Add `substreams codegen subgraph` command that takes a substreams `module` and an `spkg` and that generates a simple `subgraph` from the `module` output. diff --git a/go.mod b/go.mod index 43a374f0e..d14bafade 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/streamingfast/dgrpc v0.0.0-20240219152146-57bb131c39ca github.com/streamingfast/dstore v0.1.1-0.20240311181234-470a7a84936f github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 - github.com/streamingfast/pbgo v0.0.6-0.20231120172814-537d034aad5e + github.com/streamingfast/pbgo v0.0.6-0.20240823134334-812f6a16c5cb github.com/stretchr/testify v1.8.4 github.com/yourbasic/graph v0.0.0-20210606180040-8ecfec1c2869 go.uber.org/zap v1.26.0 @@ -40,9 +40,9 @@ require ( github.com/charmbracelet/huh v0.5.2 github.com/charmbracelet/huh/spinner v0.0.0-20240806005253-b7436a76999a github.com/charmbracelet/lipgloss v0.12.1 + github.com/charmbracelet/x/ansi v0.1.4 github.com/docker/cli v24.0.6+incompatible github.com/dustin/go-humanize v1.0.1 - github.com/fatih/color v1.13.0 github.com/golang-cz/textcase v1.2.1 github.com/google/uuid v1.6.0 github.com/hashicorp/go-multierror v1.1.1 @@ -85,7 +85,6 @@ require ( github.com/bits-and-blooms/bitset v1.12.0 // indirect github.com/bobg/go-generics/v2 v2.2.2 // indirect github.com/catppuccin/go v0.2.0 // indirect - github.com/charmbracelet/x/ansi v0.1.4 // indirect github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect github.com/charmbracelet/x/input v0.1.3 // indirect github.com/charmbracelet/x/term v0.1.1 // indirect @@ -95,8 +94,6 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/manifoldco/promptui v0.9.0 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-sqlite3 v1.14.17 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/mschoch/smat v0.2.0 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect diff --git a/go.sum b/go.sum index e1bd531fe..6e420adb7 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,6 @@ github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d h1:fSlGu5ePbkj github.com/blendle/zapdriver v1.3.2-0.20200203083823-9200777f8a3d/go.mod h1:yCBkgASmKHgUOFjK9h1sOytUVgA+JkQjqj3xYP4AdWY= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bobg/go-generics/v2 v2.1.1 h1:4rN9upY6Xm4TASSMeH+NzUghgO4h/SbNrQphIjRd/R0= -github.com/bobg/go-generics/v2 v2.1.1/go.mod h1:iPMSRVFlzkJSYOCXQ0n92RA3Vxw0RBv2E8j9ZODXgHk= github.com/bobg/go-generics/v2 v2.2.2 h1:cHTV51Vr/wSlwiNWvncz66E4QtoRw9qXZeEiLAmwqW8= github.com/bobg/go-generics/v2 v2.2.2/go.mod h1:ieOJ1ARFvk+HfMKbW1DT5UzJ/CJPKoiRm17QKK82bRE= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= @@ -234,8 +232,6 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -425,14 +421,9 @@ github.com/manifoldco/promptui v0.3.2/go.mod h1:8JU+igZ+eeiiRku4T5BjtKh2ms8sziGp github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= @@ -441,8 +432,6 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -561,8 +550,8 @@ github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 h1:RN5mrigyi github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308 h1:xlWSfi1BoPfsHtPb0VEHGUcAdBF208LUiFCwfaVPfLA= github.com/streamingfast/opaque v0.0.0-20210811180740-0c01d37ea308/go.mod h1:K1p8Bj/wG34KJvYzPUqtzpndffmpkrVY11u2hkyxCWQ= -github.com/streamingfast/pbgo v0.0.6-0.20231120172814-537d034aad5e h1:8hoT2QUwh+YNgIcCPux9xd4u9XojHR8hbyAzz7rQuEM= -github.com/streamingfast/pbgo v0.0.6-0.20231120172814-537d034aad5e/go.mod h1:fZuijmeFrqxW2YnnXmGrkQpUTHx3eHCaJUKwdvXAYKM= +github.com/streamingfast/pbgo v0.0.6-0.20240823134334-812f6a16c5cb h1:Xqt4ned9ELmQMKcg7cFbm56MKG2gBjnE1M+2HObOs6w= +github.com/streamingfast/pbgo v0.0.6-0.20240823134334-812f6a16c5cb/go.mod h1:eDQjKBYg9BWE2BTaV3UZeLZ5xw05+ywA9RCFTmM1w5Y= github.com/streamingfast/protoreflect v0.0.0-20231205191344-4b629d20ce8d h1:33VIARqUqBUKXJcuQoOS1rVSms54tgxhhNCmrLptpLg= github.com/streamingfast/protoreflect v0.0.0-20231205191344-4b629d20ce8d/go.mod h1:aBJivEdekmFWYSQ29EE/fN9IanJWJXbtjy3ky0XD/jE= github.com/streamingfast/sf-tracing v0.0.0-20240430173521-888827872b90 h1:94HllkX4ttYVilo8ZJv05b5z8JiMmqBvv4+Jdgk/+2A= @@ -815,7 +804,6 @@ golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -854,7 +842,6 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/pb/sf/substreams/index/v1/keys.pb.go b/pb/sf/substreams/index/v1/keys.pb.go index 5eceed6be..69014f689 100644 --- a/pb/sf/substreams/index/v1/keys.pb.go +++ b/pb/sf/substreams/index/v1/keys.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.34.2 // protoc (unknown) // source: sf/substreams/index/v1/keys.proto @@ -96,7 +96,7 @@ func file_sf_substreams_index_v1_keys_proto_rawDescGZIP() []byte { } var file_sf_substreams_index_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sf_substreams_index_v1_keys_proto_goTypes = []interface{}{ +var file_sf_substreams_index_v1_keys_proto_goTypes = []any{ (*Keys)(nil), // 0: sf.substreams.index.v1.Keys } var file_sf_substreams_index_v1_keys_proto_depIdxs = []int32{ @@ -113,7 +113,7 @@ func file_sf_substreams_index_v1_keys_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Keys); i { case 0: return &v.state diff --git a/pb/sf/substreams/intern/v2/deltas.pb.go b/pb/sf/substreams/intern/v2/deltas.pb.go index 38e8c0266..64ab590c8 100644 --- a/pb/sf/substreams/intern/v2/deltas.pb.go +++ b/pb/sf/substreams/intern/v2/deltas.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.34.2 // protoc (unknown) // source: sf/substreams/intern/v2/deltas.proto @@ -453,7 +453,7 @@ func file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP() []byte { var file_sf_substreams_intern_v2_deltas_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sf_substreams_intern_v2_deltas_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_sf_substreams_intern_v2_deltas_proto_goTypes = []interface{}{ +var file_sf_substreams_intern_v2_deltas_proto_goTypes = []any{ (Operation_Type)(0), // 0: sf.substreams.internal.v2.Operation.Type (*ModuleOutput)(nil), // 1: sf.substreams.internal.v2.ModuleOutput (*Operations)(nil), // 2: sf.substreams.internal.v2.Operations @@ -479,7 +479,7 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ModuleOutput); i { case 0: return &v.state @@ -491,7 +491,7 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { return nil } } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_deltas_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Operations); i { case 0: return &v.state @@ -503,7 +503,7 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { return nil } } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_deltas_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Operation); i { case 0: return &v.state @@ -516,7 +516,7 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { } } } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].OneofWrappers = []any{ (*ModuleOutput_MapOutput)(nil), (*ModuleOutput_StoreDeltas)(nil), } diff --git a/pb/sf/substreams/intern/v2/service.pb.go b/pb/sf/substreams/intern/v2/service.pb.go index ee42e1fae..f7656cd5f 100644 --- a/pb/sf/substreams/intern/v2/service.pb.go +++ b/pb/sf/substreams/intern/v2/service.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.34.2 // protoc (unknown) // source: sf/substreams/intern/v2/service.proto @@ -74,7 +74,7 @@ type ProcessRangeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in sf/substreams/intern/v2/service.proto. StopBlockNum uint64 `protobuf:"varint,2,opt,name=stop_block_num,json=stopBlockNum,proto3" json:"stop_block_num,omitempty"` OutputModule string `protobuf:"bytes,3,opt,name=output_module,json=outputModule,proto3" json:"output_module,omitempty"` Modules *v1.Modules `protobuf:"bytes,4,opt,name=modules,proto3" json:"modules,omitempty"` @@ -122,7 +122,7 @@ func (*ProcessRangeRequest) Descriptor() ([]byte, []int) { return file_sf_substreams_intern_v2_service_proto_rawDescGZIP(), []int{0} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in sf/substreams/intern/v2/service.proto. func (x *ProcessRangeRequest) GetStopBlockNum() uint64 { if x != nil { return x.StopBlockNum @@ -911,7 +911,7 @@ func file_sf_substreams_intern_v2_service_proto_rawDescGZIP() []byte { var file_sf_substreams_intern_v2_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sf_substreams_intern_v2_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_sf_substreams_intern_v2_service_proto_goTypes = []interface{}{ +var file_sf_substreams_intern_v2_service_proto_goTypes = []any{ (WASMModuleType)(0), // 0: sf.substreams.internal.v2.WASMModuleType (*ProcessRangeRequest)(nil), // 1: sf.substreams.internal.v2.ProcessRangeRequest (*ProcessRangeResponse)(nil), // 2: sf.substreams.internal.v2.ProcessRangeResponse @@ -948,7 +948,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_intern_v2_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ProcessRangeRequest); i { case 0: return &v.state @@ -960,7 +960,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ProcessRangeResponse); i { case 0: return &v.state @@ -972,7 +972,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Update); i { case 0: return &v.state @@ -984,7 +984,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ModuleStats); i { case 0: return &v.state @@ -996,7 +996,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ExternalCallMetric); i { case 0: return &v.state @@ -1008,7 +1008,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Completed); i { case 0: return &v.state @@ -1020,7 +1020,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Failed); i { case 0: return &v.state @@ -1032,7 +1032,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { return nil } } - file_sf_substreams_intern_v2_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_intern_v2_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*BlockRange); i { case 0: return &v.state @@ -1045,7 +1045,7 @@ func file_sf_substreams_intern_v2_service_proto_init() { } } } - file_sf_substreams_intern_v2_service_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_sf_substreams_intern_v2_service_proto_msgTypes[1].OneofWrappers = []any{ (*ProcessRangeResponse_Failed)(nil), (*ProcessRangeResponse_Completed)(nil), (*ProcessRangeResponse_Update)(nil), diff --git a/pb/sf/substreams/intern/v2/service_grpc.pb.go b/pb/sf/substreams/intern/v2/service_grpc.pb.go index c4cb839f7..3557010df 100644 --- a/pb/sf/substreams/intern/v2/service_grpc.pb.go +++ b/pb/sf/substreams/intern/v2/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sf/substreams/intern/v2/service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Substreams_ProcessRange_FullMethodName = "/sf.substreams.internal.v2.Substreams/ProcessRange" @@ -26,7 +26,7 @@ const ( // // 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. type SubstreamsClient interface { - ProcessRange(ctx context.Context, in *ProcessRangeRequest, opts ...grpc.CallOption) (Substreams_ProcessRangeClient, error) + ProcessRange(ctx context.Context, in *ProcessRangeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProcessRangeResponse], error) } type substreamsClient struct { @@ -37,12 +37,13 @@ func NewSubstreamsClient(cc grpc.ClientConnInterface) SubstreamsClient { return &substreamsClient{cc} } -func (c *substreamsClient) ProcessRange(ctx context.Context, in *ProcessRangeRequest, opts ...grpc.CallOption) (Substreams_ProcessRangeClient, error) { - stream, err := c.cc.NewStream(ctx, &Substreams_ServiceDesc.Streams[0], Substreams_ProcessRange_FullMethodName, opts...) +func (c *substreamsClient) ProcessRange(ctx context.Context, in *ProcessRangeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProcessRangeResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Substreams_ServiceDesc.Streams[0], Substreams_ProcessRange_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &substreamsProcessRangeClient{stream} + x := &grpc.GenericClientStream[ProcessRangeRequest, ProcessRangeResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -52,37 +53,27 @@ func (c *substreamsClient) ProcessRange(ctx context.Context, in *ProcessRangeReq return x, nil } -type Substreams_ProcessRangeClient interface { - Recv() (*ProcessRangeResponse, error) - grpc.ClientStream -} - -type substreamsProcessRangeClient struct { - grpc.ClientStream -} - -func (x *substreamsProcessRangeClient) Recv() (*ProcessRangeResponse, error) { - m := new(ProcessRangeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Substreams_ProcessRangeClient = grpc.ServerStreamingClient[ProcessRangeResponse] // SubstreamsServer is the server API for Substreams service. // All implementations should embed UnimplementedSubstreamsServer -// for forward compatibility +// for forward compatibility. type SubstreamsServer interface { - ProcessRange(*ProcessRangeRequest, Substreams_ProcessRangeServer) error + ProcessRange(*ProcessRangeRequest, grpc.ServerStreamingServer[ProcessRangeResponse]) error } -// UnimplementedSubstreamsServer should be embedded to have forward compatible implementations. -type UnimplementedSubstreamsServer struct { -} +// UnimplementedSubstreamsServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSubstreamsServer struct{} -func (UnimplementedSubstreamsServer) ProcessRange(*ProcessRangeRequest, Substreams_ProcessRangeServer) error { +func (UnimplementedSubstreamsServer) ProcessRange(*ProcessRangeRequest, grpc.ServerStreamingServer[ProcessRangeResponse]) error { return status.Errorf(codes.Unimplemented, "method ProcessRange not implemented") } +func (UnimplementedSubstreamsServer) testEmbeddedByValue() {} // UnsafeSubstreamsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SubstreamsServer will @@ -92,6 +83,13 @@ type UnsafeSubstreamsServer interface { } func RegisterSubstreamsServer(s grpc.ServiceRegistrar, srv SubstreamsServer) { + // If the following call pancis, it indicates UnimplementedSubstreamsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Substreams_ServiceDesc, srv) } @@ -100,21 +98,11 @@ func _Substreams_ProcessRange_Handler(srv interface{}, stream grpc.ServerStream) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(SubstreamsServer).ProcessRange(m, &substreamsProcessRangeServer{stream}) -} - -type Substreams_ProcessRangeServer interface { - Send(*ProcessRangeResponse) error - grpc.ServerStream + return srv.(SubstreamsServer).ProcessRange(m, &grpc.GenericServerStream[ProcessRangeRequest, ProcessRangeResponse]{ServerStream: stream}) } -type substreamsProcessRangeServer struct { - grpc.ServerStream -} - -func (x *substreamsProcessRangeServer) Send(m *ProcessRangeResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Substreams_ProcessRangeServer = grpc.ServerStreamingServer[ProcessRangeResponse] // Substreams_ServiceDesc is the grpc.ServiceDesc for Substreams service. // It's only intended for direct use with grpc.RegisterService, diff --git a/pb/sf/substreams/options.pb.go b/pb/sf/substreams/options.pb.go index 6a00c93db..9325fc9a6 100644 --- a/pb/sf/substreams/options.pb.go +++ b/pb/sf/substreams/options.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.34.2 // protoc (unknown) // source: sf/substreams/options.proto @@ -137,7 +137,7 @@ func file_sf_substreams_options_proto_rawDescGZIP() []byte { } var file_sf_substreams_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sf_substreams_options_proto_goTypes = []interface{}{ +var file_sf_substreams_options_proto_goTypes = []any{ (*FieldOptions)(nil), // 0: sf.substreams.FieldOptions (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions } @@ -157,7 +157,7 @@ func file_sf_substreams_options_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_options_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions); i { case 0: return &v.state diff --git a/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect/service.connect.go b/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect/service.connect.go index 23ff67f00..f523c65b8 100644 --- a/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect/service.connect.go +++ b/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect/service.connect.go @@ -8,6 +8,7 @@ import ( connect "connectrpc.com/connect" context "context" errors "errors" + v21 "github.com/streamingfast/pbgo/sf/firehose/v2" v2 "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2" http "net/http" strings "strings" @@ -23,6 +24,8 @@ const _ = connect.IsAtLeastVersion1_13_0 const ( // StreamName is the fully-qualified name of the Stream service. StreamName = "sf.substreams.rpc.v2.Stream" + // EndpointInfoName is the fully-qualified name of the EndpointInfo service. + EndpointInfoName = "sf.substreams.rpc.v2.EndpointInfo" ) // These constants are the fully-qualified names of the RPCs defined in this package. They're @@ -35,12 +38,16 @@ const ( const ( // StreamBlocksProcedure is the fully-qualified name of the Stream's Blocks RPC. StreamBlocksProcedure = "/sf.substreams.rpc.v2.Stream/Blocks" + // EndpointInfoInfoProcedure is the fully-qualified name of the EndpointInfo's Info RPC. + EndpointInfoInfoProcedure = "/sf.substreams.rpc.v2.EndpointInfo/Info" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. var ( - streamServiceDescriptor = v2.File_sf_substreams_rpc_v2_service_proto.Services().ByName("Stream") - streamBlocksMethodDescriptor = streamServiceDescriptor.Methods().ByName("Blocks") + streamServiceDescriptor = v2.File_sf_substreams_rpc_v2_service_proto.Services().ByName("Stream") + streamBlocksMethodDescriptor = streamServiceDescriptor.Methods().ByName("Blocks") + endpointInfoServiceDescriptor = v2.File_sf_substreams_rpc_v2_service_proto.Services().ByName("EndpointInfo") + endpointInfoInfoMethodDescriptor = endpointInfoServiceDescriptor.Methods().ByName("Info") ) // StreamClient is a client for the sf.substreams.rpc.v2.Stream service. @@ -110,3 +117,71 @@ type UnimplementedStreamHandler struct{} func (UnimplementedStreamHandler) Blocks(context.Context, *connect.Request[v2.Request], *connect.ServerStream[v2.Response]) error { return connect.NewError(connect.CodeUnimplemented, errors.New("sf.substreams.rpc.v2.Stream.Blocks is not implemented")) } + +// EndpointInfoClient is a client for the sf.substreams.rpc.v2.EndpointInfo service. +type EndpointInfoClient interface { + Info(context.Context, *connect.Request[v21.InfoRequest]) (*connect.Response[v21.InfoResponse], error) +} + +// NewEndpointInfoClient constructs a client for the sf.substreams.rpc.v2.EndpointInfo service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewEndpointInfoClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EndpointInfoClient { + baseURL = strings.TrimRight(baseURL, "/") + return &endpointInfoClient{ + info: connect.NewClient[v21.InfoRequest, v21.InfoResponse]( + httpClient, + baseURL+EndpointInfoInfoProcedure, + connect.WithSchema(endpointInfoInfoMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// endpointInfoClient implements EndpointInfoClient. +type endpointInfoClient struct { + info *connect.Client[v21.InfoRequest, v21.InfoResponse] +} + +// Info calls sf.substreams.rpc.v2.EndpointInfo.Info. +func (c *endpointInfoClient) Info(ctx context.Context, req *connect.Request[v21.InfoRequest]) (*connect.Response[v21.InfoResponse], error) { + return c.info.CallUnary(ctx, req) +} + +// EndpointInfoHandler is an implementation of the sf.substreams.rpc.v2.EndpointInfo service. +type EndpointInfoHandler interface { + Info(context.Context, *connect.Request[v21.InfoRequest]) (*connect.Response[v21.InfoResponse], error) +} + +// NewEndpointInfoHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewEndpointInfoHandler(svc EndpointInfoHandler, opts ...connect.HandlerOption) (string, http.Handler) { + endpointInfoInfoHandler := connect.NewUnaryHandler( + EndpointInfoInfoProcedure, + svc.Info, + connect.WithSchema(endpointInfoInfoMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/sf.substreams.rpc.v2.EndpointInfo/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case EndpointInfoInfoProcedure: + endpointInfoInfoHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedEndpointInfoHandler returns CodeUnimplemented from all methods. +type UnimplementedEndpointInfoHandler struct{} + +func (UnimplementedEndpointInfoHandler) Info(context.Context, *connect.Request[v21.InfoRequest]) (*connect.Response[v21.InfoResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("sf.substreams.rpc.v2.EndpointInfo.Info is not implemented")) +} diff --git a/pb/sf/substreams/rpc/v2/service.pb.go b/pb/sf/substreams/rpc/v2/service.pb.go index d34fef820..b871c6669 100644 --- a/pb/sf/substreams/rpc/v2/service.pb.go +++ b/pb/sf/substreams/rpc/v2/service.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: sf/substreams/rpc/v2/service.proto package pbsubstreamsrpc import ( + v2 "github.com/streamingfast/pbgo/sf/firehose/v2" v1 "github.com/streamingfast/substreams/pb/sf/substreams/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1587,287 +1588,294 @@ var file_sf_substreams_rpc_v2_service_proto_rawDesc = []byte{ 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, - 0x6f, 0x70, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x0f, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x55, 0x0a, 0x28, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, - 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x23, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x6f, 0x72, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x6f, 0x70, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x6f, 0x70, 0x4d, - 0x6f, 0x64, 0x65, 0x22, 0xc9, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3d, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x43, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x53, 0x0a, 0x11, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x75, 0x6e, 0x64, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x3e, - 0x0a, 0x0b, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x48, 0x00, 0x52, 0x0a, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, - 0x0a, 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x66, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, + 0x2f, 0x76, 0x32, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x9d, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, + 0x2a, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x55, + 0x0a, 0x28, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x23, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x6f, 0x72, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x6f, 0x70, 0x4d, 0x6f, + 0x64, 0x65, 0x22, 0xc9, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x53, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x75, 0x6e, 0x64, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x3e, 0x0a, + 0x0b, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x0a, 0x66, 0x61, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, 0x0a, + 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, + 0x32, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x67, 0x0a, 0x17, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x67, 0x0a, 0x17, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x73, - 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x15, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x83, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x66, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x43, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xf1, 0x02, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, - 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, - 0x2e, 0x4d, 0x61, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, - 0x2c, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x51, 0x0a, - 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, + 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x15, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x83, + 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x6e, 0x64, 0x6f, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x66, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x22, 0xf1, 0x02, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x0f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x4d, 0x61, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, - 0x12, 0x57, 0x0a, 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, - 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x48, 0x61, 0x6e, 0x64, - 0x6f, 0x66, 0x66, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, - 0x6c, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x17, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xac, 0x01, - 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, - 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, - 0x0f, 0x4d, 0x61, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, - 0x6d, 0x61, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0xbd, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x2c, + 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x51, 0x0a, 0x11, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, + 0x61, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x0f, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x4d, 0x61, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, + 0x57, 0x0a, 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, + 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x6f, + 0x66, 0x66, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, + 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x17, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xac, 0x01, 0x0a, + 0x13, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x10, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x64, 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, - 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, - 0x6c, 0x6f, 0x67, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x73, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x0f, + 0x4d, 0x61, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x6d, + 0x61, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xbd, + 0x01, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x10, 0x64, 0x65, 0x62, 0x75, 0x67, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, + 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6c, + 0x6f, 0x67, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, - 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x67, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, - 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x0e, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x57, 0x72, - 0x69, 0x74, 0x74, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, - 0x67, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6c, 0x6f, 0x67, 0x73, - 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x03, 0x4a, 0x6f, - 0x62, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, - 0x6f, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x73, 0x22, 0x6e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x22, 0xc4, 0x05, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x18, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, - 0x5c, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6c, 0x6c, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x61, - 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x40, 0x0a, - 0x1d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, - 0x33, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x1b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x69, 0x6e, - 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x69, - 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x6d, 0x65, 0x72, 0x67, - 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x4d, 0x65, 0x72, 0x67, 0x69, 0x6e, 0x67, - 0x12, 0x38, 0x0a, 0x18, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x16, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x67, 0x75, 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x57, 0x0a, 0x12, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6d, - 0x65, 0x4d, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, - 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x6c, 0x64, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0x4a, - 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, - 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0x53, 0x0a, 0x06, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, + 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x57, 0x72, 0x69, + 0x74, 0x74, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6c, 0x6f, 0x67, 0x73, 0x54, + 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x03, 0x4a, 0x6f, 0x62, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x6f, + 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x73, 0x22, 0x6e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x22, 0xc4, 0x05, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x18, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x5c, + 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x6c, + 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x40, 0x0a, 0x1d, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x33, + 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x1b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x28, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x69, 0x6e, + 0x67, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x69, + 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x4d, 0x65, 0x72, 0x67, 0x69, 0x6e, 0x67, 0x12, + 0x38, 0x0a, 0x18, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x67, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x16, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x67, + 0x75, 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x57, 0x0a, 0x12, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, + 0x4d, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, + 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0x4a, 0x0a, + 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0x53, 0x0a, 0x06, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, - 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x32, 0x3b, 0x70, - 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x72, 0x70, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0x51, + 0x0a, 0x0c, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x41, + 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x68, 0x6f, 0x73, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x66, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, + 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, + 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x32, + 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x72, 0x70, 0x63, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1884,7 +1892,7 @@ func file_sf_substreams_rpc_v2_service_proto_rawDescGZIP() []byte { var file_sf_substreams_rpc_v2_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sf_substreams_rpc_v2_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_sf_substreams_rpc_v2_service_proto_goTypes = []interface{}{ +var file_sf_substreams_rpc_v2_service_proto_goTypes = []any{ (StoreDelta_Operation)(0), // 0: sf.substreams.rpc.v2.StoreDelta.Operation (*Request)(nil), // 1: sf.substreams.rpc.v2.Request (*Response)(nil), // 2: sf.substreams.rpc.v2.Response @@ -1909,6 +1917,8 @@ var file_sf_substreams_rpc_v2_service_proto_goTypes = []interface{}{ (*v1.BlockRef)(nil), // 21: sf.substreams.v1.BlockRef (*v1.Clock)(nil), // 22: sf.substreams.v1.Clock (*anypb.Any)(nil), // 23: google.protobuf.Any + (*v2.InfoRequest)(nil), // 24: sf.firehose.v2.InfoRequest + (*v2.InfoResponse)(nil), // 25: sf.firehose.v2.InfoResponse } var file_sf_substreams_rpc_v2_service_proto_depIdxs = []int32{ 20, // 0: sf.substreams.rpc.v2.Request.modules:type_name -> sf.substreams.v1.Modules @@ -1937,9 +1947,11 @@ var file_sf_substreams_rpc_v2_service_proto_depIdxs = []int32{ 17, // 23: sf.substreams.rpc.v2.ModuleStats.external_call_metrics:type_name -> sf.substreams.rpc.v2.ExternalCallMetric 0, // 24: sf.substreams.rpc.v2.StoreDelta.operation:type_name -> sf.substreams.rpc.v2.StoreDelta.Operation 1, // 25: sf.substreams.rpc.v2.Stream.Blocks:input_type -> sf.substreams.rpc.v2.Request - 2, // 26: sf.substreams.rpc.v2.Stream.Blocks:output_type -> sf.substreams.rpc.v2.Response - 26, // [26:27] is the sub-list for method output_type - 25, // [25:26] is the sub-list for method input_type + 24, // 26: sf.substreams.rpc.v2.EndpointInfo.Info:input_type -> sf.firehose.v2.InfoRequest + 2, // 27: sf.substreams.rpc.v2.Stream.Blocks:output_type -> sf.substreams.rpc.v2.Response + 25, // 28: sf.substreams.rpc.v2.EndpointInfo.Info:output_type -> sf.firehose.v2.InfoResponse + 27, // [27:29] is the sub-list for method output_type + 25, // [25:27] is the sub-list for method input_type 25, // [25:25] is the sub-list for extension type_name 25, // [25:25] is the sub-list for extension extendee 0, // [0:25] is the sub-list for field type_name @@ -1951,7 +1963,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_rpc_v2_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Request); i { case 0: return &v.state @@ -1963,7 +1975,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Response); i { case 0: return &v.state @@ -1975,7 +1987,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*BlockUndoSignal); i { case 0: return &v.state @@ -1987,7 +1999,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*BlockScopedData); i { case 0: return &v.state @@ -1999,7 +2011,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SessionInit); i { case 0: return &v.state @@ -2011,7 +2023,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*InitialSnapshotComplete); i { case 0: return &v.state @@ -2023,7 +2035,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*InitialSnapshotData); i { case 0: return &v.state @@ -2035,7 +2047,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*MapModuleOutput); i { case 0: return &v.state @@ -2047,7 +2059,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*StoreModuleOutput); i { case 0: return &v.state @@ -2059,7 +2071,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*OutputDebugInfo); i { case 0: return &v.state @@ -2071,7 +2083,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ModulesProgress); i { case 0: return &v.state @@ -2083,7 +2095,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ProcessedBytes); i { case 0: return &v.state @@ -2095,7 +2107,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Error); i { case 0: return &v.state @@ -2107,7 +2119,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*Job); i { case 0: return &v.state @@ -2119,7 +2131,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*Stage); i { case 0: return &v.state @@ -2131,7 +2143,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ModuleStats); i { case 0: return &v.state @@ -2143,7 +2155,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ExternalCallMetric); i { case 0: return &v.state @@ -2155,7 +2167,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*StoreDelta); i { case 0: return &v.state @@ -2167,7 +2179,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { return nil } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_rpc_v2_service_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*BlockRange); i { case 0: return &v.state @@ -2180,7 +2192,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { } } } - file_sf_substreams_rpc_v2_service_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_sf_substreams_rpc_v2_service_proto_msgTypes[1].OneofWrappers = []any{ (*Response_Session)(nil), (*Response_Progress)(nil), (*Response_BlockScopedData)(nil), @@ -2197,7 +2209,7 @@ func file_sf_substreams_rpc_v2_service_proto_init() { NumEnums: 1, NumMessages: 19, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_sf_substreams_rpc_v2_service_proto_goTypes, DependencyIndexes: file_sf_substreams_rpc_v2_service_proto_depIdxs, diff --git a/pb/sf/substreams/rpc/v2/service_grpc.pb.go b/pb/sf/substreams/rpc/v2/service_grpc.pb.go index 5415b11a1..1c9c4c009 100644 --- a/pb/sf/substreams/rpc/v2/service_grpc.pb.go +++ b/pb/sf/substreams/rpc/v2/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sf/substreams/rpc/v2/service.proto @@ -8,6 +8,7 @@ package pbsubstreamsrpc import ( context "context" + v2 "github.com/streamingfast/pbgo/sf/firehose/v2" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -15,8 +16,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Stream_Blocks_FullMethodName = "/sf.substreams.rpc.v2.Stream/Blocks" @@ -26,7 +27,7 @@ const ( // // 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. type StreamClient interface { - Blocks(ctx context.Context, in *Request, opts ...grpc.CallOption) (Stream_BlocksClient, error) + Blocks(ctx context.Context, in *Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Response], error) } type streamClient struct { @@ -37,12 +38,13 @@ func NewStreamClient(cc grpc.ClientConnInterface) StreamClient { return &streamClient{cc} } -func (c *streamClient) Blocks(ctx context.Context, in *Request, opts ...grpc.CallOption) (Stream_BlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &Stream_ServiceDesc.Streams[0], Stream_Blocks_FullMethodName, opts...) +func (c *streamClient) Blocks(ctx context.Context, in *Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Response], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Stream_ServiceDesc.Streams[0], Stream_Blocks_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &streamBlocksClient{stream} + x := &grpc.GenericClientStream[Request, Response]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -52,37 +54,27 @@ func (c *streamClient) Blocks(ctx context.Context, in *Request, opts ...grpc.Cal return x, nil } -type Stream_BlocksClient interface { - Recv() (*Response, error) - grpc.ClientStream -} - -type streamBlocksClient struct { - grpc.ClientStream -} - -func (x *streamBlocksClient) Recv() (*Response, error) { - m := new(Response) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Stream_BlocksClient = grpc.ServerStreamingClient[Response] // StreamServer is the server API for Stream service. // All implementations should embed UnimplementedStreamServer -// for forward compatibility +// for forward compatibility. type StreamServer interface { - Blocks(*Request, Stream_BlocksServer) error + Blocks(*Request, grpc.ServerStreamingServer[Response]) error } -// UnimplementedStreamServer should be embedded to have forward compatible implementations. -type UnimplementedStreamServer struct { -} +// UnimplementedStreamServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedStreamServer struct{} -func (UnimplementedStreamServer) Blocks(*Request, Stream_BlocksServer) error { +func (UnimplementedStreamServer) Blocks(*Request, grpc.ServerStreamingServer[Response]) error { return status.Errorf(codes.Unimplemented, "method Blocks not implemented") } +func (UnimplementedStreamServer) testEmbeddedByValue() {} // UnsafeStreamServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to StreamServer will @@ -92,6 +84,13 @@ type UnsafeStreamServer interface { } func RegisterStreamServer(s grpc.ServiceRegistrar, srv StreamServer) { + // If the following call pancis, it indicates UnimplementedStreamServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Stream_ServiceDesc, srv) } @@ -100,21 +99,11 @@ func _Stream_Blocks_Handler(srv interface{}, stream grpc.ServerStream) error { if err := stream.RecvMsg(m); err != nil { return err } - return srv.(StreamServer).Blocks(m, &streamBlocksServer{stream}) -} - -type Stream_BlocksServer interface { - Send(*Response) error - grpc.ServerStream + return srv.(StreamServer).Blocks(m, &grpc.GenericServerStream[Request, Response]{ServerStream: stream}) } -type streamBlocksServer struct { - grpc.ServerStream -} - -func (x *streamBlocksServer) Send(m *Response) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Stream_BlocksServer = grpc.ServerStreamingServer[Response] // Stream_ServiceDesc is the grpc.ServiceDesc for Stream service. // It's only intended for direct use with grpc.RegisterService, @@ -132,3 +121,103 @@ var Stream_ServiceDesc = grpc.ServiceDesc{ }, Metadata: "sf/substreams/rpc/v2/service.proto", } + +const ( + EndpointInfo_Info_FullMethodName = "/sf.substreams.rpc.v2.EndpointInfo/Info" +) + +// EndpointInfoClient is the client API for EndpointInfo 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. +type EndpointInfoClient interface { + Info(ctx context.Context, in *v2.InfoRequest, opts ...grpc.CallOption) (*v2.InfoResponse, error) +} + +type endpointInfoClient struct { + cc grpc.ClientConnInterface +} + +func NewEndpointInfoClient(cc grpc.ClientConnInterface) EndpointInfoClient { + return &endpointInfoClient{cc} +} + +func (c *endpointInfoClient) Info(ctx context.Context, in *v2.InfoRequest, opts ...grpc.CallOption) (*v2.InfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(v2.InfoResponse) + err := c.cc.Invoke(ctx, EndpointInfo_Info_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EndpointInfoServer is the server API for EndpointInfo service. +// All implementations should embed UnimplementedEndpointInfoServer +// for forward compatibility. +type EndpointInfoServer interface { + Info(context.Context, *v2.InfoRequest) (*v2.InfoResponse, error) +} + +// UnimplementedEndpointInfoServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedEndpointInfoServer struct{} + +func (UnimplementedEndpointInfoServer) Info(context.Context, *v2.InfoRequest) (*v2.InfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} +func (UnimplementedEndpointInfoServer) testEmbeddedByValue() {} + +// UnsafeEndpointInfoServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EndpointInfoServer will +// result in compilation errors. +type UnsafeEndpointInfoServer interface { + mustEmbedUnimplementedEndpointInfoServer() +} + +func RegisterEndpointInfoServer(s grpc.ServiceRegistrar, srv EndpointInfoServer) { + // If the following call pancis, it indicates UnimplementedEndpointInfoServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&EndpointInfo_ServiceDesc, srv) +} + +func _EndpointInfo_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v2.InfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EndpointInfoServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EndpointInfo_Info_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EndpointInfoServer).Info(ctx, req.(*v2.InfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// EndpointInfo_ServiceDesc is the grpc.ServiceDesc for EndpointInfo service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EndpointInfo_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "sf.substreams.rpc.v2.EndpointInfo", + HandlerType: (*EndpointInfoServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Info", + Handler: _EndpointInfo_Info_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sf/substreams/rpc/v2/service.proto", +} diff --git a/pb/sf/substreams/sink/service/v1/service.pb.go b/pb/sf/substreams/sink/service/v1/service.pb.go index d5e2d311e..67f40c90e 100644 --- a/pb/sf/substreams/sink/service/v1/service.pb.go +++ b/pb/sf/substreams/sink/service/v1/service.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.34.2 // protoc (unknown) // source: sf/substreams/sink/service/v1/service.proto @@ -1532,7 +1532,7 @@ func file_sf_substreams_sink_service_v1_service_proto_rawDescGZIP() []byte { var file_sf_substreams_sink_service_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sf_substreams_sink_service_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_sf_substreams_sink_service_v1_service_proto_goTypes = []interface{}{ +var file_sf_substreams_sink_service_v1_service_proto_goTypes = []any{ (DeploymentStatus)(0), // 0: sf.substreams.sink.service.v1.DeploymentStatus (*DeployRequest)(nil), // 1: sf.substreams.sink.service.v1.DeployRequest (*Parameter)(nil), // 2: sf.substreams.sink.service.v1.Parameter @@ -1611,7 +1611,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_sink_service_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeployRequest); i { case 0: return &v.state @@ -1623,7 +1623,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Parameter); i { case 0: return &v.state @@ -1635,7 +1635,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DeployResponse); i { case 0: return &v.state @@ -1647,7 +1647,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UpdateRequest); i { case 0: return &v.state @@ -1659,7 +1659,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*UpdateResponse); i { case 0: return &v.state @@ -1671,7 +1671,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*InfoRequest); i { case 0: return &v.state @@ -1683,7 +1683,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*InfoResponse); i { case 0: return &v.state @@ -1695,7 +1695,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SinkProgress); i { case 0: return &v.state @@ -1707,7 +1707,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*PackageInfo); i { case 0: return &v.state @@ -1719,7 +1719,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*ListRequest); i { case 0: return &v.state @@ -1731,7 +1731,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ListResponse); i { case 0: return &v.state @@ -1743,7 +1743,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*DeploymentWithStatus); i { case 0: return &v.state @@ -1755,7 +1755,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*RemoveRequest); i { case 0: return &v.state @@ -1767,7 +1767,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*RemoveResponse); i { case 0: return &v.state @@ -1779,7 +1779,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*PauseRequest); i { case 0: return &v.state @@ -1791,7 +1791,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*PauseResponse); i { case 0: return &v.state @@ -1803,7 +1803,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*StopRequest); i { case 0: return &v.state @@ -1815,7 +1815,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*StopResponse); i { case 0: return &v.state @@ -1827,7 +1827,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ResumeRequest); i { case 0: return &v.state @@ -1839,7 +1839,7 @@ func file_sf_substreams_sink_service_v1_service_proto_init() { return nil } } - file_sf_substreams_sink_service_v1_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_sink_service_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*ResumeResponse); i { case 0: return &v.state diff --git a/pb/sf/substreams/sink/service/v1/service_grpc.pb.go b/pb/sf/substreams/sink/service/v1/service_grpc.pb.go index 23e3348fd..3c2a40116 100644 --- a/pb/sf/substreams/sink/service/v1/service_grpc.pb.go +++ b/pb/sf/substreams/sink/service/v1/service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: sf/substreams/sink/service/v1/service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Provider_Deploy_FullMethodName = "/sf.substreams.sink.service.v1.Provider/Deploy" @@ -52,8 +52,9 @@ func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient { } func (c *providerClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*DeployResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeployResponse) - err := c.cc.Invoke(ctx, Provider_Deploy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Deploy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +62,9 @@ func (c *providerClient) Deploy(ctx context.Context, in *DeployRequest, opts ... } func (c *providerClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateResponse) - err := c.cc.Invoke(ctx, Provider_Update_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Update_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +72,9 @@ func (c *providerClient) Update(ctx context.Context, in *UpdateRequest, opts ... } func (c *providerClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InfoResponse) - err := c.cc.Invoke(ctx, Provider_Info_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Info_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +82,9 @@ func (c *providerClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc } func (c *providerClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListResponse) - err := c.cc.Invoke(ctx, Provider_List_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_List_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +92,9 @@ func (c *providerClient) List(ctx context.Context, in *ListRequest, opts ...grpc } func (c *providerClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*PauseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PauseResponse) - err := c.cc.Invoke(ctx, Provider_Pause_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Pause_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -97,8 +102,9 @@ func (c *providerClient) Pause(ctx context.Context, in *PauseRequest, opts ...gr } func (c *providerClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopResponse) - err := c.cc.Invoke(ctx, Provider_Stop_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Stop_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,8 +112,9 @@ func (c *providerClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc } func (c *providerClient) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*ResumeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResumeResponse) - err := c.cc.Invoke(ctx, Provider_Resume_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Resume_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,8 +122,9 @@ func (c *providerClient) Resume(ctx context.Context, in *ResumeRequest, opts ... } func (c *providerClient) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveResponse) - err := c.cc.Invoke(ctx, Provider_Remove_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_Remove_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -125,7 +133,7 @@ func (c *providerClient) Remove(ctx context.Context, in *RemoveRequest, opts ... // ProviderServer is the server API for Provider service. // All implementations should embed UnimplementedProviderServer -// for forward compatibility +// for forward compatibility. type ProviderServer interface { Deploy(context.Context, *DeployRequest) (*DeployResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) @@ -137,9 +145,12 @@ type ProviderServer interface { Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) } -// UnimplementedProviderServer should be embedded to have forward compatible implementations. -type UnimplementedProviderServer struct { -} +// UnimplementedProviderServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProviderServer struct{} func (UnimplementedProviderServer) Deploy(context.Context, *DeployRequest) (*DeployResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deploy not implemented") @@ -165,6 +176,7 @@ func (UnimplementedProviderServer) Resume(context.Context, *ResumeRequest) (*Res func (UnimplementedProviderServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented") } +func (UnimplementedProviderServer) testEmbeddedByValue() {} // UnsafeProviderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProviderServer will @@ -174,6 +186,13 @@ type UnsafeProviderServer interface { } func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) { + // If the following call pancis, it indicates UnimplementedProviderServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Provider_ServiceDesc, srv) } diff --git a/pb/sf/substreams/v1/clock.pb.go b/pb/sf/substreams/v1/clock.pb.go index 7adc67b4e..735e61814 100644 --- a/pb/sf/substreams/v1/clock.pb.go +++ b/pb/sf/substreams/v1/clock.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.34.2 // protoc (unknown) // source: sf/substreams/v1/clock.proto @@ -179,7 +179,7 @@ func file_sf_substreams_v1_clock_proto_rawDescGZIP() []byte { } var file_sf_substreams_v1_clock_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_sf_substreams_v1_clock_proto_goTypes = []interface{}{ +var file_sf_substreams_v1_clock_proto_goTypes = []any{ (*Clock)(nil), // 0: sf.substreams.v1.Clock (*BlockRef)(nil), // 1: sf.substreams.v1.BlockRef (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -199,7 +199,7 @@ func file_sf_substreams_v1_clock_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_v1_clock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_clock_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Clock); i { case 0: return &v.state @@ -211,7 +211,7 @@ func file_sf_substreams_v1_clock_proto_init() { return nil } } - file_sf_substreams_v1_clock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_clock_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BlockRef); i { case 0: return &v.state diff --git a/pb/sf/substreams/v1/deltas.pb.go b/pb/sf/substreams/v1/deltas.pb.go index bfd987498..2e6e390e7 100644 --- a/pb/sf/substreams/v1/deltas.pb.go +++ b/pb/sf/substreams/v1/deltas.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.34.2 // protoc (unknown) // source: sf/substreams/v1/deltas.proto @@ -246,7 +246,7 @@ func file_sf_substreams_v1_deltas_proto_rawDescGZIP() []byte { var file_sf_substreams_v1_deltas_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sf_substreams_v1_deltas_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_sf_substreams_v1_deltas_proto_goTypes = []interface{}{ +var file_sf_substreams_v1_deltas_proto_goTypes = []any{ (StoreDelta_Operation)(0), // 0: sf.substreams.v1.StoreDelta.Operation (*StoreDeltas)(nil), // 1: sf.substreams.v1.StoreDeltas (*StoreDelta)(nil), // 2: sf.substreams.v1.StoreDelta @@ -267,7 +267,7 @@ func file_sf_substreams_v1_deltas_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_v1_deltas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_deltas_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StoreDeltas); i { case 0: return &v.state @@ -279,7 +279,7 @@ func file_sf_substreams_v1_deltas_proto_init() { return nil } } - file_sf_substreams_v1_deltas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_deltas_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StoreDelta); i { case 0: return &v.state diff --git a/pb/sf/substreams/v1/modules.pb.go b/pb/sf/substreams/v1/modules.pb.go index a52888e39..e2ebc85d6 100644 --- a/pb/sf/substreams/v1/modules.pb.go +++ b/pb/sf/substreams/v1/modules.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.34.2 // protoc (unknown) // source: sf/substreams/v1/modules.proto @@ -1186,7 +1186,7 @@ func file_sf_substreams_v1_modules_proto_rawDescGZIP() []byte { var file_sf_substreams_v1_modules_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_sf_substreams_v1_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_sf_substreams_v1_modules_proto_goTypes = []interface{}{ +var file_sf_substreams_v1_modules_proto_goTypes = []any{ (Module_KindStore_UpdatePolicy)(0), // 0: sf.substreams.v1.Module.KindStore.UpdatePolicy (Module_Input_Store_Mode)(0), // 1: sf.substreams.v1.Module.Input.Store.Mode (*Modules)(nil), // 2: sf.substreams.v1.Modules @@ -1233,7 +1233,7 @@ func file_sf_substreams_v1_modules_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_sf_substreams_v1_modules_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Modules); i { case 0: return &v.state @@ -1245,7 +1245,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Binary); i { case 0: return &v.state @@ -1257,7 +1257,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Module); i { case 0: return &v.state @@ -1269,7 +1269,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Module_BlockFilter); i { case 0: return &v.state @@ -1281,7 +1281,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Module_QueryFromParams); i { case 0: return &v.state @@ -1293,7 +1293,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Module_KindMap); i { case 0: return &v.state @@ -1305,7 +1305,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Module_KindStore); i { case 0: return &v.state @@ -1317,7 +1317,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Module_KindBlockIndex); i { case 0: return &v.state @@ -1329,7 +1329,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Module_Input); i { case 0: return &v.state @@ -1341,7 +1341,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Module_Output); i { case 0: return &v.state @@ -1353,7 +1353,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Module_Input_Source); i { case 0: return &v.state @@ -1365,7 +1365,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*Module_Input_Map); i { case 0: return &v.state @@ -1377,7 +1377,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Module_Input_Store); i { case 0: return &v.state @@ -1389,7 +1389,7 @@ func file_sf_substreams_v1_modules_proto_init() { return nil } } - file_sf_substreams_v1_modules_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_modules_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*Module_Input_Params); i { case 0: return &v.state @@ -1402,16 +1402,16 @@ func file_sf_substreams_v1_modules_proto_init() { } } } - file_sf_substreams_v1_modules_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_sf_substreams_v1_modules_proto_msgTypes[2].OneofWrappers = []any{ (*Module_KindMap_)(nil), (*Module_KindStore_)(nil), (*Module_KindBlockIndex_)(nil), } - file_sf_substreams_v1_modules_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_sf_substreams_v1_modules_proto_msgTypes[3].OneofWrappers = []any{ (*Module_BlockFilter_QueryString)(nil), (*Module_BlockFilter_QueryFromParams)(nil), } - file_sf_substreams_v1_modules_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_sf_substreams_v1_modules_proto_msgTypes[8].OneofWrappers = []any{ (*Module_Input_Source_)(nil), (*Module_Input_Map_)(nil), (*Module_Input_Store_)(nil), diff --git a/pb/sf/substreams/v1/package.pb.go b/pb/sf/substreams/v1/package.pb.go index 14952f8fd..92bb3e07f 100644 --- a/pb/sf/substreams/v1/package.pb.go +++ b/pb/sf/substreams/v1/package.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.34.2 // protoc (unknown) // source: sf/substreams/v1/package.proto @@ -454,7 +454,7 @@ func file_sf_substreams_v1_package_proto_rawDescGZIP() []byte { } var file_sf_substreams_v1_package_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_sf_substreams_v1_package_proto_goTypes = []interface{}{ +var file_sf_substreams_v1_package_proto_goTypes = []any{ (*Package)(nil), // 0: sf.substreams.v1.Package (*NetworkParams)(nil), // 1: sf.substreams.v1.NetworkParams (*PackageMetadata)(nil), // 2: sf.substreams.v1.PackageMetadata @@ -492,7 +492,7 @@ func file_sf_substreams_v1_package_proto_init() { } file_sf_substreams_v1_modules_proto_init() if !protoimpl.UnsafeEnabled { - file_sf_substreams_v1_package_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_package_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Package); i { case 0: return &v.state @@ -504,7 +504,7 @@ func file_sf_substreams_v1_package_proto_init() { return nil } } - file_sf_substreams_v1_package_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_package_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*NetworkParams); i { case 0: return &v.state @@ -516,7 +516,7 @@ func file_sf_substreams_v1_package_proto_init() { return nil } } - file_sf_substreams_v1_package_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_package_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*PackageMetadata); i { case 0: return &v.state @@ -528,7 +528,7 @@ func file_sf_substreams_v1_package_proto_init() { return nil } } - file_sf_substreams_v1_package_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_sf_substreams_v1_package_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ModuleMetadata); i { case 0: return &v.state diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 000000000..69b3cf512 --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,8 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: streamingfast + repository: firehose + commit: 9d6efa32daca4ea69d36b6a0bd1f2a72 + digest: shake256:b0f2d94a4fed1cea285d685397f49e35a1fa91a36d05b4aee0bfd146cb1b28d1de47ec8b1bda11e6ed06e6c6cf85b2d20a70fcdd289161f2d01f8154e780ce40 diff --git a/proto/buf.yaml b/proto/buf.yaml index 7fe60406a..d89176394 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,7 +1,7 @@ version: v1 name: buf.build/streamingfast/substreams -deps: [] +deps: ["buf.build/streamingfast/firehose"] build: excludes: diff --git a/proto/sf/substreams/rpc/v2/service.proto b/proto/sf/substreams/rpc/v2/service.proto index 1f87ab8b2..cd7f22a17 100644 --- a/proto/sf/substreams/rpc/v2/service.proto +++ b/proto/sf/substreams/rpc/v2/service.proto @@ -6,11 +6,16 @@ option go_package = "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2 import "google/protobuf/any.proto"; import "sf/substreams/v1/modules.proto"; import "sf/substreams/v1/clock.proto"; +import "sf/firehose/v2/firehose.proto"; service Stream { rpc Blocks(Request) returns (stream Response); } +service EndpointInfo { + rpc Info(sf.firehose.v2.InfoRequest) returns (sf.firehose.v2.InfoResponse); +} + message Request { int64 start_block_num = 1; string start_cursor = 2; diff --git a/service/server.go b/service/server.go index 53c45c421..5aca5ae71 100644 --- a/service/server.go +++ b/service/server.go @@ -40,6 +40,7 @@ func GetCommonServerOptions(listenAddr string, logger *zap.Logger, healthcheck d func ListenTier1( addr string, svc *Tier1Service, + infoService ssconnect.EndpointInfoHandler, auth dauth.Authenticator, logger *zap.Logger, healthcheck dgrpcserver.HealthCheck, @@ -55,9 +56,18 @@ func ListenTier1( streamHandlerGetter := func(opts ...connect_go.HandlerOption) (string, http.Handler) { return ssconnect.NewStreamHandler(svc, opts...) } + handlerGetters := []connectweb.HandlerGetter{streamHandlerGetter} + + if infoService != nil { + infoHandlerGetter := func(opts ...connect_go.HandlerOption) (string, http.Handler) { + out, outh := ssconnect.NewEndpointInfoHandler(infoService, opts...) + return out, outh + } + handlerGetters = append(handlerGetters, infoHandlerGetter) + } options = append(options, dgrpcserver.WithPermissiveCORS()) - srv := connectweb.New([]connectweb.HandlerGetter{streamHandlerGetter}, options...) + srv := connectweb.New(handlerGetters, options...) addr = strings.ReplaceAll(addr, "*", "") srv.Launch(addr) <-srv.Terminated() From 7d7c7b132e061164337298784177809df29fdd62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Mon, 26 Aug 2024 12:01:28 -0400 Subject: [PATCH 2/2] Add wazero tempdir to cache precompiled modules --- app/tier1.go | 6 ++++++ app/tier2.go | 5 +++++ docs/release-notes/change-log.md | 8 ++++++-- go.mod | 2 +- go.sum | 4 ++-- wasm/wazero/module.go | 24 +++++++++++++++++------- 6 files changed, 37 insertions(+), 12 deletions(-) diff --git a/app/tier1.go b/app/tier1.go index 4b82a7282..bcee0e014 100644 --- a/app/tier1.go +++ b/app/tier1.go @@ -10,6 +10,7 @@ import ( "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect" ssconnect "github.com/streamingfast/substreams/pb/sf/substreams/rpc/v2/pbsubstreamsrpcconnect" "github.com/streamingfast/substreams/reqctx" + "github.com/streamingfast/substreams/wasm/wazero" "github.com/streamingfast/bstream" "github.com/streamingfast/bstream/blockstream" @@ -53,6 +54,7 @@ type Tier1Config struct { GRPCShutdownGracePeriod time.Duration // The duration we allow for gRPC connections to terminate gracefully prior forcing shutdown ServiceDiscoveryURL *url.URL BlockExecutionTimeout time.Duration + TmpDir string StateStoreURL string StateStoreDefaultTag string @@ -166,6 +168,10 @@ func (a *Tier1App) Run() error { opts = append(opts, service.WithBlockExecutionTimeout(a.config.BlockExecutionTimeout)) } + if a.config.TmpDir != "" { + wazero.SetTempDir(a.config.TmpDir) + } + var wasmModules map[string]string if a.config.WASMExtensions != nil { wasmModules = a.config.WASMExtensions.Params() diff --git a/app/tier2.go b/app/tier2.go index 5bdb81acf..7d52bd75e 100644 --- a/app/tier2.go +++ b/app/tier2.go @@ -13,6 +13,7 @@ import ( "github.com/streamingfast/substreams/pipeline" "github.com/streamingfast/substreams/service" "github.com/streamingfast/substreams/wasm" + "github.com/streamingfast/substreams/wasm/wazero" "go.uber.org/atomic" "go.uber.org/zap" ) @@ -26,6 +27,7 @@ type Tier2Config struct { MaximumConcurrentRequests uint64 WASMExtensions wasm.WASMExtensioner BlockExecutionTimeout time.Duration + TmpDir string Tracing bool } @@ -80,6 +82,9 @@ func (a *Tier2App) Run() error { opts = append(opts, service.WithReadinessFunc(a.setReadiness)) + if a.config.TmpDir != "" { + wazero.SetTempDir(a.config.TmpDir) + } if a.config.WASMExtensions != nil { opts = append(opts, service.WithWASMExtensioner(a.config.WASMExtensions)) } diff --git a/docs/release-notes/change-log.md b/docs/release-notes/change-log.md index 6cb483f3b..a1378c436 100644 --- a/docs/release-notes/change-log.md +++ b/docs/release-notes/change-log.md @@ -11,15 +11,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +### Server * Add `sf.substreams.rpc.v2.EndpointInfo/Info` endpoint (if the infoserver is given as a module, i.e. from firehose-core) +* Add an execution timeout of 3 minutes per block by default (can be overriden in tier1/tier2 Configs) -- this is useful when an external (eth_call) is stuck on a forked block hash. +* Revert 'initialBlocks' changes from v1.9.1 because a 'changing module hash' causes more trouble. +* Wazero: bump v1.8.0 and activate caching of precompiled wasm modules in `/tmp/wazero` to decrease compilation time + +### Client * Add `substreams auth` command, to authenticate via `thegraph.market` and to get a dev API Key. * Rename `--discovery-endpoint` into `codegen-endpoint` in `substreams init` command. * Add `substreams codegen subgraph` command that takes a substreams `module` and an `spkg` and that generates a simple `subgraph` from the `module` output. * On `substreams init` command, if flag `--state-file` is provided, the state file is used by default for project generation. * In `substreams init` command, the state file is named using a `Date format` and not using `Unix` anymore. -* Added an execution timeout of 3 minutes per block by default (can be overriden in tier1/tier2 Configs) -- this is useful when an external (eth_call) is stuck on a forked block hash. * Tools->prometheus: added the possibility to override the start-block on an endpoint -* Revert 'initialBlocks' changes from v1.9.1 because a 'changing module hash' causes more trouble. ## v1.9.3 diff --git a/go.mod b/go.mod index d14bafade..661dfe123 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/streamingfast/substreams-sdk-go v0.0.0-20240110154316-5fb21a7a330b github.com/streamingfast/substreams-sink-sql v1.0.1-0.20231127153906-acf5f3e34330 github.com/test-go/testify v1.1.4 - github.com/tetratelabs/wazero v1.7.1 + github.com/tetratelabs/wazero v1.8.0 github.com/tidwall/pretty v1.2.1 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 go.opentelemetry.io/otel v1.24.0 diff --git a/go.sum b/go.sum index 6e420adb7..23b74c351 100644 --- a/go.sum +++ b/go.sum @@ -585,8 +585,8 @@ github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ7 github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= -github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8= -github.com/tetratelabs/wazero v1.7.1/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= +github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g= +github.com/tetratelabs/wazero v1.8.0/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo= github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= diff --git a/wasm/wazero/module.go b/wasm/wazero/module.go index 4277a26dd..b74aa47ff 100644 --- a/wasm/wazero/module.go +++ b/wasm/wazero/module.go @@ -3,6 +3,8 @@ package wazero import ( "context" "fmt" + "os" + "path" "sync" "github.com/streamingfast/substreams/reqctx" @@ -24,19 +26,27 @@ type Module struct { runtimeExtensions wasm.RuntimeExtensions } +var wazeroTmpDir = path.Join(os.TempDir(), "wazero") // default value can be overridden by setting this variable from the app + +func SetTempDir(dir string) { + wazeroTmpDir = path.Join(dir, "wazero") +} + func init() { wasm.RegisterModuleFactory("wazero", wasm.ModuleFactoryFunc(newModule)) } func newModule(ctx context.Context, wasmCode []byte, wasmCodeType string, registry *wasm.Registry) (wasm.Module, error) { - // What's the effect of `ctx` here? Will it kill all the WASM if it cancels? - // TODO: try with: wazero.NewRuntimeConfigCompiler() - // TODO: try config := wazero.NewRuntimeConfig().WithCompilationCache(cache) - runtimeConfig := wazero.NewRuntimeConfigCompiler() - // TODO: can we use some caching in the RuntimeConfig so perhaps we reuse - // things across runtimes creations? - runtime := wazero.NewRuntimeWithConfig(ctx, runtimeConfig) + // The CacheWithDir offers a way to share the cache between runtimes concurrently + // we can't just share the 'cache': we would get concurrency issues + cache, err := wazero.NewCompilationCacheWithDir(wazeroTmpDir) + if err != nil { + return nil, err + } + + // What's the effect of `ctx` here? Will it kill all the WASM if it cancels? + runtime := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfig().WithCompilationCache(cache)) wasmCodeTypeID, runtimeExtensions, err := wasm.ParseWASMCodeType(wasmCodeType) if err != nil {