add readme and reorganize imports

This commit is contained in:
Youngjoon Lee 2024-05-13 08:49:09 +09:00
parent 781ccbddc8
commit f46d343ea6
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2
5 changed files with 16 additions and 6 deletions

10
mixnet/v2/sim/README.md Normal file
View File

@ -0,0 +1,10 @@
# Mixnet v2 Simulation
## How to run
Make sure that all dependencies specified in the `requirements.txt` in the project root, and run the following command to run the simulation:
```bash
python main.py
```
TODO: Add more details

View File

@ -1,4 +1,4 @@
from mixnet.v2.sim.simulation import Simulation
from simulation import Simulation
if __name__ == "__main__":
sim = Simulation()

View File

@ -4,8 +4,8 @@ import simpy
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey, X25519PublicKey
from mixnet.v2.sim.sphinx import SphinxPacket, Attachment
from mixnet.v2.sim.p2p import P2p
from sphinx import SphinxPacket, Attachment
from p2p import P2p
class Node:

View File

@ -2,7 +2,7 @@ import random
import simpy
from mixnet.v2.sim.sphinx import SphinxPacket
from sphinx import SphinxPacket
class P2p:

View File

@ -1,7 +1,7 @@
import simpy
from mixnet.v2.sim.node import Node
from mixnet.v2.sim.p2p import P2p
from node import Node
from p2p import P2p
class Simulation: