What became of `daml-on-sql.jar` in 2.x.x?

To run Daml apps built with the SDK 1.x.x with database backing, there used to be a ledger implementation daml-on-sql.jar (cf. e.g., Release 1.18.0 · digital-asset/daml · GitHub)

This doesn’t exist in the 2.x.x releases anymore (cf. e.g. Release 2.1.0 · digital-asset/daml · GitHub).

What would I use instead to run a Daml 2.x app in a ledger with database backing?

In Daml 2, you always use Canton; for database storage, configure Canton with postgres persistence. Here’s an example setup from the Canton installation guide.

2 Likes

OK, I setup a canton ledger.

A few more questions about how to use canton:

  1. I only have a single participant node for now. Do I still need to configure a domain?

  2. Both participant and domain allow me to specify storage. In order to do the equivalent in canton of what daml-on-sql did in 1.x, where would I configure the postgres storage: participant, domain, or both?

Thanks a lot!
mesch.

  1. yes, you always need a domain.
  2. both, the in-memory storage is really only for testing

Excellent, thanks.

As for answer 2), do participant and domain need to connect to separate databases in postgres (i.e. storage.config.properties.databaseName), or can they share the same database?

Thanks again!
mesch.

You need separate databases, I recommend to take a look at the docs for an example of setting it up.

I’m looking at the example configuration linked from the docs mentioned, specifically 03-advanced-configuration/ that illustrates using storage.

I notice the bootstrap files in some examples contain explicit instructions to start nodes, e.g. examples/01-simple-topology/simple-ping.canton contains

nodes.local start

However, the bootstrap files for the participant nodes in examples/03-advanced-configuration/participant-init.canton does not contain a start instruction.

What’s the purpose of the nodes.local start instruction in the bootstrap file?

I don’t know the answer to your latest question, but do recommend starting separate threads for each question. This will increase the visibility of each question to those who might be able to answer, allow you to choose and tag the best solution for each one, and make it easier for other community members to find your questions and their answers in the future.

Excellent point; posted my last question here:

Thanks!
mesch.

1 Like