Canton: how to host a party on multiple participants

The participants are in different identity namespaces, that’s why you get the “Mismatching namespaces” error on your authorization command. You have to split the command into two to authorize both directions of the party to participant mapping.

First participant2 needs to authorize, because that participant owns the party’s namespace:

participant2.identity.party_to_participant_mappings.authorize(IdentityChangeOp.Add, party = party0, participant = participant1.id, side = RequestSide.From)

And then participant1 as the new hosting participant has to also authorize the other direction of the mapping:

participant1.identity.party_to_participant_mappings.authorize(IdentityChangeOp.Add, party = party0, participant = participant1.id, side = RequestSide.To)

Be aware that multi-participant parties have to be setup before any transactions for that party are processed. The feature to migrate an existing party with contracts from one participant to another does not exist yet.

4 Likes