diff --git a/go.sum b/go.sum index f2560b858..b9ed8e146 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,7 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= @@ -284,10 +285,12 @@ github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -314,6 +317,7 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= +github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -450,6 +454,7 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -487,6 +492,7 @@ github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIv github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -553,6 +559,7 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= @@ -603,6 +610,7 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -697,6 +705,7 @@ github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -712,6 +721,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -744,6 +754,11 @@ github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= +github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -800,6 +815,7 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -834,13 +850,16 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= @@ -878,6 +897,7 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -891,6 +911,7 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= @@ -1330,8 +1351,10 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1392,6 +1415,7 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1466,8 +1490,11 @@ google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3 h1:q1kiSVscqoDeqTF27eQ2NnLLDmqF0I373qQNXYMy0fo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= @@ -1483,6 +1510,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= diff --git a/proto/secret/compute/v1beta1/query.proto b/proto/secret/compute/v1beta1/query.proto index 6b0824c78..a04527eee 100644 --- a/proto/secret/compute/v1beta1/query.proto +++ b/proto/secret/compute/v1beta1/query.proto @@ -14,40 +14,51 @@ option (gogoproto.equal_all) = true; // Query defines the gRPC querier service service Query { // Query contract info by address - rpc ContractInfo (QueryByContractAddressRequest) returns (QueryContractInfoResponse) { - option (google.api.http).get = "/compute/v1beta1/info/{contract_address}"; + rpc ContractInfo(QueryByContractAddressRequest) + returns (QueryContractInfoResponse) { + option (google.api.http).get = + "/compute/v1beta1/info/{contract_address}"; } // Query code info by id - rpc ContractsByCodeID (QueryByCodeIDRequest) returns (QueryContractsByCodeIDResponse) { + rpc ContractsByCodeID(QueryByCodeIDRequest) + returns (QueryContractsByCodeIDResponse) { option (google.api.http).get = "/compute/v1beta1/contracts/{code_id}"; } // Query secret contract - rpc QuerySecretContract (QuerySecretContractRequest) returns (QuerySecretContractResponse) { - option (google.api.http).get = "/compute/v1beta1/query/{contract_address}"; + rpc QuerySecretContract(QuerySecretContractRequest) + returns (QuerySecretContractResponse) { + option (google.api.http).get = + "/compute/v1beta1/query/{contract_address}"; } // Query a specific contract code by id - rpc Code (QueryByCodeIDRequest) returns (QueryCodeResponse) { + rpc Code(QueryByCodeIDRequest) returns (QueryCodeResponse) { option (google.api.http).get = "/compute/v1beta1/code/{code_id}"; } // Query all contract codes on-chain - rpc Codes (google.protobuf.Empty) returns (QueryCodesResponse) { + rpc Codes(google.protobuf.Empty) returns (QueryCodesResponse) { option (google.api.http).get = "/compute/v1beta1/codes"; } // Query code hash by contract address - rpc CodeHashByContractAddress (QueryByContractAddressRequest) returns (QueryCodeHashResponse) { - option (google.api.http).get = "/compute/v1beta1/code_hash/{contract_address}"; + rpc CodeHashByContractAddress(QueryByContractAddressRequest) + returns (QueryCodeHashResponse) { + option (google.api.http).get = + "/compute/v1beta1/code_hash/{contract_address}"; } // Query code hash by code id - rpc CodeHashByCodeID (QueryByCodeIDRequest) returns (QueryCodeHashResponse) { + rpc CodeHashByCodeID(QueryByCodeIDRequest) returns (QueryCodeHashResponse) { option (google.api.http).get = "/compute/v1beta1/code_hash/{code_id}"; } // Query contract label by address - rpc LabelByAddress(QueryByContractAddressRequest) returns (QueryContractLabelResponse) { - option (google.api.http).get = "/compute/v1beta1/label/{contract_address}"; + rpc LabelByAddress(QueryByContractAddressRequest) + returns (QueryContractLabelResponse) { + option (google.api.http).get = + "/compute/v1beta1/label/{contract_address}"; } // Query contract address by label - rpc AddressByLabel(QueryByLabelRequest) returns (QueryContractAddressResponse) { - option (google.api.http).get = "/compute/v1beta1/contract_address/{label}"; + rpc AddressByLabel(QueryByLabelRequest) + returns (QueryContractAddressResponse) { + option (google.api.http).get = + "/compute/v1beta1/contract_address/{label}"; } } @@ -57,39 +68,38 @@ message QuerySecretContractRequest { bytes query = 2; } -message QueryByLabelRequest { - string label = 1; -} +message QueryByLabelRequest { string label = 1; } message QueryByContractAddressRequest { // address is the bech32 human readable address of the contract string contract_address = 1; } -message QueryByCodeIDRequest { - uint64 code_id = 1; -} +message QueryByCodeIDRequest { uint64 code_id = 1; } -message QuerySecretContractResponse { - bytes data = 1; -} +message QuerySecretContractResponse { bytes data = 1; } -// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method +// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC +// method message QueryContractInfoResponse { // contract_address is the bech32 human readable address of the contract string contract_address = 1; - ContractInfo ContractInfo = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + ContractInfo ContractInfo = 2 + [ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; } -// ContractInfoWithAddress adds the contract address to the ContractInfo representation +// ContractInfoWithAddress adds the contract address to the ContractInfo +// representation message ContractInfoWithAddress { // contract_address is the bech32 human readable address of the contract string contract_address = 1; - ContractInfo ContractInfo = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + ContractInfo ContractInfo = 2 + [ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; } message QueryContractsByCodeIDResponse { - repeated ContractInfoWithAddress contract_infos = 1 [(gogoproto.nullable) = false]; + repeated ContractInfoWithAddress contract_infos = 1 + [ (gogoproto.nullable) = false ]; } message CodeInfoResponse { @@ -102,12 +112,13 @@ message CodeInfoResponse { } message QueryCodeResponse { - CodeInfoResponse code_info = 1 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + CodeInfoResponse code_info = 1 + [ (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; bytes wasm = 2; } message QueryCodesResponse { - repeated CodeInfoResponse code_infos = 1 [(gogoproto.nullable) = false]; + repeated CodeInfoResponse code_infos = 1 [ (gogoproto.nullable) = false ]; } message QueryContractAddressResponse { @@ -115,13 +126,9 @@ message QueryContractAddressResponse { string contract_address = 1; } -message QueryContractLabelResponse { - string label = 1; -} +message QueryContractLabelResponse { string label = 1; } -message QueryCodeHashResponse { - string code_hash = 1; -} +message QueryCodeHashResponse { string code_hash = 1; } // DecryptedAnswer is a struct that represents a decrypted tx-query message DecryptedAnswer { @@ -131,7 +138,14 @@ message DecryptedAnswer { string input = 2; string output_data = 3; string output_data_as_string = 4; - repeated cosmos.base.abci.v1beta1.StringEvent output_logs = 5 [(gogoproto.nullable) = false]; - bytes output_error = 6 [(gogoproto.casttype) = "encoding/json.RawMessage"]; - string plaintext_error = 7; +} + +message DecryptedAnswers { + option (gogoproto.equal) = false; + + repeated DecryptedAnswer answers = 1; + repeated cosmos.base.abci.v1beta1.StringEvent output_logs = 2 + [ (gogoproto.nullable) = false ]; + string output_error = 3; + string plaintext_error = 4; } \ No newline at end of file diff --git a/x/compute/client/cli/helpers.go b/x/compute/client/cli/helpers.go new file mode 100644 index 000000000..850afa5c7 --- /dev/null +++ b/x/compute/client/cli/helpers.go @@ -0,0 +1,15 @@ +package cli + +import "fmt" + +func parseEncryptedBlob(blob []byte) ([]byte, []byte, []byte, error) { + if len(blob) < 64 { + return nil, nil, nil, fmt.Errorf("input must be > 64 bytes. Got %d", len(blob)) + } + + nonce := blob[0:32] + originalTxSenderPubkey := blob[32:64] + ciphertextInput := blob[64:] + + return nonce, originalTxSenderPubkey, ciphertextInput, nil +} diff --git a/x/compute/client/cli/query.go b/x/compute/client/cli/query.go index 2ed05189a..52de777e6 100644 --- a/x/compute/client/cli/query.go +++ b/x/compute/client/cli/query.go @@ -311,8 +311,7 @@ func CmdDecryptText() *cobra.Command { return fmt.Errorf("error while trying to decode the encrypted output data from base64: %w", err) } - nonce := dataCipherBz[0:32] - originalTxSenderPubkey := dataCipherBz[32:64] + nonce, originalTxSenderPubkey, ciphertextInput, err := parseEncryptedBlob(dataCipherBz) wasmCtx := wasmUtils.WASMContext{CLIContext: clientCtx} _, myPubkey, err := wasmCtx.GetTxSenderKeyPair() @@ -324,7 +323,7 @@ func CmdDecryptText() *cobra.Command { return fmt.Errorf("cannot decrypt, not original tx sender") } - dataPlaintextB64Bz, err := wasmCtx.Decrypt(dataCipherBz[64:], nonce) + dataPlaintextB64Bz, err := wasmCtx.Decrypt(ciphertextInput, nonce) if err != nil { return fmt.Errorf("error while trying to decrypt the output data: %w", err) } @@ -360,68 +359,64 @@ func GetQueryDecryptTxCmd() *cobra.Command { return fmt.Errorf("no transaction found with hash %s", args[0]) } - var answer types.DecryptedAnswer - var encryptedInput []byte - var dataOutputHexB64 string - txInputs := result.GetTx().GetMsgs() - if len(txInputs) != 1 { - return fmt.Errorf("can only decrypt txs with 1 input. Got %d", len(txInputs)) - } - txInput, ok := txInputs[0].(*types.MsgExecuteContract) - if !ok { - txInput2, ok := txInputs[0].(*types.MsgInstantiateContract) - if !ok { - txInput3, ok := txInputs[0].(*types.MsgStoreCode) - if ok { - txInput3.WASMByteCode = nil - return clientCtx.PrintProto(txInput3) - } - return fmt.Errorf("TX is not a compute transaction") - - } - encryptedInput = txInput2.InitMsg - dataOutputHexB64 = result.Data - answer.Type = "instantiate" - - } else { - encryptedInput = txInput.Msg - dataOutputHexB64 = result.Data - answer.Type = "execute" - } - - // decrypt input - if len(encryptedInput) < 64 { - return fmt.Errorf("input must be > 64 bytes. Got %d", len(encryptedInput)) - } - - nonce := encryptedInput[0:32] - originalTxSenderPubkey := encryptedInput[32:64] - wasmCtx := wasmUtils.WASMContext{CLIContext: clientCtx} _, myPubkey, err := wasmCtx.GetTxSenderKeyPair() if err != nil { return fmt.Errorf("error in GetTxSenderKeyPair: %w", err) } - if !bytes.Equal(originalTxSenderPubkey, myPubkey) { - return fmt.Errorf("cannot decrypt, not original tx sender") + answers := types.DecryptedAnswers{ + Answers: make([]*types.DecryptedAnswer, len(txInputs)), + OutputLogs: []sdk.StringEvent{}, + OutputError: "", + PlaintextError: "", } + nonces := make([][]byte, len(txInputs)) - ciphertextInput := encryptedInput[64:] - var plaintextInput []byte - if len(ciphertextInput) > 0 { - plaintextInput, err = wasmCtx.Decrypt(ciphertextInput, nonce) - if err != nil { - return fmt.Errorf("error while trying to decrypt the tx input: %w", err) + for i, tx := range txInputs { + var encryptedInput []byte + answers.Answers[i] = &types.DecryptedAnswer{} + + switch txInput := tx.(type) { + case *types.MsgExecuteContract: + { + encryptedInput = txInput.Msg + answers.Answers[i].Type = "execute" + } + case *types.MsgInstantiateContract: + { + encryptedInput = txInput.InitMsg + answers.Answers[i].Type = "instantiate" + } } - } - answer.Input = string(plaintextInput) + if encryptedInput != nil { + nonce, originalTxSenderPubkey, ciphertextInput, err := parseEncryptedBlob(encryptedInput) + if err != nil { + return fmt.Errorf("can't parse encrypted blob: %w", err) + } + + if !bytes.Equal(originalTxSenderPubkey, myPubkey) { + return fmt.Errorf("cannot decrypt, not original tx sender") + } + + var plaintextInput []byte + if len(ciphertextInput) > 0 { + plaintextInput, err = wasmCtx.Decrypt(ciphertextInput, nonce) + if err != nil { + return fmt.Errorf("error while trying to decrypt the tx input: %w", err) + } + } + + answers.Answers[i].Input = string(plaintextInput) + nonces[i] = nonce + } + } - // decrypt data - if answer.Type == "execute" { + dataOutputHexB64 := result.Data + if dataOutputHexB64 != "" { dataOutputAsProtobuf, err := hex.DecodeString(dataOutputHexB64) if err != nil { return fmt.Errorf("error while trying to decode the encrypted output data from hex string: %w", err) @@ -433,29 +428,27 @@ func GetQueryDecryptTxCmd() *cobra.Command { return fmt.Errorf("error while trying to parse data as protobuf: %w: %s", err, dataOutputHexB64) } - if len(txData.Data) > 1 { - println("WARN: more than one response in tx data. only deciphering the first.") - } + for i, data := range txData.Data { + if len(data.Data) != 0 { + dataPlaintextB64Bz, err := wasmCtx.Decrypt(data.Data, nonces[i]) + if err != nil { + continue + } + dataPlaintextB64 := string(dataPlaintextB64Bz) + answers.Answers[i].OutputData = dataPlaintextB64 - if len(txData.Data) > 0 { - dataPlaintextB64Bz, err := wasmCtx.Decrypt(txData.Data[0].Data, nonce) - if err != nil { - return fmt.Errorf("error while trying to decrypt the output data: %w", err) - } - dataPlaintextB64 := string(dataPlaintextB64Bz) - answer.OutputData = dataPlaintextB64 + dataPlaintext, err := base64.StdEncoding.DecodeString(dataPlaintextB64) + if err != nil { + continue + } - dataPlaintext, err := base64.StdEncoding.DecodeString(dataPlaintextB64) - if err != nil { - return fmt.Errorf("error while trying to decode the decrypted output data from base64 '%s': %w", dataPlaintextB64, err) + answers.Answers[i].OutputDataAsString = string(dataPlaintext) } - - answer.OutputDataAsString = string(dataPlaintext) } } // decrypt logs - answer.OutputLogs = []sdk.StringEvent{} + answers.OutputLogs = []sdk.StringEvent{} for _, l := range result.Logs { for _, e := range l.Events { if e.Type == "wasm" { @@ -465,11 +458,17 @@ func GetQueryDecryptTxCmd() *cobra.Command { if a.Key != "" { // Try to decrypt the log key. If it doesn't look encrypted, leave it as-is keyCiphertext, err := base64.StdEncoding.DecodeString(a.Key) - if err == nil { + if err != nil { + continue + } + + for _, nonce := range nonces { keyPlaintext, err := wasmCtx.Decrypt(keyCiphertext, nonce) - if err == nil { - a.Key = string(keyPlaintext) + if err != nil { + continue } + a.Key = string(keyPlaintext) + break } } @@ -477,34 +476,41 @@ func GetQueryDecryptTxCmd() *cobra.Command { if a.Value != "" { // Try to decrypt the log value. If it doesn't look encrypted, leave it as-is valueCiphertext, err := base64.StdEncoding.DecodeString(a.Value) - if err == nil { + if err != nil { + continue + } + for _, nonce := range nonces { valuePlaintext, err := wasmCtx.Decrypt(valueCiphertext, nonce) if err == nil { - a.Value = string(valuePlaintext) + continue } + a.Value = string(valuePlaintext) + break } } e.Attributes[i] = a } } - answer.OutputLogs = append(answer.OutputLogs, e) + answers.OutputLogs = append(answers.OutputLogs, e) } } } if types.IsEncryptedErrorCode(result.Code) && types.ContainsEncryptedString(result.RawLog) { - stdErr, err := wasmCtx.DecryptError(result.RawLog, answer.Type, nonce) - if err != nil { - return err + for i, nonce := range nonces { + stdErr, err := wasmCtx.DecryptError(result.RawLog, nonce) + if err != nil { + continue + } + answers.OutputError = string(append(json.RawMessage(fmt.Sprintf("message inedx %d: ", i)), stdErr...)) + break } - - answer.OutputError = stdErr } else if types.ContainsEnclaveError(result.RawLog) { - answer.PlaintextError = result.RawLog + answers.PlaintextError = result.RawLog } - return clientCtx.PrintObjectLegacy(&answer) + return clientCtx.PrintObjectLegacy(&answers) }, } @@ -590,12 +596,12 @@ func QueryWithData(contractAddress sdk.AccAddress, queryData []byte, cliCtx clie if err != nil { return err } - nonce := queryData[:32] + nonce, _, _, _ := parseEncryptedBlob(queryData) // Ignoring error since we just encrypted it res, _, err := cliCtx.QueryWithData(route, queryData) if err != nil { if types.ErrContainsQueryError(err) { - errorPlainBz, err := wasmCtx.DecryptError(err.Error(), "query", nonce) + errorPlainBz, err := wasmCtx.DecryptError(err.Error(), nonce) if err != nil { return err } diff --git a/x/compute/client/utils/utils.go b/x/compute/client/utils/utils.go index d94fb1432..a33f262a8 100644 --- a/x/compute/client/utils/utils.go +++ b/x/compute/client/utils/utils.go @@ -268,7 +268,7 @@ func (ctx WASMContext) Decrypt(ciphertext []byte, nonce []byte) ([]byte, error) var re = regexp.MustCompile("encrypted: (.+?):") -func (ctx WASMContext) DecryptError(errString string, msgType string, nonce []byte) (json.RawMessage, error) { +func (ctx WASMContext) DecryptError(errString string, nonce []byte) (json.RawMessage, error) { regexMatch := re.FindStringSubmatch(errString) if len(regexMatch) != 2 { return nil, fmt.Errorf("got an error finding base64 of the error: regexMatch '%v' should have a length of 2. error: %v", regexMatch, errString) diff --git a/x/compute/internal/types/query.pb.go b/x/compute/internal/types/query.pb.go index c5498bed8..c8f461d33 100644 --- a/x/compute/internal/types/query.pb.go +++ b/x/compute/internal/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( bytes "bytes" context "context" - encoding_json "encoding/json" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" @@ -221,7 +220,8 @@ func (m *QuerySecretContractResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySecretContractResponse proto.InternalMessageInfo -// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method +// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC +// method type QueryContractInfoResponse struct { // contract_address is the bech32 human readable address of the contract ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` @@ -261,7 +261,8 @@ func (m *QueryContractInfoResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryContractInfoResponse proto.InternalMessageInfo -// ContractInfoWithAddress adds the contract address to the ContractInfo representation +// ContractInfoWithAddress adds the contract address to the ContractInfo +// representation type ContractInfoWithAddress struct { // contract_address is the bech32 human readable address of the contract ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` @@ -569,13 +570,10 @@ var xxx_messageInfo_QueryCodeHashResponse proto.InternalMessageInfo // DecryptedAnswer is a struct that represents a decrypted tx-query type DecryptedAnswer struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` - OutputData string `protobuf:"bytes,3,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` - OutputDataAsString string `protobuf:"bytes,4,opt,name=output_data_as_string,json=outputDataAsString,proto3" json:"output_data_as_string,omitempty"` - OutputLogs []types.StringEvent `protobuf:"bytes,5,rep,name=output_logs,json=outputLogs,proto3" json:"output_logs"` - OutputError encoding_json.RawMessage `protobuf:"bytes,6,opt,name=output_error,json=outputError,proto3,casttype=encoding/json.RawMessage" json:"output_error,omitempty"` - PlaintextError string `protobuf:"bytes,7,opt,name=plaintext_error,json=plaintextError,proto3" json:"plaintext_error,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` + OutputData string `protobuf:"bytes,3,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` + OutputDataAsString string `protobuf:"bytes,4,opt,name=output_data_as_string,json=outputDataAsString,proto3" json:"output_data_as_string,omitempty"` } func (m *DecryptedAnswer) Reset() { *m = DecryptedAnswer{} } @@ -611,6 +609,46 @@ func (m *DecryptedAnswer) XXX_DiscardUnknown() { var xxx_messageInfo_DecryptedAnswer proto.InternalMessageInfo +type DecryptedAnswers struct { + Answers []*DecryptedAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` + OutputLogs []types.StringEvent `protobuf:"bytes,2,rep,name=output_logs,json=outputLogs,proto3" json:"output_logs"` + OutputError string `protobuf:"bytes,3,opt,name=output_error,json=outputError,proto3" json:"output_error,omitempty"` + PlaintextError string `protobuf:"bytes,4,opt,name=plaintext_error,json=plaintextError,proto3" json:"plaintext_error,omitempty"` +} + +func (m *DecryptedAnswers) Reset() { *m = DecryptedAnswers{} } +func (m *DecryptedAnswers) String() string { return proto.CompactTextString(m) } +func (*DecryptedAnswers) ProtoMessage() {} +func (*DecryptedAnswers) Descriptor() ([]byte, []int) { + return fileDescriptor_7735281c5fa969d4, []int{15} +} +func (m *DecryptedAnswers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DecryptedAnswers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DecryptedAnswers.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DecryptedAnswers) XXX_Merge(src proto.Message) { + xxx_messageInfo_DecryptedAnswers.Merge(m, src) +} +func (m *DecryptedAnswers) XXX_Size() int { + return m.Size() +} +func (m *DecryptedAnswers) XXX_DiscardUnknown() { + xxx_messageInfo_DecryptedAnswers.DiscardUnknown(m) +} + +var xxx_messageInfo_DecryptedAnswers proto.InternalMessageInfo + func init() { proto.RegisterType((*QuerySecretContractRequest)(nil), "secret.compute.v1beta1.QuerySecretContractRequest") proto.RegisterType((*QueryByLabelRequest)(nil), "secret.compute.v1beta1.QueryByLabelRequest") @@ -627,6 +665,7 @@ func init() { proto.RegisterType((*QueryContractLabelResponse)(nil), "secret.compute.v1beta1.QueryContractLabelResponse") proto.RegisterType((*QueryCodeHashResponse)(nil), "secret.compute.v1beta1.QueryCodeHashResponse") proto.RegisterType((*DecryptedAnswer)(nil), "secret.compute.v1beta1.DecryptedAnswer") + proto.RegisterType((*DecryptedAnswers)(nil), "secret.compute.v1beta1.DecryptedAnswers") } func init() { @@ -634,79 +673,79 @@ func init() { } var fileDescriptor_7735281c5fa969d4 = []byte{ - // 1146 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x6f, 0xdc, 0xc4, - 0x17, 0x5f, 0xa7, 0xbb, 0x49, 0x33, 0xc9, 0x37, 0x69, 0xe7, 0x9b, 0xa6, 0xee, 0x26, 0x78, 0x8b, - 0x29, 0x34, 0x69, 0x5a, 0x9b, 0xdd, 0xb6, 0x1c, 0xe0, 0x80, 0xb2, 0x4d, 0x24, 0x82, 0x52, 0x10, - 0xee, 0x01, 0x09, 0x51, 0x45, 0xb3, 0xf6, 0xc4, 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5b, - 0x2e, 0x6d, 0x20, 0xc7, 0x09, 0x31, 0xa5, 0xaa, 0x72, 0x55, 0x59, 0x18, 0xb7, 0xa6, 0x93, 0xf5, - 0xe5, 0x78, 0x19, 0xce, 0x80, 0x8a, 0xc8, 0x84, 0x3a, 0x72, 0x55, 0x59, 0x98, 0xb4, 0x62, 0x41, - 0x5f, 0x02, 0xff, 0x17, 0xee, 0x9b, 0xbb, 0xeb, 0xa8, 0x85, 0xdb, 0x89, 0xdf, 0x19, 0x50, 0x69, - 0x73, 0x59, 0x3a, 0x8b, 0x05, 0xfd, 0x4d, 0xf0, 0x9c, 0x54, 0xbe, 0x97, 0x77, 0x3e, 0x3c, 0x1c, - 0xdd, 0x04, 0x33, 0xa9, 0x2f, 0x07, 0xaf, 0xad, 0x24, 0x2e, 0x2e, 0x83, 0x31, 0x9b, 0x38, 0x78, - 0xc3, 0x73, 0x84, 0x65, 0xd9, 0x1a, 0xe5, 0xe2, 0x9a, 0xa3, 0xd7, 0xc1, 0x5c, 0x61, 0x22, 0x68, - 0x40, 0x7c, 0x8a, 0x21, 0x04, 0x65, 0x07, 0x31, 0x24, 0x8c, 0x26, 0x2d, 0xf1, 0xad, 0x7f, 0xa1, - 0x80, 0x2b, 0xc2, 0x26, 0xd1, 0x5e, 0xf3, 0x37, 0x49, 0x6a, 0x31, 0x44, 0xee, 0x2c, 0x30, 0x99, - 0x75, 0x21, 0x52, 0x38, 0xd1, 0xb8, 0x66, 0x14, 0x77, 0x93, 0x91, 0xd5, 0x6d, 0x9e, 0x3f, 0x38, - 0xac, 0x29, 0x7f, 0x1d, 0xd6, 0x4a, 0x56, 0xce, 0x87, 0xfe, 0xb9, 0x02, 0x2e, 0x67, 0x17, 0xde, - 0xf5, 0xd8, 0x56, 0x12, 0xef, 0x3f, 0x86, 0xf6, 0x21, 0xd0, 0x72, 0x69, 0xa3, 0x27, 0x45, 0x92, - 0xb9, 0x7b, 0x1f, 0x4c, 0xa5, 0x00, 0x3d, 0x7f, 0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 0x65, 0x3f, 0xfd, 0xae, 0xc0, 0x68, 0xc2, - 0x5b, 0x85, 0x18, 0x05, 0x29, 0x16, 0x95, 0xec, 0x4b, 0x39, 0x42, 0x13, 0xe8, 0xcf, 0x70, 0x1f, - 0x86, 0x04, 0xda, 0xeb, 0x1a, 0x64, 0x80, 0xca, 0x3a, 0x7e, 0xaf, 0x80, 0x29, 0x31, 0x15, 0x9a, - 0xbb, 0xff, 0x32, 0x9f, 0x8d, 0x81, 0xae, 0x6d, 0x6e, 0x02, 0xf5, 0xb8, 0x03, 0x62, 0x16, 0x15, - 0x25, 0xf4, 0x6b, 0x05, 0x4c, 0x25, 0x8f, 0x96, 0xf8, 0xad, 0x0c, 0x97, 0xfa, 0x00, 0xce, 0xbe, - 0xa8, 0xab, 0x77, 0x06, 0x82, 0x79, 0x6a, 0xe6, 0xf6, 0x00, 0x7a, 0x1a, 0xa1, 0xf9, 0x54, 0x40, - 0xdf, 0x6b, 0x3e, 0xdc, 0xff, 0x5d, 0x2b, 0x7d, 0x7b, 0xa4, 0x29, 0xfb, 0x47, 0x9a, 0x72, 0x70, - 0xa4, 0x29, 0xbf, 0x1d, 0x69, 0xca, 0x27, 0xc7, 0x5a, 0xe9, 0xe0, 0x58, 0x2b, 0xfd, 0x7a, 0xac, - 0x95, 0xde, 0x7b, 0xcd, 0xf5, 0xd8, 0x56, 0xd4, 0xe2, 0x48, 0x4c, 0xec, 0x7b, 0x6e, 0x07, 0x75, - 0x02, 0xdb, 0x8c, 0xe9, 0xe2, 0x2d, 0xcc, 0xb6, 0x49, 0xf8, 0xc8, 0xdc, 0x49, 0x03, 0xf2, 0x19, - 0x11, 0xfa, 0xa8, 0x1d, 0xff, 0xf5, 0xb4, 0x46, 0xc5, 0x7d, 0xbb, 0xfd, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc2, 0xfa, 0x11, 0x81, 0x6e, 0x0d, 0x00, 0x00, + // 1138 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x3d, 0x6c, 0x1c, 0x45, + 0x14, 0xbe, 0x71, 0xce, 0x76, 0xfc, 0x6c, 0x6c, 0x67, 0x70, 0x9c, 0xcb, 0x39, 0x9c, 0x93, 0x25, + 0x60, 0x3b, 0x4e, 0x76, 0xb9, 0x4b, 0x42, 0x01, 0x95, 0x1d, 0x5b, 0xc2, 0xc8, 0x80, 0xb8, 0x14, + 0x48, 0x88, 0xc8, 0x9a, 0xdb, 0x1d, 0x9f, 0x57, 0xb9, 0xdb, 0xd9, 0xec, 0xcc, 0xc5, 0xb6, 0x22, + 0x53, 0x50, 0x51, 0x22, 0x01, 0x12, 0x42, 0x42, 0xa2, 0x02, 0x44, 0x81, 0x44, 0x47, 0x47, 0xeb, + 0xd2, 0x12, 0x0d, 0x55, 0x04, 0x36, 0x05, 0xa2, 0xa7, 0x47, 0xf3, 0xb3, 0xeb, 0x5d, 0x7b, 0x7d, + 0xf6, 0x85, 0x22, 0xdd, 0xce, 0xcc, 0xfb, 0xf9, 0xde, 0xf7, 0xe6, 0xbd, 0x37, 0x0b, 0x16, 0xa7, + 0x6e, 0x44, 0x85, 0xe3, 0xb2, 0x76, 0xd8, 0x11, 0xd4, 0x79, 0x5c, 0x6d, 0x50, 0x41, 0xaa, 0xce, + 0xa3, 0x0e, 0x8d, 0xb6, 0xed, 0x30, 0x62, 0x82, 0xe1, 0x49, 0x2d, 0x63, 0x1b, 0x19, 0xdb, 0xc8, + 0x94, 0x27, 0x9a, 0xac, 0xc9, 0x94, 0x88, 0x23, 0xbf, 0xb4, 0x74, 0xf9, 0x24, 0x8b, 0x62, 0x3b, + 0xa4, 0xdc, 0xc8, 0x4c, 0x35, 0x19, 0x6b, 0xb6, 0xa8, 0xa3, 0x56, 0x8d, 0xce, 0xba, 0x43, 0xdb, + 0xa1, 0x30, 0xee, 0xca, 0x57, 0xcc, 0x21, 0x09, 0x7d, 0x87, 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ef, 0x00, 0x24, 0xae, 0xe3, 0x04, 0x9c, 0xdd, + 0xb7, 0x66, 0x7e, 0x28, 0xf6, 0xcb, 0xad, 0x15, 0xb8, 0x92, 0xc9, 0x7a, 0x52, 0xdb, 0x3d, 0xd7, + 0x8b, 0x55, 0x33, 0x4d, 0x2b, 0x36, 0x65, 0x7a, 0x8b, 0x31, 0x94, 0xdf, 0x5c, 0xee, 0xc0, 0xc5, + 0x24, 0x46, 0x99, 0xa0, 0x44, 0x3c, 0x93, 0x45, 0x94, 0xcd, 0xa2, 0xf5, 0x25, 0x82, 0xb1, 0x25, + 0xea, 0x46, 0xdb, 0xa1, 0xa0, 0xde, 0x42, 0xc0, 0x37, 0x69, 0x24, 0x19, 0x94, 0x1d, 0xda, 0xc8, + 0xaa, 0x6f, 0xe9, 0xd3, 0x0f, 0xc2, 0x8e, 0x30, 0x57, 0x44, 0x2f, 0xf0, 0x34, 0x0c, 0xb3, 0x8e, + 0x08, 0x3b, 0x62, 0x4d, 0xf5, 0x0e, 0x7d, 0x45, 0x40, 0x6f, 0x2d, 0x11, 0x41, 0x70, 0x15, 0x2e, + 0xa6, 0x04, 0xd6, 0x08, 0x5f, 0xe3, 0x22, 0xf2, 0x83, 0xa6, 0xb9, 0x33, 0xf8, 0x50, 0x74, 0x81, + 0xdf, 0x57, 0x27, 0x6f, 0x14, 0xff, 0xfe, 0x76, 0xba, 0x60, 0xfd, 0x8b, 0x60, 0xfc, 0x08, 0x2e, + 0x8e, 0x17, 0x60, 0x90, 0xe8, 0x4f, 0x93, 0xad, 0x99, 0x93, 0xb2, 0x75, 0x44, 0xb5, 0x1e, 0xeb, + 0xe1, 0xd5, 0x04, 0x71, 0x8b, 0x35, 0x79, 0xa9, 0x4f, 0x99, 0x79, 0xc5, 0xd6, 0x93, 0xc4, 0x96, + 0x93, 0xc4, 0x56, 0xc3, 0x23, 0x36, 0xa4, 0x41, 0x2d, 0x3f, 0xa6, 0x81, 0x30, 0x19, 0x37, 0xe1, + 0xad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87, 0xae, 0xa3, 0xdb, 0xc5, 0xbb, 0x54, + 0x6c, 0xb2, 0xe8, 0xa1, 0xb3, 0x95, 0x38, 0x94, 0x33, 0x22, 0x0a, 0x48, 0x4b, 0xff, 0x35, 0x35, + 0x06, 0x54, 0xbd, 0xdd, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x18, 0x7c, 0x8c, 0xae, 0x0d, + 0x00, 0x00, } func (this *QuerySecretContractRequest) Equal(that interface{}) bool { @@ -1987,34 +2026,6 @@ func (m *DecryptedAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PlaintextError) > 0 { - i -= len(m.PlaintextError) - copy(dAtA[i:], m.PlaintextError) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PlaintextError))) - i-- - dAtA[i] = 0x3a - } - if len(m.OutputError) > 0 { - i -= len(m.OutputError) - copy(dAtA[i:], m.OutputError) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OutputError))) - i-- - dAtA[i] = 0x32 - } - if len(m.OutputLogs) > 0 { - for iNdEx := len(m.OutputLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutputLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } if len(m.OutputDataAsString) > 0 { i -= len(m.OutputDataAsString) copy(dAtA[i:], m.OutputDataAsString) @@ -2046,6 +2057,71 @@ func (m *DecryptedAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DecryptedAnswers) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DecryptedAnswers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DecryptedAnswers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PlaintextError) > 0 { + i -= len(m.PlaintextError) + copy(dAtA[i:], m.PlaintextError) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PlaintextError))) + i-- + dAtA[i] = 0x22 + } + if len(m.OutputError) > 0 { + i -= len(m.OutputError) + copy(dAtA[i:], m.OutputError) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OutputError))) + i-- + dAtA[i] = 0x1a + } + if len(m.OutputLogs) > 0 { + for iNdEx := len(m.OutputLogs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutputLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Answers) > 0 { + for iNdEx := len(m.Answers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Answers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2295,6 +2371,21 @@ func (m *DecryptedAnswer) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + return n +} + +func (m *DecryptedAnswers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Answers) > 0 { + for _, e := range m.Answers { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } if len(m.OutputLogs) > 0 { for _, e := range m.OutputLogs { l = e.Size() @@ -3875,7 +3966,91 @@ func (m *DecryptedAnswer) Unmarshal(dAtA []byte) error { } m.OutputDataAsString = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DecryptedAnswers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DecryptedAnswers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DecryptedAnswers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Answers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Answers = append(m.Answers, &DecryptedAnswer{}) + if err := m.Answers[len(m.Answers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OutputLogs", wireType) } @@ -3909,11 +4084,11 @@ func (m *DecryptedAnswer) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OutputError", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3923,27 +4098,25 @@ func (m *DecryptedAnswer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputError = append(m.OutputError[:0], dAtA[iNdEx:postIndex]...) - if m.OutputError == nil { - m.OutputError = []byte{} - } + m.OutputError = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PlaintextError", wireType) }