How can we retrieve the resource plaintext associated with a commitment in practice?
In Constraint linearity in the resource machine - #36 by vveiln @vveiln mentioned the specs:
Resource Logic Public Inputs:
- nfs \subseteq nfs_{tx}
- cms \subseteq cms_{tx}
- tag: \mathbb{F}_{tag} — identifies the resources being checked
- extra \subseteq tx.extra
Resource Logic Private Inputs:
- input resources corresponding to the elements of nfs
- output resource corresponding to the elements of cms
- custom inputs
Will these input resource plaintexts being part of the private inputs be in
- the key-value map of the node with the cm as the lookup key or
- the key-value map in the tx extra data with the cm as the lookup key or
- a set in the extra data (which would mean that we have to iterate brute-force over them to find the matching one)
?
In the v2 specs, we at least have the tag now as a logic function public input, which is either the commitment cm or nullifier nf, depending on if the resource is created or consumed according to @vveiln (see her post)
But, as above and as @degregat writes, it is unclear how one can connect nullifiers with output resource plaintext outside the tag in case we need to (that I didn’t encounter yet) since we also lack the nullifier keys. Maybe a resource logic would want to check that certain properties of other the consumed resources hold, e.g., that none has a quantity > 10.