Constraint Engine
The Constraint Engine is responsible for determining if state updates are valid or not.
Constraints
A constraint is the smallest component which determines if a state change is valid or not. Constraints are organized into groups called Predicates.
Solutions
A solution is combined with a set of predicates to create a set of solved constraints.
Virtual Machine
Constraints are evaluated within a predicate through the use of a virtual machine.
More about the Virtual Machine
Putting it all Together
One way to think about this process:
- Anything is possible.
- Stateful predicates shrink what is possible by constraining how the state they owns can change.
- Template predicates further shrink what is possible by constraining how the state they don't own changes. This is the users way of constraining according to their preferences.
- Partial solutions shrink this space of possibilities even further by setting some of the unknowns to exact values. Setting something to an exact value is equivalent to placing the tightest constraint on that value, namely that it must be exactly that value.
- Full solutions are a set of predicates with all their unknowns constrained to exact values. This is the final shrinking of possibilities. It is to equal the exact set of proposed state mutations. Only what is allowed and desired is possible. Therefore this is what happens.
This shrinking of possibilities using boolean expressions to constrain what is possible is the core of how Essential transitions between state.
Note: the exact process of how a predicate makes it onto the blockchain is till under active development. This section will be updated as the design progresses.