The current proposal to default to a single compliance unit per actions changes how nonces of created resources are generated:
That is, the i-th nonce depends on the index i and on the consumed nullifiers.
Because the nullifier is computed from the resource’s commitment, there is an implicit assumption here: the consumed resources already existed at the moment of generating the created resources.
Ephemerality and circular dependency
That created resources come after consumed ones (in time) is not necessarily true for ephemeral resources. There is nothing wrong with this, after all ephemeral resources are not to persist (in time), but it potentially introduces a circular dependency on the proposed nonce derivation. An example is the kudo application. When burning, there is a consumed ephemeral denomination resource, whose label is set to the commitment of a created ephemeral kudo resource.
Which resource do we create first? Each depends on the commitment of the other. We are stuck.
This is not a problem if we accept that ephemeral resources can be freely set to either consumed or created.
In the example above, the circular dependency is broken by setting the ephemeral denomination resource as created.
If you are happy with this, stop reading here and dump your brain ![]()
Nonce derivation based on action ordering
If we are not willing to grant that, for every conceivable application, consumption or creation of ephemeral resources can be set at will, then we need to change the way nonces are derived.
The suggestion is to generalize the mechanism we’ve been using for compliance units (CU) of size two. There is one variable-size CU per action. The compliance circuit would receive as witness (any) ordering over the participating resources, and enforce that the nonce of each created resource is set to the tag of the preceding/parent resource.
created_resource.nonce = parent_tag
Besides enforcing correct nonce derivation for all created resources, the circuit also enforces that the witness sequence is actually an ordering of the action resources, and that it starts with a consumed resource. Nonce uniqueness is guaranteed up to negliglible probability:
- The witness ordering ensures created resources within the same action have different nonces.
- Using the parent tag, i.e. either its nullifier or its commitment, ensures the child nonce is different at consumption and creation of the parent resource.
Constructing an ordering. To follow with the example of a kudo burn, the action dependency, excluding nonces, is as follows. (You don’t need to understand the application nor the purpose of the resources utilized per action. It just matters the dependency across them.)
Which yields several orderings of the action without circular dependencies in the nonces generation. For example:


