3.3.4 Transport Level

Connection handling is based on 0MQ, which provides a variety of connection patterns and support for transport layer protocols. The basic pattern is asynchronous client-server communication, represented by a server-side 0MQ ROUTER, which listens to the provided endpoint and with multiple connected 0Mq DEALER sockets as connected clients. The following rules apply to this pattern:

  • Clients connect to the server and send requests.

  • For each request, the server sends 0 or more responses.

  • Clients can send multiple requests without waiting for a response.

  • Servers can send multiple responses without waiting for new requests.

After the connection is established, the exchange of messages begins (peering). The following states are allowed:

  • The nodes are not connected.

  • Connected – a prerequisite for peering.

  • Peering – nodes exchange messages.

0MQ includes a TLS-like certificate exchange mechanism and protocol encryption capability that is transparent to the socket’s implementation. Support for socket-level encryption in Sawtooth is conducted through a key server; the keys are read from the validator. toml configuration file. Certificates are generated for each client upon connection. If the server key pair is not configured, network connections between validators will not be authenticated or encrypted.

In the case of DGT, node joining, and validation is additionally governed by the topology that is managed in a separate transaction family.

Last updated