Unlike provideLazy, provide should be called at most once within any vat
incarnation with a given baggage,key pair.
provide should only be used to populate baggage, where the total number of
calls to provide must be low cardinality, since we keep the bookkeeping to
detect collisions in normal language-heap memory. All the other
baggage-oriented provide* and prepare* functions call provide, and so
impose the same constraints. This is consistent with our expected durability
patterns: What we store in baggage are
kindHandles, which are per kind, which must be low cardinality
data "variables" for reestablishing the lexical scope, especially of
singletons
named non-baggage collections at the leaves of the baggage tree.
What is expected to be high cardinality are the instances of the kinds, and
the members of the non-bagggage collections.
TODO https://github.com/Agoric/agoric-sdk/pull/5875 : Implement
development-time instrumentation to detect when provide violates the above
prescription, and is called more than once in the same vat incarnation with
the same baggage,key pair.
Unlike
provideLazy
,provide
should be called at most once within any vat incarnation with a givenbaggage
,key
pair.provide
should only be used to populate baggage, where the total number of calls toprovide
must be low cardinality, since we keep the bookkeeping to detect collisions in normal language-heap memory. All the other baggage-orientedprovide*
andprepare*
functions callprovide
, and so impose the same constraints. This is consistent with our expected durability patterns: What we store in baggage areWhat is expected to be high cardinality are the instances of the kinds, and the members of the non-bagggage collections.
TODO https://github.com/Agoric/agoric-sdk/pull/5875 : Implement development-time instrumentation to detect when
provide
violates the above prescription, and is called more than once in the same vat incarnation with the same baggage,key pair.