From 989aa1934c6b194960138a8676c10e6c91de05eb Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 19 Jun 2024 12:34:15 -0700 Subject: [PATCH] fix(swingset): log vat termination and upgrade better (#9535) Vat termination now makes the kernel do a console.log like: `kernel terminating vat v6 (failure=true)` Vat upgrade now announces the start of the upgrade process with: `attempting to upgrade vat v6 from incarnation 0 to source b1-..` in addition to announcing the success or failure of the upgrade `vat v6 upgraded from incarnation 0 to 1 with source b1-..` or `WARNING: vat v6 failed to upgrade from incarnation 0 (startVat)` --- packages/SwingSet/src/kernel/kernel.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SwingSet/src/kernel/kernel.js b/packages/SwingSet/src/kernel/kernel.js index 23f0d9ec637..df5dfd1fba1 100644 --- a/packages/SwingSet/src/kernel/kernel.js +++ b/packages/SwingSet/src/kernel/kernel.js @@ -251,6 +251,7 @@ export default function buildKernel( * @param {SwingSetCapData} info */ async function terminateVat(vatID, shouldReject, info) { + console.log(`kernel terminating vat ${vatID} (failure=${shouldReject})`); const vatKeeper = kernelKeeper.provideVatKeeper(vatID); const critical = vatKeeper.getOptions().critical; insistCapData(info); @@ -819,6 +820,10 @@ export default function buildKernel( ); const disconnectionCapData = kser(disconnectionObject); + console.log( + `attempting to upgrade vat ${vatID} from incarnation ${oldIncarnation} to source ${bundleID}`, + ); + /** * Terminate the vat and translate internal-delivery results into * abort-without-termination results for the upgrade delivery.