|
1 | 1 | {lib, writeText, runCommand, jq}: |
2 | 2 | let |
3 | | - inherit (builtins) attrNames elem fromJSON readFile toFile toJSON; |
| 3 | + inherit (builtins) attrNames elem fromJSON getAttr readFile toFile toJSON; |
4 | 4 | inherit (lib) filterAttrs flip forEach listToAttrs mapAttrs mapAttrsToList optionalAttrs optionalString pipe; |
5 | 5 |
|
6 | 6 | mkEdgeTopology = { |
@@ -130,13 +130,15 @@ let |
130 | 130 | # Min currently 10.4.0 for `LedgerDB` config support. |
131 | 131 | minNodeVersion = { MinNodeVersion = "10.4.0"; }; |
132 | 132 |
|
| 133 | + mergeTraceOpts = cfg: traceOpts: cfg // {TraceOptions = getAttr "TraceOptions" cfg // traceOpts;}; |
| 134 | + |
133 | 135 | environments = mapAttrs (name: env: { |
134 | 136 | inherit name; |
135 | 137 | # default derived configs: |
136 | | - nodeConfig = defaultLogConfig // env.networkConfig; |
137 | | - nodeConfigLegacy = defaultLogConfigLegacy // env.networkConfig; |
138 | | - nodeConfigBp = defaultLogConfig // env.networkConfigBp; |
139 | | - nodeConfigBpLegacy = defaultLogConfigLegacy // env.networkConfigBp; |
| 138 | + nodeConfig = mergeTraceOpts (defaultLogConfig // env.networkConfig) (env.extraTracerConfig or {}); |
| 139 | + nodeConfigLegacy = defaultLogConfigLegacy // env.networkConfig // (env.extraTracerConfigLegacy or {}); |
| 140 | + nodeConfigBp = mergeTraceOpts (defaultLogConfig // env.networkConfigBp) (env.extraTracerConfig or {}); |
| 141 | + nodeConfigBpLegacy = defaultLogConfigLegacy // env.networkConfigBp // (env.extraTracerConfigLegacy or {}); |
140 | 142 | consensusProtocol = env.networkConfig.Protocol; |
141 | 143 | submitApiConfig = mkSubmitApiConfig name environments.${name}.nodeConfig; |
142 | 144 | dbSyncConfig = |
|
182 | 184 | extraDbSyncConfig = { |
183 | 185 | enableFutureGenesis = true; |
184 | 186 | }; |
| 187 | + |
| 188 | + # Once legacy tracing system is removed, tracing mods can be placed back in $ENV-config.nix |
| 189 | + extraTracerConfig.Mempool.severity = "Silence"; |
| 190 | + extraTracerConfigLegacy.TraceMempool = false; |
185 | 191 | }; |
186 | 192 |
|
187 | 193 | preprod = rec { |
|
0 commit comments