Meaning
Mathematical rule that defines how a system moves from its current status to a new one based on a specific input. The state transition function acts as the logic core of a ledger, ensuring that every change follows a predictable and authorized path. It governs the evolution of the database and stops applying when an input fails to meet the pre-defined criteria for a valid change.
Computational Rule
Logic must be applied identically by every node to maintain a single source of truth. The state transition function takes the current state and a transaction as inputs and produces a new state as the output. If the input is a payment, the function subtracts the amount from one account and adds it to another.
This process is deterministic, meaning the same inputs will always produce the exact same result.
Deterministic Output
Consistency is the only way to prevent a network from splitting into multiple versions of history. If the state transition function were to include a random variable or a local timestamp, different machines would end up with different balances. This is why the function must be pure and isolated from any external noise.
The cost of this precision is the inability to use certain common programming techniques that rely on non-deterministic behavior.
Error Path
Invalid inputs are simply discarded by the system before they can affect the state. This protects the database from corruption or unauthorized changes by malicious actors.