An entity is an account, order, market, contract, deposit or withdrawal. Every entity has a unique uid. Once created entities are never deleted.
We distinguish between recoverable errors and failures.
Recoverable errors are exceptions of type Invalid_transition. If this exception reaches the top level then piston will return an rpc error and continue processing. Any other exceptions will cause piston to die. Deepred will then mark the offending event as unprocessable and replay from a snapshot.