Item Discarded

Item is now Closed, hence discarding it.

Hi @carleslabon . The error is on the ledger API side, not the client side where you have increased the limits. Canton by default has a 10Mb limit on both protocol messages and incoming messages on the Ledger API. You are hitting the latter in this case. You can list that limit by adding a sandbox-option:

sandbox-options:
  - -C=canton.participants.sandbox.ledger-api.max-inbound-message-size=20000000

You cannot raise the protocol level limit on the Sandbox as that’s a dynamic domain parameter, but you shouldn’t hit that due to Dar sizes.

Do be careful with such non-standard settings, however. If you set them, you are relying on the fact that your production ledger will also be running with non-standard settings.

1 Like

An additional thought: A 10+ Mb smart contract package is pretty unusual. Could it be that you package your Daml Scripts and Triggers in the same bundle?

If so, I would recommend:

  1. Moving your scripts and triggers into a separate project that depends on the smart contracts
  2. Calling daml start on the smart contract package
  3. Using daml script ... on the triggers/script package to test and initialize your ledger.
1 Like

Is your canton and daml sdk version for DAR compilation align ?

@carleslabon as I said, you can increase it from 4MB to 10MB on the Sandbox, but not beyond. On production deployments you can go beyond 10MB as you can set non-standard dynamic domain parameters there, like maximum message size.

It doesn’t make sense to me that you cannot split out your scripts and triggers from the package. The smart contracts that you need to deploy to the ledger cannot depend on scripts and triggers.

Hi sir, so how you resolve it at the end ?