Skip to main content

Configure the TSS Node

Currently, you can configure the TSS Node in two methods:
  • Through the configuration file.
  • Through command line arguments, for example, ./tss-node.sh start --ws-url=ws://ws.example.com/ws.
It’s recommended that you use the configuration file to configure the TSS Node. To do so, please follow these steps:
  1. Navigate to the configs directory.
  2. Copy and paste the file cobo-tss-node-config.yaml.template.
  3. Rename the copied file to cobo-tss-node-config.yaml. The directory structure will appear as follows:
    cobo-tss-node-generic
    
    ├── configs
    
    │ ├── cobo-tss-node-config.yaml
    
    │ └── cobo-tss-node-config.yaml.template (default configuration file template)
    
    └── tss-node.sh (startup script)
    
  4. Edit the cobo-tss-node-config.yaml file:
    1. Open the configuration file in a text editor.
    2. Review all configuration items in the file. Most items have reasonable default values, so you only need to modify specific items based on your actual needs. You can refer to Configuration items to understand the meaning of key configuration items.
    3. Modify necessary items according to your environment. For example:
      • Set env to production for production environment
      • Configure the callback section to set up the TSS Node Callback server
      • Adjust log configurations as needed
    4. Save changes and close the file.

Configuration items

Configuration ItemDescription
envThe operating environment. Can be either development or production. For details, see Environments.
db.pathThe path to the database file. You should NEVER modify this file.
callbackConfigurations for the TSS Node callback servers. For details, see Configure TSS Node settings
log.std.enableWhether to output terminal log.
log.std.levelLog level to output to the terminal. Can be one of: error, warn, info, or debug.
log.file.enableWhether to save the log file.
log.file.levelLog level to export to the log file.
log.file.filenamePath to the log file.
log.file.maxsizeMaximum size of the log file.
log.file.max_backupsNumber of backups for each log file.
metrics.jobGlobal tag for all metrics. Default value is “tss-node”.
metrics.instanceGlobal tag to identify the instance number. Default value is 0.
metrics.name_prefixPrefix added to all metric names.
metrics.influxdb.server_addrThe address of your InfluxDB server (e.g., http://example.com:8086).
metrics.influxdb.databaseThe name of your InfluxDB database.
metrics.influxdb.usernameUsername for InfluxDB authentication.
metrics.influxdb.passwordPassword for InfluxDB authentication.

TSS Node commands

init

sudo ./tss-node.sh init
You can initialize the TSS Node and create a database file. The execution will fail if the database file already exists. For more information, please refer to Initialize the TSS Node.

info

sudo ./tss-node.sh info
You can review the information associated with the TSS Node, including the TSS Node ID and the TSS Node’s callback public key used to communicate with the TSS Node callback server. The output example is as follows.
$ sudo ./tss-node.sh info

Container started: 5c3819f6bf9425312ad5fe9561a9d8a4ae7145e05f73b3998a3a8112d7056653

Wait a few seconds ..

INFO[2022-12-14T09:12:11Z] Node ID: coboXNCDGc4eWaWYTbbgH3Q5jmNNRpZzVatRXyanYeC2XjkJb

INFO[2022-12-14T09:12:11Z] Callback public key:

-----BEGIN PUBLIC KEY-----

MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz13MMDtCMdmBci/f7boS

……

gQIDAQAB

-----END PUBLIC KEY-----

5c3819f6bf9425312ad5fe9561a9d8a4ae7145e05f73b3998a3a8112d7056653

info group

sudo ./tss-node.sh info group [group_id]
You can use the info group command to query the information of the corresponding key share holder group.:
ItemValueDescription
Group IDvnJShriEOIzBLaOUxUDsUnique identifier of a key share holder group.
Created Time2023-01-11 14:36:42.179778596 +0000 UTCCreation time of the key share holder group.
Root Extended Public Keyxpub661MyMwAq……Mcet8The root extended public key that corresponds to the key shares under the current group.
ChainCode0x098a……9dd9The chain code corresponding to the root extended public key, in hexadecimal format.
Share ID121637……483926The ID of the key share, in decimal format.
Share Public Key0x0231adf……d2773The public key that corresponds to the key share. Default value: compressed public key in hexadecimal format.
Type1Type: 1 represents ECDSA, and 2 represents EdDSA.
Curvesecp256k1Supported signature algorithm.
Threshold2The minimum number of key shares required for each transaction signing.
Local Node IDcoboA1B2C3D4The Node ID of the locally stored TSS Node.
Other Node IDs[coboA1B2C3D4, coboA2B3C4D5]The Node ID of the TSS Node managed by other parties.
Participants:3The total number of key shares, Node IDs, and key share IDs.

start

sudo ./tss-node.sh start
The cobo-tss-node will start running.

version

sudo ./tss-node.sh version
You can use the version command to query the version of the TSS Node.

status

sudo ./tss-node.sh status
You can use the status command to query the status of the TSS Node. An example output is as follows:
$ sudo ./tss-node.sh status

Checking docker engine ... OK, version: 19.03.6

Checking container image ... OK, id: sha256:4ff66478be3f193293fbaf85ce764734dab14eff002699636d1329a16f1ce57b

=================================================================

Recent logs from TSS-node daemon container cefc3335c10b (Running)

-----------------------------------------------------------------

INFO[2022-12-14T09:00:37Z] Failed to register service: invalid TSS Node, please initial TSS Node on Cobo MPC Server first

INFO[2022-12-14T09:00:52Z] Start to register service

INFO[2022-12-14T09:00:52Z] Failed to register service: invalid TSS Node,please initial TSS Node on Cobo MPC Server first

INFO[2022-12-14T09:01:07Z] Start to register service

INFO[2022-12-14T09:01:07Z] Failed to register service: invalid TSS Node, please initial TSS Node on Cobo MPC Server first
Execution workflow:
  • Verify the successful installation of Docker Engine and ensure the client has the necessary permissions.
  • Check the status of the SGX driver (applicable to an SGX-ready version).
  • Confirm the existence of the built container image.
  • Inspect containers for any errors.
  • Monitor the currently running TSS Node container and display the latest five logs.

log

sudo ./tss-node.sh log
Use this command to view the logs of the currently running TSS Node container.

stop

sudo ./tss-node.sh stop
Use this command to stop the currently running TSS Node container.
Feel free to share your feedback to improve our documentation!