@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.
- package/Makefile +25 -12
- package/ante/ante.go +7 -5
- package/app/app.go +62 -47
- package/app/export.go +13 -6
- package/cmd/agd/main.go +5 -3
- package/cmd/libdaemon/main.go +5 -2
- package/daemon/cmd/genaccounts.go +13 -9
- package/daemon/cmd/root.go +27 -11
- package/daemon/cmd/root_test.go +1 -1
- package/daemon/cmd/testnet.go +17 -6
- package/daemon/main.go +3 -2
- package/git-revision.txt +1 -1
- package/go.mod +95 -64
- package/go.sum +592 -243
- package/package.json +2 -2
- package/proto/agoric/vstorage/query.proto +53 -1
- package/scripts/protocgen.sh +12 -1
- package/third_party/proto/buf.yaml +1 -0
- package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +4 -1
- package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -4
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +16 -6
- package/third_party/proto/cosmos_proto/cosmos.proto +97 -0
- package/third_party/proto/google/api/annotations.proto +1 -1
- package/third_party/proto/google/api/http.proto +181 -120
- package/third_party/proto/google/api/httpbody.proto +9 -6
- package/third_party/proto/google/protobuf/any.proto +1 -7
- package/third_party/proto/ibc/core/channel/v1/channel.proto +15 -1
- package/third_party/proto/ibc/core/client/v1/client.proto +9 -6
- package/upgradegaia.sh +13 -4
- package/vm/action.go +24 -21
- package/vm/action_test.go +5 -5
- package/vm/controller.go +9 -10
- package/x/lien/keeper/account.go +3 -3
- package/x/lien/keeper/keeper.go +5 -4
- package/x/lien/keeper/keeper_test.go +8 -8
- package/x/lien/lien.go +6 -4
- package/x/lien/lien_test.go +20 -16
- package/x/swingset/client/cli/query.go +2 -2
- package/x/swingset/client/cli/tx.go +48 -33
- package/x/swingset/client/proposal_handler.go +2 -17
- package/x/swingset/keeper/keeper.go +8 -11
- package/x/swingset/keeper/keeper_test.go +1 -1
- package/x/swingset/keeper/msg_server.go +2 -4
- package/x/swingset/keeper/proposal.go +10 -0
- package/x/swingset/keeper/querier.go +14 -6
- package/x/swingset/proposal_handler.go +3 -3
- package/x/swingset/swingset.go +4 -2
- package/x/swingset/types/codec.go +2 -2
- package/x/swingset/types/msgs.pb.go +16 -16
- package/x/swingset/types/proposal.go +5 -5
- package/x/swingset/types/types.go +30 -28
- package/x/vbank/keeper/keeper.go +3 -2
- package/x/vbank/keeper/querier.go +6 -2
- package/x/vbank/keeper/rewards.go +1 -1
- package/x/vbank/vbank.go +11 -10
- package/x/vbank/vbank_test.go +8 -8
- package/x/vibc/ibc.go +27 -26
- package/x/vibc/keeper/keeper.go +19 -18
- package/x/vibc/types/expected_keepers.go +13 -5
- package/x/vibc/types/msgs.go +1 -1
- package/x/vibc/types/msgs.pb.go +1 -1
- package/x/vstorage/README.md +138 -0
- package/x/vstorage/capdata/capdata.go +298 -0
- package/x/vstorage/capdata/capdata_test.go +352 -0
- package/x/vstorage/client/cli/query.go +51 -4
- package/x/vstorage/keeper/grpc_query.go +221 -0
- package/x/vstorage/keeper/keeper.go +3 -2
- package/x/vstorage/keeper/keeper_grpc_test.go +300 -0
- package/x/vstorage/keeper/keeper_test.go +1 -1
- package/x/vstorage/keeper/querier.go +6 -2
- package/x/vstorage/types/query.pb.go +646 -36
- package/x/vstorage/types/query.pb.gw.go +119 -0
- package/x/vstorage/vstorage.go +16 -15
- package/x/vstorage/vstorage_test.go +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.35.0-upgrade-14-dev-
|
|
3
|
+
"version": "0.35.0-upgrade-14-dev-c8f9e7b.0+c8f9e7b",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
5
|
"parsers": {
|
|
6
6
|
"js": "mjs"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c8f9e7be1645e0be23f47de197409a7d4874add5"
|
|
39
39
|
}
|
|
@@ -9,11 +9,18 @@ option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage/types
|
|
|
9
9
|
|
|
10
10
|
// Query defines the gRPC querier service
|
|
11
11
|
service Query {
|
|
12
|
-
// Return an arbitrary vstorage datum.
|
|
12
|
+
// Return the raw string value of an arbitrary vstorage datum.
|
|
13
13
|
rpc Data(QueryDataRequest) returns (QueryDataResponse) {
|
|
14
14
|
option (google.api.http).get = "/agoric/vstorage/data/{path}";
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
// Return a formatted representation of a vstorage datum that must be
|
|
18
|
+
// a valid StreamCell with CapData values, or standalone CapData.
|
|
19
|
+
rpc CapData(QueryCapDataRequest)
|
|
20
|
+
returns (QueryCapDataResponse) {
|
|
21
|
+
option (google.api.http).get = "/agoric/vstorage/capdata/{path}";
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
// Return the children of a given vstorage path.
|
|
18
25
|
rpc Children(QueryChildrenRequest)
|
|
19
26
|
returns (QueryChildrenResponse) {
|
|
@@ -37,6 +44,51 @@ message QueryDataResponse {
|
|
|
37
44
|
];
|
|
38
45
|
}
|
|
39
46
|
|
|
47
|
+
// QueryCapDataRequest contains a path and formatting configuration.
|
|
48
|
+
message QueryCapDataRequest {
|
|
49
|
+
string path = 1 [
|
|
50
|
+
(gogoproto.jsontag) = "path",
|
|
51
|
+
(gogoproto.moretags) = "yaml:\"path\""
|
|
52
|
+
];
|
|
53
|
+
// mediaType must be an actual media type in the registry at
|
|
54
|
+
// https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
55
|
+
// or a special value that does not conflict with the media type syntax.
|
|
56
|
+
// The only valid value is "JSON Lines", which is also the default.
|
|
57
|
+
string media_type = 2 [
|
|
58
|
+
(gogoproto.jsontag) = "mediaType",
|
|
59
|
+
(gogoproto.moretags) = "yaml:\"mediaType\""
|
|
60
|
+
];
|
|
61
|
+
// itemFormat, if present, must be the special value "flat" to indicate that
|
|
62
|
+
// the deep structure of each item should be flattened into a single level
|
|
63
|
+
// with kebab-case keys (e.g., `{ "metrics": { "min": 0, "max": 88 } }` as
|
|
64
|
+
// `{ "metrics-min": 0, "metrics-max": 88 }`).
|
|
65
|
+
string item_format = 3 [
|
|
66
|
+
(gogoproto.jsontag) = "itemFormat",
|
|
67
|
+
(gogoproto.moretags) = "yaml:\"itemFormat\""
|
|
68
|
+
];
|
|
69
|
+
// remotableValueFormat indicates how to transform references to opaque but
|
|
70
|
+
// distinguishable Remotables into readable embedded representations.
|
|
71
|
+
// * "object" represents each Remotable as an `{ id, allegedName }` object, e.g. `{ "id": "board007", "allegedName": "IST brand" }`.
|
|
72
|
+
// * "string" represents each Remotable as a string with bracket-wrapped contents including its alleged name and id, e.g. "[Alleged: IST brand <board007>]".
|
|
73
|
+
string remotable_value_format = 10 [
|
|
74
|
+
(gogoproto.jsontag) = "remotableValueFormat",
|
|
75
|
+
(gogoproto.moretags) = "yaml:\"remotableValueFormat\""
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// QueryCapDataResponse represents the result with the requested formatting,
|
|
80
|
+
// reserving space for future metadata such as media type.
|
|
81
|
+
message QueryCapDataResponse {
|
|
82
|
+
string block_height = 1 [
|
|
83
|
+
(gogoproto.jsontag) = "blockHeight",
|
|
84
|
+
(gogoproto.moretags) = "yaml:\"blockHeight\""
|
|
85
|
+
];
|
|
86
|
+
string value = 10 [
|
|
87
|
+
(gogoproto.jsontag) = "value",
|
|
88
|
+
(gogoproto.moretags) = "yaml:\"value\""
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
|
|
40
92
|
// QueryChildrenRequest is the vstorage path children query.
|
|
41
93
|
message QueryChildrenRequest {
|
|
42
94
|
string path = 1 [
|
package/scripts/protocgen.sh
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
set -eo pipefail
|
|
4
4
|
|
|
5
|
+
protoc_gen_gocosmos() {
|
|
6
|
+
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
|
|
7
|
+
echo -e "\tPlease run this command from somewhere inside the ibc-go folder."
|
|
8
|
+
return 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2>/dev/null
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protoc_gen_gocosmos
|
|
15
|
+
|
|
5
16
|
proto_dirs=$(find . -path ./third_party -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
|
6
17
|
for dir in $proto_dirs; do
|
|
7
18
|
# NOTE: when migrating to grpc-gateway v2, we will need to remove the
|
|
@@ -10,7 +21,7 @@ for dir in $proto_dirs; do
|
|
|
10
21
|
protoc \
|
|
11
22
|
-I proto \
|
|
12
23
|
-I third_party/proto \
|
|
13
|
-
--gocosmos_out=plugins=
|
|
24
|
+
--gocosmos_out=plugins=grpc,\
|
|
14
25
|
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
|
15
26
|
--grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \
|
|
16
27
|
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
|
@@ -32,6 +32,8 @@ message PageRequest {
|
|
|
32
32
|
bool count_total = 4;
|
|
33
33
|
|
|
34
34
|
// reverse is set to true if results are to be returned in the descending order.
|
|
35
|
+
//
|
|
36
|
+
// Since: cosmos-sdk 0.43
|
|
35
37
|
bool reverse = 5;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -44,7 +46,8 @@ message PageRequest {
|
|
|
44
46
|
// }
|
|
45
47
|
message PageResponse {
|
|
46
48
|
// next_key is the key to be passed to PageRequest.key to
|
|
47
|
-
// query the next page most efficiently
|
|
49
|
+
// query the next page most efficiently. It will be empty if
|
|
50
|
+
// there are no more results.
|
|
48
51
|
bytes next_key = 1;
|
|
49
52
|
|
|
50
53
|
// total is total number of results available if PageRequest.count_total
|
|
@@ -2,6 +2,7 @@ syntax = "proto3";
|
|
|
2
2
|
package cosmos.base.v1beta1;
|
|
3
3
|
|
|
4
4
|
import "gogoproto/gogo.proto";
|
|
5
|
+
import "cosmos_proto/cosmos.proto";
|
|
5
6
|
|
|
6
7
|
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
|
7
8
|
option (gogoproto.goproto_stringer_all) = false;
|
|
@@ -15,7 +16,8 @@ message Coin {
|
|
|
15
16
|
option (gogoproto.equal) = true;
|
|
16
17
|
|
|
17
18
|
string denom = 1;
|
|
18
|
-
string amount = 2
|
|
19
|
+
string amount = 2
|
|
20
|
+
[(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
// DecCoin defines a token with a denomination and a decimal amount.
|
|
@@ -26,15 +28,16 @@ message DecCoin {
|
|
|
26
28
|
option (gogoproto.equal) = true;
|
|
27
29
|
|
|
28
30
|
string denom = 1;
|
|
29
|
-
string amount = 2
|
|
31
|
+
string amount = 2
|
|
32
|
+
[(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
// IntProto defines a Protobuf wrapper around an Int object.
|
|
33
36
|
message IntProto {
|
|
34
|
-
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
|
37
|
+
string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
// DecProto defines a Protobuf wrapper around a Dec object.
|
|
38
41
|
message DecProto {
|
|
39
|
-
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
|
42
|
+
string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
|
40
43
|
}
|
|
@@ -4,6 +4,7 @@ package cosmos.upgrade.v1beta1;
|
|
|
4
4
|
import "google/protobuf/any.proto";
|
|
5
5
|
import "gogoproto/gogo.proto";
|
|
6
6
|
import "google/protobuf/timestamp.proto";
|
|
7
|
+
import "cosmos_proto/cosmos.proto";
|
|
7
8
|
|
|
8
9
|
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
|
9
10
|
option (gogoproto.goproto_getters_all) = false;
|
|
@@ -38,15 +39,18 @@ message Plan {
|
|
|
38
39
|
// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
|
|
39
40
|
// moved to the IBC module in the sub module 02-client.
|
|
40
41
|
// If this field is not empty, an error will be thrown.
|
|
41
|
-
google.protobuf.Any upgraded_client_state = 5
|
|
42
|
-
[deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""];
|
|
42
|
+
google.protobuf.Any upgraded_client_state = 5 [deprecated = true];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
|
46
46
|
// upgrade.
|
|
47
|
+
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
|
|
48
|
+
// proposals, see MsgSoftwareUpgrade.
|
|
47
49
|
message SoftwareUpgradeProposal {
|
|
48
|
-
option
|
|
49
|
-
option (
|
|
50
|
+
option deprecated = true;
|
|
51
|
+
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
|
|
52
|
+
option (gogoproto.equal) = true;
|
|
53
|
+
option (gogoproto.goproto_stringer) = false;
|
|
50
54
|
|
|
51
55
|
string title = 1;
|
|
52
56
|
string description = 2;
|
|
@@ -55,15 +59,21 @@ message SoftwareUpgradeProposal {
|
|
|
55
59
|
|
|
56
60
|
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
|
57
61
|
// upgrade.
|
|
62
|
+
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
|
|
63
|
+
// proposals, see MsgCancelUpgrade.
|
|
58
64
|
message CancelSoftwareUpgradeProposal {
|
|
59
|
-
option
|
|
60
|
-
option (
|
|
65
|
+
option deprecated = true;
|
|
66
|
+
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
|
|
67
|
+
option (gogoproto.equal) = true;
|
|
68
|
+
option (gogoproto.goproto_stringer) = false;
|
|
61
69
|
|
|
62
70
|
string title = 1;
|
|
63
71
|
string description = 2;
|
|
64
72
|
}
|
|
65
73
|
|
|
66
74
|
// ModuleVersion specifies a module and its consensus version.
|
|
75
|
+
//
|
|
76
|
+
// Since: cosmos-sdk 0.43
|
|
67
77
|
message ModuleVersion {
|
|
68
78
|
option (gogoproto.equal) = true;
|
|
69
79
|
option (gogoproto.goproto_stringer) = true;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package cosmos_proto;
|
|
3
|
+
|
|
4
|
+
import "google/protobuf/descriptor.proto";
|
|
5
|
+
|
|
6
|
+
option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto";
|
|
7
|
+
|
|
8
|
+
extend google.protobuf.MessageOptions {
|
|
9
|
+
|
|
10
|
+
// implements_interface is used to indicate the type name of the interface
|
|
11
|
+
// that a message implements so that it can be used in google.protobuf.Any
|
|
12
|
+
// fields that accept that interface. A message can implement multiple
|
|
13
|
+
// interfaces. Interfaces should be declared using a declare_interface
|
|
14
|
+
// file option.
|
|
15
|
+
repeated string implements_interface = 93001;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
extend google.protobuf.FieldOptions {
|
|
19
|
+
|
|
20
|
+
// accepts_interface is used to annotate that a google.protobuf.Any
|
|
21
|
+
// field accepts messages that implement the specified interface.
|
|
22
|
+
// Interfaces should be declared using a declare_interface file option.
|
|
23
|
+
string accepts_interface = 93001;
|
|
24
|
+
|
|
25
|
+
// scalar is used to indicate that this field follows the formatting defined
|
|
26
|
+
// by the named scalar which should be declared with declare_scalar. Code
|
|
27
|
+
// generators may choose to use this information to map this field to a
|
|
28
|
+
// language-specific type representing the scalar.
|
|
29
|
+
string scalar = 93002;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
extend google.protobuf.FileOptions {
|
|
33
|
+
|
|
34
|
+
// declare_interface declares an interface type to be used with
|
|
35
|
+
// accepts_interface and implements_interface. Interface names are
|
|
36
|
+
// expected to follow the following convention such that their declaration
|
|
37
|
+
// can be discovered by tools: for a given interface type a.b.C, it is
|
|
38
|
+
// expected that the declaration will be found in a protobuf file named
|
|
39
|
+
// a/b/interfaces.proto in the file descriptor set.
|
|
40
|
+
repeated InterfaceDescriptor declare_interface = 793021;
|
|
41
|
+
|
|
42
|
+
// declare_scalar declares a scalar type to be used with
|
|
43
|
+
// the scalar field option. Scalar names are
|
|
44
|
+
// expected to follow the following convention such that their declaration
|
|
45
|
+
// can be discovered by tools: for a given scalar type a.b.C, it is
|
|
46
|
+
// expected that the declaration will be found in a protobuf file named
|
|
47
|
+
// a/b/scalars.proto in the file descriptor set.
|
|
48
|
+
repeated ScalarDescriptor declare_scalar = 793022;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// InterfaceDescriptor describes an interface type to be used with
|
|
52
|
+
// accepts_interface and implements_interface and declared by declare_interface.
|
|
53
|
+
message InterfaceDescriptor {
|
|
54
|
+
|
|
55
|
+
// name is the name of the interface. It should be a short-name (without
|
|
56
|
+
// a period) such that the fully qualified name of the interface will be
|
|
57
|
+
// package.name, ex. for the package a.b and interface named C, the
|
|
58
|
+
// fully-qualified name will be a.b.C.
|
|
59
|
+
string name = 1;
|
|
60
|
+
|
|
61
|
+
// description is a human-readable description of the interface and its
|
|
62
|
+
// purpose.
|
|
63
|
+
string description = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ScalarDescriptor describes an scalar type to be used with
|
|
67
|
+
// the scalar field option and declared by declare_scalar.
|
|
68
|
+
// Scalars extend simple protobuf built-in types with additional
|
|
69
|
+
// syntax and semantics, for instance to represent big integers.
|
|
70
|
+
// Scalars should ideally define an encoding such that there is only one
|
|
71
|
+
// valid syntactical representation for a given semantic meaning,
|
|
72
|
+
// i.e. the encoding should be deterministic.
|
|
73
|
+
message ScalarDescriptor {
|
|
74
|
+
|
|
75
|
+
// name is the name of the scalar. It should be a short-name (without
|
|
76
|
+
// a period) such that the fully qualified name of the scalar will be
|
|
77
|
+
// package.name, ex. for the package a.b and scalar named C, the
|
|
78
|
+
// fully-qualified name will be a.b.C.
|
|
79
|
+
string name = 1;
|
|
80
|
+
|
|
81
|
+
// description is a human-readable description of the scalar and its
|
|
82
|
+
// encoding format. For instance a big integer or decimal scalar should
|
|
83
|
+
// specify precisely the expected encoding format.
|
|
84
|
+
string description = 2;
|
|
85
|
+
|
|
86
|
+
// field_type is the type of field with which this scalar can be used.
|
|
87
|
+
// Scalars can be used with one and only one type of field so that
|
|
88
|
+
// encoding standards and simple and clear. Currently only string and
|
|
89
|
+
// bytes fields are supported for scalars.
|
|
90
|
+
repeated ScalarType field_type = 3;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
enum ScalarType {
|
|
94
|
+
SCALAR_TYPE_UNSPECIFIED = 0;
|
|
95
|
+
SCALAR_TYPE_STRING = 1;
|
|
96
|
+
SCALAR_TYPE_BYTES = 2;
|
|
97
|
+
}
|