Unable to create contract with the package uploaded by Ledger API

Hi there,

Today I used Ledger API to upload a package to Canton participant. The participant did not allow me to create contracts using the uploaded template.

The participant node is permissioned and I’m not using IAM on participant node. Interestingly I can still create smart contracts using old packages I uploaded via canton console weeks ago.

The error I got is

23:18:54.813 [da-ui-backend-akka.actor.default-dispatcher-10] INFO  c.d.n.s.platform.PlatformSubscriber - Command 'c8a2399e7dc3f23' completed with status 'CommandStatusError(FAILED_PRECONDITION,NO_DOMAIN_FOR_SUBMISSION(9,e0c7f9c1): No valid domain for submission found.)'. akkaAddress=akka://da-ui-backend, sourceThread=da-ui-backend-akka.actor.default-dispatcher-8, akkaTimestamp=13:18:54.813UTC, akkaSource=akka://da-ui-backend/user/$a/party-Alice%3A%3A122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93, sourceActorSystem=da-ui-backend

The participant node log shows

2023-06-05 21:58:56,163 [canton-env-execution-context-21] INFO  c.d.c.p.s.CantonSyncService:participant=participant1 tid:b582179bbb5d3acd94557b56aa8b00df - NO_DOMAIN_FOR_SUBMISSION(9,b582179b): No valid domain for submission found. err-context:{applicationId=Navigator-197262a5-f81c-48a8-b4a2-b97dc4a2dc9e#54f168b5dcf70c91, commandId=54d40e15355386b0, domainsNotUsed=Map(domainManager1::1220a22a9347... -> Some packages are not known to all informees on domain domainManager1::1220a22a9347....
Participant PAR::participant1::122013276fc5... has not vetted "default" (5568e5111e97...)), location=DomainSelector.scala:206} 

Did I miss any steps in between? What is the differences between uploading package using Canton console and Ledger API?

Uploading via the Ledger API doesn’t automatically wait for the uploaded packages to be uploaded and vetted on all participants. The behavior is similar to (dars.upload with synchronizeVetting set to false – whereas the default is true using the Canton Console). If you retry the submission at a later time, you should be able to create those contracts.

Thanks @stefanobaghino-da , It has been a day and I still cannot use the template. How long does the process take? Also is there a way to configure it? How can I check the status?

A day should be way more than enough to have a package spread to all participants and being vetted. I’m not 100% sure of why that’s the case. If you have any way to reproduce the issue, it would be good to open a ticket.

To solve your problem, you can use vetted_packages.list to have a look at the currently vetted packages and vetted_packages.authorize to authorize packages that are not currently vetted from the Canton Console. Other commands in the “Packages” and “DAR Administration” sections in the same documentation page might help.

I think I found the reason. When the ledger was started, the domain manager container didn’t start. The system was running without domain manager. It allowed contracts to be created using the old templates, but not new templates.

1 Like