nomos-simulations/simlib/blendnet-sims
Youngjoon Lee 67f62c68c9
enhance logging
2024-12-10 20:21:21 +09:00
..
config Mix: add connection maintenance, excluding disconnecting 2024-12-06 13:52:30 +09:00
scripts calculate std 2024-12-10 16:38:53 +09:00
src enhance logging 2024-12-10 20:21:21 +09:00
Cargo.toml Mix: add connection maintenance, excluding disconnecting 2024-12-06 13:52:30 +09:00
README.md Rename `mixnet-sims` to `blendnet-sims` (#60) 2024-12-03 21:01:04 +09:00

README.md

Nomos Blend Simulation

Features

  • The simulation runs multiple Nomos Blend nodes using netrunner.
  • Each node implements the Nomos Blend Tier 1~3 protocols.
  • The simulation prints logs that can be used to analyze the following properties.
    • Latency
    • Bandwidth
    • Anonymity

Configurations

The simulation can be configured by config/blendnet.json.

step_time and network_settings

We recommend setting the step time equal to the minimum latency in the network settings, in order to speed up the simulation. For example, if all regions are used, and if the minimum latency is 40ms (asia:asia), we recommend setting the step time to 40ms.

wards.sum

The simulation runs until the wards.sum number of messages (data or cover) arrive in their last blend node and finally fully unwrapped.

Network Topology

The simulation constructs a network with the node_count number of nodes. Each node establish connections with the connected_peers_count number of nodes randomly selected.

Protocol Parameters

Tier 1: Persistent Transmission

"persistent_transmission": {
  "max_emission_frequency": 1.0,
  "drop_message_probability": 0.0
},

We recommend setting max_emission_frequency to 1 message per second, which is the same as the expected maximum message frequency configured in the consensus protocol that will use the Nomos Blend protocol.

To disable drop messages, set drop_message_probability to 0.

Tier 2: Message Blending

"number_of_mix_layers": 2,
"max_delay_seconds": 10

The number_of_mix_layers is a parameter for the Cryptographic Processor. And, the max_delay_seconds is for Temporal Processor, which is the same as \Delta_{max} in the specification.

Tier 3: Cover Traffic

"epoch_duration": "432000s",
"slot_duration": "20s",
"slots_per_epoch": 21600,
"number_of_hops": 2,

These parameters are defined in the specification. In short, each node selects the slots_per_epoch / node_count * (1 / number_of_hops) number of slots at the beginning of each epoch. At every selected slot, the node generates a cover message.

Running the simulation

cargo build --release
../target/release/blendnet-sims --input-settings ./config/blendnet.json

The simulation prints a bunch of logs that can be used for analysis. We recommend piping logs to a file.

Analysis

To analysis logs for latency and anonymity, see the README in the scripts.

The bandwidth consumed by each node is printed as a log at the end of the simulation.