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.
Last updated
Was this helpful?
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.
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.
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.
To manage those challenges, Truebit instruments the WebAssembly program to:
Limit the number of executed instructions (Gas metering).
Restrict the available execution stack memory (Stack limit).
Constrain the depth of nested calls assigned to the task execution (Call limit).
In addition to that, it also performs the following tasks:
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?
Was this helpful?