Introduction

The Nomos Mix simulator:

Installation

git clone <https://github.com/logos-co/nomos-specs.git> -b mixnet-v2-sim-fin
cd nomos-specs
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Getting Started

Before running simulations with realistic parameters, this section describes how the simulation works and how to configure it, by running it with simple parameters.

Base Settings

This is a setting to produce the base result (i.e. control group) that will be compared to other results later.

simulation:
  # Desired duration of the simulation in seconds
  # Since the simulation uses discrete time steps, the actual duration may be longer or shorter.
  duration_sec: 1000

network:
  # Total number of nodes in the entire network.
  num_nodes: 5
  latency:
    # Maximum network latency between nodes in seconds.
    # A constant latency will be chosen randomly for each connection within the range [0, max_latency_sec].
    max_latency_sec: 0.1
    # Seed for the random number generator used to determine the network latencies.
    seed: 0
  peering:
    # Target number of peers each node can connect to (both inbound and outbound).
    degree: 6

mix:
  # Global constant transmission rate of each connection in messages per second.
  transmission_rate_per_sec: 10
  mix_path:
    # Maximum number of mix nodes to be chosen for a Sphinx packet.
    max_length: 3
    # Seed for the random number generator used to determine the mix path.
    seed: 3

logic:
  sender_lottery:
    # Interval between lottery draws in seconds.
    interval_sec: 1
    # Probability of a node being selected as a sender in each lottery draw.
    probability: 0.000
    # Seed for the random number generator used to determine the lottery winners.
    seed: 10

Discrete Simulation Time

Network

Mix