Skip to content

Nodes Configuration

adderou edited this page Jan 15, 2020 · 5 revisions

The configuration file used by the nodes is named config.yaml and it can be in the current working directory or in /etc/dtcnode/ folder. the structure is the following

config:
  publickey: ...
  privatekey: ...
  host: 0.0.0.0
  port: 8871
  client:
    publickey: ...
    host: 172.17.0.1
    rsa:
      keys:
      - id: 31c19a8d-f254-4cee-8b1c-4b65ec9ccef4
        keyshare: ...
        keymetainfo: ...
      - id: 1a32952b-f47c-4667-ab71-6e7631b519be
        keyshare: ...
        keymetainfo: ...
    ecdsa:
      keys:
      - id: 68d2762d-a8de-486e-9473-bb039aa006e6
        keyshare: ...
        keymetainfo: ...
      - id: fa3a0d84-e392-4226-8a81-7b951c9dde7d
        keyshare: ...
        keymetainfo: ...

The complete config tree is below a general key. Here the config file defines the

It has a mandatory section, called general, where we currently define three variables:

  • publicKey represents a Base85 public key used by ZMQ CURVE Auth mode. The nodes should communicate in this mode to send and receive encripted messages.
  • privateKey represents a Base85 private key used by ZMQ CURVE Auth mode. The nodes should communicate in this mode to send and receive encripted messages.
  • host represents the local IP where the ZMQ node will bind.
  • port represents the local TCP port where the ZMQ server will bind.
  • client contains the information related to the computer that is allowed to use the library, and it has the following sections:
    • publicKey represents a Base85 public key used by ZMQ CURVE Auth mode. The nodes should communicate in this mode to send and receive encripted messages.
    • host is the IP or resolvable hostname that is allowed to connect to the node. It is strongly recommended to use an IP instead of a hostname.
    • ecdsa and rsa save the keys generated in each case for the node. Both keys have the same dictionary as value:
      • keys is a list that stores the keyshares used for document signing, and each element inside it has the following fields:
        • id is the UUID for the key share, used for retrieving an specific key share.
        • keyshare is a serialized tcrsa or tcecdsa object of type KeyShare.
        • keymetainfo is a serialized tcrsa or tcecdsa object of type KeyMetaInfo.

If you need to generate a public/private Base85 key pair for ZMQ Curve Authentication, we recommend to use the gencurve utility in dtcconfig repository.