What became of sandbox option --contract-id-seeding=testing-weak in 2.x.x?
- meschOP
Under Daml SDK 1.x.x, I used this clause in the
daml.yamlfile to makedaml startwork without failing on waiting to gather entropy:sandbox-options: - --contract-id-seeding=testing-weakAfter upgrading to 2.1.0, I see the following error message in
daml start:... Created .daml/dist/arbo-ledger-0.0.1.dar Error: Unknown option --contract-id-seeding=testing-weak Canton v2.1.0 Usage: canton [daemon|run|generate] [options] <args>... ...The subsequent help text offers some alternatives, and
-Cseems appealing:-C, --config key-value's <key1>=<value1>,<key2>=<value2> Set configuration key value pairs directly.so I tried:
sandbox-options: - -C contract-id-seeding=testing-weakyet this yields:
Error: Unknown option -C contract-id-seeding=testing-weak Canton v2.1.0 Usage: canton [daemon|run|generate] [options] <args>...and offers the same help text regarding
-C. So I’m left clueless.Can anyone point me in the right direction?
Cheers,
mesch. - mesch 1
Also, searching the Daml documentation for
testing-weakyields no result whatsoever:https://docs.daml.com/search.html?query="testing-weak"
Yet, the log messages from
daml startactually recommend “using” this option:INFO:root:Ledger: b'\x1b[31mWARN c.d.p.a.SeedService$ - Trying to gather entropy from the underlying operating system to initialized the contract ID seeding, but the entropy pool seems empty.\n' INFO:root:Ledger: b'\x1b[0;39m\x1b[31mWARN c.d.p.a.SeedService$ - In CI environments environment consider using the "testing-weak" mode, that may produce insecure contract IDs but does not block on startup.\n' - Ben_M
I just checked on my Daml SDK 2.0 Canton Server, and I get no reference to
-C contract-id-seeding=testing-weakDaml sandbox --help
$ daml sandbox --help Usage: daml sandbox [--port ARG] [--admin-api-port ARG] [--domain-public-port ARG] [--domain-admin-port ARG] [--canton-port-file PATH] [--static-time | --wall-clock-time] [--canton-help] [-c|--config FILE] [--port-file PATH] [--dar PATH] [ARG] Available options: --canton-port-file PATH File to write canton participant ports when ready --canton-help Display the help of the underlying Canton JAR instead of the Sandbox wrapper. This is only required for advanced options. -c,--config FILE Set configuration file(s). If several configuration files assign values to the same key, the last value is taken. --port-file PATH File to write ledger API port when ready --dar PATH DAR file to upload to sandbox --shutdown-stdin-close Shut down when stdin is closed, disabled by default -h,--help Show this help textDaml start --help
$ daml start --help Usage: daml start [--sandbox-port PORT_NUM] [--open-browser ARG] [--start-navigator ARG] [--navigator-port PORT_NUM] [--json-api-port ARG] [--on-start COMMAND] [--wait-for-signal ARG] [--sandbox-option SANDBOX_OPTION] [--navigator-option NAVIGATOR_OPTION] [--json-api-option JSON_API_OPTION] [--script-option SCRIPT_OPTION] [--sandbox-admin-api-port PORT_NUM] [--sandbox-domain-public-port PORT_NUM] [--sandbox-domain-admin-port PORT_NUM] Available options: --sandbox-port PORT_NUM Port number for the sandbox --open-browser ARG Open the browser after navigator Can be set to "yes", "no" or "auto" to select the default (True) --start-navigator ARG Start navigator as part of daml start. Can be set to true or false. Defaults to true. --navigator-port PORT_NUM Port number for navigator (default is 7500). --json-api-port ARG Port that the HTTP JSON API should listen on or 'none' to disable it --on-start COMMAND Command to run once sandbox and navigator are running. --wait-for-signal ARG Wait for Ctrl+C or interrupt after starting servers. Can be set to "yes", "no" or "auto" to select the default (True) --sandbox-option SANDBOX_OPTION Pass option to sandbox --navigator-option NAVIGATOR_OPTION Pass option to navigator --json-api-option JSON_API_OPTION Pass option to HTTP JSON API --script-option SCRIPT_OPTION Pass option to Daml script interpreter --shutdown-stdin-close Shut down when stdin is closed, disabled by default --sandbox-admin-api-port PORT_NUM Port number for the canton admin API (--sandbox-canton only) --sandbox-domain-public-port PORT_NUM Port number for the canton domain public API (--sandbox-canton only) --sandbox-domain-admin-port PORT_NUM Port number for the canton domain admin API (--sandbox-canton only) -h,--help Show this help textI think unless you removed the specific
sandbox-options: - --contract-id-seeding=testing-weakfrom yourdaml.yamlin the App, once you upgraded to the newer SDK, it will still reference that configuration.Perhaps one of the Daml SDK team can confirm or deny this?
- mesch
I get no reference to -C contract-id-seeding=testing-weak
Neither do I. To clarify:
-
daml startfails if I do include--contract-id-seeding=testing-weakinsandbox-optionsindaml.yaml, because the option doesn’t exist. (This used to work in pre-2.0.0.) -
daml startfails if I don’t include that option, because it cannot gather enough entropy. TheWARNINGmessages in the log contain the hintconsider using the "testing-weak" mode, but no indication how to enable testing-weak mode. -
The usage page also shown in 1 listed the flag
-Cto set config options, so I tried that, but it only resulted in the same usage page shown again.
-
- Ben_M
Referring to Low Entropy Error Stops Daml Start - #4 by stefanobaghino-da, the correct format for the command is/was as you had:
- --contract-id-seeding=testing-weakAs for the underlying Entropy issue, what O/S version are you using?
- cocreature 1
You can set it via a Canton config file. Create
canton.configwith the following contents:canton.participants.sandbox.parameters.contract-id-seeding = testing-weakYou can then run
daml sandbox -c canton.configto pick up the config. - stefanobaghino-da
cocreature:You can set it via a Canton config file. Create
canton.configwith the following contents:canton.participants.sandbox.parameters.contract-id-seeding = testing-weakYou can then run
daml sandbox -c canton.configto pick up the config.@cocreature Looking at the original solution
mesch:sandbox-options: - -C contract-id-seeding=testing-weakThis means that
sandbox-options: - -C canton.participants.sandbox.parameters.contract-id-seeding=testing-weakShould work as well, right?
- cocreature 1
You need an equal sign in between or split it into two arguments so
sandbox-options: - -C=canton.participants.sandbox.parameters.contract-id-seeding=testing-weakshould do the trick
- mesch
Thanks a lot for the answers. I flagged the solution I confirmed to work above.
Btw. the syntax of a short option with a value separated by
=rather than space is very unusual (in addition to being undocumented, as far as I can see):-C=canton.participants.sandbox.parameters.contract-id-seeding=testing-weakFWIW would never have tried that.
Thanks a lot for all the responses!
Cheers,
mesch. - cocreature 2
The equal sign isn’t mandatory but it’s relatively common across tools to support this. The alternative is that you pass it as two separate arguments
sandbox-options: - -C - canton.participants.sandbox.parameters.contract-id-seeding=testing-weakIn your shell you can do that by adding a space and your shell will split it into two arguments before invoking the command but if you put that in your daml.yaml it will be interpreted as a single argument containing a space which is not going to work.