@agoric/cosmos 0.35.0-upgrade-14-dev-8be87aa.0 → 0.35.0-upgrade-14-dev-c8f9e7b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/Makefile +25 -12
  2. package/ante/ante.go +7 -5
  3. package/app/app.go +62 -47
  4. package/app/export.go +13 -6
  5. package/cmd/agd/main.go +5 -3
  6. package/cmd/libdaemon/main.go +5 -2
  7. package/daemon/cmd/genaccounts.go +13 -9
  8. package/daemon/cmd/root.go +27 -11
  9. package/daemon/cmd/root_test.go +1 -1
  10. package/daemon/cmd/testnet.go +17 -6
  11. package/daemon/main.go +3 -2
  12. package/git-revision.txt +1 -1
  13. package/go.mod +95 -64
  14. package/go.sum +592 -243
  15. package/package.json +2 -2
  16. package/proto/agoric/vstorage/query.proto +53 -1
  17. package/scripts/protocgen.sh +12 -1
  18. package/third_party/proto/buf.yaml +1 -0
  19. package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +4 -1
  20. package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -4
  21. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +16 -6
  22. package/third_party/proto/cosmos_proto/cosmos.proto +97 -0
  23. package/third_party/proto/google/api/annotations.proto +1 -1
  24. package/third_party/proto/google/api/http.proto +181 -120
  25. package/third_party/proto/google/api/httpbody.proto +9 -6
  26. package/third_party/proto/google/protobuf/any.proto +1 -7
  27. package/third_party/proto/ibc/core/channel/v1/channel.proto +15 -1
  28. package/third_party/proto/ibc/core/client/v1/client.proto +9 -6
  29. package/upgradegaia.sh +13 -4
  30. package/vm/action.go +24 -21
  31. package/vm/action_test.go +5 -5
  32. package/vm/controller.go +9 -10
  33. package/x/lien/keeper/account.go +3 -3
  34. package/x/lien/keeper/keeper.go +5 -4
  35. package/x/lien/keeper/keeper_test.go +8 -8
  36. package/x/lien/lien.go +6 -4
  37. package/x/lien/lien_test.go +20 -16
  38. package/x/swingset/client/cli/query.go +2 -2
  39. package/x/swingset/client/cli/tx.go +48 -33
  40. package/x/swingset/client/proposal_handler.go +2 -17
  41. package/x/swingset/keeper/keeper.go +8 -11
  42. package/x/swingset/keeper/keeper_test.go +1 -1
  43. package/x/swingset/keeper/msg_server.go +2 -4
  44. package/x/swingset/keeper/proposal.go +10 -0
  45. package/x/swingset/keeper/querier.go +14 -6
  46. package/x/swingset/proposal_handler.go +3 -3
  47. package/x/swingset/swingset.go +4 -2
  48. package/x/swingset/types/codec.go +2 -2
  49. package/x/swingset/types/msgs.pb.go +16 -16
  50. package/x/swingset/types/proposal.go +5 -5
  51. package/x/swingset/types/types.go +30 -28
  52. package/x/vbank/keeper/keeper.go +3 -2
  53. package/x/vbank/keeper/querier.go +6 -2
  54. package/x/vbank/keeper/rewards.go +1 -1
  55. package/x/vbank/vbank.go +11 -10
  56. package/x/vbank/vbank_test.go +8 -8
  57. package/x/vibc/ibc.go +27 -26
  58. package/x/vibc/keeper/keeper.go +19 -18
  59. package/x/vibc/types/expected_keepers.go +13 -5
  60. package/x/vibc/types/msgs.go +1 -1
  61. package/x/vibc/types/msgs.pb.go +1 -1
  62. package/x/vstorage/README.md +138 -0
  63. package/x/vstorage/capdata/capdata.go +298 -0
  64. package/x/vstorage/capdata/capdata_test.go +352 -0
  65. package/x/vstorage/client/cli/query.go +51 -4
  66. package/x/vstorage/keeper/grpc_query.go +221 -0
  67. package/x/vstorage/keeper/keeper.go +3 -2
  68. package/x/vstorage/keeper/keeper_grpc_test.go +300 -0
  69. package/x/vstorage/keeper/keeper_test.go +1 -1
  70. package/x/vstorage/keeper/querier.go +6 -2
  71. package/x/vstorage/types/query.pb.go +646 -36
  72. package/x/vstorage/types/query.pb.gw.go +119 -0
  73. package/x/vstorage/vstorage.go +16 -15
  74. package/x/vstorage/vstorage_test.go +5 -5
@@ -1,4 +1,4 @@
1
- // Copyright 2018 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ option java_outer_classname = "HttpProto";
23
23
  option java_package = "com.google.api";
24
24
  option objc_class_prefix = "GAPI";
25
25
 
26
-
27
26
  // Defines the HTTP configuration for an API service. It contains a list of
28
27
  // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
29
28
  // to one or more HTTP REST API methods.
@@ -33,7 +32,7 @@ message Http {
33
32
  // **NOTE:** All service configuration rules follow "last one wins" order.
34
33
  repeated HttpRule rules = 1;
35
34
 
36
- // When set to true, URL path parmeters will be fully URI-decoded except in
35
+ // When set to true, URL path parameters will be fully URI-decoded except in
37
36
  // cases of single segment matches in reserved expansion, where "%2F" will be
38
37
  // left encoded.
39
38
  //
@@ -42,94 +41,94 @@ message Http {
42
41
  bool fully_decode_reserved_expansion = 2;
43
42
  }
44
43
 
45
- // `HttpRule` defines the mapping of an RPC method to one or more HTTP
46
- // REST API methods. The mapping specifies how different portions of the RPC
47
- // request message are mapped to URL path, URL query parameters, and
48
- // HTTP request body. The mapping is typically specified as an
49
- // `google.api.http` annotation on the RPC method,
50
- // see "google/api/annotations.proto" for details.
51
- //
52
- // The mapping consists of a field specifying the path template and
53
- // method kind. The path template can refer to fields in the request
54
- // message, as in the example below which describes a REST GET
55
- // operation on a resource collection of messages:
56
- //
44
+ // # gRPC Transcoding
45
+ //
46
+ // gRPC Transcoding is a feature for mapping between a gRPC method and one or
47
+ // more HTTP REST endpoints. It allows developers to build a single API service
48
+ // that supports both gRPC APIs and REST APIs. Many systems, including [Google
49
+ // APIs](https://github.com/googleapis/googleapis),
50
+ // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
51
+ // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
52
+ // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
53
+ // and use it for large scale production services.
54
+ //
55
+ // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
56
+ // how different portions of the gRPC request message are mapped to the URL
57
+ // path, URL query parameters, and HTTP request body. It also controls how the
58
+ // gRPC response message is mapped to the HTTP response body. `HttpRule` is
59
+ // typically specified as an `google.api.http` annotation on the gRPC method.
60
+ //
61
+ // Each mapping specifies a URL path template and an HTTP method. The path
62
+ // template may refer to one or more fields in the gRPC request message, as long
63
+ // as each field is a non-repeated field with a primitive (non-message) type.
64
+ // The path template controls how fields of the request message are mapped to
65
+ // the URL path.
66
+ //
67
+ // Example:
57
68
  //
58
69
  // service Messaging {
59
70
  // rpc GetMessage(GetMessageRequest) returns (Message) {
60
- // option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
71
+ // option (google.api.http) = {
72
+ // get: "/v1/{name=messages/*}"
73
+ // };
61
74
  // }
62
75
  // }
63
76
  // message GetMessageRequest {
64
- // message SubMessage {
65
- // string subfield = 1;
66
- // }
67
- // string message_id = 1; // mapped to the URL
68
- // SubMessage sub = 2; // `sub.subfield` is url-mapped
77
+ // string name = 1; // Mapped to URL path.
69
78
  // }
70
79
  // message Message {
71
- // string text = 1; // content of the resource
80
+ // string text = 1; // The resource content.
72
81
  // }
73
82
  //
74
- // The same http annotation can alternatively be expressed inside the
75
- // `GRPC API Configuration` YAML file.
83
+ // This enables an HTTP REST to gRPC mapping as below:
76
84
  //
77
- // http:
78
- // rules:
79
- // - selector: <proto_package_name>.Messaging.GetMessage
80
- // get: /v1/messages/{message_id}/{sub.subfield}
81
- //
82
- // This definition enables an automatic, bidrectional mapping of HTTP
83
- // JSON to RPC. Example:
84
- //
85
- // HTTP | RPC
85
+ // HTTP | gRPC
86
86
  // -----|-----
87
- // `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
88
- //
89
- // In general, not only fields but also field paths can be referenced
90
- // from a path pattern. Fields mapped to the path pattern cannot be
91
- // repeated and must have a primitive (non-message) type.
92
- //
93
- // Any fields in the request message which are not bound by the path
94
- // pattern automatically become (optional) HTTP query
95
- // parameters. Assume the following definition of the request message:
87
+ // `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
96
88
  //
89
+ // Any fields in the request message which are not bound by the path template
90
+ // automatically become HTTP query parameters if there is no HTTP request body.
91
+ // For example:
97
92
  //
98
93
  // service Messaging {
99
94
  // rpc GetMessage(GetMessageRequest) returns (Message) {
100
- // option (google.api.http).get = "/v1/messages/{message_id}";
95
+ // option (google.api.http) = {
96
+ // get:"/v1/messages/{message_id}"
97
+ // };
101
98
  // }
102
99
  // }
103
100
  // message GetMessageRequest {
104
101
  // message SubMessage {
105
102
  // string subfield = 1;
106
103
  // }
107
- // string message_id = 1; // mapped to the URL
108
- // int64 revision = 2; // becomes a parameter
109
- // SubMessage sub = 3; // `sub.subfield` becomes a parameter
104
+ // string message_id = 1; // Mapped to URL path.
105
+ // int64 revision = 2; // Mapped to URL query parameter `revision`.
106
+ // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
110
107
  // }
111
108
  //
112
- //
113
109
  // This enables a HTTP JSON to RPC mapping as below:
114
110
  //
115
- // HTTP | RPC
111
+ // HTTP | gRPC
116
112
  // -----|-----
117
- // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
118
- //
119
- // Note that fields which are mapped to HTTP parameters must have a
120
- // primitive type or a repeated primitive type. Message types are not
121
- // allowed. In the case of a repeated type, the parameter can be
122
- // repeated in the URL, as in `...?param=A&param=B`.
123
- //
124
- // For HTTP method kinds which allow a request body, the `body` field
113
+ // `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
114
+ // `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
115
+ // "foo"))`
116
+ //
117
+ // Note that fields which are mapped to URL query parameters must have a
118
+ // primitive type or a repeated primitive type or a non-repeated message type.
119
+ // In the case of a repeated type, the parameter can be repeated in the URL
120
+ // as `...?param=A&param=B`. In the case of a message type, each field of the
121
+ // message is mapped to a separate parameter, such as
122
+ // `...?foo.a=A&foo.b=B&foo.c=C`.
123
+ //
124
+ // For HTTP methods that allow a request body, the `body` field
125
125
  // specifies the mapping. Consider a REST update method on the
126
126
  // message resource collection:
127
127
  //
128
- //
129
128
  // service Messaging {
130
129
  // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
131
130
  // option (google.api.http) = {
132
- // put: "/v1/messages/{message_id}"
131
+ // patch: "/v1/messages/{message_id}"
133
132
  // body: "message"
134
133
  // };
135
134
  // }
@@ -139,14 +138,14 @@ message Http {
139
138
  // Message message = 2; // mapped to the body
140
139
  // }
141
140
  //
142
- //
143
141
  // The following HTTP JSON to RPC mapping is enabled, where the
144
142
  // representation of the JSON in the request body is determined by
145
143
  // protos JSON encoding:
146
144
  //
147
- // HTTP | RPC
145
+ // HTTP | gRPC
148
146
  // -----|-----
149
- // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
147
+ // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
148
+ // "123456" message { text: "Hi!" })`
150
149
  //
151
150
  // The special name `*` can be used in the body mapping to define that
152
151
  // every field not bound by the path template should be mapped to the
@@ -156,7 +155,7 @@ message Http {
156
155
  // service Messaging {
157
156
  // rpc UpdateMessage(Message) returns (Message) {
158
157
  // option (google.api.http) = {
159
- // put: "/v1/messages/{message_id}"
158
+ // patch: "/v1/messages/{message_id}"
160
159
  // body: "*"
161
160
  // };
162
161
  // }
@@ -169,13 +168,14 @@ message Http {
169
168
  //
170
169
  // The following HTTP JSON to RPC mapping is enabled:
171
170
  //
172
- // HTTP | RPC
171
+ // HTTP | gRPC
173
172
  // -----|-----
174
- // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
173
+ // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
174
+ // "123456" text: "Hi!")`
175
175
  //
176
176
  // Note that when using `*` in the body mapping, it is not possible to
177
177
  // have HTTP parameters, as all fields not bound by the path end in
178
- // the body. This makes this option more rarely used in practice of
178
+ // the body. This makes this option more rarely used in practice when
179
179
  // defining REST APIs. The common usage of `*` is in custom methods
180
180
  // which don't use the URL at all for transferring data.
181
181
  //
@@ -197,32 +197,34 @@ message Http {
197
197
  // string user_id = 2;
198
198
  // }
199
199
  //
200
+ // This enables the following two alternative HTTP JSON to RPC mappings:
200
201
  //
201
- // This enables the following two alternative HTTP JSON to RPC
202
- // mappings:
203
- //
204
- // HTTP | RPC
202
+ // HTTP | gRPC
205
203
  // -----|-----
206
204
  // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
207
- // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
208
- //
209
- // # Rules for HTTP mapping
210
- //
211
- // The rules for mapping HTTP path, query parameters, and body fields
212
- // to the request message are as follows:
213
- //
214
- // 1. The `body` field specifies either `*` or a field path, or is
215
- // omitted. If omitted, it indicates there is no HTTP request body.
216
- // 2. Leaf fields (recursive expansion of nested messages in the
217
- // request) can be classified into three types:
218
- // (a) Matched in the URL template.
219
- // (b) Covered by body (if body is `*`, everything except (a) fields;
220
- // else everything under the body field)
221
- // (c) All other fields.
222
- // 3. URL query parameters found in the HTTP request are mapped to (c) fields.
223
- // 4. Any body sent with an HTTP request can contain only (b) fields.
224
- //
225
- // The syntax of the path template is as follows:
205
+ // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
206
+ // "123456")`
207
+ //
208
+ // ## Rules for HTTP mapping
209
+ //
210
+ // 1. Leaf request fields (recursive expansion nested messages in the request
211
+ // message) are classified into three categories:
212
+ // - Fields referred by the path template. They are passed via the URL path.
213
+ // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
214
+ // are passed via the HTTP
215
+ // request body.
216
+ // - All other fields are passed via the URL query parameters, and the
217
+ // parameter name is the field path in the request message. A repeated
218
+ // field can be represented as multiple query parameters under the same
219
+ // name.
220
+ // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
221
+ // query parameter, all fields
222
+ // are passed via URL path and HTTP request body.
223
+ // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
224
+ // request body, all
225
+ // fields are passed via URL path and URL query parameters.
226
+ //
227
+ // ### Path template syntax
226
228
  //
227
229
  // Template = "/" Segments [ Verb ] ;
228
230
  // Segments = Segment { "/" Segment } ;
@@ -231,57 +233,111 @@ message Http {
231
233
  // FieldPath = IDENT { "." IDENT } ;
232
234
  // Verb = ":" LITERAL ;
233
235
  //
234
- // The syntax `*` matches a single path segment. The syntax `**` matches zero
235
- // or more path segments, which must be the last part of the path except the
236
- // `Verb`. The syntax `LITERAL` matches literal text in the path.
236
+ // The syntax `*` matches a single URL path segment. The syntax `**` matches
237
+ // zero or more URL path segments, which must be the last part of the URL path
238
+ // except the `Verb`.
237
239
  //
238
240
  // The syntax `Variable` matches part of the URL path as specified by its
239
241
  // template. A variable template must not contain other variables. If a variable
240
242
  // matches a single path segment, its template may be omitted, e.g. `{var}`
241
243
  // is equivalent to `{var=*}`.
242
244
  //
245
+ // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
246
+ // contains any reserved character, such characters should be percent-encoded
247
+ // before the matching.
248
+ //
243
249
  // If a variable contains exactly one path segment, such as `"{var}"` or
244
- // `"{var=*}"`, when such a variable is expanded into a URL path, all characters
245
- // except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
246
- // Discovery Document as `{var}`.
247
- //
248
- // If a variable contains one or more path segments, such as `"{var=foo/*}"`
249
- // or `"{var=**}"`, when such a variable is expanded into a URL path, all
250
- // characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
251
- // show up in the Discovery Document as `{+var}`.
252
- //
253
- // NOTE: While the single segment variable matches the semantics of
254
- // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
255
- // Simple String Expansion, the multi segment variable **does not** match
256
- // RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
250
+ // `"{var=*}"`, when such a variable is expanded into a URL path on the client
251
+ // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
252
+ // server side does the reverse decoding. Such variables show up in the
253
+ // [Discovery
254
+ // Document](https://developers.google.com/discovery/v1/reference/apis) as
255
+ // `{var}`.
256
+ //
257
+ // If a variable contains multiple path segments, such as `"{var=foo/*}"`
258
+ // or `"{var=**}"`, when such a variable is expanded into a URL path on the
259
+ // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
260
+ // The server side does the reverse decoding, except "%2F" and "%2f" are left
261
+ // unchanged. Such variables show up in the
262
+ // [Discovery
263
+ // Document](https://developers.google.com/discovery/v1/reference/apis) as
264
+ // `{+var}`.
265
+ //
266
+ // ## Using gRPC API Service Configuration
267
+ //
268
+ // gRPC API Service Configuration (service config) is a configuration language
269
+ // for configuring a gRPC service to become a user-facing product. The
270
+ // service config is simply the YAML representation of the `google.api.Service`
271
+ // proto message.
272
+ //
273
+ // As an alternative to annotating your proto file, you can configure gRPC
274
+ // transcoding in your service config YAML files. You do this by specifying a
275
+ // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
276
+ // effect as the proto annotation. This can be particularly useful if you
277
+ // have a proto that is reused in multiple services. Note that any transcoding
278
+ // specified in the service config will override any matching transcoding
279
+ // configuration in the proto.
280
+ //
281
+ // Example:
282
+ //
283
+ // http:
284
+ // rules:
285
+ // # Selects a gRPC method and applies HttpRule to it.
286
+ // - selector: example.v1.Messaging.GetMessage
287
+ // get: /v1/messages/{message_id}/{sub.subfield}
288
+ //
289
+ // ## Special notes
290
+ //
291
+ // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
292
+ // proto to JSON conversion must follow the [proto3
293
+ // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
294
+ //
295
+ // While the single segment variable follows the semantics of
296
+ // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
297
+ // Expansion, the multi segment variable **does not** follow RFC 6570 Section
298
+ // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
257
299
  // does not expand special characters like `?` and `#`, which would lead
258
- // to invalid URLs.
300
+ // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
301
+ // for multi segment variables.
259
302
  //
260
- // NOTE: the field paths in variables and in the `body` must not refer to
261
- // repeated fields or map fields.
303
+ // The path variables **must not** refer to any repeated or mapped field,
304
+ // because client libraries are not capable of handling such variable expansion.
305
+ //
306
+ // The path variables **must not** capture the leading "/" character. The reason
307
+ // is that the most common use case "{var}" does not capture the leading "/"
308
+ // character. For consistency, all path variables must share the same behavior.
309
+ //
310
+ // Repeated message fields must not be mapped to URL query parameters, because
311
+ // no client library can support such complicated mapping.
312
+ //
313
+ // If an API needs to use a JSON array for request or response body, it can map
314
+ // the request or response body to a repeated field. However, some gRPC
315
+ // Transcoding implementations may not support this feature.
262
316
  message HttpRule {
263
- // Selects methods to which this rule applies.
317
+ // Selects a method to which this rule applies.
264
318
  //
265
- // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
319
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax
320
+ // details.
266
321
  string selector = 1;
267
322
 
268
323
  // Determines the URL pattern is matched by this rules. This pattern can be
269
324
  // used with any of the {get|put|post|delete|patch} methods. A custom method
270
325
  // can be defined using the 'custom' field.
271
326
  oneof pattern {
272
- // Used for listing and getting information about resources.
327
+ // Maps to HTTP GET. Used for listing and getting information about
328
+ // resources.
273
329
  string get = 2;
274
330
 
275
- // Used for updating a resource.
331
+ // Maps to HTTP PUT. Used for replacing a resource.
276
332
  string put = 3;
277
333
 
278
- // Used for creating a resource.
334
+ // Maps to HTTP POST. Used for creating a resource or performing an action.
279
335
  string post = 4;
280
336
 
281
- // Used for deleting a resource.
337
+ // Maps to HTTP DELETE. Used for deleting a resource.
282
338
  string delete = 5;
283
339
 
284
- // Used for updating a resource.
340
+ // Maps to HTTP PATCH. Used for updating a resource.
285
341
  string patch = 6;
286
342
 
287
343
  // The custom pattern is used for specifying an HTTP method that is not
@@ -291,15 +347,20 @@ message HttpRule {
291
347
  CustomHttpPattern custom = 8;
292
348
  }
293
349
 
294
- // The name of the request field whose value is mapped to the HTTP body, or
295
- // `*` for mapping all fields not captured by the path pattern to the HTTP
296
- // body. NOTE: the referred field must not be a repeated field and must be
297
- // present at the top-level of request message type.
350
+ // The name of the request field whose value is mapped to the HTTP request
351
+ // body, or `*` for mapping all request fields not captured by the path
352
+ // pattern to the HTTP body, or omitted for not having any HTTP request body.
353
+ //
354
+ // NOTE: the referred field must be present at the top-level of the request
355
+ // message type.
298
356
  string body = 7;
299
357
 
300
358
  // Optional. The name of the response field whose value is mapped to the HTTP
301
- // body of response. Other response fields are ignored. When
302
- // not set, the response message will be used as HTTP body of response.
359
+ // response body. When omitted, the entire response message will be used
360
+ // as the HTTP response body.
361
+ //
362
+ // NOTE: The referred field must be present at the top-level of the response
363
+ // message type.
303
364
  string response_body = 12;
304
365
 
305
366
  // Additional HTTP bindings for the selector. Nested bindings must
@@ -1,4 +1,4 @@
1
- // Copyright 2018 Google LLC.
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- //
15
14
 
16
15
  syntax = "proto3";
17
16
 
@@ -46,12 +45,15 @@ option objc_class_prefix = "GAPI";
46
45
  //
47
46
  // // The raw HTTP body is bound to this field.
48
47
  // google.api.HttpBody http_body = 2;
48
+ //
49
49
  // }
50
50
  //
51
51
  // service ResourceService {
52
- // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
53
- // rpc UpdateResource(google.api.HttpBody) returns
54
- // (google.protobuf.Empty);
52
+ // rpc GetResource(GetResourceRequest)
53
+ // returns (google.api.HttpBody);
54
+ // rpc UpdateResource(google.api.HttpBody)
55
+ // returns (google.protobuf.Empty);
56
+ //
55
57
  // }
56
58
  //
57
59
  // Example with streaming methods:
@@ -61,6 +63,7 @@ option objc_class_prefix = "GAPI";
61
63
  // returns (stream google.api.HttpBody);
62
64
  // rpc UpdateCalendar(stream google.api.HttpBody)
63
65
  // returns (stream google.api.HttpBody);
66
+ //
64
67
  // }
65
68
  //
66
69
  // Use of this type only changes how the request and response bodies are
@@ -75,4 +78,4 @@ message HttpBody {
75
78
  // Application specific response metadata. Must be set in the first response
76
79
  // for streaming APIs.
77
80
  repeated google.protobuf.Any extensions = 3;
78
- }
81
+ }
@@ -32,10 +32,8 @@ syntax = "proto3";
32
32
 
33
33
  package google.protobuf;
34
34
 
35
- import "gogoproto/gogo.proto";
36
-
37
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
38
- option go_package = "github.com/golang/protobuf/ptypes/any";
36
+ option go_package = "types";
39
37
  option java_package = "com.google.protobuf";
40
38
  option java_outer_classname = "AnyProto";
41
39
  option java_multiple_files = true;
@@ -154,8 +152,4 @@ message Any {
154
152
 
155
153
  // Must be a valid serialized protocol buffer of the above specified type.
156
154
  bytes value = 2;
157
-
158
- option (gogoproto.typedecl) = false;
159
155
  }
160
-
161
- option (gogoproto.goproto_registration) = false;
@@ -2,7 +2,7 @@ syntax = "proto3";
2
2
 
3
3
  package ibc.core.channel.v1;
4
4
 
5
- option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types";
6
6
 
7
7
  import "gogoproto/gogo.proto";
8
8
  import "ibc/core/client/v1/client.proto";
@@ -132,6 +132,20 @@ message PacketState {
132
132
  bytes data = 4;
133
133
  }
134
134
 
135
+ // PacketId is an identifer for a unique Packet
136
+ // Source chains refer to packets by source port/channel
137
+ // Destination chains refer to packets by destination port/channel
138
+ message PacketId {
139
+ option (gogoproto.goproto_getters) = false;
140
+
141
+ // channel port identifier
142
+ string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
143
+ // channel unique identifier
144
+ string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
145
+ // packet sequence
146
+ uint64 sequence = 3;
147
+ }
148
+
135
149
  // Acknowledgement is the recommended acknowledgement format to be used by
136
150
  // app-specific protocols.
137
151
  // NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental
@@ -2,11 +2,12 @@ syntax = "proto3";
2
2
 
3
3
  package ibc.core.client.v1;
4
4
 
5
- option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types";
6
6
 
7
7
  import "gogoproto/gogo.proto";
8
8
  import "google/protobuf/any.proto";
9
9
  import "cosmos/upgrade/v1beta1/upgrade.proto";
10
+ import "cosmos_proto/cosmos.proto";
10
11
 
11
12
  // IdentifiedClientState defines a client state with an additional client
12
13
  // identifier field.
@@ -23,7 +24,7 @@ message ConsensusStateWithHeight {
23
24
  // consensus state height
24
25
  Height height = 1 [(gogoproto.nullable) = false];
25
26
  // consensus state
26
- google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""];
27
+ google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
27
28
  }
28
29
 
29
30
  // ClientConsensusStates defines all the stored consensus states for a given
@@ -41,7 +42,8 @@ message ClientConsensusStates {
41
42
  // handler may fail if the subject and the substitute do not match in client and
42
43
  // chain parameters (with exception to latest height, frozen height, and chain-id).
43
44
  message ClientUpdateProposal {
44
- option (gogoproto.goproto_getters) = false;
45
+ option (gogoproto.goproto_getters) = false;
46
+ option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
45
47
  // the title of the update proposal
46
48
  string title = 1;
47
49
  // the description of the proposal
@@ -56,9 +58,10 @@ message ClientUpdateProposal {
56
58
  // UpgradeProposal is a gov Content type for initiating an IBC breaking
57
59
  // upgrade.
58
60
  message UpgradeProposal {
59
- option (gogoproto.goproto_getters) = false;
60
- option (gogoproto.goproto_stringer) = false;
61
- option (gogoproto.equal) = true;
61
+ option (gogoproto.goproto_getters) = false;
62
+ option (gogoproto.goproto_stringer) = false;
63
+ option (gogoproto.equal) = true;
64
+ option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
62
65
 
63
66
  string title = 1;
64
67
  string description = 2;
package/upgradegaia.sh CHANGED
@@ -48,10 +48,19 @@ echo "Compute 3-way diffs between Gaia and us"
48
48
  echo "creating $new"
49
49
  mkdir -p "$(dirname "$new")"
50
50
  status=0
51
- diff3 -mE \
52
- "$thisdir/$our" \
53
- "$tmp/${FROM_BRANCH//\//_}/$src" \
54
- "$tmp/${TO_BRANCH//\//_}/$src" \
51
+ ourfile="$thisdir/$our"
52
+ if [ ! -f $ourfile ]; then
53
+ ourfile=/dev/null
54
+ fi
55
+ fromfile="$tmp/${FROM_BRANCH//\//_}/$src"
56
+ if [ ! -f $fromfile ]; then
57
+ fromfile=/dev/null
58
+ fi
59
+ tofile="$tmp/${TO_BRANCH//\//_}/$src"
60
+ if [ ! -f $tofile ]; then
61
+ tofile=/dev/null
62
+ fi
63
+ diff3 -mE "$ourfile" "$fromfile" "$tofile" \
55
64
  > "$new" || status=$?
56
65
  if [ $status -ge 2 ]; then
57
66
  exit "$status"