Static Configuration

Canton nodes, at load time, set all the static configurations via a config file. Static configuration is e.g. about setting the connectivity parameters to the persistence store. On the other hand, connecting to a domain or adding parties however is not a static configuration and therefore is not set via the config file.

initialization of Canton nodes.

Canton’s configuration file for static properties is written in HOCON format

A sample configuration file for two participant nodes and a single domain can be seen below.

canton {

  participants {

    participant1 {
      storage {
        type = memory
      }

      admin-api {
        port= 10010
      }

      ledger-api {
        port = 10011
      }
    }

    participant2 {
      storage {
        type = memory
      }

      admin-api {
        port= 10020
      }

      ledger-api {
        port = 10021
      }
    }
  }

  domains {
   mydomain {
      storage {
        type = memory
      }

      server {
        public.port = 6000
        admin.port = 6001
      }
    }
  }

}

Persistence

To provide a database for the participant node, add a storage section to the configuration files.

      storage {
        type = "h2"
        db-name = "db1",
        password {
          username = "participant1"
          password = "pwd"
        }
      }

Warning

Canton’s support for persistence is work in progress. You will lose data when restarting a node regardless of the setting you choose here. Use memory or h2 backends for the moment, as using a persistent database can lead to a corrupted state. We will soon support a range of JDBC-compatible databases.

Administrative API

To set the address and the port at which the administrative API service listens to,

Key Usage Management

At the moment, Canton supports only symbolic cryptography, real cryptography support will be added in a future release.

To configure the key usage management,