Skip to content

feat: Mix Cover Traffic specification#311

Merged
chaitanyaprem merged 1 commit into
masterfrom
feat/mix-cover-traffic
May 11, 2026
Merged

feat: Mix Cover Traffic specification#311
chaitanyaprem merged 1 commit into
masterfrom
feat/mix-cover-traffic

Conversation

@chaitanyaprem
Copy link
Copy Markdown
Contributor

@chaitanyaprem chaitanyaprem commented Apr 8, 2026

Summary

This PR introduces the Mix Cover Traffic specification — a concrete instantiation of the pluggable cover traffic component defined in Mix Protocol §6.4. The spec defines how mix nodes generate and emit cover packets to achieve sender unobservability.

Key design decisions

  • Self-balancing R-slot pool: Cover, locally originated messages, and forwarded packets share a single per-epoch budget R from the DoS protection mechanism. Forwarding naturally consumes ~L/(1+L) of the budget; the remainder is used for cover. No explicit origination rate constraint is needed.
  • Self-exit loop paths: Cover packets use loop paths where the originator is the exit node. A dedicated codec string /mix/cover-traffic/1.0.0 identifies returning cover packets during exit processing, handled locally.
  • Two strategies: Constant-Rate (RECOMMENDED default) and Poisson-Rate (for Loopix/Nym alignment). The spec includes detailed analysis of why Loopix formal guarantees don't transfer unchanged to this architecture (shared budget violates independence, epoch boundaries break memorylessness).
  • Pre-computation as optional optimization: Cover packets MAY be pre-built during epoch N-1 for epoch N, with batched pre-computation as an implementation recommendation.
  • Per-hop proof assumption (§4): The budget model assumes per-hop generated proofs. Sender-generated proofs require a different budget model, deferred to future work.
  • Pre-scheduled emission timing (§11.3): A future enhancement where all traffic types share a fixed timing grid, eliminating periodic pattern concerns. Only compatible with Constant-Rate. Inspired by blend protocol.

Changes to existing specs

  • mix.md §8.6.4: Added step 4 "Internal Protocol Codec Check" between extracting the codec and Exit Layer handoff. This is a generic hook for pluggable components that use internal protocol codecs.
  • mix-dos-protection.md §8.2.3: Added OnEpochChange(callback) procedure for epoch boundary notifications to pluggable components.

@chaitanyaprem chaitanyaprem changed the base branch from master to chore/mix-dos-protection April 8, 2026 07:37
@chaitanyaprem chaitanyaprem changed the title add Mix Cover Traffic specification feat: add Mix Cover Traffic specification Apr 8, 2026
@chaitanyaprem chaitanyaprem changed the title feat: add Mix Cover Traffic specification feat: Mix Cover Traffic specification Apr 8, 2026
Copy link
Copy Markdown
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!
Below I made some comments suggesting we underspecify the idea of proof precomputation, mostly to sidestep the complexity that introduces for RLN-based protection mechanisms (not only can a software bug lead to you slashing and deanonymising yourself, but because of root changes you might precompute invalid proofs). However, after reading through everything I agree that we probably want to keep proof precomputation as recommended default. Perhaps we can just RECOMMEND that all proofs be validated (again) before using them?

Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
@chaitanyaprem chaitanyaprem force-pushed the feat/mix-cover-traffic branch 2 times, most recently from b45f312 to 81e6e87 Compare April 16, 2026 06:30
Copy link
Copy Markdown
Contributor

@AkshayaMani AkshayaMani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great spec! Left a few comments with questions and suggestions.

Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md
Comment thread docs/ift-ts/raw/mix-cover-traffic.md
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
@chaitanyaprem
Copy link
Copy Markdown
Contributor Author

@AkshayaMani also added an overview section in the spec now.

Base automatically changed from chore/mix-dos-protection to master April 30, 2026 10:00
Copy link
Copy Markdown
Contributor

@Cofson Cofson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuinely solid spec, the self-balancing pool model is well argued and the iteration with AkshayaMani has tightened a lot. Three small things worth firming up before draft:

Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
Comment thread docs/ift-ts/raw/mix-cover-traffic.md Outdated
@chaitanyaprem chaitanyaprem force-pushed the feat/mix-cover-traffic branch from d188532 to 941b623 Compare May 8, 2026 08:44
Concrete instantiation of the pluggable cover traffic component
defined in Mix Protocol §6.4. Covers Constant-Rate strategy with
self-balancing slot pool, self-exit loop paths, optional
pre-computation, and `cover_rate_fraction` for forwarding headroom.
Adds the §8.6.4 internal-codec check in mix.md and the §8.2.3
OnEpochChange notification in mix-dos-protection.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chaitanyaprem chaitanyaprem force-pushed the feat/mix-cover-traffic branch from 941b623 to 66a96e8 Compare May 8, 2026 08:59
@chaitanyaprem
Copy link
Copy Markdown
Contributor Author

I am merging this spec for now, any enhancements can be done as separate PR to update it.

@chaitanyaprem chaitanyaprem merged commit 2aa2bcd into master May 11, 2026
2 checks passed
@chaitanyaprem chaitanyaprem deleted the feat/mix-cover-traffic branch May 11, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants