Lazy Execution
Lazy exectution, sometimes referred to as “lazy evaluation” or “call-by-need”, is a functional programming design pattern whereby an expression is not evaluated until the moment it is needed. This post-processing strategy comes with a number of advantages including the ability to treat expressions as abstract structures rather than confining them to a set of specific primitives. These abstract structures and their resulting state can be determined over an unbounded execution time.
In the context of distributed ledgers, lazy execution is especially valuable because it frees the ordering mechanism from having to handle complex data structures and function calls, eliminating threats that arise from manipulating block mempools.
Lazy Execution in Notoros
By evaluating application state after an event has already been committed to the ledger, Notoros applications can parallelize their processing off-chain. This reduces the workload of the ledger, allowing the network to achieve consensus with minimal redundancy and computational complexity. Additionally, lazy execution frees the Notoros ledger from having to implement unique primitives for every execution environment, making the ledger itself agnostic to the state and processing of an application. This means that any type of software can leverage the Notoros ledger without having to painstakingly “enshrine” its components into the Notoros codebase.