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
Blockchains(like Ethereum) or accounting software (Cobol) do not allow code to call local clocks, randoms, or any other sources of non determinism.
Nix builds allow access only to predefined directory with fully replaced environment variables and consume only content addressable binaries.
So question, is about Can isolated-vm make execution of JS deterministic isolating it from non determinism of local clocks, randoms, GC thread scheduling, random based sorting, any file system access?
The text was updated successfully, but these errors were encountered:
Asking about filesystems is a weird, since JavaScript does not specify access to a filesystem. This is something provided by the DOM or other APIs. I'm not sure what you mean by "random based sorting" either.
Anyway the short answer is: no, it is not a formal goal of the project because this is not a goal of the underlying runtime, v8, or even the language of JavaScript. In recent years there has been some work to fix previously implementation-defined sections of the specification-- for-in order and Array.prototype.sort stability. Off the top of the my there exists others like trigonometric functions, stack overflow height, and of course FinalizationRegistry.
I am working on a from-scratch rewrite which will have some features that would take it a bit closer. Specifically you can choose a deterministic monotonically increasing clock, and choose a random seed:
. If you go a step further and disable certain JavaScript features you could achieve some form of determinism on a given machine. The results may not match across platforms and architectures though.
Formal definition of
deterministic
is https://en.wikipedia.org/wiki/Deterministic_algorithm .Examples are,
https://github.com/facebookexperimental/hermit allows to execute native code deterministically on linux by isolating thread scheduling non determinism
Blockchains(like Ethereum) or accounting software (Cobol) do not allow code to call local clocks, randoms, or any other sources of non determinism.
Nix builds allow access only to predefined directory with fully replaced environment variables and consume only content addressable binaries.
So question, is about
Can isolated-vm make execution of JS deterministic isolating it from non determinism of local clocks, randoms, GC thread scheduling, random based sorting, any file system access?
The text was updated successfully, but these errors were encountered: