mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-07 15:43:07 +00:00
add readme and reorganize imports
This commit is contained in:
parent
781ccbddc8
commit
f46d343ea6
10
mixnet/v2/sim/README.md
Normal file
10
mixnet/v2/sim/README.md
Normal 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
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from mixnet.v2.sim.simulation import Simulation
|
from simulation import Simulation
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sim = Simulation()
|
sim = Simulation()
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import simpy
|
|||||||
from cryptography.hazmat.primitives import serialization
|
from cryptography.hazmat.primitives import serialization
|
||||||
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey, X25519PublicKey
|
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey, X25519PublicKey
|
||||||
|
|
||||||
from mixnet.v2.sim.sphinx import SphinxPacket, Attachment
|
from sphinx import SphinxPacket, Attachment
|
||||||
from mixnet.v2.sim.p2p import P2p
|
from p2p import P2p
|
||||||
|
|
||||||
|
|
||||||
class Node:
|
class Node:
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import random
|
|||||||
|
|
||||||
import simpy
|
import simpy
|
||||||
|
|
||||||
from mixnet.v2.sim.sphinx import SphinxPacket
|
from sphinx import SphinxPacket
|
||||||
|
|
||||||
|
|
||||||
class P2p:
|
class P2p:
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import simpy
|
import simpy
|
||||||
|
|
||||||
from mixnet.v2.sim.node import Node
|
from node import Node
|
||||||
from mixnet.v2.sim.p2p import P2p
|
from p2p import P2p
|
||||||
|
|
||||||
|
|
||||||
class Simulation:
|
class Simulation:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user