diff --git a/deprecated/mixnet_v1/bls.py b/deprecated/mixnet_v1/bls.py index 44c79a3..249d1ce 100644 --- a/deprecated/mixnet_v1/bls.py +++ b/deprecated/mixnet_v1/bls.py @@ -2,7 +2,7 @@ from typing import TypeAlias import blspy -from deprecated.mixnet_v1.utils import random_bytes +from .utils import random_bytes BlsPrivateKey: TypeAlias = blspy.PrivateKey BlsPublicKey: TypeAlias = blspy.G1Element diff --git a/deprecated/mixnet_v1/client.py b/deprecated/mixnet_v1/client.py index c954980..ea2891d 100644 --- a/deprecated/mixnet_v1/client.py +++ b/deprecated/mixnet_v1/client.py @@ -4,10 +4,10 @@ import asyncio from contextlib import suppress from typing import Self -from deprecated.mixnet_v1.config import MixClientConfig, MixnetTopology -from deprecated.mixnet_v1.node import PacketQueue -from deprecated.mixnet_v1.packet import PacketBuilder -from deprecated.mixnet_v1.poisson import poisson_interval_sec +from .config import MixClientConfig, MixnetTopology +from .node import PacketQueue +from .packet import PacketBuilder +from .poisson import poisson_interval_sec class MixClient: diff --git a/deprecated/mixnet_v1/config.py b/deprecated/mixnet_v1/config.py index 642500e..67a12e8 100644 --- a/deprecated/mixnet_v1/config.py +++ b/deprecated/mixnet_v1/config.py @@ -10,8 +10,8 @@ from cryptography.hazmat.primitives.asymmetric.x25519 import ( ) from pysphinx.node import Node -from deprecated.mixnet_v1.bls import BlsPrivateKey, BlsPublicKey -from deprecated.mixnet_v1.fisheryates import FisherYates +from .bls import BlsPrivateKey, BlsPublicKey +from .fisheryates import FisherYates @dataclass diff --git a/deprecated/mixnet_v1/mixnet.py b/deprecated/mixnet_v1/mixnet.py index 1058823..3746121 100644 --- a/deprecated/mixnet_v1/mixnet.py +++ b/deprecated/mixnet_v1/mixnet.py @@ -4,13 +4,13 @@ import asyncio from contextlib import suppress from typing import Self, TypeAlias -from deprecated.mixnet_v1.client import MixClient -from deprecated.mixnet_v1.config import ( +from .client import MixClient +from .config import ( MixnetConfig, MixnetTopology, MixnetTopologyConfig, ) -from deprecated.mixnet_v1.node import MixNode +from .node import MixNode EntropyQueue: TypeAlias = "asyncio.Queue[bytes]" diff --git a/deprecated/mixnet_v1/node.py b/deprecated/mixnet_v1/node.py index aa20a64..af8ff67 100644 --- a/deprecated/mixnet_v1/node.py +++ b/deprecated/mixnet_v1/node.py @@ -15,8 +15,8 @@ from pysphinx.sphinx import ( UnknownHeaderTypeError, ) -from deprecated.mixnet_v1.config import MixNodeConfig, NodeAddress -from deprecated.mixnet_v1.poisson import poisson_interval_sec +from .config import MixNodeConfig, NodeAddress +from .poisson import poisson_interval_sec PacketQueue: TypeAlias = "asyncio.Queue[Tuple[NodeAddress, SphinxPacket]]" PacketPayloadQueue: TypeAlias = ( diff --git a/deprecated/mixnet_v1/packet.py b/deprecated/mixnet_v1/packet.py index 6ecf262..b76c59c 100644 --- a/deprecated/mixnet_v1/packet.py +++ b/deprecated/mixnet_v1/packet.py @@ -9,7 +9,7 @@ from typing import Dict, List, Self, Tuple, TypeAlias from pysphinx.payload import Payload from pysphinx.sphinx import SphinxPacket -from deprecated.mixnet_v1.config import MixnetTopology, MixNodeInfo +from .config import MixnetTopology, MixNodeInfo class MessageFlag(Enum): diff --git a/deprecated/mixnet_v1/test_client.py b/deprecated/mixnet_v1/test_client.py index fff7b31..f6a783d 100644 --- a/deprecated/mixnet_v1/test_client.py +++ b/deprecated/mixnet_v1/test_client.py @@ -3,13 +3,13 @@ from unittest import IsolatedAsyncioTestCase import numpy -from deprecated.mixnet_v1.client import MixClient -from deprecated.mixnet_v1.poisson import poisson_mean_interval_sec -from deprecated.mixnet_v1.test_utils import ( +from .client import MixClient +from .poisson import poisson_mean_interval_sec +from .test_utils import ( init_mixnet_config, with_test_timeout, ) -from deprecated.mixnet_v1.utils import random_bytes +from .utils import random_bytes class TestMixClient(IsolatedAsyncioTestCase): diff --git a/deprecated/mixnet_v1/test_fisheryates.py b/deprecated/mixnet_v1/test_fisheryates.py index 1d9a605..fab9426 100644 --- a/deprecated/mixnet_v1/test_fisheryates.py +++ b/deprecated/mixnet_v1/test_fisheryates.py @@ -1,6 +1,6 @@ from unittest import TestCase -from deprecated.mixnet_v1.fisheryates import FisherYates +from .fisheryates import FisherYates class TestFisherYates(TestCase): diff --git a/deprecated/mixnet_v1/test_mixnet.py b/deprecated/mixnet_v1/test_mixnet.py index fde95bf..bce581c 100644 --- a/deprecated/mixnet_v1/test_mixnet.py +++ b/deprecated/mixnet_v1/test_mixnet.py @@ -1,8 +1,8 @@ import asyncio from unittest import IsolatedAsyncioTestCase -from deprecated.mixnet_v1.mixnet import Mixnet -from deprecated.mixnet_v1.test_utils import init_mixnet_config +from .mixnet import Mixnet +from .test_utils import init_mixnet_config class TestMixnet(IsolatedAsyncioTestCase): diff --git a/deprecated/mixnet_v1/test_node.py b/deprecated/mixnet_v1/test_node.py index a26c9b1..17a0afa 100644 --- a/deprecated/mixnet_v1/test_node.py +++ b/deprecated/mixnet_v1/test_node.py @@ -5,10 +5,10 @@ from unittest import IsolatedAsyncioTestCase import numpy from pysphinx.sphinx import SphinxPacket -from deprecated.mixnet_v1.node import MixNode, NodeAddress, PacketQueue -from deprecated.mixnet_v1.packet import PacketBuilder -from deprecated.mixnet_v1.poisson import poisson_interval_sec, poisson_mean_interval_sec -from deprecated.mixnet_v1.test_utils import ( +from .node import MixNode, NodeAddress, PacketQueue +from .packet import PacketBuilder +from .poisson import poisson_interval_sec, poisson_mean_interval_sec +from .test_utils import ( init_mixnet_config, with_test_timeout, ) diff --git a/deprecated/mixnet_v1/test_packet.py b/deprecated/mixnet_v1/test_packet.py index 64322df..9549fb7 100644 --- a/deprecated/mixnet_v1/test_packet.py +++ b/deprecated/mixnet_v1/test_packet.py @@ -3,15 +3,15 @@ from unittest import TestCase from pysphinx.sphinx import ProcessedFinalHopPacket, SphinxPacket -from deprecated.mixnet_v1.config import MixNodeInfo -from deprecated.mixnet_v1.packet import ( +from .config import MixNodeInfo +from .packet import ( Fragment, MessageFlag, MessageReconstructor, PacketBuilder, ) -from deprecated.mixnet_v1.test_utils import init_mixnet_config -from deprecated.mixnet_v1.utils import random_bytes +from .test_utils import init_mixnet_config +from .utils import random_bytes class TestPacket(TestCase): diff --git a/deprecated/mixnet_v1/test_utils.py b/deprecated/mixnet_v1/test_utils.py index 89426cc..80d5829 100644 --- a/deprecated/mixnet_v1/test_utils.py +++ b/deprecated/mixnet_v1/test_utils.py @@ -2,8 +2,8 @@ import asyncio from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey -from deprecated.mixnet_v1.bls import generate_bls -from deprecated.mixnet_v1.config import ( +from .bls import generate_bls +from .config import ( MixClientConfig, MixnetConfig, MixnetTopology, @@ -12,7 +12,7 @@ from deprecated.mixnet_v1.config import ( MixNodeConfig, MixNodeInfo, ) -from deprecated.mixnet_v1.utils import random_bytes +from .utils import random_bytes def with_test_timeout(t):