@agoric/cosmos 0.35.0-u12.0 → 0.35.0-u14.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 (91) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/Makefile +25 -12
  3. package/ante/ante.go +7 -5
  4. package/ante/inbound_test.go +8 -0
  5. package/app/app.go +139 -108
  6. package/app/export.go +13 -9
  7. package/app/sim_test.go +4 -4
  8. package/cmd/agd/main.go +5 -3
  9. package/cmd/libdaemon/main.go +5 -2
  10. package/daemon/cmd/genaccounts.go +13 -9
  11. package/daemon/cmd/root.go +38 -17
  12. package/daemon/cmd/root_test.go +1 -1
  13. package/daemon/cmd/testnet.go +17 -6
  14. package/daemon/main.go +3 -2
  15. package/git-revision.txt +1 -1
  16. package/go.mod +117 -76
  17. package/go.sum +858 -210
  18. package/package.json +3 -3
  19. package/proto/agoric/vstorage/query.proto +53 -1
  20. package/scripts/protocgen.sh +12 -1
  21. package/third_party/proto/buf.yaml +1 -0
  22. package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +4 -1
  23. package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -4
  24. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +16 -6
  25. package/third_party/proto/cosmos_proto/cosmos.proto +97 -0
  26. package/third_party/proto/google/api/annotations.proto +1 -1
  27. package/third_party/proto/google/api/http.proto +181 -120
  28. package/third_party/proto/google/api/httpbody.proto +9 -6
  29. package/third_party/proto/google/protobuf/any.proto +1 -7
  30. package/third_party/proto/ibc/core/channel/v1/channel.proto +15 -1
  31. package/third_party/proto/ibc/core/client/v1/client.proto +9 -6
  32. package/upgradegaia.sh +13 -4
  33. package/vm/action.go +133 -0
  34. package/vm/action_test.go +129 -0
  35. package/vm/controller.go +9 -16
  36. package/vm/core_proposals.go +31 -0
  37. package/x/lien/keeper/account.go +16 -11
  38. package/x/lien/keeper/keeper.go +5 -4
  39. package/x/lien/keeper/keeper_test.go +9 -9
  40. package/x/lien/lien.go +6 -4
  41. package/x/lien/lien_test.go +20 -16
  42. package/x/swingset/abci.go +25 -33
  43. package/x/swingset/client/cli/query.go +2 -2
  44. package/x/swingset/client/cli/tx.go +48 -33
  45. package/x/swingset/client/proposal_handler.go +2 -17
  46. package/x/swingset/keeper/keeper.go +69 -15
  47. package/x/swingset/keeper/keeper_test.go +1 -1
  48. package/x/swingset/keeper/migrations.go +7 -2
  49. package/x/swingset/keeper/msg_server.go +66 -49
  50. package/x/swingset/keeper/proposal.go +14 -8
  51. package/x/swingset/keeper/querier.go +14 -6
  52. package/x/swingset/keeper/swing_store_exports_handler.go +5 -1
  53. package/x/swingset/proposal_handler.go +3 -3
  54. package/x/swingset/swingset.go +4 -2
  55. package/x/swingset/types/codec.go +2 -2
  56. package/x/swingset/types/default-params.go +22 -16
  57. package/x/swingset/types/expected_keepers.go +11 -0
  58. package/x/swingset/types/msgs.go +43 -2
  59. package/x/swingset/types/msgs.pb.go +16 -16
  60. package/x/swingset/types/params.go +74 -0
  61. package/x/swingset/types/params_test.go +116 -0
  62. package/x/swingset/types/proposal.go +5 -5
  63. package/x/swingset/types/types.go +30 -28
  64. package/x/vbank/keeper/keeper.go +3 -2
  65. package/x/vbank/keeper/querier.go +6 -2
  66. package/x/vbank/keeper/rewards.go +1 -1
  67. package/x/vbank/vbank.go +19 -17
  68. package/x/vbank/vbank_test.go +18 -18
  69. package/x/vibc/handler.go +3 -8
  70. package/x/vibc/ibc.go +79 -126
  71. package/x/vibc/keeper/keeper.go +19 -18
  72. package/x/vibc/types/expected_keepers.go +13 -5
  73. package/x/vibc/types/msgs.go +1 -1
  74. package/x/vibc/types/msgs.pb.go +1 -1
  75. package/x/vstorage/README.md +138 -0
  76. package/x/vstorage/capdata/capdata.go +298 -0
  77. package/x/vstorage/capdata/capdata_test.go +352 -0
  78. package/x/vstorage/client/cli/query.go +51 -4
  79. package/x/vstorage/keeper/grpc_query.go +221 -0
  80. package/x/vstorage/keeper/keeper.go +3 -2
  81. package/x/vstorage/keeper/keeper_grpc_test.go +300 -0
  82. package/x/vstorage/keeper/keeper_test.go +1 -1
  83. package/x/vstorage/keeper/querier.go +6 -2
  84. package/x/vstorage/keeper/querier_test.go +112 -0
  85. package/x/vstorage/types/query.pb.go +646 -36
  86. package/x/vstorage/types/query.pb.gw.go +119 -0
  87. package/x/vstorage/vstorage.go +16 -15
  88. package/x/vstorage/vstorage_test.go +5 -5
  89. package/x/swingset/legacy/v32/params.go +0 -37
  90. package/x/swingset/legacy/v32/params_test.go +0 -133
  91. /package/{src/index.cjs → index.cjs} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,73 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.35.0-u14.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u13.0...@agoric/cosmos@0.35.0-u14.0) (2024-02-27)
7
+
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * **cosmos:** make vm comms use `context.Context`
12
+
13
+ ### Features
14
+
15
+ * repair KREAd contract on zoe upgrade ([6ac7623](https://github.com/Agoric/agoric-sdk/commit/6ac762379e2660353a23202acd2d6fb52ed13682))
16
+ * **cosmos:** Add a "CapData" vstorage RPC endpoint ([d20e708](https://github.com/Agoric/agoric-sdk/commit/d20e708cf68e6b0616218e668f21f66b491032b5)), closes [#7581](https://github.com/Agoric/agoric-sdk/issues/7581)
17
+ * **cosmos:** Add a vstorage package for decoding CapData ([f1b6b74](https://github.com/Agoric/agoric-sdk/commit/f1b6b74d6410412d86f094175fca72e2e17e8a2b))
18
+ * **cosmos:** clean up `OnStartHook` and `OnExitHook` signatures ([e8a3a77](https://github.com/Agoric/agoric-sdk/commit/e8a3a77aacab4affa7e83885ece8789418a31846))
19
+ * **cosmos:** make vm comms use `context.Context` ([0bb03a0](https://github.com/Agoric/agoric-sdk/commit/0bb03a0f222426bf8da6729d968c404dc9e72468))
20
+ * agd vstorage 'path' for data or children ([71a217e](https://github.com/Agoric/agoric-sdk/commit/71a217e5a3576b6e8e89fb27e59eb7f2ebde592b))
21
+ * **cosmos:** Always include alleged name and slot id in vstorage CapData remotable representations ([ee23c4e](https://github.com/Agoric/agoric-sdk/commit/ee23c4e404d90afaa28dbf53dfdb33cb9c3eda1b))
22
+ * expose node service to retrieve operator config ([972d243](https://github.com/Agoric/agoric-sdk/commit/972d243eff2bf1eb0ca10f8a9860109a5a39cf87))
23
+ * replace zoe and zcf ([#8846](https://github.com/Agoric/agoric-sdk/issues/8846)) ([0169c7e](https://github.com/Agoric/agoric-sdk/commit/0169c7e505099fdcfa8e4d1436e5d3b372f1c320))
24
+ * tolerate missing files in gaia 3-way diff ([8633f4d](https://github.com/Agoric/agoric-sdk/commit/8633f4d7917a12035182715d560d50f312ece4ff))
25
+ * upgrade ibc-go to v6.2.1 ([2371b51](https://github.com/Agoric/agoric-sdk/commit/2371b5178eff16baadc5716a3f7e11573d3b8889))
26
+ * **cosmos:** impose defaults when sending VM actions ([d32e71e](https://github.com/Agoric/agoric-sdk/commit/d32e71ec14121c3c69aa3c173f284c706d329c75))
27
+ * **cosmos:** next upgrade is `agoric-upgrade-14` ([0333099](https://github.com/Agoric/agoric-sdk/commit/03330999fa8ea872c57a94db063eadbdadc6f342))
28
+ * **cosmos:** support core proposals set by upgrade handler ([14e47cc](https://github.com/Agoric/agoric-sdk/commit/14e47cc503db18ee74d7d9bd3193797524b7f540))
29
+ * **cosmos:** upgrade wallet factory ([ceffbcd](https://github.com/Agoric/agoric-sdk/commit/ceffbcdd85bd4dfa3a7646b590133f9fd55755c8))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **cosmos:** add action context to core evals ([ce1197d](https://github.com/Agoric/agoric-sdk/commit/ce1197dca3c6e274f39ab9f125ed0ec8ad9388fd))
35
+ * avoid broken goleveldb ([f4bd519](https://github.com/Agoric/agoric-sdk/commit/f4bd519ff0675fec1ecb81eaf2488b0df72bd286))
36
+ * exempt more 3rd-party protos from link check ([0be9f00](https://github.com/Agoric/agoric-sdk/commit/0be9f0097d7657f33b5ecda467ff33309b228f51))
37
+ * govulncheck updates ([e83fb57](https://github.com/Agoric/agoric-sdk/commit/e83fb57406ff176c11322c5b61e8515d7d8235df))
38
+ * pick up snapshot initiation fix ([2d41178](https://github.com/Agoric/agoric-sdk/commit/2d41178e84d66fb3c4e990406989a4f6e1f4f386))
39
+ * unwrap account keeper for app module ([4807023](https://github.com/Agoric/agoric-sdk/commit/48070238018ce6afc361254e5e847e90752eb9cf))
40
+ * update protobuf download and generation for ibc-go v4 ([63bdd54](https://github.com/Agoric/agoric-sdk/commit/63bdd54f7629adc6dbb38632c0e1b0bc2526f0e2))
41
+
42
+
43
+ ### Reverts
44
+
45
+ * Revert "fix(cosmos): don't log expected missing tx context of CORE_EVAL" ([eb856af](https://github.com/Agoric/agoric-sdk/commit/eb856afcb32b4376ceb353c6895c65db0c251958))
46
+
47
+
48
+
49
+ ## [0.35.0-u13.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u12.0...@agoric/cosmos@0.35.0-u13.0) (2023-12-07)
50
+
51
+
52
+ ### Features
53
+
54
+ * **cosmos:** un-wire x/crisis ([#8582](https://github.com/Agoric/agoric-sdk/issues/8582)) ([19404a3](https://github.com/Agoric/agoric-sdk/commit/19404a3c5cd10d9c454f190b60cbf0aa715f605c))
55
+ * **x/swingset:** auto-provision smart wallet ([5073800](https://github.com/Agoric/agoric-sdk/commit/5073800f87c92a194a21c9cc59ad1bb570a39b95))
56
+ * **x/swingset:** refuse smart wallet messages if not provisioned ([50a5a55](https://github.com/Agoric/agoric-sdk/commit/50a5a557956562fc05b8c2defd99a0102a35153f))
57
+ * pick up return-grants from latest cosmos-sdk ([975533e](https://github.com/Agoric/agoric-sdk/commit/975533e088f96c80cf8d6f6b7c5f45665e3495ba))
58
+ * update ibc-go to v4, adapt packages and API ([6672e5c](https://github.com/Agoric/agoric-sdk/commit/6672e5cb780c8baa530ac59bff27d793e1ff8f50))
59
+
60
+
61
+ ### Bug Fixes
62
+
63
+ * handle hang-on-halt behavior from agoric-labs/cosmos-sdk[#305](https://github.com/Agoric/agoric-sdk/issues/305) ([7ae9a70](https://github.com/Agoric/agoric-sdk/commit/7ae9a705478727d1d7ace7c665861cfee14b5f28))
64
+ * update dependencies to fix tests ([9d750dd](https://github.com/Agoric/agoric-sdk/commit/9d750dd39993d380a5e889ea7faa4bb78c3257aa))
65
+
66
+
67
+ ### Reverts
68
+
69
+ * Revert "fix: handle hang-on-halt behavior from agoric-labs/cosmos-sdk#305" ([3a37f5e](https://github.com/Agoric/agoric-sdk/commit/3a37f5e472405d1d3bee2075b47ecd3632ba4073)), closes [agoric-labs/cosmos-sdk#305](https://github.com/agoric-labs/cosmos-sdk/issues/305) [agoric-labs/cosmos-sdk#305](https://github.com/agoric-labs/cosmos-sdk/issues/305)
70
+
71
+
72
+
6
73
  ## [0.35.0-u12.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u11wf.0...@agoric/cosmos@0.35.0-u12.0) (2023-11-10)
7
74
 
8
75
 
package/Makefile CHANGED
@@ -98,44 +98,57 @@ proto-lint: proto-tools
98
98
  proto-check-breaking: proto-tools
99
99
  ${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
100
100
 
101
- TMVER := $(shell go list -m all | sed -ne 's!^github\.com/tendermint/tendermint \(.*\)!\1!p')
102
- COSMOSVER = $(shell go list -m all | sed -ne 's!^github\.com/cosmos/cosmos-sdk \(.*\)!\1!p')
103
- IBCVER = 832044782f10
104
- t:
105
- echo "X$(COSMOSVER)X"
106
-
107
- TM_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/tendermint/tendermint)/proto/tendermint
108
- GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
109
- IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v3)/proto/ibc/core
101
+ GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
102
+ # GOOGLE_API_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
103
+ IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
104
+ COSMOS_PROTO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
110
105
  COSMOS_SDK_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
111
106
 
107
+ COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
112
108
  GOGO_PROTO_TYPES = third_party/proto/gogoproto
109
+ GOOGLE_API_TYPES = third_party/proto/google/api
110
+ GOOGLE_PROTO_TYPES = third_party/proto/google/protobuf
113
111
  IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1
114
112
  IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1
115
- SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
113
+ SDK_BASE_TYPES = third_party/proto/cosmos/base/v1beta1
114
+ SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
116
115
  SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1
117
116
 
118
117
  proto-update-deps:
118
+ mkdir -p $(COSMOS_PROTO_TYPES)
119
+ curl -sSL $(COSMOS_PROTO_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
120
+
119
121
  mkdir -p $(GOGO_PROTO_TYPES)
120
122
  curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
121
123
 
124
+ # Downloading from a not-a-go-module is problematic. These files are artifacts for now.
125
+ # mkdir -p $(GOOGLE_API_TYPES)
126
+ # curl -sSL $(GOOGLE_API_URL)/annotations.proto > $(GOOGLE_API_TYPES)/annotations.proto
127
+ # curl -sSL $(GOOGLE_API_URL)/http.proto > $(GOOGLE_API_TYPES)/http.proto
128
+ # curl -sSL $(GOOGLE_API_URL)/httpbody.proto > $(GOOGLE_API_TYPES)/httpbody.proto
129
+
130
+ mkdir -p $(GOOGLE_PROTO_TYPES)
131
+ curl -sSL $(GOGO_PROTO_URL)/protobuf/google/protobuf/any.proto > $(GOOGLE_PROTO_TYPES)/any.proto
132
+
122
133
  mkdir -p $(IBC_CHANNEL_TYPES)
123
134
  curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto
124
135
 
125
136
  mkdir -p $(IBC_CLIENT_TYPES)
126
137
  curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto
127
138
 
139
+ mkdir -p $(SDK_BASE_TYPES)
140
+ curl -sSL $(COSMOS_SDK_PROTO_URL)/base/v1beta1/coin.proto > $(SDK_BASE_TYPES)/coin.proto
141
+
128
142
  mkdir -p $(SDK_QUERY_TYPES)
129
143
  curl -sSL $(COSMOS_SDK_PROTO_URL)/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto
130
144
 
131
145
  mkdir -p $(SDK_UPGRADE_TYPES)
132
146
  curl -sSL $(COSMOS_SDK_PROTO_URL)/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto
133
147
 
134
-
135
148
  UNAME_S ?= $(shell uname -s)
136
149
  UNAME_M ?= $(shell uname -m)
137
150
 
138
- BUF_VERSION ?= 0.56.0
151
+ BUF_VERSION ?= 1.0.0
139
152
 
140
153
  PROTOC_VERSION ?= 3.11.2
141
154
  ifeq ($(UNAME_S),Linux)
package/ante/ante.go CHANGED
@@ -4,8 +4,8 @@ import (
4
4
  sdk "github.com/cosmos/cosmos-sdk/types"
5
5
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
6
6
  "github.com/cosmos/cosmos-sdk/x/auth/ante"
7
- ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"
8
- ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
7
+ ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
8
+ ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
9
9
  )
10
10
 
11
11
  // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
@@ -43,8 +43,10 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
43
43
 
44
44
  anteDecorators := []sdk.AnteDecorator{
45
45
  ante.NewSetUpContextDecorator(),
46
- ante.NewRejectExtensionOptionsDecorator(),
47
- ante.NewMempoolFeeDecorator(),
46
+ ante.NewExtensionOptionsDecorator(nil), // reject all extensions
47
+ // former ante.NewMempoolFeeDecorator()
48
+ // replaced as in https://github.com/provenance-io/provenance/pull/1016
49
+ ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, nil),
48
50
  ante.NewValidateBasicDecorator(),
49
51
  ante.NewTxTimeoutHeightDecorator(),
50
52
  ante.NewValidateMemoDecorator(opts.AccountKeeper),
@@ -58,7 +60,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
58
60
  ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
59
61
  NewAdmissionDecorator(opts.AdmissionData),
60
62
  ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
61
- ibcante.NewAnteDecorator(opts.IBCKeeper),
63
+ ibcante.NewRedundantRelayDecorator(opts.IBCKeeper),
62
64
  }
63
65
 
64
66
  return sdk.ChainAnteDecorators(anteDecorators...), nil
@@ -217,3 +217,11 @@ func (msk mockSwingsetKeeper) GetBeansPerUnit(ctx sdk.Context) map[string]sdk.Ui
217
217
  func (msk mockSwingsetKeeper) ChargeBeans(ctx sdk.Context, addr sdk.AccAddress, beans sdk.Uint) error {
218
218
  return fmt.Errorf("not implemented")
219
219
  }
220
+
221
+ func (msk mockSwingsetKeeper) GetSmartWalletState(ctx sdk.Context, addr sdk.AccAddress) swingtypes.SmartWalletState {
222
+ panic(fmt.Errorf("not implemented"))
223
+ }
224
+
225
+ func (msk mockSwingsetKeeper) ChargeForSmartWallet(ctx sdk.Context, addr sdk.AccAddress) error {
226
+ return fmt.Errorf("not implemented")
227
+ }