Skip to content
Discussions/App Development/Item DiscardedForum ↗

Item Discarded

App Development6 posts321 views2 likesLast activity Apr 2023
CA
carleslabonOP
Mar 2023

Item is now Closed, hence discarding it.

BE
bernhard
Mar 2023

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.

BE
bernhard
Mar 2023

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.
RA
raphson93
Apr 2023

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

BE
bernhard
Apr 2023

@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.

RA
raphson93
Apr 2023

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

← Back to Discussions