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
It would be nice to be able to switch on "static mode" for the VM, which basically just ensures that no state writes occur/that there are no side effects from a program execution. For now I think it's sufficient to make sure that in static mode we don't use certain host calls, such as write_storage and spawn. Ideally this could be switched on for a single execute() call, and it should be persistent: when switched on, all subsequent stack frames should be in static mode until we return to the place where it was switched on.
One place this would be useful is when the host calls certain methods, including Verify and MaxSpend, which it currently assumes are static--it would be good to have additional assurances of this from the VM.
It's also likely we'll want to introduce something like EVM's STATICCALL at some point.
The text was updated successfully, but these errors were encountered:
Why not have this mode entirely in the host? I.e. the host would know the state (static/not static) and allow only certain operations depending on the mode.
I think that's fine. The only catch is that, if we introduce a STATICCALL opcode/host call in future, we'll need a way for the VM to signal to the host that it should enable static mode.
I take this back, the host call itself is the signal. There's nothing to do on the VM side other than implementing the host call.
It would be nice to be able to switch on "static mode" for the VM, which basically just ensures that no state writes occur/that there are no side effects from a program execution. For now I think it's sufficient to make sure that in static mode we don't use certain host calls, such as write_storage and spawn. Ideally this could be switched on for a single execute() call, and it should be persistent: when switched on, all subsequent stack frames should be in static mode until we return to the place where it was switched on.
One place this would be useful is when the host calls certain methods, including Verify and MaxSpend, which it currently assumes are static--it would be good to have additional assurances of this from the VM.
It's also likely we'll want to introduce something like EVM's
STATICCALL
at some point.The text was updated successfully, but these errors were encountered: