1 What is Composite Phasing
Composite Phasing ("Smart Phasing") is a very powerful new feature that allows approval models for conditional transactions to be defined in terms of a Boolean Expression of other approval models, i.e. allows joining the current primitive approval models such as by whitelist, by asset balance, by hash, etc, using the AND, OR, and NOT operators.
This allows the new Asset Control feature to be used in combination with the Account Control feature when required, the transaction execution being made conditional on satisfying both the Asset Control and Account Control settings. It also allows for example combining the existing by hash or by transaction approval models with by whitelist, by balance, etc, approvals, which enables doing atomic coupling of transactions (including cross-blockchain) even for multisignature accounts (i.e. subject to Account Control), or with assets subject to Asset Control.
The NOT operator allows for dead-man-switch type conditions, where a transaction is executed only if some condition (e.g. revealing a secret) is not satisfied.
2 Defining a Boolean Expression
To define the boolean expression used by composite phasing, first define the basic approval models then reference them using the AND(&), OR(|) and NOT(!) operators which can be composed to form a valid true/false expression. For example, to define that a transaction is executed only if condition A is not met and and condition B is met, define the expression as !A & B
3 Setting up an Approval Model
4 Use your Approval Model
Setting up transaction phasing has changed in Ardor, instead of choosing the voting model when submitting the transaction. You simply choose an existing voting model.
|To use the defined approval model, select it as Phasing Approval Model from the advanced area of the transaction dialog (figure 5)|