@agoric/cosmic-swingset 0.41.4-dev-5c932ce.0 → 0.41.4-dev-9c73ae4.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/package.json +11 -11
- package/src/launch-chain.js +32 -1
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-9c73ae4.0+9c73ae4",
|
|
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-9c73ae4.0+9c73ae4",
|
|
26
|
+
"@agoric/cosmos": "0.34.2-dev-9c73ae4.0+9c73ae4",
|
|
27
|
+
"@agoric/deploy-script-support": "0.10.4-dev-9c73ae4.0+9c73ae4",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-9c73ae4.0+9c73ae4",
|
|
29
|
+
"@agoric/store": "0.9.3-dev-9c73ae4.0+9c73ae4",
|
|
30
|
+
"@agoric/swing-store": "0.9.2-dev-9c73ae4.0+9c73ae4",
|
|
31
|
+
"@agoric/swingset-vat": "0.32.3-dev-9c73ae4.0+9c73ae4",
|
|
32
|
+
"@agoric/telemetry": "0.6.3-dev-9c73ae4.0+9c73ae4",
|
|
33
|
+
"@agoric/vm-config": "0.1.1-dev-9c73ae4.0+9c73ae4",
|
|
34
34
|
"@endo/bundle-source": "^3.4.2",
|
|
35
35
|
"@endo/env-options": "^1.1.7",
|
|
36
36
|
"@endo/errors": "^1.2.7",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"typeCoverage": {
|
|
72
72
|
"atLeast": 80.55
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9c73ae4bfa7d48114690e694b065ee0a1ce99e30"
|
|
75
75
|
}
|
package/src/launch-chain.js
CHANGED
|
@@ -215,7 +215,7 @@ export async function buildSwingset(
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
const pendingCoreProposals = await ensureSwingsetInitialized();
|
|
218
|
-
upgradeSwingset(kernelStorage);
|
|
218
|
+
const { modified } = upgradeSwingset(kernelStorage);
|
|
219
219
|
const controller = await makeSwingsetController(
|
|
220
220
|
kernelStorage,
|
|
221
221
|
deviceEndowments,
|
|
@@ -236,6 +236,7 @@ export async function buildSwingset(
|
|
|
236
236
|
return {
|
|
237
237
|
coreProposals: pendingCoreProposals,
|
|
238
238
|
controller,
|
|
239
|
+
kernelHasUpgradeEvents: modified,
|
|
239
240
|
mb: mailboxDevice,
|
|
240
241
|
bridgeInbound: bridgeDevice.deliverInbound,
|
|
241
242
|
timer: timerDevice,
|
|
@@ -408,6 +409,7 @@ export async function launch({
|
|
|
408
409
|
const {
|
|
409
410
|
coreProposals: bootstrapCoreProposals,
|
|
410
411
|
controller,
|
|
412
|
+
kernelHasUpgradeEvents,
|
|
411
413
|
mb,
|
|
412
414
|
bridgeInbound,
|
|
413
415
|
timer,
|
|
@@ -510,6 +512,14 @@ export async function launch({
|
|
|
510
512
|
await commit();
|
|
511
513
|
}
|
|
512
514
|
|
|
515
|
+
async function doKernelUpgradeEvents(inboundNum) {
|
|
516
|
+
controller.writeSlogObject({
|
|
517
|
+
type: 'cosmic-swingset-inject-kernel-upgrade-events',
|
|
518
|
+
inboundNum,
|
|
519
|
+
});
|
|
520
|
+
controller.injectQueuedUpgradeEvents();
|
|
521
|
+
}
|
|
522
|
+
|
|
513
523
|
async function deliverInbound(sender, messages, ack, inboundNum) {
|
|
514
524
|
Array.isArray(messages) || Fail`inbound given non-Array: ${messages}`;
|
|
515
525
|
controller.writeSlogObject({
|
|
@@ -629,6 +639,11 @@ export async function launch({
|
|
|
629
639
|
break;
|
|
630
640
|
}
|
|
631
641
|
|
|
642
|
+
case ActionType.KERNEL_UPGRADE_EVENTS: {
|
|
643
|
+
p = doKernelUpgradeEvents(inboundNum);
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
|
|
632
647
|
case ActionType.INSTALL_BUNDLE: {
|
|
633
648
|
p = installBundle(action.bundle);
|
|
634
649
|
break;
|
|
@@ -934,6 +949,22 @@ export async function launch({
|
|
|
934
949
|
await doBootstrap(action);
|
|
935
950
|
}
|
|
936
951
|
|
|
952
|
+
// The reboot-time upgradeSwingset() may have generated some
|
|
953
|
+
// remediation events that need to be injected at the right
|
|
954
|
+
// time (after catchup, before proposals). Push them onto
|
|
955
|
+
// runThisBlock before anything else goes there.
|
|
956
|
+
if (kernelHasUpgradeEvents) {
|
|
957
|
+
isBootstrap ||
|
|
958
|
+
upgradeDetails ||
|
|
959
|
+
Fail`Unexpected kernel upgrade events outside of consensus start`;
|
|
960
|
+
const txHash = 'x/kernel-upgrade-events';
|
|
961
|
+
const context = { blockHeight, txHash, msgIdx: 0 };
|
|
962
|
+
runThisBlock.push({
|
|
963
|
+
action: { type: ActionType.KERNEL_UPGRADE_EVENTS },
|
|
964
|
+
context,
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
|
|
937
968
|
// Concatenate together any pending core proposals from chain bootstrap
|
|
938
969
|
// with any from this inbound init action, then execute them all.
|
|
939
970
|
const coreProposals = mergeCoreProposals(
|