Skip to content
Discussions/App Development/Daml 2.0 - How to change the sandbox ledger id?Forum ↗

Daml 2.0 - How to change the sandbox ledger id?

App Development5 posts287 views1 likesLast activity Mar 2022
JA
jaypeedaOP
Mar 2022

Hi team,

How do you change the ledger id in Daml 2.0 ?

Cheers,

Jean-Paul

RA
Ratko_Veprek
Mar 2022

The ledger-id of a participant node is hard coded to participant.uid.id:

github.com

digital-asset/canton/blob/09cd027ebcd861ddb537e6cd6d102178b5b765df/community/participant/src/main/scala/com/digitalasset/canton/participant/ParticipantNode.scala#L488

      
        
  1. syncDomainPersistentStateFactory.initializePersistentStates(domainAliasManager)
  2. )
  3. multiDomainCausalityStore <- EitherT.liftF(
  4. MultiDomainCausalityStore(storage, indexedStringStore, timeouts, loggerFactory)
  5. )
  6. ledgerId = participantId.uid.id.unwrap
  7. resourceManagementService = resourceManagementServiceFactory(persistentState.settingsStore)
  8. // Sync Service
  9. sync = cantonSyncServiceFactory.create(
  10. participantId,
  11. domainRegistry,
  12. domainConnectionConfigStore,
  13. domainAliasManager,
  14. persistentState,
  15. ephemeralState,
  16. syncDomainPersistentStateManager,
  17. syncDomainPersistentStateFactory,

So by default, this is set to the “config name” of the participant.

JA
jaypeeda
Mar 2022

So you cannot change that in daml.yaml or is there a way to change the participant.uid.id ?

RA
Ratko_Veprek
Mar 2022

You 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 2022

Understood, thanks !

← Back to Discussions