update readme

This commit is contained in:
Youngjoon Lee 2024-07-15 23:44:56 +09:00
parent f7f931f73e
commit 38bd5b56f9
No known key found for this signature in database
GPG Key ID: B4253AFBA618BF4D
3 changed files with 28 additions and 5 deletions

View File

@ -1,5 +1,26 @@
# NomMix Simulation # NomMix Simulation
* [Features](#features)
* [Future Plans](#future-plans)
* [Installation](#installation)
* [Getting Started](#getting-started)
## Features
- Simulate the NomMix protocol with the given parameters.
- Measure the performance of the NomMix protocol.
- Bandwidth usages
- Analyze the privacy properties that the NomMix protocol provides.
- Message sizes
- Node states and hamming distances
## Future Plans
- Simulate more features of the NomMix protocol.
- Temporal mixing
- Level-1 noise
- Simulate possible adversarial attacks and measure the robustness of the NomMix protocol.
## Installation ## Installation
Clone the repository and install the dependencies: Clone the repository and install the dependencies:
@ -11,7 +32,7 @@ source .venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
``` ```
## Getting started ## Getting Started
Copy the [`mixnet/sim/config.ci.yaml`](./config.ci.yaml) file and adjust the parameters to your needs. Copy the [`mixnet/sim/config.ci.yaml`](./config.ci.yaml) file and adjust the parameters to your needs.
Each parameter is explained in the config file. Each parameter is explained in the config file.
@ -26,13 +47,14 @@ All results are printed in the console as below.
And, all plots are shown once all analysis is done. And, all plots are shown once all analysis is done.
``` ```
========================================== ==========================================
Message Size Distribution Message Size Distribution
========================================== ==========================================
msg_size count msg_size count
0 1405 99990 0 1405 99990
========================================== ==========================================
Node States of All Nodes over Time Node States of All Nodes over Time
SENDING:-1, IDLE:0, RECEIVING:1
========================================== ==========================================
Node-0 Node-1 Node-2 Node-3 Node-4 Node-0 Node-1 Node-2 Node-3 Node-4
0 0 0 0 0 0 0 0 0 0 0 0

View File

@ -32,7 +32,8 @@ class NodeStateTable:
# Convert NodeState enum to their integer values # Convert NodeState enum to their integer values
df = df.map(lambda state: state.value) df = df.map(lambda state: state.value)
print("==========================================") print("==========================================")
print(" Node States of All Nodes over Time") print("Node States of All Nodes over Time")
print(", ".join(f"{state.name}:{state.value}" for state in NodeState))
print("==========================================") print("==========================================")
print(f"{df}\n") print(f"{df}\n")

View File

@ -43,7 +43,7 @@ class ConnectionStats:
df = pandas.DataFrame.from_dict(sizes, orient="index").reset_index() df = pandas.DataFrame.from_dict(sizes, orient="index").reset_index()
df.columns = ["msg_size", "count"] df.columns = ["msg_size", "count"]
print("==========================================") print("==========================================")
print(" Message Size Distribution") print("Message Size Distribution")
print("==========================================") print("==========================================")
print(f"{df}\n") print(f"{df}\n")