Hi Daml community,
I’m working with Daml Finance and successfully run it on Sandbox and test it with Java code gen. Thanks to this fix.
Now I’m trying to do the same but with Canton. Config, participant, domains etc. I added config flags from the fix and got error:
ERROR c.d.c.CantonCommunityApp$ - GENERIC_CONFIG_ERROR(8,0): Cannot convert configuration to a config of class com.digitalasset.canton.config.CantonCommunityConfig. Failures are:
  at 'canton.domains.mydomain.domain-parameters.protocol-version':
    - (/canton/csd/csd.conf: 49) Unable to convert string dev to a valid CantonVersion. A CantonVersion is similar to a semantic version. For example, '1.2.3' or '1.2.3-SNAPSHOT' are valid CantonVersions.
 err-context:{location=CantonConfig.scala:1355} 
Looks like it is complaining about this particular flag: protocol-version = dev
If I drop this flag, the Canton is running well.  But then I try to load dar with Finance Library inside and get:
Uploading /canton/csd/models-0.0.1.dar to ledger:5011
upload-dar did not succeed: "\"DAR_PARSE_ERROR(8,91bea5c7): Failed to parse the dar file content.\""
Is it possible to upload Finance Library dar on Canton ledger? I know that it is not possible to load on Daml Hub for the daml<2.5.0. But I have to ask to be sure.
Here is my Canton config:
# first, turn on non-standard configuration support
canton.parameters.non-standard-config = yes
canton {
    participants {
        custodian {
            storage.type = memory
            admin-api.port = 5012
            ledger-api.port = 5011
            ledger-api.address = 0.0.0.0
        }
        issuer {
            storage.type = memory
            admin-api.port = 5032
            ledger-api.port = 5031
            ledger-api.address = 0.0.0.0
        }
    }
    domains {
        mydomain {
            storage.type = memory
            public-api.port = 5018
            admin-api.port = 5019
            domain-parameters.will-corrupt-your-system-dev-version-support = yes
        }
    }
  // enable ledger_api commands for our getting started guide
  features.enable-testing-commands = yes
}
canton.participants.custodian.parameters = {
    # enable dev version on the participant (this will allow the participant to connect to a domain with dev protocol version)
    will-corrupt-your-system-dev-version-support = yes
    # enable engine lf version support
    unsafe-enable-daml-lf-dev-version = yes
}
canton.participants.issuer.parameters = {
    # enable dev version on the participant (this will allow the participant to connect to a domain with dev protocol version)
    will-corrupt-your-system-dev-version-support = yes
    # enable engine lf version support
    unsafe-enable-daml-lf-dev-version = yes
}
Everything is running via docker-compose. Here is how I start ledger service and ledger-script that upload dar:
  ledger:
    image: digitalasset/canton-open-source
    profiles: ["ledger"]
    volumes:
      - ./canton:/canton/csd
    command:
      daemon -c /canton/csd/csd.conf --bootstrap /canton/csd/csd.canton --log-profile=container
  ledger-script:
      image: digitalasset/daml-sdk:2.4.0
      profiles: ["ledger"]
      depends_on:
        - ledger
      volumes:
        - ./canton:/canton/csd
        - ./config:/canton/csd/config
      command: "bash -c /canton/csd/onboarding.sh"
This command uploads dar. Working inside onboarding.sh:
daml ledger upload-dar "${DAR}" --host ledger --port 5011
I run it for every participant port.
Thanks!

