I introduced a new persist_event_if effect function to be used where a potential async side effect needs to be performed so that we may construct a persistent event.
In my particular situation, I have a behavior that maintains a synchronized counter and a private key for all edge-based gateways. This counter is required to be incremented and then encrypted along with an entity's stable MAC address, which is a field of the entity state. The result is a value that can be used in a "public address" which does not reveal an underlying stable address.
I introduced a new
persist_event_if
effect function to be used where a potential async side effect needs to be performed so that we may construct a persistent event.In my particular situation, I have a behavior that maintains a synchronized counter and a private key for all edge-based gateways. This counter is required to be incremented and then encrypted along with an entity's stable MAC address, which is a field of the entity state. The result is a value that can be used in a "public address" which does not reveal an underlying stable address.
For more background on how to determine this type of address: https://en.wikipedia.org/wiki/IPv6_address#Stable_privacy_addresses.