[object Object]

← back to Exo

make node-ids unique per-session (#1338)

2a4e0d4629a79767d3728cb6a4890592973f2cf9 · 2026-01-30 13:33:31 +0000 · Evan Quiney

we currently have no strict reuqirements that node ids persist across
sessions, so we can generate fresh nodeids each time

this avoids issues like #1332, but prevents further features such as
caching downloads or node-id dialling

Co-authored-by: rltakashige <rl.takashige@gmail.com>

Files touched

Diff

commit 2a4e0d4629a79767d3728cb6a4890592973f2cf9
Author: Evan Quiney <evanev7@gmail.com>
Date:   Fri Jan 30 13:33:31 2026 +0000

    make node-ids unique per-session (#1338)
    
    we currently have no strict reuqirements that node ids persist across
    sessions, so we can generate fresh nodeids each time
    
    this avoids issues like #1332, but prevents further features such as
    caching downloads or node-id dialling
    
    Co-authored-by: rltakashige <rl.takashige@gmail.com>
---
 src/exo/routing/router.py                        | 2 ++
 src/exo/shared/tests/test_node_id_persistence.py | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/exo/routing/router.py b/src/exo/routing/router.py
index ac6073af..d75af742 100644
--- a/src/exo/routing/router.py
+++ b/src/exo/routing/router.py
@@ -216,6 +216,8 @@ def get_node_id_keypair(
     Obtains the :class:`Keypair` associated with this node-ID.
     Obtain the :class:`PeerId` by from it.
     """
+    # TODO(evan): bring back node id persistence once we figure out how to deal with duplicates
+    return Keypair.generate_ed25519()
 
     def lock_path(path: str | bytes | PathLike[str] | PathLike[bytes]) -> Path:
         return Path(str(path) + ".lock")
diff --git a/src/exo/shared/tests/test_node_id_persistence.py b/src/exo/shared/tests/test_node_id_persistence.py
index 8b241aa5..c067bd3c 100644
--- a/src/exo/shared/tests/test_node_id_persistence.py
+++ b/src/exo/shared/tests/test_node_id_persistence.py
@@ -8,7 +8,7 @@ from multiprocessing.synchronize import Event as EventT
 from multiprocessing.synchronize import Semaphore as SemaphoreT
 
 from loguru import logger
-from pytest import LogCaptureFixture
+from pytest import LogCaptureFixture, mark
 
 from exo.routing.router import get_node_id_keypair
 from exo.shared.constants import EXO_NODE_ID_KEYPAIR
@@ -74,6 +74,7 @@ def _delete_if_exists(p: str | bytes | os.PathLike[str] | os.PathLike[bytes]):
         os.remove(p)
 
 
+@mark.skip(reason="this functionality is currently disabled but may return in future")
 def test_node_id_fetching(caplog: LogCaptureFixture):
     reps = 10
 

← 46a14153 switch to ModelCard.load outside of download log (#1339)  ·  back to Exo  ·  Check all nodes to evict (#1341) a5bc38ad →