From 384ad0d019bfd00859aa95b4641c9540f635d9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Wed, 16 Jul 2025 15:38:39 +0100 Subject: [PATCH 1/2] fix: don't allow mixnode running in exit mode --- nym-node/src/config/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nym-node/src/config/mod.rs b/nym-node/src/config/mod.rs index 80836b38341..53726a89a2e 100644 --- a/nym-node/src/config/mod.rs +++ b/nym-node/src/config/mod.rs @@ -433,6 +433,14 @@ impl Config { )); } + // nor it's allowed to run mixnode mode alongside exit mode + // (use two separate checks for better error messages) + if self.modes.mixnode && self.modes.exit { + return Err(NymNodeError::config_validation_failure( + "illegal modes configuration - node cannot run as a mixnode and an entry exit", + )); + } + Ok(()) } } From bc74929c3b11f1bf1e6ecee4100bc7ed32b1a8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 17 Jul 2025 10:47:22 +0100 Subject: [PATCH 2/2] fixed error message --- nym-node/src/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nym-node/src/config/mod.rs b/nym-node/src/config/mod.rs index 53726a89a2e..257fc0f862f 100644 --- a/nym-node/src/config/mod.rs +++ b/nym-node/src/config/mod.rs @@ -437,7 +437,7 @@ impl Config { // (use two separate checks for better error messages) if self.modes.mixnode && self.modes.exit { return Err(NymNodeError::config_validation_failure( - "illegal modes configuration - node cannot run as a mixnode and an entry exit", + "illegal modes configuration - node cannot run as a mixnode and an exit gateway", )); }