What's the right way to launch navigator?

When connecting Navigator to a running ledger, what’s the difference between running

daml navigator server <host> <port> (documented here)

vs

daml ledger navigator --host <host> --port <port> (documented here)

When should I use each?

4 Likes

daml navigator just calls the underlying Navigator JAR and will pick up a ui-backend.conf file to determine the list of available parties or read daml.yaml and the parties specified there.

daml ledger navigator is a wrapper that first queries the party management API to get the list of known parties. It then creates a temporary ui-backend.conf file and starts Navigator with that config. So Navigator will show you exactly the parties that have been allocated. This is particularly useful on ledgers without implicit party allocation and on ledgers where you cannot choose your party id freely.

So if you allocate your parties properly (a DAML Script specified in init-script in your daml.yaml is sufficient for daml start to do that), then daml ledger navigator is the better option since you don’t have to update some config file if new parties have been added. If you rely on implicit party allocation then daml navigator is currently the better option.

Note that daml ledger navigator will not refresh parties if you allocate them later so you have to restart it. I would argue that long-term Navigator should become aware of the party management API itself both so that daml ledger navigator is no longer special and so that it can refresh them dynamically.

5 Likes