cMix Software Overview
The xx network codebase is combined between xx network’s consensus software and Elixxir’s cMix protocol.
Elixxir software is organized into four groups of repositories as shown in the figure: Core, Services, Clients, and Tools. The Core libraries handle functionality across Clients and Services, which contain data structures, interfaces, and cryptography common to many xx network components. Services implement various messenger features, as well as authorizing Clients and Nodes to join the network. Clients interact with the network using a shared Client API (xxDK). Tools provide several interfaces and utilities to deploy, test, and debug the network.
To follow the setup guide, most Node operators will likely elect to download the prepackaged tarballs containing the compiled binaries. To learn more, refer to the Node and Gateway Software section.
xx network Codebase
The xx network Primitives repository contains the basic data structures and utilities used in the Elixxir and Praxxis codebases. This includes the ID structure for Nodes, Gateways, and users and the NDF structure. Additional generic structures and utilities are also contained in Primitives, such as file access and rate-limiting utilities.
The xx network Crypto repository contains cryptographic primitives that are shared between Elixxir and Praxxis codebases. Primarily lower-level primitives, randomness generation, TLS handling, and nonce handling.
The Comms repository handles all network communication functionality as well as all of the core connectivity logic. It includes generic comms handlers and protocols and not specific implementations, which are implemented in the respective Comm branches for each project.
The Elixxir Primitives repository contains the basic data structures and utilities that are used by all Elixxir repositories. This includes the user fact structure, the cMix message structure, and the version object.
The Crypto repository encompasses all of the base cryptographic functionality found in the codebase. Relying heavily on Go’s big integer implementation, Crypto features a cryptographically secure random number generator implementation, libraries for working with large integers in modulo cyclic groups for cMix operations, and basic encrypt/decrypt functionality. Like Primitives, Crypto only contains code that is generic to the larger system. A core approach to this repository is to supply wrappers for operations that may require migration to other implementations in the future.
Comms builds on the generic utilities of xx network Comms to provide specific functionality for Elixxir. It holds a gRPC protocol file along with a thin Client/Server implementation. The repository currently uses TLS certificates with RSA keys for encryption and identification, which will migrate to xx consensus-based quantum secure authenticated channels as development progresses.
The GPUMaths repository accelerates the math used by Server, especially for precomputations. It provides a subset of the math implemented in the Crypto repository but accelerated on GPUs. Underlying the acceleration is a publicly available CUDA arbitrary-precision math library, CGBN2. Components of this written in CUDA are in a separate repository gpumathsnative.
The Server repository implements the core cMix functionality and is the software that a Node runs. It performs precomputation and real-time computation and processes messages. In addition, it receives batches of messages from the Gateways as well as performs network team operations.
The Gateway repository contains the API for Clients to interact with the network. Every Node runs a Gateway and the Gateways collect and store messages for Clients. Gateway is designed to be a scalable front-end to the xx network.
Permissioning, also referred to as Scheduling, manages the NDF for Clients and Servers and schedules cMix rounds within the network. Eventually, this functionality will be managed by the distributed xx consensus. For now, this code handles admission, manages which Nodes are part of the network, and orchestrates when Nodes operate.
Elixxir/Client API (xxDK)
All Clients use the Client API to interact and send messages with the cMix network. In addition, it uses Go mobile to produce a library compatible with iOS and Android.
Elixxir/User Discovery (UD)
User Discovery helps users make the first contact with other users. In addition, it facilitates user search and lookup in a private manner.
git: client-android [not public]
Currently, clients exist for iOS and Android operating systems. These both use the Go mobile libraries produced in the Client API.
The Wrapper Script is a Node and Gateway management script that simplifies the running of the xx network software. The script automates the management of the xx network software log files. For easy management or in the event of an error, it starts, stops, and restarts the software without the operator having to revisit the command line. Optionally, it can automatically update the Node and Gateway with the latest xx network binaries and configuration files. To learn more, refer to the Wrapper Script Arguments section.
DevOps is a deployment platform for Microsoft Azure, Google Cloud Platform, and Amazon Web Services (AWS) written in Terraform. DevOps allows for the deployment of test networks, management of deployments of individual Nodes, and the deployment of multi-cloud implementations of xx network.
The Integration repository is a series of end-to-end tests designed to test different functionality of the cMix protocol. Several tests focus on different batch sizes with Nodes only. Another test covers all the Client-level interactions within the network.
The Local Environment repository contains a set of scripts designed to allow testing the entire platform on a single machine.
Both Gateway and Node binaries have a version string embedded in them, consisting of a major version, a minor version, and a patch string, separated by a period.
To participate in the network, a Node or Gateway has to have a compatible version with the required version reported by the Scheduling server. For a version to be compatible, the major version must be equal to the required major version and the minor version must be greater than or equal to the required minor version. The patch can be anything, but it will always be present.