Daml 2.0 - How to change the sandbox ledger id?
App Development5 posts287 views1 likesLast activity Mar 2022
JA
jaypeedaOP
Mar 2022Hi team,
How do you change the ledger id in Daml 2.0 ?
Cheers,
Jean-Paul
RA
Ratko_Veprek
Mar 2022The ledger-id of a participant node is hard coded to participant.uid.id:
github.comdigital-asset/canton/blob/09cd027ebcd861ddb537e6cd6d102178b5b765df/community/participant/src/main/scala/com/digitalasset/canton/participant/ParticipantNode.scala#L488
- syncDomainPersistentStateFactory.initializePersistentStates(domainAliasManager)
- )
-
- multiDomainCausalityStore <- EitherT.liftF(
- MultiDomainCausalityStore(storage, indexedStringStore, timeouts, loggerFactory)
- )
-
- ledgerId = participantId.uid.id.unwrap
-
- resourceManagementService = resourceManagementServiceFactory(persistentState.settingsStore)
-
- // Sync Service
- sync = cantonSyncServiceFactory.create(
- participantId,
- domainRegistry,
- domainConnectionConfigStore,
- domainAliasManager,
- persistentState,
- ephemeralState,
- syncDomainPersistentStateManager,
- syncDomainPersistentStateFactory,
So by default, this is set to the “config name” of the participant.
JA
jaypeeda
Mar 2022So you cannot change that in daml.yaml or is there a way to change the participant.uid.id ?
RA
Ratko_Veprek
Mar 2022You can not change it after a Canton participant node has been initialised. However, when you write a new Canton configuration file, you can name the participant accordingly such that it matches your expected ledger id.
JA
jaypeeda
Mar 2022Understood, thanks !