endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
829 stars 72 forks source link

Document limitations in platform math determinism #1948

Open kriskowal opened 10 months ago

kriskowal commented 10 months ago

Per discussion https://github.com/endojs/endo/issues/1319, ses does not currently tame sources of non-determinism floating up from Math operations. Our in-repository documentation of the caveats of SES fidelity should note that confined code may exhibit non-determinism if the underlying platform provides non-deterministic answers to floating point operations. We should also recommend mitigations, e.g., providing a Math namespace that lacks support for floating point, requiring deterministic programs to operate in terms of integers or bigints.