Uploaded a dar compiled with a 1.dev target

When running the sandbox of a project compiled with daml 2.1.1 but with a 1.dev target I am getting the following error:

Uploading /Users/jean/Documents/hypertrading/htl/smartsuite/openflows/damlflows/.daml/dist/damlflows-1.0.0.dar to localhost:6865
upload-dar did not succeed: ““ALLOWED_LANGUAGE_VERSIONS(8,-7d04e7a): Disallowed language version in package 9041cc4fc4492e4b23f486e4fa08312a47af80e864cea7ab624c785c456f06ca: Expected version between 1.14 and 1.14 but got 1.dev””

What needs to be done ?

You can enable support for Daml-LF 1.dev using a Canton config file which enables this for the default sandbox participant:

canton.participants.sandbox.parameters.unsafe-enable-daml-lf-dev-version = true

Note that this really is unsafe for production ledgers, you’ll permanently get your ledger in a state where it might not be able to migrate to the next version. For playing around in Sandbox, this is perfectly fine though.

Once you created that config file specify it via daml sandbox -c canton.conf or if you want daml start to pick it up add the corresponding line to your daml.yaml:

sandbox-options: ["-c", "canton.conf"]
1 Like

FWIW. The instructions above didn’t quite work for me with Canton 2.4. The instructions on Frequently Asked Questions — Daml SDK 2.4.0 documentation did, however, work once I figured out that:

  • Participants name used by Daml Assistant is “sandbox”
  • Domain name used by Daml Assistant is “local”

The full config file that I ended up using looks like this:

# first, turn on non-standard configuration support
canton.parameters.non-standard-config = yes

canton.domains.local.init.domain-parameters {
    # then, enable the version support on the nodes
    will-corrupt-your-system-dev-version-support = yes
    # set the domain protocol version to `dev`
    protocol-version = dev
}

canton.participants.sandbox.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
}
1 Like