Is it possible to start Canton Sandbox in static time mode, specified in the `daml.yaml` file?

It’s a bit tricky unfortunately, you are running into two different bugs:

  1. [BUG] Cannot set Canton sandbox wrapper options via sandbox-options in daml.yaml · Issue #13497 · digital-asset/daml · GitHub
    You can work around that by creating a config file with the following contents and then specify -c=canton.conf in your sandbox options.
canton.participants.sandbox.testing-time.type = monotonic-time
canton.parameters.clock.type = sim-clock
  1. [BUG] Cannot override time mode in script-options · Issue #13499 · digital-asset/daml · GitHub
    You can also work around this by removing the init-script line from your daml.yaml and instead specifying the script via --on-start.
daml start --on-start 'daml script --dar=.daml/dist/foobar-0.1.0.dar --ledger-host=localhost --ledger-port=6865 --script-name Init:setup --static-time

Obviously having to work around two separate issues just to change the time mode is not great and hopefully this will be fixed soon. I cannot provide a timeline atm unfortunately.

1 Like