Role of maintainers for Canton Contract Keys

Pigging backing off of I need help in understanding the role of "maintainer", I was reviewing the Canton’s support for uniqueness of contract keys. This explanation

While adding the check to the individual participants is straightforward, it is hard to get meaningful guarantees from such local checks because each participant has only a limited view of the entire virtual global ledger. For example, the check could pass locally on a participant even though there exists a contract with the given key on some domain that the participant is not connected to. Similarly, since the processing of different domains runs in parallel, it is unclear how to consistently handle the case where transactions on different domains create two contracts with the same key.

First, why do we have to perform

the check could pass locally on a participant even though there exists a contract with the given key on some domain that the participant is not connected to.

How would this occur? If a Party is hosted by a participant, wouldn’t that mean that the maintainer is hosted by some participant too, and then that maintainer cannot create a contract with the a given key on a domain that participant is not connected too?

1 Like

In Canton, a Daml party can be hosted on several participants and these participants may be connected to different domains. So two contracts may be simultaneously be created on two domains, but each participant of the maintainer sees only one of the two creations. When you later transfer one of the contracts to a domain to which both participants are connected, the other participant suddenly sees two contracts for the same key.

1 Like