@agoric/cosmos 0.35.0-u18a.0 → 0.35.0-u19.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/CHANGELOG.md +18 -74
- package/app/app.go +1 -1
- package/app/upgrade.go +144 -47
- package/git-revision.txt +1 -1
- package/package.json +2 -3
- package/x/swingset/keeper/keeper.go +3 -7
- package/x/swingset/keeper/keeper_test.go +16 -10
- package/x/swingset/keeper/msg_server.go +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,79 +3,7 @@
|
|
|
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-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* **cosmos:** Next upgrade is agoric-upgrade-18a ([b87159a](https://github.com/Agoric/agoric-sdk/commit/b87159ad77c3c13ae0c2123cb1373d59463f68ef))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Bug Fixes
|
|
15
|
-
|
|
16
|
-
* **vtransfer:** some tweaks for ack handling ([a6d295a](https://github.com/Agoric/agoric-sdk/commit/a6d295a730126580262f96c383a4c69412a2e54e))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## [0.35.0-u18.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u18.4...@agoric/cosmos@0.35.0-u18.5) (2024-12-24)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Features
|
|
24
|
-
|
|
25
|
-
* **cosmos:** Support arbitrary core eval builder arguments ([#10767](https://github.com/Agoric/agoric-sdk/issues/10767)) ([a944f4c](https://github.com/Agoric/agoric-sdk/commit/a944f4cdf36012e8c07fe0804de5e9f3532db3ce)), closes [#10752](https://github.com/Agoric/agoric-sdk/issues/10752) [#10752](https://github.com/Agoric/agoric-sdk/issues/10752)
|
|
26
|
-
* **cosmos:** use `x/vbank` ConsensusVersion to upgrade monitoring ([0e367d3](https://github.com/Agoric/agoric-sdk/commit/0e367d3e9870622acc8a38afe57c2b6cbe629341))
|
|
27
|
-
* migrate upgrade of v7-board from upgrade 19 to upgrade 18 ([#10761](https://github.com/Agoric/agoric-sdk/issues/10761)) ([837776e](https://github.com/Agoric/agoric-sdk/commit/837776e6eb693603bce4ed3f9af5c659c9a19d2d)), closes [#10760](https://github.com/Agoric/agoric-sdk/issues/10760)
|
|
28
|
-
* upgrade v7-board and test it ([#10516](https://github.com/Agoric/agoric-sdk/issues/10516)) ([d8a109e](https://github.com/Agoric/agoric-sdk/commit/d8a109edcc78c977ef856131b52dd449e6a9d724)), closes [#10394](https://github.com/Agoric/agoric-sdk/issues/10394)
|
|
29
|
-
* **vbank:** new param `allowed_monitoring_accounts` ([5ac4c52](https://github.com/Agoric/agoric-sdk/commit/5ac4c527b5a3e85bb14ba91a32bcbb6beb0097c9))
|
|
30
|
-
* **vtransfer:** extract base address from parameterized address ([3d44b53](https://github.com/Agoric/agoric-sdk/commit/3d44b5363324baa803a2d9523ce11ded7cce1ed1))
|
|
31
|
-
* **vtransfer:** port some `address-hooks.js` functions to Go ([159098b](https://github.com/Agoric/agoric-sdk/commit/159098bbfaddf4448da4778aa29fbc072aed80a9))
|
|
32
|
-
* **x/swingset:** Add parameters for controlling vat cleanup budget ([02c8138](https://github.com/Agoric/agoric-sdk/commit/02c8138bb2090bc995bfe517bc52952014458984)), closes [#8928](https://github.com/Agoric/agoric-sdk/issues/8928)
|
|
33
|
-
* **x/swingset:** Define default vat cleanup budget as { default: 5, kv: 50 } ([d86ee6d](https://github.com/Agoric/agoric-sdk/commit/d86ee6d5cf0882a53ac3a6e3b802e4002c4c1d12))
|
|
34
|
-
* **x/swingset:** Read beansPerUnit in each message handler and pass down to helpers ([55b9b49](https://github.com/Agoric/agoric-sdk/commit/55b9b49d5f77be9db33ae132a8f7b7017a90d0a9))
|
|
35
|
-
* **x/swingset:** Require a non-empty vat cleanup budget to include `default` ([28c4d8b](https://github.com/Agoric/agoric-sdk/commit/28c4d8bf9897f1ff744e64ea0e681ee41064aafd))
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Bug Fixes
|
|
39
|
-
|
|
40
|
-
* **agd:** upgrade all orchestration vats to new liveslots ([59fa82c](https://github.com/Agoric/agoric-sdk/commit/59fa82c4740e1ddace28e1389e3c7c875bcdf93e))
|
|
41
|
-
* **cosmos:** return an error if version is unsupported ([d17e55b](https://github.com/Agoric/agoric-sdk/commit/d17e55b5d5c0a178e49ed9a0402ed52827074426))
|
|
42
|
-
* **x/swingset:** Let migration see incomplete Params structs ([315cdd5](https://github.com/Agoric/agoric-sdk/commit/315cdd56e0955ba26d624ca3a4997888abc1d635))
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## [0.35.0-u18.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u18.3...@agoric/cosmos@0.35.0-u18.4) (2024-12-17)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @agoric/cosmos
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## [0.35.0-u18.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u18.2...@agoric/cosmos@0.35.0-u18.3) (2024-12-09)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @agoric/cosmos
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## [0.35.0-u18.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u18.1...@agoric/cosmos@0.35.0-u18.2) (2024-11-21)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @agoric/cosmos
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [0.35.0-u18.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u18.0...@agoric/cosmos@0.35.0-u18.1) (2024-11-19)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @agoric/cosmos
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## [0.35.0-u18.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.34.1...@agoric/cosmos@0.35.0-u18.0) (2024-10-31)
|
|
6
|
+
## [0.35.0-u19.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.34.1...@agoric/cosmos@0.35.0-u19.0) (2025-02-24)
|
|
79
7
|
|
|
80
8
|
|
|
81
9
|
### ⚠ BREAKING CHANGES
|
|
@@ -120,17 +48,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
120
48
|
* **cosmos:** impose defaults when sending VM actions ([a710d68](https://github.com/Agoric/agoric-sdk/commit/a710d68512cf9983bdf5230e2e99f267521c7210))
|
|
121
49
|
* **cosmos:** KVEntry implements json Marshaler and Unmarshaller ([1bba859](https://github.com/Agoric/agoric-sdk/commit/1bba8592eee0e24e480c407095f0f63ccca4a242))
|
|
122
50
|
* **cosmos:** make vm comms use `context.Context` ([fa1754c](https://github.com/Agoric/agoric-sdk/commit/fa1754c791ba6c848e6b94f3a75051c6b4cc69f6))
|
|
123
|
-
* **cosmos:** Next
|
|
51
|
+
* **cosmos:** Next Upgrade is agoric-upgrade-19 ([e224889](https://github.com/Agoric/agoric-sdk/commit/e2248899164cf58ecdd086801453a8290fe222df))
|
|
124
52
|
* **cosmos:** prevent VM port handlers from panicking ([afd6017](https://github.com/Agoric/agoric-sdk/commit/afd60170d453865cfa871a01e8d8a74ffef9221a))
|
|
125
53
|
* **cosmos:** propagate and handle shutdown message ([ac12e6d](https://github.com/Agoric/agoric-sdk/commit/ac12e6d57b3a50e079744f7a6faced7f4bebb957))
|
|
126
54
|
* **cosmos:** separate swing-store export data from genesis file ([f476bd5](https://github.com/Agoric/agoric-sdk/commit/f476bd50fb3ca5df0c4f43b20e059e05a2659b4c))
|
|
127
55
|
* **cosmos:** separate vm server ([37e3254](https://github.com/Agoric/agoric-sdk/commit/37e325433b6024198d34052f3150951c33a29f62))
|
|
128
56
|
* **cosmos:** spawn JS on export command ([592948d](https://github.com/Agoric/agoric-sdk/commit/592948dc2fada0a9d1f56581ccae42040bfe4a53))
|
|
57
|
+
* **cosmos:** Support arbitrary core eval builder arguments ([#10767](https://github.com/Agoric/agoric-sdk/issues/10767)) ([a944f4c](https://github.com/Agoric/agoric-sdk/commit/a944f4cdf36012e8c07fe0804de5e9f3532db3ce)), closes [#10752](https://github.com/Agoric/agoric-sdk/issues/10752) [#10752](https://github.com/Agoric/agoric-sdk/issues/10752)
|
|
129
58
|
* **cosmos:** support core proposals set by upgrade handler ([605eb4b](https://github.com/Agoric/agoric-sdk/commit/605eb4b8f33d7646c3a9084d43ecd51029e12b80))
|
|
130
59
|
* **cosmos:** support snapshot export ([4386f8e](https://github.com/Agoric/agoric-sdk/commit/4386f8e67136f184b94febb5d65990a26e101cf3))
|
|
131
60
|
* **cosmos:** un-wire x/crisis ([#8582](https://github.com/Agoric/agoric-sdk/issues/8582)) ([7153535](https://github.com/Agoric/agoric-sdk/commit/7153535c5c10fed309dc60f12f981c81841fdb93))
|
|
132
61
|
* **cosmos:** upgrade provisioning vat ([#8901](https://github.com/Agoric/agoric-sdk/issues/8901)) ([174e37d](https://github.com/Agoric/agoric-sdk/commit/174e37d7499b372c33ecaf6e05f82f43ebfff902))
|
|
133
62
|
* **cosmos:** upgrade skips proposals with no variant ([4ce1372](https://github.com/Agoric/agoric-sdk/commit/4ce13721201d9a62a40352d909f97a44d8e5b25d))
|
|
63
|
+
* **cosmos:** use `x/vbank` ConsensusVersion to upgrade monitoring ([0e367d3](https://github.com/Agoric/agoric-sdk/commit/0e367d3e9870622acc8a38afe57c2b6cbe629341))
|
|
134
64
|
* **cosmos:** use operational artifact level for swingset state export/restore ([161ddd3](https://github.com/Agoric/agoric-sdk/commit/161ddd34ca6c16da0ad3ef716fa5da3d2ba86b68))
|
|
135
65
|
* **cosmos:** wire in vlocalchain to the Cosmos app ([3ea527d](https://github.com/Agoric/agoric-sdk/commit/3ea527d9844dcf2b5f2c60d1bfb1760e064ec0f7))
|
|
136
66
|
* **cosmos:** wire new swingset port handler ([ea582bf](https://github.com/Agoric/agoric-sdk/commit/ea582bf7738f82d0abe5529ee1ac9f2e117c957a))
|
|
@@ -139,6 +69,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
139
69
|
* **golang/cosmos:** Support relative SLOGFILE while still requiring app.toml slogfile to be absolute ([a759010](https://github.com/Agoric/agoric-sdk/commit/a75901040fe2acc3470cdc6f95228958f399959e))
|
|
140
70
|
* **golang:** bump PFM to v6.1.2 ([#9120](https://github.com/Agoric/agoric-sdk/issues/9120)) ([5c28f49](https://github.com/Agoric/agoric-sdk/commit/5c28f496976128e59e0e5a8f1a8c24f7b496527d))
|
|
141
71
|
* **localchain:** make `localchain.query` and `queryMany` useful ([41209d5](https://github.com/Agoric/agoric-sdk/commit/41209d5b7c1de478d3f2ae709558e3e535c4ad8d))
|
|
72
|
+
* migrate upgrade of v7-board from upgrade 19 to upgrade 18 ([#10761](https://github.com/Agoric/agoric-sdk/issues/10761)) ([837776e](https://github.com/Agoric/agoric-sdk/commit/837776e6eb693603bce4ed3f9af5c659c9a19d2d)), closes [#10760](https://github.com/Agoric/agoric-sdk/issues/10760)
|
|
142
73
|
* new 'boot' package with bootstrap configs ([8e3173b](https://github.com/Agoric/agoric-sdk/commit/8e3173b0b86a3dc90b31164bc4272c54e46a6641))
|
|
143
74
|
* pick up return-grants from latest cosmos-sdk ([a88eb8a](https://github.com/Agoric/agoric-sdk/commit/a88eb8a21fb914e49bf436eb86aa6be8b2546269))
|
|
144
75
|
* remove vaults, auctions, and priceFeeds from upgrade.go ([d064567](https://github.com/Agoric/agoric-sdk/commit/d064567df87cad9c57ea6e9d918b650785d08089))
|
|
@@ -151,10 +82,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
151
82
|
* tolerate missing files in gaia 3-way diff ([2e4d8d3](https://github.com/Agoric/agoric-sdk/commit/2e4d8d33ae77cc50b99bbdfa1083316b6cfb3584))
|
|
152
83
|
* update ibc-go to v4, adapt packages and API ([0ec1b79](https://github.com/Agoric/agoric-sdk/commit/0ec1b79ea0419d8576d8806c3b670e730bf09dcd))
|
|
153
84
|
* upgrade ibc-go to v6.2.1 ([fa4695d](https://github.com/Agoric/agoric-sdk/commit/fa4695dce10091a6ac0f1423a361d27986b70f26))
|
|
85
|
+
* upgrade v7-board and test it ([#10516](https://github.com/Agoric/agoric-sdk/issues/10516)) ([d8a109e](https://github.com/Agoric/agoric-sdk/commit/d8a109edcc78c977ef856131b52dd449e6a9d724)), closes [#10394](https://github.com/Agoric/agoric-sdk/issues/10394)
|
|
154
86
|
* upgrade wallet-factory ([e370bff](https://github.com/Agoric/agoric-sdk/commit/e370bff50e00b7e134148332d1ccb410d626db1c))
|
|
155
87
|
* Upgrade Zoe ([ef1e0a2](https://github.com/Agoric/agoric-sdk/commit/ef1e0a216c100de89b28923a7f13251ed48e8f36))
|
|
156
88
|
* **vat-transfer:** first cut at working proposal ([2864bd5](https://github.com/Agoric/agoric-sdk/commit/2864bd5c12300c3595df9676bcfde894dbe59b29))
|
|
157
89
|
* **vats:** upgrade the orchestration core ([c2d9530](https://github.com/Agoric/agoric-sdk/commit/c2d9530e2d891bd9412969a43a9c5728cc3c2721))
|
|
90
|
+
* **vbank:** new param `allowed_monitoring_accounts` ([5ac4c52](https://github.com/Agoric/agoric-sdk/commit/5ac4c527b5a3e85bb14ba91a32bcbb6beb0097c9))
|
|
158
91
|
* **vibc:** add `AsyncVersions` flag anticipating `ibc-go` ([ca5933c](https://github.com/Agoric/agoric-sdk/commit/ca5933cc41075dfba30c44cb3a987d9c721cd97d))
|
|
159
92
|
* **vibc:** use triggers to raise targeted events ([b89aaca](https://github.com/Agoric/agoric-sdk/commit/b89aaca2afd7d0901fc06d7a6bab27aab38d389b))
|
|
160
93
|
* **vlocalchain:** bare minimum implementation ([6e35dc6](https://github.com/Agoric/agoric-sdk/commit/6e35dc642ce08a199604b7888d4fb5bbbd4c7db1))
|
|
@@ -162,21 +95,29 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
162
95
|
* **vlocalchain:** use jsonpb.Marshaler for VLOCALCHAIN_EXECUTE_TX responses ([2140e92](https://github.com/Agoric/agoric-sdk/commit/2140e929f3ce2edda3151bf2fbc542ff8971b677))
|
|
163
96
|
* vm-config package ([8b1ecad](https://github.com/Agoric/agoric-sdk/commit/8b1ecad8ab50db777bc11c3ee6fcdb37d6cb38b6))
|
|
164
97
|
* **vocalchain:** use `OrigName: false` for query response marshalling ([84992e9](https://github.com/Agoric/agoric-sdk/commit/84992e976bbb65b8c4d77c88312296c35e98dab4))
|
|
98
|
+
* **vtransfer:** extract base address from parameterized address ([3d44b53](https://github.com/Agoric/agoric-sdk/commit/3d44b5363324baa803a2d9523ce11ded7cce1ed1))
|
|
165
99
|
* **vtransfer:** only intercept packets for registered targets ([554fa49](https://github.com/Agoric/agoric-sdk/commit/554fa490ca4e0cdd05ddf526eb946caf6be45e98))
|
|
100
|
+
* **vtransfer:** port some `address-hooks.js` functions to Go ([159098b](https://github.com/Agoric/agoric-sdk/commit/159098bbfaddf4448da4778aa29fbc072aed80a9))
|
|
166
101
|
* **vtransfer:** prefix action types with `VTRANSFER_` ([80d69e9](https://github.com/Agoric/agoric-sdk/commit/80d69e94488683ed6fa650f048e8fb0fcd025042))
|
|
167
102
|
* **vtransfer:** save watched addresses to genesis ([89b50a0](https://github.com/Agoric/agoric-sdk/commit/89b50a082c63e236356f33d521cad5f15a4e80d2))
|
|
168
103
|
* **vtransfer:** use `vibc` middleware ([f40c5c8](https://github.com/Agoric/agoric-sdk/commit/f40c5c8d9f691ed32a1a9b03c5938f93341629db))
|
|
104
|
+
* **x/swingset:** Add parameters for controlling vat cleanup budget ([02c8138](https://github.com/Agoric/agoric-sdk/commit/02c8138bb2090bc995bfe517bc52952014458984)), closes [#8928](https://github.com/Agoric/agoric-sdk/issues/8928)
|
|
169
105
|
* **x/swingset:** add store data to genesis ([9df85cf](https://github.com/Agoric/agoric-sdk/commit/9df85cf4908d5f4dfa9c4adc7cb15b7bc7cd3893))
|
|
170
106
|
* **x/swingset:** add WaitUntilSwingStoreExportDone ([05bbee5](https://github.com/Agoric/agoric-sdk/commit/05bbee53906591f3520a14f7580145c5a2593208))
|
|
171
107
|
* **x/swingset:** allow taking snapshot latest height ([a1290ef](https://github.com/Agoric/agoric-sdk/commit/a1290eff74583838f096acfd9baddb6f623693a6))
|
|
108
|
+
* **x/swingset:** allow third party to provision wallet ([#10923](https://github.com/Agoric/agoric-sdk/issues/10923)) ([d2b661f](https://github.com/Agoric/agoric-sdk/commit/d2b661fa059ece198d02b2d72e9611b666c3794f)), closes [#10912](https://github.com/Agoric/agoric-sdk/issues/10912)
|
|
172
109
|
* **x/swingset:** auto-provision smart wallet ([20a5485](https://github.com/Agoric/agoric-sdk/commit/20a5485b96d072a4cee990b3c24f8fb441ea909f))
|
|
110
|
+
* **x/swingset:** Define default vat cleanup budget as { default: 5, kv: 50 } ([d86ee6d](https://github.com/Agoric/agoric-sdk/commit/d86ee6d5cf0882a53ac3a6e3b802e4002c4c1d12))
|
|
173
111
|
* **x/swingset:** export swing store in genesis ([598abf7](https://github.com/Agoric/agoric-sdk/commit/598abf73ac555bd7284c8a91a03c205dc62d9b0c))
|
|
174
112
|
* **x/swingset:** import swing store from genesis state ([55ba7f6](https://github.com/Agoric/agoric-sdk/commit/55ba7f6c3d6a958d3eb5c6c8b191b649da05809f))
|
|
113
|
+
* **x/swingset:** Read beansPerUnit in each message handler and pass down to helpers ([55b9b49](https://github.com/Agoric/agoric-sdk/commit/55b9b49d5f77be9db33ae132a8f7b7017a90d0a9))
|
|
175
114
|
* **x/swingset:** refuse smart wallet messages if not provisioned ([75bd9a7](https://github.com/Agoric/agoric-sdk/commit/75bd9a7bf85bd9b3b9870d9cf42d63f08f0e4f68))
|
|
115
|
+
* **x/swingset:** Require a non-empty vat cleanup budget to include `default` ([28c4d8b](https://github.com/Agoric/agoric-sdk/commit/28c4d8bf9897f1ff744e64ea0e681ee41064aafd))
|
|
176
116
|
|
|
177
117
|
|
|
178
118
|
### Bug Fixes
|
|
179
119
|
|
|
120
|
+
* **agd:** upgrade all orchestration vats to new liveslots ([59fa82c](https://github.com/Agoric/agoric-sdk/commit/59fa82c4740e1ddace28e1389e3c7c875bcdf93e))
|
|
180
121
|
* avoid broken goleveldb ([a2bfb34](https://github.com/Agoric/agoric-sdk/commit/a2bfb34d14806e6492fb3293bdfa24e2199d40c2))
|
|
181
122
|
* **builders:** use proper `oracleBrand` subkey case ([52f02b7](https://github.com/Agoric/agoric-sdk/commit/52f02b75b6706ee455a32ff83617dd5afb7342a7))
|
|
182
123
|
* **cosmic-swingset:** add missing bits for maxVatsOnline ([8c0c177](https://github.com/Agoric/agoric-sdk/commit/8c0c17752f7439db6f7aee9f88be1dedce2a1bf1))
|
|
@@ -192,6 +133,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
192
133
|
* **cosmos:** no global state in `vm` ([ab02669](https://github.com/Agoric/agoric-sdk/commit/ab0266908ec9f36587d3521287808f7a30ed9207))
|
|
193
134
|
* **cosmos:** only allow snapshot export at latest height ([#9601](https://github.com/Agoric/agoric-sdk/issues/9601)) ([6bc363b](https://github.com/Agoric/agoric-sdk/commit/6bc363b5624bab5fd151ec4889b5f5116f2cf53c)), closes [#9600](https://github.com/Agoric/agoric-sdk/issues/9600)
|
|
194
135
|
* **cosmos:** prevent Golang error wrapping stack frame divergence ([3390d90](https://github.com/Agoric/agoric-sdk/commit/3390d902f42a96e502d459cad224d97c9971e307))
|
|
136
|
+
* **cosmos:** return an error if version is unsupported ([d17e55b](https://github.com/Agoric/agoric-sdk/commit/d17e55b5d5c0a178e49ed9a0402ed52827074426))
|
|
195
137
|
* **cosmos:** Support building on Linux aarch64 ([ff2e5ed](https://github.com/Agoric/agoric-sdk/commit/ff2e5ed20e52e6484a6cba126b0739b0b1fc6360))
|
|
196
138
|
* **cosmos:** update more `vtransfer` app.go wiring ([a171561](https://github.com/Agoric/agoric-sdk/commit/a1715615a01fce060eb990e1b2bb9a6d6a2a3566))
|
|
197
139
|
* **cosmos:** use dedicated dedicate app creator for non start commands ([84208e9](https://github.com/Agoric/agoric-sdk/commit/84208e99f5a6f57988cabe4d3f3108f72c579436))
|
|
@@ -219,9 +161,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
219
161
|
* **vtransfer:** implement and manually test middleware ([23e3da9](https://github.com/Agoric/agoric-sdk/commit/23e3da9b3c1e621d46d5f9b0c7896c746f9e99f3))
|
|
220
162
|
* **vtransfer:** refactor and minor improvements ([803e381](https://github.com/Agoric/agoric-sdk/commit/803e38105de4047ccd7feeae2db3a512d43d2f93))
|
|
221
163
|
* **vtransfer:** some separation of keeper duties ([96fdbdf](https://github.com/Agoric/agoric-sdk/commit/96fdbdf7f39d785956214e3a2f1ef2f15a520a19))
|
|
164
|
+
* **vtransfer:** some tweaks for ack handling ([fab004b](https://github.com/Agoric/agoric-sdk/commit/fab004b2b8e141c70e8331de0817b3c439ad48f2))
|
|
222
165
|
* **x/swingset:** enforce snapshot restore before init ([35f03f9](https://github.com/Agoric/agoric-sdk/commit/35f03f9f2b72b47475a3ae4c5068bee60c1278da))
|
|
223
166
|
* **x/swingset:** guard snapshot restore for concurrency ([554a110](https://github.com/Agoric/agoric-sdk/commit/554a1102a08f466dad5d8291044150236896ec7a))
|
|
224
167
|
* **x/swingset:** handle defer errors on export write ([f1eacbe](https://github.com/Agoric/agoric-sdk/commit/f1eacbec22eb52955266e401b83bc2e324b5bde5))
|
|
168
|
+
* **x/swingset:** Let migration see incomplete Params structs ([315cdd5](https://github.com/Agoric/agoric-sdk/commit/315cdd56e0955ba26d624ca3a4997888abc1d635))
|
|
225
169
|
* **x/swingset:** switch export/import to replay artifact level ([6ab24b2](https://github.com/Agoric/agoric-sdk/commit/6ab24b299f31affc0a638cc6352678a2c167044c))
|
|
226
170
|
* **x/vstorage:** value can be empty in genesis data ([b8a817d](https://github.com/Agoric/agoric-sdk/commit/b8a817dfa70c225741a32fb73780de75c5aa9184))
|
|
227
171
|
|
package/app/app.go
CHANGED
package/app/upgrade.go
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
package gaia
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"encoding/json"
|
|
4
5
|
"fmt"
|
|
6
|
+
"reflect"
|
|
7
|
+
"strings"
|
|
8
|
+
"text/template"
|
|
5
9
|
|
|
6
10
|
"github.com/Agoric/agoric-sdk/golang/cosmos/vm"
|
|
7
11
|
swingsetkeeper "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/keeper"
|
|
@@ -11,7 +15,11 @@ import (
|
|
|
11
15
|
)
|
|
12
16
|
|
|
13
17
|
var upgradeNamesOfThisVersion = []string{
|
|
14
|
-
"agoric-upgrade-
|
|
18
|
+
"agoric-upgrade-19-mainnet",
|
|
19
|
+
"agoric-upgrade-19-devnet",
|
|
20
|
+
"agoric-upgrade-19-emerynet",
|
|
21
|
+
"agoric-upgrade-19-a3p",
|
|
22
|
+
"agoric-upgrade-19-basic",
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
// isUpgradeNameOfThisVersion returns whether the provided plan name is a
|
|
@@ -45,7 +53,11 @@ func isPrimaryUpgradeName(name string) bool {
|
|
|
45
53
|
return false
|
|
46
54
|
}
|
|
47
55
|
switch name {
|
|
48
|
-
case validUpgradeName("agoric-upgrade-
|
|
56
|
+
case validUpgradeName("agoric-upgrade-19-mainnet"),
|
|
57
|
+
validUpgradeName("agoric-upgrade-19-devnet"),
|
|
58
|
+
validUpgradeName("agoric-upgrade-19-emerynet"),
|
|
59
|
+
validUpgradeName("agoric-upgrade-19-a3p"),
|
|
60
|
+
validUpgradeName("agoric-upgrade-19-basic"):
|
|
49
61
|
return true
|
|
50
62
|
default:
|
|
51
63
|
panic(fmt.Errorf("unexpected upgrade name %s", validUpgradeName(name)))
|
|
@@ -63,24 +75,93 @@ func isFirstTimeUpgradeOfThisVersion(app *GaiaApp, ctx sdk.Context) bool {
|
|
|
63
75
|
return true
|
|
64
76
|
}
|
|
65
77
|
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
func buildProposalStepWithArgs(moduleName string, entrypoint string, extra any) (vm.CoreProposalStep, error) {
|
|
79
|
+
t := template.Must(template.New("").Parse(`{
|
|
80
|
+
"module": "{{.moduleName}}",
|
|
81
|
+
"entrypoint": "{{.entrypoint}}",
|
|
82
|
+
"args": {{.args}}
|
|
83
|
+
}`))
|
|
84
|
+
|
|
85
|
+
var args []byte
|
|
86
|
+
var err error
|
|
87
|
+
if extra == nil {
|
|
88
|
+
// The specified entrypoint will be called with no extra arguments after powers.
|
|
89
|
+
args = []byte(`[]`)
|
|
90
|
+
} else if reflect.TypeOf(extra).Kind() == reflect.Map && reflect.TypeOf(extra).Key().Kind() == reflect.String {
|
|
91
|
+
// The specified entrypoint will be called with this options argument after powers.
|
|
92
|
+
args, err = json.Marshal([]any{extra})
|
|
93
|
+
} else if reflect.TypeOf(extra).Kind() == reflect.Slice {
|
|
94
|
+
// The specified entrypoint will be called with each of these arguments after powers.
|
|
95
|
+
args, err = json.Marshal(extra)
|
|
96
|
+
} else {
|
|
97
|
+
return nil, fmt.Errorf("proposal extra must be nil, array, or string map, not %v", extra)
|
|
98
|
+
}
|
|
99
|
+
if err != nil {
|
|
100
|
+
return nil, err
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var result strings.Builder
|
|
104
|
+
err = t.Execute(&result, map[string]any{
|
|
105
|
+
"moduleName": moduleName,
|
|
106
|
+
"entrypoint": entrypoint,
|
|
107
|
+
"args": string(args),
|
|
108
|
+
})
|
|
109
|
+
if err != nil {
|
|
110
|
+
return nil, err
|
|
111
|
+
}
|
|
112
|
+
jsonStr := result.String()
|
|
113
|
+
jsonBz := []byte(jsonStr)
|
|
114
|
+
if !json.Valid(jsonBz) {
|
|
115
|
+
return nil, fmt.Errorf("invalid JSON: %s", jsonStr)
|
|
116
|
+
}
|
|
117
|
+
proposal := vm.ArbitraryCoreProposal{Json: jsonBz}
|
|
118
|
+
return vm.CoreProposalStepForModules(proposal), nil
|
|
119
|
+
}
|
|
68
120
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
121
|
+
func getVariantFromUpgradeName(upgradeName string) string {
|
|
122
|
+
switch upgradeName {
|
|
123
|
+
case "agoric-upgrade-19-a3p":
|
|
124
|
+
return "A3P_INTEGRATION"
|
|
125
|
+
case "agoric-upgrade-19-mainnet":
|
|
126
|
+
return "MAINNET"
|
|
127
|
+
case "agoric-upgrade-19-devnet":
|
|
128
|
+
return "DEVNET"
|
|
129
|
+
case "agoric-upgrade-19-emerynet":
|
|
130
|
+
return "EMERYNET"
|
|
131
|
+
case "agoric-upgrade-19-basic":
|
|
132
|
+
// Noupgrade for this version.
|
|
133
|
+
return ""
|
|
134
|
+
default:
|
|
135
|
+
return ""
|
|
136
|
+
}
|
|
137
|
+
}
|
|
72
138
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// map[string]any{
|
|
77
|
-
// "variant": variant,
|
|
78
|
-
// },
|
|
79
|
-
// )
|
|
80
|
-
// }
|
|
139
|
+
func upgradeMintHolderCoreProposal(targetUpgrade string) (vm.CoreProposalStep, error) {
|
|
140
|
+
return buildProposalStepFromScript(targetUpgrade, "@agoric/builders/scripts/vats/upgrade-mintHolder.js")
|
|
141
|
+
}
|
|
81
142
|
|
|
82
|
-
|
|
83
|
-
|
|
143
|
+
func restartFeeDistributorCoreProposal(targetUpgrade string) (vm.CoreProposalStep, error) {
|
|
144
|
+
return buildProposalStepFromScript(targetUpgrade, "@agoric/builders/scripts/inter-protocol/replace-feeDistributor-combo.js")
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
func buildProposalStepFromScript(targetUpgrade string, builderScript string) (vm.CoreProposalStep, error) {
|
|
148
|
+
variant := getVariantFromUpgradeName(targetUpgrade)
|
|
149
|
+
|
|
150
|
+
if variant == "" {
|
|
151
|
+
return nil, nil
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return buildProposalStepWithArgs(
|
|
155
|
+
builderScript,
|
|
156
|
+
"defaultProposalBuilder",
|
|
157
|
+
map[string]any{
|
|
158
|
+
"variant": variant,
|
|
159
|
+
},
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// upgrade19Handler performs standard upgrade actions plus custom actions for upgrade-19.
|
|
164
|
+
func upgrade19Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgradetypes.Plan, module.VersionMap) (module.VersionMap, error) {
|
|
84
165
|
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVm module.VersionMap) (module.VersionMap, error) {
|
|
85
166
|
app.CheckControllerInited(false)
|
|
86
167
|
|
|
@@ -96,37 +177,53 @@ func upgrade18aHandler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upg
|
|
|
96
177
|
return module.VersionMap{}, fmt.Errorf("cannot run %s as first upgrade", plan.Name)
|
|
97
178
|
}
|
|
98
179
|
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
// vm.CoreProposalStepForModules(
|
|
126
|
-
// "@agoric/builders/scripts/vats/upgrade-asset-reserve.js",
|
|
127
|
-
// ),
|
|
128
|
-
// )
|
|
180
|
+
// Each CoreProposalStep runs sequentially, and can be constructed from
|
|
181
|
+
// one or more modules executing in parallel within the step.
|
|
182
|
+
CoreProposalSteps = append(CoreProposalSteps,
|
|
183
|
+
// Register a new ZCF to be used for all future contract instances and upgrades
|
|
184
|
+
vm.CoreProposalStepForModules(
|
|
185
|
+
"@agoric/builders/scripts/vats/upgrade-zcf.js",
|
|
186
|
+
),
|
|
187
|
+
// because of #10794, we need to do at least a null upgrade of
|
|
188
|
+
// the walletFactory on every software upgrade
|
|
189
|
+
vm.CoreProposalStepForModules(
|
|
190
|
+
"@agoric/builders/scripts/smart-wallet/build-wallet-factory2-upgrade.js",
|
|
191
|
+
),
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
upgradeMintHolderStep, err := upgradeMintHolderCoreProposal(targetUpgrade)
|
|
195
|
+
if err != nil {
|
|
196
|
+
return nil, err
|
|
197
|
+
} else if upgradeMintHolderStep != nil {
|
|
198
|
+
CoreProposalSteps = append(CoreProposalSteps, upgradeMintHolderStep)
|
|
199
|
+
}
|
|
200
|
+
restartFeeDistributorStep, err := restartFeeDistributorCoreProposal(targetUpgrade)
|
|
201
|
+
if err != nil {
|
|
202
|
+
return nil, err
|
|
203
|
+
} else if restartFeeDistributorStep != nil {
|
|
204
|
+
CoreProposalSteps = append(CoreProposalSteps, restartFeeDistributorStep)
|
|
205
|
+
}
|
|
129
206
|
|
|
207
|
+
CoreProposalSteps = append(CoreProposalSteps,
|
|
208
|
+
vm.CoreProposalStepForModules(
|
|
209
|
+
"@agoric/builders/scripts/vats/upgrade-paRegistry.js",
|
|
210
|
+
),
|
|
211
|
+
vm.CoreProposalStepForModules(
|
|
212
|
+
"@agoric/builders/scripts/vats/upgrade-provisionPool.js",
|
|
213
|
+
),
|
|
214
|
+
vm.CoreProposalStepForModules(
|
|
215
|
+
"@agoric/builders/scripts/vats/upgrade-bank.js",
|
|
216
|
+
),
|
|
217
|
+
vm.CoreProposalStepForModules(
|
|
218
|
+
"@agoric/builders/scripts/vats/upgrade-agoricNames.js",
|
|
219
|
+
),
|
|
220
|
+
vm.CoreProposalStepForModules(
|
|
221
|
+
"@agoric/builders/scripts/vats/upgrade-asset-reserve.js",
|
|
222
|
+
),
|
|
223
|
+
vm.CoreProposalStepForModules(
|
|
224
|
+
"@agoric/builders/scripts/vats/upgrade-psm.js",
|
|
225
|
+
),
|
|
226
|
+
)
|
|
130
227
|
}
|
|
131
228
|
|
|
132
229
|
app.upgradeDetails = &upgradeDetails{
|
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
29e9704c37
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.35.0-
|
|
3
|
+
"version": "0.35.0-u19.0",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
5
|
"parsers": {
|
|
6
6
|
"js": "mjs"
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": "^18.12 || ^20.9"
|
|
11
11
|
},
|
|
12
|
-
"packageManager": "yarn@1.22.22",
|
|
13
12
|
"scripts": {
|
|
14
13
|
"test": "exit 0",
|
|
15
14
|
"build:all": "make",
|
|
@@ -39,5 +38,5 @@
|
|
|
39
38
|
"typeCoverage": {
|
|
40
39
|
"atLeast": 0
|
|
41
40
|
},
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "29e9704c375a06bb617027093b30d2d25faa6471"
|
|
43
42
|
}
|
|
@@ -380,7 +380,7 @@ func makeFeeMenu(powerFlagFees []types.PowerFlagFee) map[string]sdk.Coins {
|
|
|
380
380
|
|
|
381
381
|
var privilegedProvisioningCoins sdk.Coins = sdk.NewCoins(sdk.NewInt64Coin("provisionpass", 1))
|
|
382
382
|
|
|
383
|
-
func calculateFees(balances sdk.Coins,
|
|
383
|
+
func calculateFees(balances sdk.Coins, powerFlags []string, powerFlagFees []types.PowerFlagFee) (sdk.Coins, error) {
|
|
384
384
|
fees := sdk.NewCoins()
|
|
385
385
|
|
|
386
386
|
// See if we have the balance needed for privileged provisioning.
|
|
@@ -389,10 +389,6 @@ func calculateFees(balances sdk.Coins, submitter, addr sdk.AccAddress, powerFlag
|
|
|
389
389
|
return fees, nil
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
if !submitter.Equals(addr) {
|
|
393
|
-
return nil, fmt.Errorf("submitter is not the same as target address for fee-based provisioning")
|
|
394
|
-
}
|
|
395
|
-
|
|
396
392
|
if len(powerFlags) == 0 {
|
|
397
393
|
return nil, fmt.Errorf("must specify powerFlags for fee-based provisioning")
|
|
398
394
|
}
|
|
@@ -412,9 +408,9 @@ func calculateFees(balances sdk.Coins, submitter, addr sdk.AccAddress, powerFlag
|
|
|
412
408
|
return fees, nil
|
|
413
409
|
}
|
|
414
410
|
|
|
415
|
-
func (k Keeper) ChargeForProvisioning(ctx sdk.Context, submitter
|
|
411
|
+
func (k Keeper) ChargeForProvisioning(ctx sdk.Context, submitter sdk.AccAddress, powerFlags []string) error {
|
|
416
412
|
balances := k.bankKeeper.GetAllBalances(ctx, submitter)
|
|
417
|
-
fees, err := calculateFees(balances,
|
|
413
|
+
fees, err := calculateFees(balances, powerFlags, k.GetParams(ctx).PowerFlagFees)
|
|
418
414
|
if err != nil {
|
|
419
415
|
return err
|
|
420
416
|
}
|
|
@@ -61,15 +61,6 @@ func Test_calculateFees(t *testing.T) {
|
|
|
61
61
|
},
|
|
62
62
|
want: cns(),
|
|
63
63
|
},
|
|
64
|
-
{
|
|
65
|
-
name: "cannot pay fee to provision third party",
|
|
66
|
-
args: args{
|
|
67
|
-
submitter: submitAddr,
|
|
68
|
-
addr: utilAddr,
|
|
69
|
-
powerFlags: []string{"powerflag1"},
|
|
70
|
-
},
|
|
71
|
-
errMsg: "submitter is not the same as target address for fee-based provisioning",
|
|
72
|
-
},
|
|
73
64
|
{
|
|
74
65
|
name: "need powerflags for fee provisioning",
|
|
75
66
|
args: args{
|
|
@@ -106,6 +97,21 @@ func Test_calculateFees(t *testing.T) {
|
|
|
106
97
|
},
|
|
107
98
|
want: cns(a(1300)),
|
|
108
99
|
},
|
|
100
|
+
{
|
|
101
|
+
name: "can pay fee to provision third party",
|
|
102
|
+
args: args{
|
|
103
|
+
submitter: submitAddr,
|
|
104
|
+
addr: utilAddr,
|
|
105
|
+
powerFlags: []string{"power1"},
|
|
106
|
+
powerFlagFees: []types.PowerFlagFee{
|
|
107
|
+
{
|
|
108
|
+
PowerFlag: "power1",
|
|
109
|
+
Fee: cns(a(1000)),
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
want: cns(a(1000)),
|
|
114
|
+
},
|
|
109
115
|
{
|
|
110
116
|
name: "later menu entries do not override",
|
|
111
117
|
args: args{
|
|
@@ -173,7 +179,7 @@ func Test_calculateFees(t *testing.T) {
|
|
|
173
179
|
}
|
|
174
180
|
for _, tt := range tests {
|
|
175
181
|
t.Run(tt.name, func(t *testing.T) {
|
|
176
|
-
got, err := calculateFees(tt.args.balances, tt.args.
|
|
182
|
+
got, err := calculateFees(tt.args.balances, tt.args.powerFlags, tt.args.powerFlagFees)
|
|
177
183
|
var errMsg string
|
|
178
184
|
if err != nil {
|
|
179
185
|
errMsg = err.Error()
|
|
@@ -158,7 +158,7 @@ func (keeper msgServer) provisionIfNeeded(ctx sdk.Context, owner sdk.AccAddress)
|
|
|
158
158
|
func (keeper msgServer) Provision(goCtx context.Context, msg *types.MsgProvision) (*types.MsgProvisionResponse, error) {
|
|
159
159
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
160
160
|
|
|
161
|
-
err := keeper.ChargeForProvisioning(ctx, msg.Submitter, msg.
|
|
161
|
+
err := keeper.ChargeForProvisioning(ctx, msg.Submitter, msg.PowerFlags)
|
|
162
162
|
if err != nil {
|
|
163
163
|
return nil, err
|
|
164
164
|
}
|