-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move vatParameters to startVat() delivery #4787
Conversation
@FUDCo I recommend reviewing one commit at a time, they're pretty independent, but the first two seemed too small for their own PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, though it seems like a lot of mechanism just to add one parameter to startVat
.
True, but the important thing is that |
use Far('root', ..) instead of 'vref', this matches our conventions for `buildRootObject` better and will make the device-hooks test easier to write.
For consistency, `kernel.createTestVat()` now sends a `dispatch.startVat` to these `setup`-based test vats, just like all normal vats. Some tests were modified to ignore the extra delivery they now observe. refs #4381
Previously, `vatParameters` arrived at a vat worker in the `setBundle` message to the supervisor (the same one that provided the vat's source bundle). This changes the code to deliver them inside the `dispatch.startVat()` invocation instead. Liveslots-based vats see no change: both cases hand vatParameters in via the `buildRootObject()` call. `setup()`-based vats must change: the `setup()` call no longer contains a `vatParameters` argument, and vatParameters are available temporally later than before. As a result, the comms vat must wait for `startVat()` to learn its two configuration settings: `identifierBase` and `sendExplicitSeqNums`. Comms now uses both to initialize its state DB, and reads `sendExplicitSeqNums` from the DB for each `transit()` call. This paves the way for `vatParameters` to contain slots, not just inert data. The VatTranslator that converts `startVat` KernelDeliveryObjects into VatDeliveryObjects does not yet perform slot translation, nor does liveslots treat `vatParameters` as capdata, but they are now in the right place to perform those tasks. refs #4381 closes #4766
6292fbf
to
d1f4918
Compare
fix(swingset): deliver vatParameters in startVat()
Previously,
vatParameters
arrived at a vat worker in thesetBundle
message to the supervisor (the same one that provided the vat's source
bundle). This changes the code to deliver them inside the
dispatch.startVat()
invocation instead.Liveslots-based vats see no change: both cases hand vatParameters in via the
buildRootObject()
call.setup()
-based vats must change: thesetup()
call no longer contains a
vatParameters
argument, and vatParameters areavailable temporally later than before.
As a result, the comms vat must wait for
startVat()
to learn its twoconfiguration settings:
identifierBase
andsendExplicitSeqNums
. Comms nowuses both to initialize its state DB, and reads
sendExplicitSeqNums
fromthe DB for each
transit()
call.This paves the way for
vatParameters
to contain slots, not just inert data.The VatTranslator that converts
startVat
KernelDeliveryObjects intoVatDeliveryObjects does not yet perform slot translation, nor does liveslots
treat
vatParameters
as capdata, but they are now in the right place toperform those tasks.
refs #4381
closes #4766