Hello Daml Community,
I have a question about party ids.
I have read this article, and i came to the conclusion that it is not possible to have static id parties.
I have a canton network, 2 remote participants and 1 remote domain. I create my party id with this command:
daml script --dar .daml/dist/Project-0.0.1.dar --ledger-host 192.168.61.128 --ledger-port 5011 --output-file party_bob.json --script-name Lights:initializeUser
and my script to allocate the Party:
data LedgerParties = LedgerParties with bob : Party
initializeUser : Script LedgerParties initializeUser = do partyBob <- allocatePartyWithHint "bob" (PartyIdHint "bob") bob <- validateUserId "bob" _ <- createUser (User bob (Some partyBob)) [CanActAs partyBob] pure (LedgerParties partyBob)
If the system goes down, when I reload it, i need to create new party ids with command above.
Is it possible to upload the old party id stored in the json file i created?
I ask this because I have persistence with postgres in the domain. When i reboot the system to test the persistence i came to the conclusion that the contracts of the partyA (participant1) created earlier, will no longer be seen by partyA2.0 (participant1 reboot), because they will have a different id.
Is there any solution to this? If so, can you point me to the documentation.
Thank you