From 1967e82184125b81bbe9144f82db3dfe69f49d6e Mon Sep 17 00:00:00 2001 From: John Lotoski Date: Wed, 26 Aug 2026 02:42:31 -0500 Subject: [PATCH 1/3] bump: iohkNix for mainnet bootstrap peers and match ci cfg --- configuration/cardano/mainnet-topology.json | 4 ---- flake.lock | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/configuration/cardano/mainnet-topology.json b/configuration/cardano/mainnet-topology.json index daa4e773694..7f400d02136 100644 --- a/configuration/cardano/mainnet-topology.json +++ b/configuration/cardano/mainnet-topology.json @@ -7,10 +7,6 @@ { "address": "backbone.mainnet.cardanofoundation.org", "port": 3001 - }, - { - "address": "backbone.mainnet.emurgornd.com", - "port": 3001 } ], "localRoots": [ diff --git a/flake.lock b/flake.lock index 0f7fb212c09..6ffe3ebdbbc 100644 --- a/flake.lock +++ b/flake.lock @@ -1142,11 +1142,11 @@ "sodium": "sodium_2" }, "locked": { - "lastModified": 1786665795, - "narHash": "sha256-IYKsT8+Fl4P/KQPnLhFEexK1cgtCJefoWfovvF+URlM=", + "lastModified": 1787718550, + "narHash": "sha256-Wkevfb7P201JHWpP4sbSg3HEO4YDPuCrwvARatfF2RI=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "9ebcc963cc35bf8ba974a069186dbe101dfdf395", + "rev": "af463a46dbe9c6e2db6b2639c0f35f5689e0c3a8", "type": "github" }, "original": { From 25b6059a992b22c1e472a1d8d161555adf3a7a88 Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Tue, 18 Aug 2026 21:50:49 +0200 Subject: [PATCH 2/3] nixos: do not mask eval errors `tryEval` caught too broadly, not only the intented `assert`. This turns an eval error into a red herring as its error message is replaced and stack trace discarded. There was no need for `tryEval` anyway as an `assert` already does what this code tried to implement. --- nix/nixos/cardano-node-service.nix | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index bb657e2e4b0..53cb7b2bd91 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -33,17 +33,10 @@ let }; assertNewTopology = i: - let - checkEval = tryEval ( - assert - if cfg.bootstrapPeers == [] && all (e: e.trustable != true) ((newTopology i).localRoots) - then false - else true; - newTopology i); - in - if checkEval.success - then checkEval.value - else abort "When bootstrapPeers is an empty list, at least one localRoot must be trustable, otherwise cardano node will fail to start."; + assert assertMsg + (cfg.bootstrapPeers == [] -> any (e: e.trustable == true) (newTopology i).localRoots) + "When bootstrapPeers is an empty list, at least one localRoot must be trustable, otherwise cardano node will fail to start."; + newTopology i; selectTopology = i: if cfg.topology != null From 5b748b4d753608fd8502c9d7a893ff9405dc3cd3 Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Wed, 26 Aug 2026 14:16:17 +0200 Subject: [PATCH 3/3] nixos: do not evaluate expression twice --- nix/nixos/cardano-node-service.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index 53cb7b2bd91..5a4f6622203 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -33,10 +33,11 @@ let }; assertNewTopology = i: + let topo = newTopology i; in assert assertMsg - (cfg.bootstrapPeers == [] -> any (e: e.trustable == true) (newTopology i).localRoots) + (cfg.bootstrapPeers == [] -> any (e: e.trustable == true) topo.localRoots) "When bootstrapPeers is an empty list, at least one localRoot must be trustable, otherwise cardano node will fail to start."; - newTopology i; + topo; selectTopology = i: if cfg.topology != null