diff --git a/docker-integrations/tendermint-go/.dockerignore b/docker-integrations/tendermint-go/.dockerignore new file mode 100644 index 00000000..9bc13ebb --- /dev/null +++ b/docker-integrations/tendermint-go/.dockerignore @@ -0,0 +1,8 @@ +**/out +.git +.env +.aws +*.md +LICENSE +scripts/ +Dockerfile \ No newline at end of file diff --git a/docker-integrations/tendermint-go/.gitignore b/docker-integrations/tendermint-go/.gitignore new file mode 100644 index 00000000..3e49cdee --- /dev/null +++ b/docker-integrations/tendermint-go/.gitignore @@ -0,0 +1,190 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node + +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +\*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +\*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +../tendermint/node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +\*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +\*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.cache +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +.cache/ + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.\* +.DS_Store/ + +### Node Patch + +# Serverless Webpack directories + +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output + +.svelte-kit +.idea +/common/types/client/ +/common/types/lcd/ + +# End of https://www.toptal.com/developers/gitignore/api/node diff --git a/docker-integrations/tendermint-go/CHANGELOG.md b/docker-integrations/tendermint-go/CHANGELOG.md new file mode 100644 index 00000000..a61cd2b0 --- /dev/null +++ b/docker-integrations/tendermint-go/CHANGELOG.md @@ -0,0 +1,8 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.0.1] + +**Note:** TODO UPDATE BEFORE MERGING diff --git a/docker-integrations/tendermint-go/Dockerfile b/docker-integrations/tendermint-go/Dockerfile new file mode 100644 index 00000000..c1dfaa52 --- /dev/null +++ b/docker-integrations/tendermint-go/Dockerfile @@ -0,0 +1,28 @@ +# Build stage +FROM golang:1.21 AS build + +# Set work directory +WORKDIR /app + +# Copy go.mod and go.sum files to download dependencies +COPY go.mod go.sum Makefile ./ +RUN go mod download + +# Copy source files +COPY protos ./protos +COPY pkg ./pkg + +# Build the Go app +RUN BINARY_NAME=kyve-runtime make build + +# Final stage +FROM ubuntu:latest + +# Copy the compiled binary from the build stage +COPY --from=build /app/cmd/kyve-runtime /app/kyve-runtime + +# Expose gRPC port +EXPOSE 50051 + +# Run the server +CMD ["/app/kyve-runtime"] diff --git a/docker-integrations/tendermint-go/LICENSE b/docker-integrations/tendermint-go/LICENSE new file mode 100644 index 00000000..21e34717 --- /dev/null +++ b/docker-integrations/tendermint-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2022 BCP Innovations UG (haftungsbeschränkt) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/docker-integrations/tendermint-go/Makefile b/docker-integrations/tendermint-go/Makefile new file mode 100644 index 00000000..ba6971a2 --- /dev/null +++ b/docker-integrations/tendermint-go/Makefile @@ -0,0 +1,58 @@ +# Shortcut targets +default: image + +############################################################################### +# Both native and cross architecture builds are supported. +# The target architecture is select by setting the ARCH variable. +# When ARCH is undefined it is set to the detected host architecture. +# When ARCH differs from the host architecture a crossbuild will be performed. +ARCHES = amd64 armv7 arm64 + +GOOS ?= $(shell uname | tr '[:upper:]' '[:lower:]') + +# BUILDARCH is the host architecture +# ARCH is the target architecture +# we need to keep track of them separately +BUILDARCH ?= $(shell uname -m) + +# canonicalized names for host architecture +ifeq ($(BUILDARCH),aarch64) + BUILDARCH=arm64 +endif +ifeq ($(BUILDARCH),x86_64) + BUILDARCH=amd64 +endif +ifeq ($(BUILDARCH),armv7l) + BUILDARCH=armv7 +endif + +# unless otherwise set, I am building for my own architecture, i.e. not cross-compiling +ARCH ?= $(BUILDARCH) + +############################################################################### +DOCKERFILE ?= Dockerfile +VERSION ?= latest +DOCKER_IMAGE_NAME=tendermint-go +BINARY_NAME ?= kyve-$(GOOS)-$(ARCH) +CGO_ENABLED=0 + +############################################################################### +# Building the binary +############################################################################### + +build: + go build -o cmd/$(BINARY_NAME) ./pkg + +############################################################################### +# Building the image +############################################################################### + + +build-image-buildx: + docker buildx build --platform linux/$(ARCH) -t $(DOCKER_IMAGE_NAME):$(VERSION) . + +build-image: + docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) . + +run-container: + docker run -it --rm -p 50051:50051 $(DOCKER_IMAGE_NAME):$(VERSION) \ No newline at end of file diff --git a/docker-integrations/tendermint-go/README.md b/docker-integrations/tendermint-go/README.md new file mode 100644 index 00000000..3a6290f6 --- /dev/null +++ b/docker-integrations/tendermint-go/README.md @@ -0,0 +1,28 @@ +# Tendermint Go gRPC Runtime + +This is a Go gRPC runtime for the [Tendermint](https://tendermint.com/) blockchain consensus engine. + +## Usage + +* Running the runtime:: + ```bash + go run main.go + ``` + +* Building the runtime binary:: + ```bash + make build + ``` + +* Building the Docker image:: + ```bash + make docker-image + ``` + +* Running the runtime container:: + + ```bash + make run-container + ``` + + diff --git a/docker-integrations/tendermint-go/cmd/kyve-darwin-arm64 b/docker-integrations/tendermint-go/cmd/kyve-darwin-arm64 new file mode 100755 index 00000000..15f2c6a9 Binary files /dev/null and b/docker-integrations/tendermint-go/cmd/kyve-darwin-arm64 differ diff --git a/docker-integrations/tendermint-go/cmd/kyve-linux-amd64 b/docker-integrations/tendermint-go/cmd/kyve-linux-amd64 new file mode 100755 index 00000000..826ddcf5 Binary files /dev/null and b/docker-integrations/tendermint-go/cmd/kyve-linux-amd64 differ diff --git a/docker-integrations/tendermint-go/cmd/kyve-linux-arm64 b/docker-integrations/tendermint-go/cmd/kyve-linux-arm64 new file mode 100755 index 00000000..ca3df9a6 Binary files /dev/null and b/docker-integrations/tendermint-go/cmd/kyve-linux-arm64 differ diff --git a/docker-integrations/tendermint-go/go.mod b/docker-integrations/tendermint-go/go.mod new file mode 100644 index 00000000..9501655e --- /dev/null +++ b/docker-integrations/tendermint-go/go.mod @@ -0,0 +1,16 @@ +module github.com/KYVENetwork/kyvejs/docker-integrations/tendermint-go + +require ( + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 +) + +require ( + github.com/golang/protobuf v1.5.3 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect +) + +go 1.21.3 diff --git a/docker-integrations/tendermint-go/go.sum b/docker-integrations/tendermint-go/go.sum new file mode 100644 index 00000000..16f3bb4e --- /dev/null +++ b/docker-integrations/tendermint-go/go.sum @@ -0,0 +1,21 @@ +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/docker-integrations/tendermint-go/pkg/main.go b/docker-integrations/tendermint-go/pkg/main.go new file mode 100644 index 00000000..33a4cd4f --- /dev/null +++ b/docker-integrations/tendermint-go/pkg/main.go @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/KYVENetwork/kyvejs/docker-integrations/tendermint-go/protos" + "google.golang.org/grpc" + "log" + "net" +) + +func main() { + // Initialize the gRPC server and listen on port 50051 + fmt.Println("Initializing Tendermint runtime as a gRPC Server...") + listener, err := net.Listen("tcp", ":50051") + if err != nil { + log.Fatalf("Failed to listen on port 50051: %v", err) + } + + // Create a new gRPC server instance + s := grpc.NewServer() + + // Register the Tendermint service with the gRPC server + protos.RegisterRuntimeServer(s, &Tendermint{}) + + // Start serving incoming connections + fmt.Printf("gRPC Server is running...\nPress Ctrl + C to exit.\n") + err = s.Serve(listener) + if err != nil { + log.Fatalf("Failed to serve gRPC server: %v", err) + } +} diff --git a/docker-integrations/tendermint-go/pkg/server.go b/docker-integrations/tendermint-go/pkg/server.go new file mode 100644 index 00000000..101e9528 --- /dev/null +++ b/docker-integrations/tendermint-go/pkg/server.go @@ -0,0 +1,237 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "github.com/KYVENetwork/kyvejs/docker-integrations/tendermint-go/protos" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "os" + "reflect" + "sort" + "strconv" +) + +type Tendermint struct { + protos.RuntimeServer +} + +func (t *Tendermint) GetRuntimeName(ctx context.Context, req *protos.GetRuntimeNameRequest) (*protos.GetRuntimeNameResponse, error) { + return &protos.GetRuntimeNameResponse{Name: "@docker/tendermint-go"}, nil +} + +func (t *Tendermint) GetRuntimeVersion(ctx context.Context, req *protos.GetRuntimeVersionRequest) (*protos.GetRuntimeVersionResponse, error) { + return &protos.GetRuntimeVersionResponse{Version: "0.0.1"}, nil +} + +func (t *Tendermint) ValidateSetConfig(ctx context.Context, req *protos.ValidateSetConfigRequest) (*protos.ValidateSetConfigResponse, error) { + rawConfig := req.GetRawConfig() + var config map[string]interface{} + + err := json.Unmarshal([]byte(rawConfig), &config) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling rawConfig JSON string: %v", err) + } + + if config["network"] == nil { + return nil, status.Error(codes.Internal, "config does not have property 'network' defined") + } + + if config["rpc"] == nil { + return nil, status.Error(codes.Internal, "config does not have property 'rpc' defined") + } + + if value, exists := os.LookupEnv("KYVEJS_TENDERMINT_RPC"); exists { + config["rpc"] = value + } + + serializedConfig, err := json.Marshal(config) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error marshalling config map[string]interface{}: %v", err) + } + return &protos.ValidateSetConfigResponse{SerializedConfig: string(serializedConfig)}, nil +} + +func (t *Tendermint) GetDataItem(ctx context.Context, req *protos.GetDataItemRequest) (*protos.GetDataItemResponse, error) { + var config map[string]string + err := json.Unmarshal([]byte(req.GetConfig().GetSerializedConfig()), &config) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling serializedConfig JSON string: %v", err) + } + key := req.GetKey() + + blockHeightUrl := fmt.Sprintf("%s/block?height=%s", config["rpc"], key) + blockResponse, err := getJsonFromUrl(blockHeightUrl) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error getting JSON from URL %s: %v", blockHeightUrl, err) + } + + blockResultsUrl := fmt.Sprintf("%s/block_results?height=%s", config["rpc"], key) + blockResultsResponse, err := getJsonFromUrl(blockResultsUrl) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error getting JSON from URL %s: %v", blockResultsUrl, err) + } + + value := map[string]interface{}{ + "block": blockResponse["result"], + "block_results": blockResultsResponse["result"], + } + parsedJson, err := json.Marshal(value) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error marshalling value map[string]interface{}: %v", err) + } + return &protos.GetDataItemResponse{DataItem: &protos.DataItem{Key: key, Value: string(parsedJson)}}, nil +} + +func (t *Tendermint) PrevalidateDataItem(ctx context.Context, req *protos.PrevalidateDataItemRequest) (*protos.PrevalidateDataItemResponse, error) { + var config map[string]string + err := json.Unmarshal([]byte(req.GetConfig().GetSerializedConfig()), &config) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling serializedConfig JSON string: %v", err) + } + + var itemValue map[string]interface{} + item := map[string]interface{}{ + "key": req.GetDataItem().GetKey(), + "value": json.Unmarshal([]byte(req.GetDataItem().GetValue()), &itemValue), + } + + // Check if data item is defined + if item["value"] == nil { + return &protos.PrevalidateDataItemResponse{Valid: false}, nil + } + + // Check if block and block results are defined + if item["value"].(map[string]interface{})["block"] == nil && item["value"].(map[string]interface{})["block_results"] == nil { + return &protos.PrevalidateDataItemResponse{Valid: false}, nil + } + + // Check if network matches + if config["network"] != item["value"].(map[string]interface{})["block"].(map[string]interface{})["header"].(map[string]interface{})["chain_id"] { + return &protos.PrevalidateDataItemResponse{Valid: false}, nil + } + + return &protos.PrevalidateDataItemResponse{Valid: true}, nil +} + +func (t *Tendermint) TransformDataItem(ctx context.Context, req *protos.TransformDataItemRequest) (*protos.TransformDataItemResponse, error) { + var item map[string]interface{} + if err := json.Unmarshal([]byte(req.GetDataItem().GetValue()), &item); err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling JSON: %v", err) + } + + compareEventAttribute := func(a, b map[string]interface{}) bool { + return a["key"].(string) < b["key"].(string) + } + + processEvents := func(events []map[string]interface{}) []map[string]interface{} { + for _, event := range events { + attributes := event["attributes"].([]map[string]interface{}) + sort.Slice(attributes, func(i, j int) bool { + return compareEventAttribute(attributes[i], attributes[j]) + }) + event["attributes"] = attributes + } + return events + } + + blockResults := item["block_results"].(map[string]interface{}) + if beginBlockEvents, ok := blockResults["begin_block_events"].([]map[string]interface{}); ok { + blockResults["begin_block_events"] = processEvents(beginBlockEvents) + } + + if endBlockEvents, ok := blockResults["end_block_events"].([]map[string]interface{}); ok { + blockResults["end_block_events"] = processEvents(endBlockEvents) + } + + if txsResults, ok := blockResults["txs_results"].([]map[string]interface{}); ok { + for _, txResult := range txsResults { + delete(txResult, "log") + if events, ok := txResult["events"].([]map[string]interface{}); ok { + txResult["events"] = processEvents(events) + } + } + } + + // Construct the data_item to return + transformedDataItemJSON, err := json.Marshal(item) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error marshalling JSON: %v", err) + } + + transformedDataItem := &protos.DataItem{ + Key: req.DataItem.Key, + Value: string(transformedDataItemJSON), + } + + return &protos.TransformDataItemResponse{ + TransformedDataItem: transformedDataItem, + }, nil +} + +func (t *Tendermint) ValidateDataItem(ctx context.Context, req *protos.ValidateDataItemRequest) (*protos.ValidateDataItemResponse, error) { + requestProposedDataItem := req.GetProposedDataItem() + requestValidationDataItem := req.GetValidationDataItem() + var proposedDataItem map[string]interface{} + + if err := json.Unmarshal([]byte(requestProposedDataItem.GetValue()), &proposedDataItem); err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling proposedDataItem JSON string: %v", err) + } + + var validationDataItem map[string]interface{} + + if err := json.Unmarshal([]byte(requestValidationDataItem.GetValue()), &validationDataItem); err != nil { + return nil, status.Errorf(codes.Internal, "Error unmarshalling proposedDataItem JSON string: %v", err) + } + + // Check if the proposedDataItem and validationDataItem are equal + if !reflect.DeepEqual(proposedDataItem, validationDataItem) { + return &protos.ValidateDataItemResponse{Vote: int32(protos.VOTE_VALID)}, nil + } + + if validationDataItem["block"].(map[string]interface{})["block"].(map[string]interface{})["chain_id"] != "osmosis-1" { + // Remove validationDataItem.value.block_results.begin_block_events + validationDataItem["block_results"].(map[string]interface{})["begin_block_events"] = nil + // Remove proposedDataItem.value.block_results.begin_block_events + proposedDataItem["block_results"].(map[string]interface{})["begin_block_events"] = nil + + if !reflect.DeepEqual(proposedDataItem, validationDataItem) { + // Vote Abstain if begin_block_events are not equal + return &protos.ValidateDataItemResponse{Vote: int32(protos.VOTE_ABSTAIN)}, nil + } + } + + // Vote Invalid if proposedDataItem and validationDataItem do not match + return &protos.ValidateDataItemResponse{Vote: int32(protos.VOTE_INVALID)}, nil +} + +func (t *Tendermint) SummarizeDataBundle(ctx context.Context, req *protos.SummarizeDataBundleRequest) (*protos.SummarizeDataBundleResponse, error) { + var latestBlockHeight string + grpcBundle := req.GetBundle() + + latestBundle := grpcBundle[len(grpcBundle)-1] + + var value map[string]interface{} + + if err := json.Unmarshal([]byte(latestBundle.GetValue()), &value); err != nil { + // If value.block.block.header.height exists save it to lateBlockHeight or else "" + if value["block"].(map[string]interface{})["block"].(map[string]interface{})["header"].(map[string]interface{})["height"] != nil { + latestBlockHeight = value["block"].(map[string]interface{})["block"].(map[string]interface{})["header"].(map[string]interface{})["height"].(string) + } else { + latestBlockHeight = "" + } + } + return &protos.SummarizeDataBundleResponse{Summary: latestBlockHeight}, nil +} + +func (t *Tendermint) NextKey(ctx context.Context, req *protos.NextKeyRequest) (*protos.NextKeyResponse, error) { + key := req.GetKey() + parsedKey, err := strconv.Atoi(key) + if err != nil { + return nil, status.Errorf(codes.Internal, "Error converting key %s to int: %v", key, err) + } + nextKey := parsedKey + 1 + + return &protos.NextKeyResponse{NextKey: strconv.Itoa(nextKey)}, nil +} diff --git a/docker-integrations/tendermint-go/pkg/utils.go b/docker-integrations/tendermint-go/pkg/utils.go new file mode 100644 index 00000000..12b85efe --- /dev/null +++ b/docker-integrations/tendermint-go/pkg/utils.go @@ -0,0 +1,22 @@ +package main + +import ( + "encoding/json" + "net/http" +) + +func getJsonFromUrl(url string) (map[string]interface{}, error) { + resp, err := http.Get(url) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + var data map[string]interface{} + err = json.NewDecoder(resp.Body).Decode(&data) + if err != nil { + return nil, err + } + + return data, nil +} diff --git a/docker-integrations/tendermint-go/protos/runtime.pb.go b/docker-integrations/tendermint-go/protos/runtime.pb.go new file mode 100644 index 00000000..5ba764e0 --- /dev/null +++ b/docker-integrations/tendermint-go/protos/runtime.pb.go @@ -0,0 +1,1572 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v4.24.4 +// source: runtime.proto + +package protos + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the vote enum +type VOTE int32 + +const ( + VOTE_UNSPECIFIED VOTE = 0 + VOTE_VALID VOTE = 1 + VOTE_INVALID VOTE = 2 + VOTE_ABSTAIN VOTE = 3 +) + +// Enum value maps for VOTE. +var ( + VOTE_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "VALID", + 2: "INVALID", + 3: "ABSTAIN", + } + VOTE_value = map[string]int32{ + "UNSPECIFIED": 0, + "VALID": 1, + "INVALID": 2, + "ABSTAIN": 3, + } +) + +func (x VOTE) Enum() *VOTE { + p := new(VOTE) + *p = x + return p +} + +func (x VOTE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VOTE) Descriptor() protoreflect.EnumDescriptor { + return file_runtime_proto_enumTypes[0].Descriptor() +} + +func (VOTE) Type() protoreflect.EnumType { + return &file_runtime_proto_enumTypes[0] +} + +func (x VOTE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VOTE.Descriptor instead. +func (VOTE) EnumDescriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{0} +} + +// The main data entity served by the gRPC service +// Contains the block key and the block value as a serialized value +type DataItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *DataItem) Reset() { + *x = DataItem{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataItem) ProtoMessage() {} + +func (x *DataItem) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataItem.ProtoReflect.Descriptor instead. +func (*DataItem) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{0} +} + +func (x *DataItem) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *DataItem) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// Configuration entity containing serialized info about connection to the respective chain +type RuntimeConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SerializedConfig string `protobuf:"bytes,1,opt,name=serialized_config,json=serializedConfig,proto3" json:"serialized_config,omitempty"` +} + +func (x *RuntimeConfig) Reset() { + *x = RuntimeConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuntimeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuntimeConfig) ProtoMessage() {} + +func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuntimeConfig.ProtoReflect.Descriptor instead. +func (*RuntimeConfig) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{1} +} + +func (x *RuntimeConfig) GetSerializedConfig() string { + if x != nil { + return x.SerializedConfig + } + return "" +} + +type GetRuntimeNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetRuntimeNameRequest) Reset() { + *x = GetRuntimeNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRuntimeNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRuntimeNameRequest) ProtoMessage() {} + +func (x *GetRuntimeNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRuntimeNameRequest.ProtoReflect.Descriptor instead. +func (*GetRuntimeNameRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{2} +} + +type GetRuntimeNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetRuntimeNameResponse) Reset() { + *x = GetRuntimeNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRuntimeNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRuntimeNameResponse) ProtoMessage() {} + +func (x *GetRuntimeNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRuntimeNameResponse.ProtoReflect.Descriptor instead. +func (*GetRuntimeNameResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{3} +} + +func (x *GetRuntimeNameResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// getRuntimeName +// Request returning the version of the runtime +// returns the runtime version as a string +type GetRuntimeVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetRuntimeVersionRequest) Reset() { + *x = GetRuntimeVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRuntimeVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRuntimeVersionRequest) ProtoMessage() {} + +func (x *GetRuntimeVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRuntimeVersionRequest.ProtoReflect.Descriptor instead. +func (*GetRuntimeVersionRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{4} +} + +type GetRuntimeVersionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetRuntimeVersionResponse) Reset() { + *x = GetRuntimeVersionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRuntimeVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRuntimeVersionResponse) ProtoMessage() {} + +func (x *GetRuntimeVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRuntimeVersionResponse.ProtoReflect.Descriptor instead. +func (*GetRuntimeVersionResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{5} +} + +func (x *GetRuntimeVersionResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// validateSetConfig +// Request validating a configuration string to connect to the respective chain +// returns a validated serialized configuration object +type ValidateSetConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RawConfig string `protobuf:"bytes,1,opt,name=raw_config,json=rawConfig,proto3" json:"raw_config,omitempty"` +} + +func (x *ValidateSetConfigRequest) Reset() { + *x = ValidateSetConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateSetConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateSetConfigRequest) ProtoMessage() {} + +func (x *ValidateSetConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateSetConfigRequest.ProtoReflect.Descriptor instead. +func (*ValidateSetConfigRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidateSetConfigRequest) GetRawConfig() string { + if x != nil { + return x.RawConfig + } + return "" +} + +type ValidateSetConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SerializedConfig string `protobuf:"bytes,1,opt,name=serialized_config,json=serializedConfig,proto3" json:"serialized_config,omitempty"` +} + +func (x *ValidateSetConfigResponse) Reset() { + *x = ValidateSetConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateSetConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateSetConfigResponse) ProtoMessage() {} + +func (x *ValidateSetConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateSetConfigResponse.ProtoReflect.Descriptor instead. +func (*ValidateSetConfigResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{7} +} + +func (x *ValidateSetConfigResponse) GetSerializedConfig() string { + if x != nil { + return x.SerializedConfig + } + return "" +} + +// getDataItem +// Request retrieving and returning a block from the respective chain +// Returns the requested block as a dataItem +type GetDataItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *GetDataItemRequest) Reset() { + *x = GetDataItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataItemRequest) ProtoMessage() {} + +func (x *GetDataItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataItemRequest.ProtoReflect.Descriptor instead. +func (*GetDataItemRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{8} +} + +func (x *GetDataItemRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *GetDataItemRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type GetDataItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataItem *DataItem `protobuf:"bytes,1,opt,name=data_item,json=dataItem,proto3" json:"data_item,omitempty"` +} + +func (x *GetDataItemResponse) Reset() { + *x = GetDataItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataItemResponse) ProtoMessage() {} + +func (x *GetDataItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataItemResponse.ProtoReflect.Descriptor instead. +func (*GetDataItemResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{9} +} + +func (x *GetDataItemResponse) GetDataItem() *DataItem { + if x != nil { + return x.DataItem + } + return nil +} + +// prevalidateDataItem +// Request pre-validating a dataItem that is about to be validated +// returns the pre-validation result as a boolean +type PrevalidateDataItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + DataItem *DataItem `protobuf:"bytes,2,opt,name=data_item,json=dataItem,proto3" json:"data_item,omitempty"` +} + +func (x *PrevalidateDataItemRequest) Reset() { + *x = PrevalidateDataItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrevalidateDataItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrevalidateDataItemRequest) ProtoMessage() {} + +func (x *PrevalidateDataItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrevalidateDataItemRequest.ProtoReflect.Descriptor instead. +func (*PrevalidateDataItemRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{10} +} + +func (x *PrevalidateDataItemRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *PrevalidateDataItemRequest) GetDataItem() *DataItem { + if x != nil { + return x.DataItem + } + return nil +} + +type PrevalidateDataItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` +} + +func (x *PrevalidateDataItemResponse) Reset() { + *x = PrevalidateDataItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrevalidateDataItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrevalidateDataItemResponse) ProtoMessage() {} + +func (x *PrevalidateDataItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrevalidateDataItemResponse.ProtoReflect.Descriptor instead. +func (*PrevalidateDataItemResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{11} +} + +func (x *PrevalidateDataItemResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +// transformDataItem +// Request transforming the given data item into a preferred format +// returns the transformed dataItem +type TransformDataItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + DataItem *DataItem `protobuf:"bytes,2,opt,name=data_item,json=dataItem,proto3" json:"data_item,omitempty"` +} + +func (x *TransformDataItemRequest) Reset() { + *x = TransformDataItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransformDataItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransformDataItemRequest) ProtoMessage() {} + +func (x *TransformDataItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransformDataItemRequest.ProtoReflect.Descriptor instead. +func (*TransformDataItemRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{12} +} + +func (x *TransformDataItemRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *TransformDataItemRequest) GetDataItem() *DataItem { + if x != nil { + return x.DataItem + } + return nil +} + +type TransformDataItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransformedDataItem *DataItem `protobuf:"bytes,1,opt,name=transformed_data_item,json=transformedDataItem,proto3" json:"transformed_data_item,omitempty"` +} + +func (x *TransformDataItemResponse) Reset() { + *x = TransformDataItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransformDataItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransformDataItemResponse) ProtoMessage() {} + +func (x *TransformDataItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransformDataItemResponse.ProtoReflect.Descriptor instead. +func (*TransformDataItemResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{13} +} + +func (x *TransformDataItemResponse) GetTransformedDataItem() *DataItem { + if x != nil { + return x.TransformedDataItem + } + return nil +} + +// validateDataItem +// Request validating a dataItem +// returns the validation result as a boolean +type ValidateDataItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + ProposedDataItem *DataItem `protobuf:"bytes,2,opt,name=proposed_data_item,json=proposedDataItem,proto3" json:"proposed_data_item,omitempty"` + ValidationDataItem *DataItem `protobuf:"bytes,3,opt,name=validation_data_item,json=validationDataItem,proto3" json:"validation_data_item,omitempty"` +} + +func (x *ValidateDataItemRequest) Reset() { + *x = ValidateDataItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateDataItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateDataItemRequest) ProtoMessage() {} + +func (x *ValidateDataItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateDataItemRequest.ProtoReflect.Descriptor instead. +func (*ValidateDataItemRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{14} +} + +func (x *ValidateDataItemRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *ValidateDataItemRequest) GetProposedDataItem() *DataItem { + if x != nil { + return x.ProposedDataItem + } + return nil +} + +func (x *ValidateDataItemRequest) GetValidationDataItem() *DataItem { + if x != nil { + return x.ValidationDataItem + } + return nil +} + +type ValidateDataItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vote int32 `protobuf:"varint,1,opt,name=vote,proto3" json:"vote,omitempty"` +} + +func (x *ValidateDataItemResponse) Reset() { + *x = ValidateDataItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateDataItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateDataItemResponse) ProtoMessage() {} + +func (x *ValidateDataItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateDataItemResponse.ProtoReflect.Descriptor instead. +func (*ValidateDataItemResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{15} +} + +func (x *ValidateDataItemResponse) GetVote() int32 { + if x != nil { + return x.Vote + } + return 0 +} + +// summarizeDataBundle +// Request summarizing a dataBundle +// returns the bundle summary as a string +type SummarizeDataBundleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + Bundle []*DataItem `protobuf:"bytes,2,rep,name=bundle,proto3" json:"bundle,omitempty"` +} + +func (x *SummarizeDataBundleRequest) Reset() { + *x = SummarizeDataBundleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SummarizeDataBundleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SummarizeDataBundleRequest) ProtoMessage() {} + +func (x *SummarizeDataBundleRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SummarizeDataBundleRequest.ProtoReflect.Descriptor instead. +func (*SummarizeDataBundleRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{16} +} + +func (x *SummarizeDataBundleRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *SummarizeDataBundleRequest) GetBundle() []*DataItem { + if x != nil { + return x.Bundle + } + return nil +} + +type SummarizeDataBundleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` +} + +func (x *SummarizeDataBundleResponse) Reset() { + *x = SummarizeDataBundleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SummarizeDataBundleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SummarizeDataBundleResponse) ProtoMessage() {} + +func (x *SummarizeDataBundleResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SummarizeDataBundleResponse.ProtoReflect.Descriptor instead. +func (*SummarizeDataBundleResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{17} +} + +func (x *SummarizeDataBundleResponse) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +// nextKey +// Request retrieving the next key on the chain +// returns the key as a string +type NextKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *RuntimeConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *NextKeyRequest) Reset() { + *x = NextKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NextKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NextKeyRequest) ProtoMessage() {} + +func (x *NextKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NextKeyRequest.ProtoReflect.Descriptor instead. +func (*NextKeyRequest) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{18} +} + +func (x *NextKeyRequest) GetConfig() *RuntimeConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *NextKeyRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type NextKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NextKey string `protobuf:"bytes,1,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` +} + +func (x *NextKeyResponse) Reset() { + *x = NextKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runtime_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NextKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NextKeyResponse) ProtoMessage() {} + +func (x *NextKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_runtime_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NextKeyResponse.ProtoReflect.Descriptor instead. +func (*NextKeyResponse) Descriptor() ([]byte, []int) { + return file_runtime_proto_rawDescGZIP(), []int{19} +} + +func (x *NextKeyResponse) GetNextKey() string { + if x != nil { + return x.NextKey + } + return "" +} + +var File_runtime_proto protoreflect.FileDescriptor + +var file_runtime_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x32, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x3c, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x18, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x61, 0x77, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x48, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x4e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x22, 0x3d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x22, + 0x6c, 0x0a, 0x1a, 0x50, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x74, + 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x33, 0x0a, + 0x1b, 0x50, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x44, + 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x5a, + 0x0a, 0x19, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x15, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x22, 0xb7, 0x01, 0x0a, 0x17, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, + 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x3b, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, + 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x22, 0x2e, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x76, 0x6f, 0x74, 0x65, 0x22, 0x67, 0x0a, 0x1a, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x06, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x37, 0x0a, + 0x1b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x4a, 0x0a, 0x0e, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x22, 0x2c, 0x0a, 0x0f, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, + 0x2a, 0x3c, 0x0a, 0x04, 0x56, 0x4f, 0x54, 0x45, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, + 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x03, 0x32, 0x85, + 0x05, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x50, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x61, + 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x19, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, + 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, + 0x6d, 0x12, 0x18, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x69, 0x7a, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x2e, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x4e, 0x65, 0x78, 0x74, + 0x4b, 0x65, 0x79, 0x12, 0x0f, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_runtime_proto_rawDescOnce sync.Once + file_runtime_proto_rawDescData = file_runtime_proto_rawDesc +) + +func file_runtime_proto_rawDescGZIP() []byte { + file_runtime_proto_rawDescOnce.Do(func() { + file_runtime_proto_rawDescData = protoimpl.X.CompressGZIP(file_runtime_proto_rawDescData) + }) + return file_runtime_proto_rawDescData +} + +var file_runtime_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_runtime_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_runtime_proto_goTypes = []interface{}{ + (VOTE)(0), // 0: VOTE + (*DataItem)(nil), // 1: DataItem + (*RuntimeConfig)(nil), // 2: RuntimeConfig + (*GetRuntimeNameRequest)(nil), // 3: GetRuntimeNameRequest + (*GetRuntimeNameResponse)(nil), // 4: GetRuntimeNameResponse + (*GetRuntimeVersionRequest)(nil), // 5: GetRuntimeVersionRequest + (*GetRuntimeVersionResponse)(nil), // 6: GetRuntimeVersionResponse + (*ValidateSetConfigRequest)(nil), // 7: ValidateSetConfigRequest + (*ValidateSetConfigResponse)(nil), // 8: ValidateSetConfigResponse + (*GetDataItemRequest)(nil), // 9: GetDataItemRequest + (*GetDataItemResponse)(nil), // 10: GetDataItemResponse + (*PrevalidateDataItemRequest)(nil), // 11: PrevalidateDataItemRequest + (*PrevalidateDataItemResponse)(nil), // 12: PrevalidateDataItemResponse + (*TransformDataItemRequest)(nil), // 13: TransformDataItemRequest + (*TransformDataItemResponse)(nil), // 14: TransformDataItemResponse + (*ValidateDataItemRequest)(nil), // 15: ValidateDataItemRequest + (*ValidateDataItemResponse)(nil), // 16: ValidateDataItemResponse + (*SummarizeDataBundleRequest)(nil), // 17: SummarizeDataBundleRequest + (*SummarizeDataBundleResponse)(nil), // 18: SummarizeDataBundleResponse + (*NextKeyRequest)(nil), // 19: NextKeyRequest + (*NextKeyResponse)(nil), // 20: NextKeyResponse +} +var file_runtime_proto_depIdxs = []int32{ + 2, // 0: GetDataItemRequest.config:type_name -> RuntimeConfig + 1, // 1: GetDataItemResponse.data_item:type_name -> DataItem + 2, // 2: PrevalidateDataItemRequest.config:type_name -> RuntimeConfig + 1, // 3: PrevalidateDataItemRequest.data_item:type_name -> DataItem + 2, // 4: TransformDataItemRequest.config:type_name -> RuntimeConfig + 1, // 5: TransformDataItemRequest.data_item:type_name -> DataItem + 1, // 6: TransformDataItemResponse.transformed_data_item:type_name -> DataItem + 2, // 7: ValidateDataItemRequest.config:type_name -> RuntimeConfig + 1, // 8: ValidateDataItemRequest.proposed_data_item:type_name -> DataItem + 1, // 9: ValidateDataItemRequest.validation_data_item:type_name -> DataItem + 2, // 10: SummarizeDataBundleRequest.config:type_name -> RuntimeConfig + 1, // 11: SummarizeDataBundleRequest.bundle:type_name -> DataItem + 2, // 12: NextKeyRequest.config:type_name -> RuntimeConfig + 3, // 13: Runtime.GetRuntimeName:input_type -> GetRuntimeNameRequest + 5, // 14: Runtime.GetRuntimeVersion:input_type -> GetRuntimeVersionRequest + 7, // 15: Runtime.ValidateSetConfig:input_type -> ValidateSetConfigRequest + 9, // 16: Runtime.GetDataItem:input_type -> GetDataItemRequest + 11, // 17: Runtime.PrevalidateDataItem:input_type -> PrevalidateDataItemRequest + 13, // 18: Runtime.TransformDataItem:input_type -> TransformDataItemRequest + 15, // 19: Runtime.ValidateDataItem:input_type -> ValidateDataItemRequest + 17, // 20: Runtime.SummarizeDataBundle:input_type -> SummarizeDataBundleRequest + 19, // 21: Runtime.NextKey:input_type -> NextKeyRequest + 4, // 22: Runtime.GetRuntimeName:output_type -> GetRuntimeNameResponse + 6, // 23: Runtime.GetRuntimeVersion:output_type -> GetRuntimeVersionResponse + 8, // 24: Runtime.ValidateSetConfig:output_type -> ValidateSetConfigResponse + 10, // 25: Runtime.GetDataItem:output_type -> GetDataItemResponse + 12, // 26: Runtime.PrevalidateDataItem:output_type -> PrevalidateDataItemResponse + 14, // 27: Runtime.TransformDataItem:output_type -> TransformDataItemResponse + 16, // 28: Runtime.ValidateDataItem:output_type -> ValidateDataItemResponse + 18, // 29: Runtime.SummarizeDataBundle:output_type -> SummarizeDataBundleResponse + 20, // 30: Runtime.NextKey:output_type -> NextKeyResponse + 22, // [22:31] is the sub-list for method output_type + 13, // [13:22] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_runtime_proto_init() } +func file_runtime_proto_init() { + if File_runtime_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_runtime_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuntimeConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRuntimeNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRuntimeNameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRuntimeVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRuntimeVersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateSetConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateSetConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataItemResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrevalidateDataItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrevalidateDataItemResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransformDataItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransformDataItemResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateDataItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateDataItemResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SummarizeDataBundleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SummarizeDataBundleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NextKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runtime_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NextKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_runtime_proto_rawDesc, + NumEnums: 1, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_runtime_proto_goTypes, + DependencyIndexes: file_runtime_proto_depIdxs, + EnumInfos: file_runtime_proto_enumTypes, + MessageInfos: file_runtime_proto_msgTypes, + }.Build() + File_runtime_proto = out.File + file_runtime_proto_rawDesc = nil + file_runtime_proto_goTypes = nil + file_runtime_proto_depIdxs = nil +} diff --git a/docker-integrations/tendermint-go/protos/runtime_grpc.pb.go b/docker-integrations/tendermint-go/protos/runtime_grpc.pb.go new file mode 100644 index 00000000..d76c0cea --- /dev/null +++ b/docker-integrations/tendermint-go/protos/runtime_grpc.pb.go @@ -0,0 +1,393 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.24.4 +// source: runtime.proto + +package protos + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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 + +// RuntimeClient is the client API for Runtime service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RuntimeClient interface { + GetRuntimeName(ctx context.Context, in *GetRuntimeNameRequest, opts ...grpc.CallOption) (*GetRuntimeNameResponse, error) + GetRuntimeVersion(ctx context.Context, in *GetRuntimeVersionRequest, opts ...grpc.CallOption) (*GetRuntimeVersionResponse, error) + ValidateSetConfig(ctx context.Context, in *ValidateSetConfigRequest, opts ...grpc.CallOption) (*ValidateSetConfigResponse, error) + GetDataItem(ctx context.Context, in *GetDataItemRequest, opts ...grpc.CallOption) (*GetDataItemResponse, error) + PrevalidateDataItem(ctx context.Context, in *PrevalidateDataItemRequest, opts ...grpc.CallOption) (*PrevalidateDataItemResponse, error) + TransformDataItem(ctx context.Context, in *TransformDataItemRequest, opts ...grpc.CallOption) (*TransformDataItemResponse, error) + ValidateDataItem(ctx context.Context, in *ValidateDataItemRequest, opts ...grpc.CallOption) (*ValidateDataItemResponse, error) + SummarizeDataBundle(ctx context.Context, in *SummarizeDataBundleRequest, opts ...grpc.CallOption) (*SummarizeDataBundleResponse, error) + NextKey(ctx context.Context, in *NextKeyRequest, opts ...grpc.CallOption) (*NextKeyResponse, error) +} + +type runtimeClient struct { + cc grpc.ClientConnInterface +} + +func NewRuntimeClient(cc grpc.ClientConnInterface) RuntimeClient { + return &runtimeClient{cc} +} + +func (c *runtimeClient) GetRuntimeName(ctx context.Context, in *GetRuntimeNameRequest, opts ...grpc.CallOption) (*GetRuntimeNameResponse, error) { + out := new(GetRuntimeNameResponse) + err := c.cc.Invoke(ctx, "/Runtime/GetRuntimeName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) GetRuntimeVersion(ctx context.Context, in *GetRuntimeVersionRequest, opts ...grpc.CallOption) (*GetRuntimeVersionResponse, error) { + out := new(GetRuntimeVersionResponse) + err := c.cc.Invoke(ctx, "/Runtime/GetRuntimeVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) ValidateSetConfig(ctx context.Context, in *ValidateSetConfigRequest, opts ...grpc.CallOption) (*ValidateSetConfigResponse, error) { + out := new(ValidateSetConfigResponse) + err := c.cc.Invoke(ctx, "/Runtime/ValidateSetConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) GetDataItem(ctx context.Context, in *GetDataItemRequest, opts ...grpc.CallOption) (*GetDataItemResponse, error) { + out := new(GetDataItemResponse) + err := c.cc.Invoke(ctx, "/Runtime/GetDataItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) PrevalidateDataItem(ctx context.Context, in *PrevalidateDataItemRequest, opts ...grpc.CallOption) (*PrevalidateDataItemResponse, error) { + out := new(PrevalidateDataItemResponse) + err := c.cc.Invoke(ctx, "/Runtime/PrevalidateDataItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) TransformDataItem(ctx context.Context, in *TransformDataItemRequest, opts ...grpc.CallOption) (*TransformDataItemResponse, error) { + out := new(TransformDataItemResponse) + err := c.cc.Invoke(ctx, "/Runtime/TransformDataItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) ValidateDataItem(ctx context.Context, in *ValidateDataItemRequest, opts ...grpc.CallOption) (*ValidateDataItemResponse, error) { + out := new(ValidateDataItemResponse) + err := c.cc.Invoke(ctx, "/Runtime/ValidateDataItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) SummarizeDataBundle(ctx context.Context, in *SummarizeDataBundleRequest, opts ...grpc.CallOption) (*SummarizeDataBundleResponse, error) { + out := new(SummarizeDataBundleResponse) + err := c.cc.Invoke(ctx, "/Runtime/SummarizeDataBundle", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeClient) NextKey(ctx context.Context, in *NextKeyRequest, opts ...grpc.CallOption) (*NextKeyResponse, error) { + out := new(NextKeyResponse) + err := c.cc.Invoke(ctx, "/Runtime/NextKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RuntimeServer is the server API for Runtime service. +// All implementations must embed UnimplementedRuntimeServer +// for forward compatibility +type RuntimeServer interface { + GetRuntimeName(context.Context, *GetRuntimeNameRequest) (*GetRuntimeNameResponse, error) + GetRuntimeVersion(context.Context, *GetRuntimeVersionRequest) (*GetRuntimeVersionResponse, error) + ValidateSetConfig(context.Context, *ValidateSetConfigRequest) (*ValidateSetConfigResponse, error) + GetDataItem(context.Context, *GetDataItemRequest) (*GetDataItemResponse, error) + PrevalidateDataItem(context.Context, *PrevalidateDataItemRequest) (*PrevalidateDataItemResponse, error) + TransformDataItem(context.Context, *TransformDataItemRequest) (*TransformDataItemResponse, error) + ValidateDataItem(context.Context, *ValidateDataItemRequest) (*ValidateDataItemResponse, error) + SummarizeDataBundle(context.Context, *SummarizeDataBundleRequest) (*SummarizeDataBundleResponse, error) + NextKey(context.Context, *NextKeyRequest) (*NextKeyResponse, error) + mustEmbedUnimplementedRuntimeServer() +} + +// UnimplementedRuntimeServer must be embedded to have forward compatible implementations. +type UnimplementedRuntimeServer struct { +} + +func (UnimplementedRuntimeServer) GetRuntimeName(context.Context, *GetRuntimeNameRequest) (*GetRuntimeNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRuntimeName not implemented") +} +func (UnimplementedRuntimeServer) GetRuntimeVersion(context.Context, *GetRuntimeVersionRequest) (*GetRuntimeVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRuntimeVersion not implemented") +} +func (UnimplementedRuntimeServer) ValidateSetConfig(context.Context, *ValidateSetConfigRequest) (*ValidateSetConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateSetConfig not implemented") +} +func (UnimplementedRuntimeServer) GetDataItem(context.Context, *GetDataItemRequest) (*GetDataItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataItem not implemented") +} +func (UnimplementedRuntimeServer) PrevalidateDataItem(context.Context, *PrevalidateDataItemRequest) (*PrevalidateDataItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PrevalidateDataItem not implemented") +} +func (UnimplementedRuntimeServer) TransformDataItem(context.Context, *TransformDataItemRequest) (*TransformDataItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformDataItem not implemented") +} +func (UnimplementedRuntimeServer) ValidateDataItem(context.Context, *ValidateDataItemRequest) (*ValidateDataItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateDataItem not implemented") +} +func (UnimplementedRuntimeServer) SummarizeDataBundle(context.Context, *SummarizeDataBundleRequest) (*SummarizeDataBundleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SummarizeDataBundle not implemented") +} +func (UnimplementedRuntimeServer) NextKey(context.Context, *NextKeyRequest) (*NextKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NextKey not implemented") +} +func (UnimplementedRuntimeServer) mustEmbedUnimplementedRuntimeServer() {} + +// UnsafeRuntimeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RuntimeServer will +// result in compilation errors. +type UnsafeRuntimeServer interface { + mustEmbedUnimplementedRuntimeServer() +} + +func RegisterRuntimeServer(s grpc.ServiceRegistrar, srv RuntimeServer) { + s.RegisterService(&Runtime_ServiceDesc, srv) +} + +func _Runtime_GetRuntimeName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRuntimeNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).GetRuntimeName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/GetRuntimeName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).GetRuntimeName(ctx, req.(*GetRuntimeNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_GetRuntimeVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRuntimeVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).GetRuntimeVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/GetRuntimeVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).GetRuntimeVersion(ctx, req.(*GetRuntimeVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_ValidateSetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateSetConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).ValidateSetConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/ValidateSetConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).ValidateSetConfig(ctx, req.(*ValidateSetConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_GetDataItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).GetDataItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/GetDataItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).GetDataItem(ctx, req.(*GetDataItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_PrevalidateDataItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PrevalidateDataItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).PrevalidateDataItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/PrevalidateDataItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).PrevalidateDataItem(ctx, req.(*PrevalidateDataItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_TransformDataItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransformDataItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).TransformDataItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/TransformDataItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).TransformDataItem(ctx, req.(*TransformDataItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_ValidateDataItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateDataItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).ValidateDataItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/ValidateDataItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).ValidateDataItem(ctx, req.(*ValidateDataItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_SummarizeDataBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SummarizeDataBundleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).SummarizeDataBundle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/SummarizeDataBundle", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).SummarizeDataBundle(ctx, req.(*SummarizeDataBundleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Runtime_NextKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NextKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServer).NextKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Runtime/NextKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServer).NextKey(ctx, req.(*NextKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Runtime_ServiceDesc is the grpc.ServiceDesc for Runtime service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Runtime_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Runtime", + HandlerType: (*RuntimeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetRuntimeName", + Handler: _Runtime_GetRuntimeName_Handler, + }, + { + MethodName: "GetRuntimeVersion", + Handler: _Runtime_GetRuntimeVersion_Handler, + }, + { + MethodName: "ValidateSetConfig", + Handler: _Runtime_ValidateSetConfig_Handler, + }, + { + MethodName: "GetDataItem", + Handler: _Runtime_GetDataItem_Handler, + }, + { + MethodName: "PrevalidateDataItem", + Handler: _Runtime_PrevalidateDataItem_Handler, + }, + { + MethodName: "TransformDataItem", + Handler: _Runtime_TransformDataItem_Handler, + }, + { + MethodName: "ValidateDataItem", + Handler: _Runtime_ValidateDataItem_Handler, + }, + { + MethodName: "SummarizeDataBundle", + Handler: _Runtime_SummarizeDataBundle_Handler, + }, + { + MethodName: "NextKey", + Handler: _Runtime_NextKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "runtime.proto", +} diff --git a/docker-integrations/tendermint-go/scripts/pb-gen.sh b/docker-integrations/tendermint-go/scripts/pb-gen.sh new file mode 100644 index 00000000..f8a6a875 --- /dev/null +++ b/docker-integrations/tendermint-go/scripts/pb-gen.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Change to the root directory of the repository +cd ../../../ + +# Run the protoc command to compile the protobuf files +protoc --proto_path=common/protocol/src/types/protos/ \ + --go_out=docker-integrations/tendermint-go/protos \ + --go_opt=paths=source_relative \ + --go-grpc_out=docker-integrations/tendermint-go/protos \ + --go-grpc_opt=paths=source_relative \ + runtime.proto + +# Print a message indicating the script has finished running +echo "Protobuf compilation complete." \ No newline at end of file