Home

Awesome

janus

Build Status

Janus is an implementation of the Distributed Aggregation Protocol (DAP) specification. Currently it supports VDAFs with trivial aggregation parameters only, e.g. Prio3. VDAFs with nontrivial aggregation parameters (e.g. Mastic) are not yet supported.

Janus is currently in active development.

<!--toc:start--> <!--toc:end-->

Draft versions and release branches

The main branch is under continuous development and will usually be partway between DAP drafts. Janus uses stable release branches to maintain implementations of different DAP draft versions. Rust crates and container images with versions x.y.z are released from a corresponding release/x.y branch.

Git branchDraft versionConforms to protocol?Status
release/0.1draft-ietf-ppm-dap-01YesUnmaintained as of December 7, 2022
release/0.2draft-ietf-ppm-dap-02YesUnmaintained as of July 13, 2023
release/0.3draft-ietf-ppm-dap-03YesUnmaintained as of February 6, 2023
release/0.4draft-ietf-ppm-dap-04YesUnmaintained as of May 24, 2023
release/0.subscriber-01draft-ietf-ppm-dap-02 plus extensionsNoUnmaintained as of November 1, 2023
release/0.5draft-ietf-ppm-dap-04YesUnmaintained as of June 24, 2024
release/0.6draft-ietf-ppm-dap-07Yes, with errataUnmaintained as of June 24, 2024
release/0.7draft-ietf-ppm-dap-09YesSupported
maindraft-ietf-ppm-dap-13Not yet (under development)Supported

Note that not every DAP draft has been implemented.

draft-ietf-ppm-dap-07 errata

There is a bug in Janus' release/0.6 branch wherein PrepareResp messages are incorrectly encoded, making Janus incompatible with other DAP Aggregator implementations.

See issue #2466 for details.

Versioning and Stability

Janus follows semantic versioning. Because we are at major version 0, we increment the minor version number for breaking changes, and increment the patch version for new features and backwards-compatible bug fixes.

What is considered a breaking change depends on the crate. The following crates are stable on their Rust API:

janus_core is published to crates.io, but has no stability guarantees. It should not be depended on directly. If you find yourself needing to depend on it directly while using any other Janus crates, open a bug report.

The following crates are stable on their external configuration, CLI arguments, and HTTP API. Their Rust API may arbitrarily change and should not be depended on. They are not published to crates.io.

Any other crates not mentioned have no stability guarantees whatsoever.

Building

To build Janus, execute cargo build.

Container image

To build container images, run docker buildx bake --load. This will produce images tagged janus_aggregator, janus_garbage_collector, janus_aggregation_job_creator, janus_aggregation_job_driver, janus_collection_job_driver, janus_cli, janus_db_migrator, janus_interop_client, janus_interop_aggregator, and janus_interop_collector by default.

Pre-built container images are available at us-west2-docker.pkg.dev/divviup-artifacts-public/janus.

Minimum Supported Rust Version (MSRV)

We support the latest stable version of Rust, at time of release, and the two preceding minor versions.

Running tests

Tests require that docker and kind be installed on the machine running the tests and in the PATH of the test-runner's environment. The docker daemon must be running. CI tests currently use kind 0.20.0 and the corresponding Kubernetes 1.26 node image (kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb). Using the same versions for local development is recommended.

To run Janus tests, execute cargo test. To run tests on Docker images, execute cargo xtask test-docker.

Note that podman is not an acceptable substitute for docker. There are subtle incompatibilities between the two that will cause tests to fail.

inotify limits

If you experience issues with tests using Kind on Linux, you may need to adjust inotify sysctls. Both systemd and Kubernetes inside each Kind node make use of inotify. When combined with other services and desktop applications, they may exhaust per-user limits.

Deploying Janus

See the documentation on deploying Janus for details about its configuration and operation.

Cargo features

janus_core has the following features available.

janus_aggregator has the following features available.