@agoric/cosmos 0.36.0-u23.0 → 0.36.0-u23.1
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 +6 -0
- package/app/app.go +13 -2
- package/app/upgrade.go +36 -0
- package/git-revision.txt +1 -1
- package/package.json +6 -2
- package/coverage.txt +0 -8531
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.36.0-u23.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.36.0-u23.0...@agoric/cosmos@0.36.0-u23.1) (2026-07-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* promote a running vat to critical at a software upgrade ([58cc611](https://github.com/Agoric/agoric-sdk/commit/58cc6112aafad39aeab4b4f285cda8b3fd3509b4))
|
|
11
|
+
|
|
6
12
|
## [0.36.0-u23.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.34.1...@agoric/cosmos@0.36.0-u23.0) (2026-04-27)
|
|
7
13
|
|
|
8
14
|
### ⚠ BREAKING CHANGES
|
package/app/app.go
CHANGED
|
@@ -1008,9 +1008,20 @@ func normalizeModuleAccount(ctx sdk.Context, ak authkeeper.AccountKeeper, name s
|
|
|
1008
1008
|
ak.SetModuleAccount(ctx, ma)
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
+
// vatOptionUpdate is an in-place change to a single running vat's persisted
|
|
1012
|
+
// options, applied by cosmic-swingset at the reboot point of a software
|
|
1013
|
+
// upgrade. Selection is by exact VatID; currently only Critical is supported
|
|
1014
|
+
// (promote a contract vat so its termination halts the chain instead of
|
|
1015
|
+
// severing it).
|
|
1016
|
+
type vatOptionUpdate struct {
|
|
1017
|
+
VatID string `json:"vatID"`
|
|
1018
|
+
Critical *bool `json:"critical,omitempty"`
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1011
1021
|
type upgradeDetails struct {
|
|
1012
|
-
Plan
|
|
1013
|
-
CoreProposals
|
|
1022
|
+
Plan upgradetypes.Plan `json:"plan"`
|
|
1023
|
+
CoreProposals *vm.CoreProposals `json:"coreProposals,omitempty"`
|
|
1024
|
+
VatOptionUpdates []vatOptionUpdate `json:"vatOptionUpdates,omitempty"`
|
|
1014
1025
|
}
|
|
1015
1026
|
|
|
1016
1027
|
type cosmosInitAction struct {
|
package/app/upgrade.go
CHANGED
|
@@ -24,6 +24,7 @@ import (
|
|
|
24
24
|
var upgradeNamesOfThisVersion = []string{
|
|
25
25
|
"agoric-upgrade-23",
|
|
26
26
|
"agoric-upgrade-23-1",
|
|
27
|
+
"agoric-upgrade-23-2",
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
// isUpgradeNameOfThisVersion returns whether the provided plan name is a
|
|
@@ -61,6 +62,8 @@ func isPrimaryUpgradeName(name string) bool {
|
|
|
61
62
|
return true
|
|
62
63
|
case validUpgradeName("agoric-upgrade-23-1"):
|
|
63
64
|
return false
|
|
65
|
+
case validUpgradeName("agoric-upgrade-23-2"):
|
|
66
|
+
return false
|
|
64
67
|
default:
|
|
65
68
|
panic(fmt.Errorf("unexpected upgrade name %s", validUpgradeName(name)))
|
|
66
69
|
}
|
|
@@ -185,6 +188,15 @@ func makeUpgrade23Handler(app *GaiaApp, targetUpgrade string) upgradetypes.Upgra
|
|
|
185
188
|
|
|
186
189
|
CoreProposalSteps := []vm.CoreProposalStep{}
|
|
187
190
|
|
|
191
|
+
// vatOptionUpdates are in-place per-vat option changes handed to
|
|
192
|
+
// cosmic-swingset to apply at this upgrade's reboot point. Unlike the
|
|
193
|
+
// CoreProposalSteps below, they are not core-evals: there is no
|
|
194
|
+
// supported runtime path for a core-eval to flip an already-running
|
|
195
|
+
// vat's `critical` flag, so this writes the kernel kvStore directly
|
|
196
|
+
// (applyVatOptionUpdates, packages/SwingSet/src/controller/
|
|
197
|
+
// upgradeSwingset.js). Chain selection lives here, cosmos-side.
|
|
198
|
+
var vatOptionUpdates []vatOptionUpdate
|
|
199
|
+
|
|
188
200
|
// These CoreProposalSteps are not idempotent and should only be executed
|
|
189
201
|
// as part of the first upgrade using this handler on any given chain.
|
|
190
202
|
if isFirstTimeUpgradeOfThisVersion(app, ctx) {
|
|
@@ -228,6 +240,28 @@ func makeUpgrade23Handler(app *GaiaApp, targetUpgrade string) upgradetypes.Upgra
|
|
|
228
240
|
}
|
|
229
241
|
}
|
|
230
242
|
|
|
243
|
+
// These vatOptionUpdates are idempotent and can be applied on any upgrade
|
|
244
|
+
// of this version, even if it is not the first upgrade.
|
|
245
|
+
{
|
|
246
|
+
// Promote the running ymax contract vat to `critical`. These are
|
|
247
|
+
// the known vatIDs for the ymax contract on each chain: ymax1 on
|
|
248
|
+
// mainnet, ymax0 on devnet.
|
|
249
|
+
promote := true
|
|
250
|
+
switch ctx.ChainID() {
|
|
251
|
+
case "agoric-3": // MAINNET (ymax1)
|
|
252
|
+
vatOptionUpdates = []vatOptionUpdate{{VatID: "v288", Critical: &promote}}
|
|
253
|
+
case "agoricdev-25": // DEVNET (ymax0)
|
|
254
|
+
vatOptionUpdates = []vatOptionUpdate{{VatID: "v320", Critical: &promote}}
|
|
255
|
+
}
|
|
256
|
+
if len(vatOptionUpdates) > 0 {
|
|
257
|
+
ctx.Logger().Info(
|
|
258
|
+
"upgrade will apply in-place vat option updates",
|
|
259
|
+
"chainID", ctx.ChainID(),
|
|
260
|
+
"vatOptionUpdates", vatOptionUpdates,
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
231
265
|
app.upgradeDetails = &upgradeDetails{
|
|
232
266
|
// Record the plan to send to SwingSet
|
|
233
267
|
Plan: plan,
|
|
@@ -235,6 +269,8 @@ func makeUpgrade23Handler(app *GaiaApp, targetUpgrade string) upgradetypes.Upgra
|
|
|
235
269
|
// These will be merged with any coreProposals specified in the
|
|
236
270
|
// upgradeInfo field of the upgrade plan ran as subsequent steps
|
|
237
271
|
CoreProposals: vm.CoreProposalsFromSteps(CoreProposalSteps...),
|
|
272
|
+
// In-place vat option updates applied at the reboot point (see above)
|
|
273
|
+
VatOptionUpdates: vatOptionUpdates,
|
|
238
274
|
}
|
|
239
275
|
|
|
240
276
|
// Always run module migrations
|
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6a63435
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.36.0-u23.
|
|
3
|
+
"version": "0.36.0-u23.1",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Agoric/agoric-sdk.git"
|
|
8
|
+
},
|
|
5
9
|
"parsers": {
|
|
6
10
|
"js": "mjs"
|
|
7
11
|
},
|
|
@@ -41,5 +45,5 @@
|
|
|
41
45
|
"typeCoverage": {
|
|
42
46
|
"atLeast": 0
|
|
43
47
|
},
|
|
44
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "6a6343510742fef366aa7b4a31a862f9ef409656"
|
|
45
49
|
}
|