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
We can address #2092 (using Symbol.asyncIterator as a method name) thoroughly by the serialization change described in #2481 (which would also fix #2612), but it's going to take a little while because it touches many different codepaths through the kernel and comms layer. We can apply a quick fix by special-casing that one method name.
This will, of course, prohibit access to a method named with the stringSymbol.asyncIterator, because anyone who invokes E(remote)['Symbol.asyncIterator']() will wind up invoking target[Symbol.asyncIterator]() instead of target['Symbol.asyncIterator'](). This falls into the same lack-of-JS-fidelity bug bucket that prevents cross-machine invocation of e.g. E(remote)['method:with:colon'](), tracked in #2612.
Security Considerations
There shouldn't be any security consequences of this, since we consider Symbol.asyncIterator to be an ambient ability. However we need to pay attention to the compatibility consequences. We'll have three phases:
1 (current): liveslots doesn't do anything special, it is impossible to invoke target[Symbol.asyncIterator]
Assuming we don't consider upgrading some vats and not others (which we don't even have the ability to do now, since all vats get the same liveslots), then the question is compatibility between separate machines (chains/ag-solo) that might be at different stages.
If a stage-2 machine attempts to invoke the symbol method on a stage-1 machine, it will be delivered as a string method invocation, which will probably fail safely. If a stage-1 machine happened to try to invoke E(target)['Symbol.asyncIterator'](), which would be pretty unlikely, it would be delivered as a symbol method invocation, which would be surprising. All other methods will interoperate just fine.
A stage-1/2 machine won't be able to interoperate with a stage-3 machine at all, unless we take on the task of trying to do format-translation between the two. This could be done entirely within the comms vat, but it'd be kind of gross so I'm hoping to avoid it.
Test Plan
Normal unit tests.
The text was updated successfully, but these errors were encountered:
Liveslots special-cases this one symbol by converting it into a (string)
method name of `"Symbol.asyncIterator"` for `syscall.send`, and back again
during `dispatch.deliver`. This has several limitations:
* no other Symbols are accepted yet
* `E(target)[Symbol.asyncIterator](args)` and
`E[target]['Symbol.asyncIterator'](args)` will invoke the same target method,
which is clearly wrong
* a method named `'Symbol.asyncIterator'` (as a string) cannot be invoked
remotely
This should all be fixed someday by #2481.
closes#2619
What is the Problem Being Solved?
We can address #2092 (using
Symbol.asyncIterator
as a method name) thoroughly by the serialization change described in #2481 (which would also fix #2612), but it's going to take a little while because it touches many different codepaths through the kernel and comms layer. We can apply a quick fix by special-casing that one method name.Description of the Design
Liveslots (in
queueMessage
) will add:On the receiving side, in
deliver
, we'll add:This will, of course, prohibit access to a method named with the string
Symbol.asyncIterator
, because anyone who invokesE(remote)['Symbol.asyncIterator']()
will wind up invokingtarget[Symbol.asyncIterator]()
instead oftarget['Symbol.asyncIterator']()
. This falls into the same lack-of-JS-fidelity bug bucket that prevents cross-machine invocation of e.g.E(remote)['method:with:colon']()
, tracked in #2612.Security Considerations
There shouldn't be any security consequences of this, since we consider
Symbol.asyncIterator
to be an ambient ability. However we need to pay attention to the compatibility consequences. We'll have three phases:target[Symbol.asyncIterator]
Assuming we don't consider upgrading some vats and not others (which we don't even have the ability to do now, since all vats get the same
liveslots
), then the question is compatibility between separate machines (chains/ag-solo) that might be at different stages.If a stage-2 machine attempts to invoke the symbol method on a stage-1 machine, it will be delivered as a string method invocation, which will probably fail safely. If a stage-1 machine happened to try to invoke
E(target)['Symbol.asyncIterator']()
, which would be pretty unlikely, it would be delivered as a symbol method invocation, which would be surprising. All other methods will interoperate just fine.A stage-1/2 machine won't be able to interoperate with a stage-3 machine at all, unless we take on the task of trying to do format-translation between the two. This could be done entirely within the comms vat, but it'd be kind of gross so I'm hoping to avoid it.
Test Plan
Normal unit tests.
The text was updated successfully, but these errors were encountered: