-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VOM: split nextInstanceID into a separate vatstore key
Previously, we stored both the static parts of a DurableKindDescriptor (tag, stateShape) and the dynamic part (nextInstanceID) in the same vatStore key (`vom.dkind.${kindID}`). This meant we had to re-write the whole thing each time we make a new instance, which seems like a waste. This change splits the next instance ID out to a separate key: * `vom.dkind.${kindID}.descriptor`: holds the static descriptor * `vom.dkind.${kindID}.nextID`: holds the next instance ID Note that KindIDs are always integers, and we always append the .descriptor/.nextID suffix, so I'm not worried about vatstore key confusion/collision. It also changes the merely-virtual Kind descriptor key to match: `vom.vkind.${kindID}.descriptor`. Note that we don't bother recording a `nextID` for virtual Kinds, since these never outlive an incarnation, so we can hold the nextInstanceID in RAM. We only write out the descriptor for external tooling and debugging, anyways. Internally, `nextInstanceID` is now a BigInt, because we use `Nat()` on the value we get back from the vatstore. This is not exposed to userspace, and vrefs are strings (which incorporate the ID). closes #7364
- Loading branch information
Showing
6 changed files
with
122 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.