diff --git a/bench/cardano-topology/cardano-topology.hs b/bench/cardano-topology/cardano-topology.hs index 16ead1ac0a0..96c33a99f09 100644 --- a/bench/cardano-topology/cardano-topology.hs +++ b/bench/cardano-topology/cardano-topology.hs @@ -143,12 +143,18 @@ main = do ( long "loc" <> help "Region (at least one)" <> metavar "LOCNAME" )) - <*> pure defaultRoleSelector - - defaultRoleSelector = \case - 0 -> Nothing -- BFT node has no pools - 1 -> Just 1 -- Regular pools have just 1 pool - _ -> Just 2 -- Dense pools have any amount >1 as marker + <*> (roleSelector <$> + flag False True + ( long "with-bft-node-0" + <> help "Include a BFT node-0")) + + roleSelector withBft = \case + -- TODO: prepare for deprecation of BFT nodes by switching 1 & 0 + 1 -> Just 1 -- Normal pools are just that -- a single pool + 0 -> if withBft + then Nothing -- The BFT node has no pools + else Just 1 -- Dense pools are denoted by any amount >1 + _ -> Just 2 opts = info (cliParser <**> helper) ( fullDesc diff --git a/nix/workbench/topology.sh b/nix/workbench/topology.sh index 128d3e18c61..e3b6ac3d1d4 100644 --- a/nix/workbench/topology.sh +++ b/nix/workbench/topology.sh @@ -38,6 +38,8 @@ case "${op}" in args=( --topology-output "$outdir"/topology-nixops.json --dot-output "$outdir"/topology.dot --size $n_hosts + ## TODO: drop this, once we fully deprecate BFT in all scenarios + --with-bft-node-0 $(jq '.composition.locations | map("--loc " + .)