Skip to content

Create Configurations

Eduardo Riveros Roca edited this page Nov 24, 2020 · 9 revisions

The configuration is created with dtcconfig.To create a valid configuration, you need to know beforehand the network addresses and ports assigned to each node.

  • Execute go get github.com/niclabs/dtcconfig to retrieve the configuration program.
  • Execute go run github.com/niclabs/dtcconfig create -t <threshold> -n <node-data> -H <host-public-ip> -d <db-location> -l <log-path>, where:
    • threshold is the minimum number of nodes that should be able to sign to generate a valid signature
    • node-data is a host:port comma separated list with the public IPs of the nodes and the ports where they are listening to DTC messages
    • host-public-ip is the IP the nodes will see when the host connects to it.
    • db-path is the path where the HSM DB will be stored. it is recommended to use an absolute path on a folder you have permissions to write.
    • log-path is the path where the log will be stored. If it is not set, the default path set is /tmp/dtc.log.

The client config file will be created in the current directory with the name dtc-config.yaml, and the nodes configuration files will be created inside ./nodes/ folder. Each node config file will be inside a folder named node_<i>, with the name dtcnode-config.yaml. This files should be used on dtcnode instances.

It is recommended to move the client config file to /etc/dtc/ folder. Also you can put it on the same folder you execute your PKCS11-enabled application.

For more information about the arguments, you can visit the dtcconfig repository.

If you want some examples about how a file is created for a given network, you can see our network example.

Finally, you can compile the node service if you want to use the system with real nodes.

If you only want to test it, you can use the Automated Tests or the Quick Node deployment mode in dtcnode library.