How does EOS ensure contracts are deterministic? If WASM is used doesn't that mean developer can write non-deterministic contracts which break the network?


Update

I understand the properties of a pure function, given some input return the same output. This question is about how is determinism enforced? e.g. Are WASM op codes checked? or some other technique etc.

  • 1
    only deterministic wasm is allowed – confused00 Nov 5 at 10:42
  • @confused00 how so? – stacksonstacks Nov 6 at 8:17

All inputs are based on the shared data on a public ledger. There are no analog or non-deterministic input like the time of a day or random number generator.

  • Same inputs
  • Same code
  • Same results

= deterministic

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.