# Daml Finance Dar on Canton

**URL:** <https://forum.canton.network/t/daml-finance-dar-on-canton/5796>\
**Category:** App Development\
**Tags:** features and bugs, daml-finance, damlhub, canton\
**Created:** [December 10, 2022, 4:13pm UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796 "2022-12-10T16:13:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VictorShneer](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/victorshneer/32/5413_2.png) [@VictorShneer](https://forum.canton.network/u/VictorShneer)\
**Post date:** [December 10, 2022, 4:13pm UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796/1 "2022-12-10T16:13:01Z")

</div>

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](https://discuss.daml.com/t/sandbox-upload-dar-error-disallowed-language-version-in-package/5618).

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:

```haskell
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:

```haskell
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](https://discuss.daml.com/t/daml-hub-does-not-see-templates/5750) to load on Daml Hub for the daml\<2.5.0. But I have to ask to be sure.

Here is my Canton config:

```haskell
# 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:

```haskell
  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!

---

<div class="post-metadata">

**Author:** ![Mate\_Varga](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/mate_varga/32/2308_2.png) [@Mate\_Varga](https://forum.canton.network/u/Mate_Varga)\
**Post date:** [December 11, 2022, 7:03am UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796/2 "2022-12-11T07:03:15Z")

</div>

Hi @VictorShneer,

While I do not yet see why the suggested **`dev`** does not work here, I do now that the exact version you are looking for is **`4.0.0`** , and that value will be accepted. A maybe related note is the daml-finance-app uses `sdk-version: 2.5.0-snapshot.20221010.10736.0.2f453a14`, but you are pulling the canton version 2.4.x and daml-sdk version 2.4.0. Also daml-sdk is an image I recommend you do not use, especially not for any production purpose.

Kind Regards,  
Mate

---

<div class="post-metadata">

**Author:** ![VictorShneer](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/victorshneer/32/5413_2.png) [@VictorShneer](https://forum.canton.network/u/VictorShneer)\
**Post date:** [December 11, 2022, 10:12am UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796/3 "2022-12-11T10:12:11Z")

</div>

@Mate_Varga Thanks for reply! I made it this way, in docker-compose:  
`image: digitalasset/canton-open-source:dev`  
and after it pull the image `DAR upload succeded` 🤩

First I tried  
`domain-parameters.protocol-version = 4.0.0`  
under canton config, but he said that only 2.0.0 and 3.0.0 are supported 🫤

Now I have  
`Command allocateParty failed: INTERNAL: An error occurred. Please contact the operator and inquire about the request <no-correlation-id>`

But this is another story. Thanks for help!

P.S  
Yep, I don’t run it in production.

---

<div class="post-metadata">

**Author:** ![Mate\_Varga](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/mate_varga/32/2308_2.png) [@Mate\_Varga](https://forum.canton.network/u/Mate_Varga)\
**Post date:** [December 11, 2022, 10:49am UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796/4 "2022-12-11T10:49:19Z")

</div>

Glad that you made it work!

> [@VictorShneer](#):
>
> First I tried  
> `domain-parameters.protocol-version = 4.0.0`  
> under canton config, but he said that only 2.0.0 and 3.0.0 are supported

This suggests you were trying to run the config with \<2.4.0

For the error you received, I’d first look at the participant node’s logs, you can add `--log-file-name /canton/csd/canton.log` argument to the canton command to evacuate the full logs from the container, which will be more informative if you also add `--debug`.

---

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [December 12, 2022, 10:54am UTC](https://forum.canton.network/t/daml-finance-dar-on-canton/5796/5 "2022-12-12T10:54:41Z")

</div>

Thanks for giving this a try. It made me realize we don’t document how to do this. I’ve opened [Document how to deploy Daml Finance to Canton · Issue #479 · digital-asset/daml-finance · GitHub](https://github.com/digital-asset/daml-finance/issues/479) to track.
