You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source code for these vats lives in packages/SwingSet/src/vats/. All but network are instantiated automatically by SwingSet unless you disable them with a config option (although the userspace-provided bootstrap function is still responsible for wiring them up). Our chain packages/vats/ creates a vat-network around the swingset-provided src/vats/network/ code.
We need all of these to be upgradable, so we don't find ourselves stuck later when we want to add a feature or fix a bug. That means replacing their Far objects with instances of a durable Kind.
As a side-effect, they will move a lot of their state to virtual+durable storage. This will reduce the memory concerns of long-running vats that could accumulate state, at the cost of performance (they'll be doing a lot of DB operations instead of simple in-RAM lookups).
comms is transcriptless, so it's already taken care of.
We might be able to defer writing code to actually trigger their upgrades, as long as we know the initial version is storing enough of its state in the DB to allow us to implement the upgrades (and the new versions to upgrade to) later. OTOH we can't really test their upgradeability without adding a knob for it.
These are all static vats. To trigger the upgrade of a static vat, we could either add that power to vat-admin, or we could introduce some sort of controller.upgradeStaticVat(vatID, newBundleID) API. The upgrade process itself is probably the same as for dynamic vats: processUpgradeVatEvent() performs a stopVat delivery, replaces the vat source bundleid DB key (which will be slightly different for a static vat, unless we find a nice way to unify them better), flushes the worker, then makes a new worker and sends it a startVat delivery.
The text was updated successfully, but these errors were encountered:
These have all been completed except for the network vat work, which is in something of an indeterminate state for reasons unrelated to the upgradeability thing, and therefore the network vat as a whole may quite possibly get overhauled at some point in the post-Vaults future and render the work that's been done up until now on network vat upgradeability obsolete. (Though any such overhaul would almost certainly include making it durable/upgradeable in whatever its new form turns out to be.) So I'm going to close out this epic to keep it from blocking the vaults release even though the network vat task is not done. However, I'll leave the network vat task itself in place as a reminder that this will need to be addressed at some point.
Swingset has a number of internal vats:
The source code for these vats lives in
packages/SwingSet/src/vats/
. All butnetwork
are instantiated automatically by SwingSet unless you disable them with aconfig
option (although the userspace-providedbootstrap
function is still responsible for wiring them up). Our chainpackages/vats/
creates avat-network
around the swingset-providedsrc/vats/network/
code.We need all of these to be upgradable, so we don't find ourselves stuck later when we want to add a feature or fix a bug. That means replacing their
Far
objects with instances of a durableKind
.As a side-effect, they will move a lot of their state to virtual+durable storage. This will reduce the memory concerns of long-running vats that could accumulate state, at the cost of performance (they'll be doing a lot of DB operations instead of simple in-RAM lookups).
comms
is transcriptless, so it's already taken care of.We might be able to defer writing code to actually trigger their upgrades, as long as we know the initial version is storing enough of its state in the DB to allow us to implement the upgrades (and the new versions to upgrade to) later. OTOH we can't really test their upgradeability without adding a knob for it.
These are all static vats. To trigger the upgrade of a static vat, we could either add that power to
vat-admin
, or we could introduce some sort ofcontroller.upgradeStaticVat(vatID, newBundleID)
API. The upgrade process itself is probably the same as for dynamic vats:processUpgradeVatEvent()
performs astopVat
delivery, replaces the vat source bundleid DB key (which will be slightly different for a static vat, unless we find a nice way to unify them better), flushes the worker, then makes a new worker and sends it astartVat
delivery.The text was updated successfully, but these errors were encountered: