Determinism
In Truebit tasks, determinism ensures that whenever someone takes part in the Truebit process, they'll always get the same result if they use the same starting information.
What is Determinism?
Determinism means that when you run a program or code multiple times with the same inputs and conditions, you will always get the same result.
Challenges
A program running in a Turing machine is non-deterministic by default. Given some input, it is only possible to tell if a program will end by running it first. That is known as the halting problem.
A program running an infinitely recursive function will consume the whole stack memory even before its infinite recursion gets noticed by the time it takes to execute.
The way floating-point hardware is implemented can lead to inconsistencies in the task execution results.
How do we manage those challenges?
To manage those challenges, Truebit instruments the WebAssembly program to:
Limit the executed Instruction count (Gas metering)
Available execution Stack memory (Stack limit)
Nested calls (Call limit) assigned to the task execution
In addition to that, it also
Replaces the the default WASI implementation with a customized WASI interface developed by Truebit
Replaces FPU instructions with deterministic functions created by Truebit
Last updated
Was this helpful?