-
Notifications
You must be signed in to change notification settings - Fork 212
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
use vatIndex, not vatName, to index internal vat tables #193
Comments
For now, we track device nodes in the Device Table, and objects in the Object Table, and the (perhaps bad) rule is that devices can only export device nodes, and vats can only export objects. So the Device Table maps kernel device nodes ( So we can change this to use device index and vat index. The Device Table will map |
.. as the index for kernel state data structures, instead of user-provided vatName/deviceName strings. This will make it easier to use key/value state storage (#144), since the keys will be more uniform (and shorter, and not vulnerable to people using the separator string in their vat name). Also it will make adding dynamic Vats easier (#19), as we'll just increment a counter instead of asking the user to discover a unique name. closes #146
.. as the index for kernel state data structures, instead of user-provided vatName/deviceName strings. This will make it easier to use key/value state storage (#144), since the keys will be more uniform (and shorter, and not vulnerable to people using the separator string in their vat name). Also it will make adding dynamic Vats easier (#19), as we'll just increment a counter instead of asking the user to discover a unique name. closes #146
in the old repo. this was SwingSet issue 146 |
In the current kernel, we use a string vatName everywhere we need to refer to a Vat. This includes the "owner" in the ObjectTable, the "Decider" in the PromiseTable, and the field in Notify deliveries that say which vat should be notified.
We should switch all of these to use an integer vatIndex instead, and have a single table that maps from vatIndex to vatName for diagnostics and debug messages. The
vatManager
should know the name, for the various debug prints it does, but should not use it for functional purposes.This will help with #24 (dynamically-added vats), as we should not require the new vats to have unique names. It should also improve the space-efficiency of #54, as we'll use the vatIndex in the storage keys instead of the full vat name (the keys can start with
vNN.
).We can still require that the initial "genesis vats" have unique names, and use those names in the
vats
object that the bootstrap vat receives (I'd rather not have the bootstrap code have to guess the order in which the genesis vats are added, and reference those vats by number instead of by name).Devices should do the same thing, although I'm not sure whether they should share the same numberspace as vats (devices and vats are basically the same, but with different translation layers, and different syscalls supported). We might need to clean up the differences between them first. All devices must be present at startup (they are all "genesis devices").
The text was updated successfully, but these errors were encountered: