By the definition CRDTs (Conflict-free replicated data types) are conflict-free. So it means that any update made on one node will finally be applied (merged) on all other nodes.
So it leads me to the assumption that CRDT can't logically restrict or decline or refuse to make some update if the environment is in it's regular state (no hardware faults, etc.).
On the other hand the transaction by definition should be either accepted or declined, rolled back if some requirement not met - if some conflict detected. So it means that transactions (based on conflicts) can't be implemented with CRDTs (that are conflict-free). Is that right?
Let's consider an example - simple banking account. Balance is a non-negative number. I tried to implement it with PN-Counter (Positive-Negative Counter). I wanted to make it Non-negative - restrict spending if balance goes below zero. But seems it is impossible. Been implemented with PN-Counter it will allow to go below zero. Or if I want to restrict that - I need to synchronize (lock) all nodes to get a confirmation.
If it is possible to implement a simple transaction with CRDTs could you please describe how it is possible with the given example - non-negative number.