@agoric/cosmic-swingset 0.41.4-dev-57db88d.0.57db88d → 0.41.4-dev-acbc12e.0.acbc12e
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/package.json +12 -12
- package/src/launch-chain.js +32 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmic-swingset",
|
|
3
|
-
"version": "0.41.4-dev-
|
|
3
|
+
"version": "0.41.4-dev-acbc12e.0.acbc12e",
|
|
4
4
|
"description": "Agoric's Cosmos blockchain integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/builders": "0.1.1-dev-
|
|
26
|
-
"@agoric/cosmos": "0.34.2-dev-
|
|
27
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
28
|
-
"@agoric/internal": "0.3.3-dev-
|
|
29
|
-
"@agoric/store": "0.9.3-dev-
|
|
30
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
31
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
32
|
-
"@agoric/telemetry": "0.6.3-dev-
|
|
33
|
-
"@agoric/vm-config": "0.1.1-dev-
|
|
25
|
+
"@agoric/builders": "0.1.1-dev-acbc12e.0.acbc12e",
|
|
26
|
+
"@agoric/cosmos": "0.34.2-dev-acbc12e.0.acbc12e",
|
|
27
|
+
"@agoric/deploy-script-support": "0.10.4-dev-acbc12e.0.acbc12e",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-acbc12e.0.acbc12e",
|
|
29
|
+
"@agoric/store": "0.9.3-dev-acbc12e.0.acbc12e",
|
|
30
|
+
"@agoric/swing-store": "0.9.2-dev-acbc12e.0.acbc12e",
|
|
31
|
+
"@agoric/swingset-vat": "0.32.3-dev-acbc12e.0.acbc12e",
|
|
32
|
+
"@agoric/telemetry": "0.6.3-dev-acbc12e.0.acbc12e",
|
|
33
|
+
"@agoric/vm-config": "0.1.1-dev-acbc12e.0.acbc12e",
|
|
34
34
|
"@endo/bundle-source": "^4.3.2",
|
|
35
35
|
"@endo/env-options": "^1.1.11",
|
|
36
36
|
"@endo/errors": "^1.3.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"tmp": "^0.2.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
54
|
+
"@agoric/kmarshal": "0.1.1-dev-acbc12e.0.acbc12e",
|
|
55
55
|
"ava": "^8.0.1",
|
|
56
56
|
"better-sqlite3": "^12.10.0",
|
|
57
57
|
"c8": "^10.1.3",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 87.02
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "acbc12e3724691dcaa8798b7b59cdf1ad06bfe8c"
|
|
88
88
|
}
|
package/src/launch-chain.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
loadSwingsetConfigFile,
|
|
23
23
|
normalizeConfig,
|
|
24
24
|
upgradeSwingset,
|
|
25
|
+
applyVatOptionUpdates,
|
|
25
26
|
} from '@agoric/swingset-vat';
|
|
26
27
|
import { openSwingStore } from '@agoric/swing-store';
|
|
27
28
|
import { attenuate, BridgeId as BRIDGE_ID } from '@agoric/internal';
|
|
@@ -1166,8 +1167,37 @@ export async function launchAndShareInternals({
|
|
|
1166
1167
|
|
|
1167
1168
|
const softwareUpgradeCoreProposals = upgradeDetails?.coreProposals;
|
|
1168
1169
|
|
|
1169
|
-
const {
|
|
1170
|
-
|
|
1170
|
+
const {
|
|
1171
|
+
coreProposals: upgradeInfoCoreProposals,
|
|
1172
|
+
vatOptionUpdates: upgradeInfoVatOptionUpdates,
|
|
1173
|
+
} = parseUpgradePlanInfo(
|
|
1174
|
+
upgradeDetails?.plan,
|
|
1175
|
+
ActionType.AG_COSMOS_INIT,
|
|
1176
|
+
);
|
|
1177
|
+
|
|
1178
|
+
// Apply any host-injected in-place vat option updates for this
|
|
1179
|
+
// software upgrade. This mirrors coreProposals handling: two
|
|
1180
|
+
// channels, merged and applied at the upgrade block —
|
|
1181
|
+
// * upgradeDetails.vatOptionUpdates: hard-coded per chain in the
|
|
1182
|
+
// cosmos upgrade handler (golang/cosmos/app/upgrade.go), for
|
|
1183
|
+
// chains known there; and
|
|
1184
|
+
// * upgradePlan.info.vatOptionUpdates: proposer-supplied via the
|
|
1185
|
+
// upgrade proposal's info JSON.
|
|
1186
|
+
// All chain selection is done cosmos-side; cosmic-swingset makes no
|
|
1187
|
+
// chainID decision. Applying it here — before core proposals run and
|
|
1188
|
+
// before COMMIT_BLOCK — gets it applied and recorded in consensus for
|
|
1189
|
+
// every later block.
|
|
1190
|
+
const vatOptionUpdates = [
|
|
1191
|
+
...(upgradeDetails?.vatOptionUpdates || []),
|
|
1192
|
+
...(upgradeInfoVatOptionUpdates || []),
|
|
1193
|
+
];
|
|
1194
|
+
if (vatOptionUpdates.length) {
|
|
1195
|
+
// Just for a clearer error if this were ever reached during
|
|
1196
|
+
// bootstrap.
|
|
1197
|
+
(upgradeDetails && !isBootstrap) ||
|
|
1198
|
+
Fail`vat option updates are only supported during a software upgrade, not chain bootstrap`;
|
|
1199
|
+
applyVatOptionUpdates(kernelStorage.kvStore, vatOptionUpdates);
|
|
1200
|
+
}
|
|
1171
1201
|
|
|
1172
1202
|
if (isBootstrap) {
|
|
1173
1203
|
// This only runs for the very first block on the chain.
|