|
82 | 82 | Backend = "V2LSM"; |
83 | 83 | LSMDatabasePath = cfg.lsmDatabasePath i; |
84 | 84 | }; |
85 | | - } |
86 | | - // optionalAttrs (cfg.withUtxoHdLmdb i){ |
87 | | - LedgerDB = { |
88 | | - Backend = "V1LMDB"; |
89 | | - LiveTablesPath = cfg.lmdbDatabasePath i; |
90 | | - }; |
91 | 85 | }; |
92 | 86 | in i: let |
93 | 87 | instanceConfig = recursiveUpdate (baseInstanceConfig i) (cfg.extraNodeInstanceConfig i); |
@@ -393,16 +387,6 @@ in { |
393 | 387 | description = ''The node database path, for each instance.''; |
394 | 388 | }; |
395 | 389 |
|
396 | | - lmdbDatabasePath = mkOption { |
397 | | - type = funcToOr nullOrStr; |
398 | | - default = null; |
399 | | - apply = x : if lib.isFunction x then x else if x == null then _: null else _: x; |
400 | | - description = '' |
401 | | - A node UTxO-HD on-disk LMDB path for performant disk I/O, for each instance. |
402 | | - This could point to a direct-access SSD, with a specifically created journal-less file system and optimized mount options. |
403 | | - ''; |
404 | | - }; |
405 | | - |
406 | 390 | lsmDatabasePath = mkOption { |
407 | 391 | type = funcToOr nullOrStr; |
408 | 392 | default = null; |
@@ -757,16 +741,6 @@ in { |
757 | 741 | ''; |
758 | 742 | }; |
759 | 743 |
|
760 | | - withUtxoHdLmdb = mkOption { |
761 | | - type = funcToOr bool; |
762 | | - default = false; |
763 | | - apply = x: if lib.isFunction x then x else _: x; |
764 | | - description = '' |
765 | | - On a UTxO-HD enabled node, the in-memory backend is the default. |
766 | | - This activates the on-disk backend (LMDB) instead. |
767 | | - ''; |
768 | | - }; |
769 | | - |
770 | 744 | withUtxoHdLsmt = mkOption { |
771 | 745 | type = funcToOr bool; |
772 | 746 | default = false; |
|
858 | 832 | }; |
859 | 833 |
|
860 | 834 | config = mkIf cfg.enable ( let |
861 | | - lmdbPaths = filter (x: x != null) (map (e: cfg.lmdbDatabasePath e) (genList trivial.id cfg.instances)); |
862 | 835 | lsmPaths = filter (x: x != null) (map (e: cfg.lsmDatabasePath e) (genList trivial.id cfg.instances)); |
863 | 836 | genInstanceConf = f: listToAttrs (if cfg.instances > 1 |
864 | 837 | then genList (i: let n = "cardano-node-${toString i}"; in nameValuePair n (f n i)) cfg.instances |
@@ -988,18 +961,10 @@ in { |
988 | 961 | assertion = !cfg.systemdSocketActivation; |
989 | 962 | message = "Systemd socket activation cannot be used with p2p topology due to a systemd socket re-use issue."; |
990 | 963 | } |
991 | | - { |
992 | | - assertion = (length lmdbPaths) == (length (lists.unique lmdbPaths)); |
993 | | - message = "When configuring multiple LMDB enabled nodes on one instance, lmdbDatabasePath must be unique."; |
994 | | - } |
995 | 964 | { |
996 | 965 | assertion = (length lsmPaths) == (length (lists.unique lsmPaths)); |
997 | 966 | message = "When configuring multiple LSM enabled nodes on one instance, lsmDatabasePath must be unique."; |
998 | 967 | } |
999 | | - { |
1000 | | - assertion = all (i: !(cfg.withUtxoHdLmdb i && cfg.withUtxoHdLsmt i)) (genList trivial.id cfg.instances); |
1001 | | - message = "Each instance can only declare either withUtxoHdLmdb or withUtxoHdLsmt"; |
1002 | | - } |
1003 | 968 | { |
1004 | 969 | assertion = count (o: o != null) (with cfg; [ |
1005 | 970 | (tracerSocketPathAccept i) |
|
0 commit comments