Skip to content

services.cardano-db-sync

services.cardano-db-sync.enable

Whether to enable enable the cardano-db-sync service.

Type: boolean

Default: false

Example: true

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.package

Type: package

Default: <derivation cardano-db-sync-exe-cardano-db-sync-13.2.0.1>

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.cluster

cluster name

Type: null or string

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.dbSyncPkgs

The cardano-db-sync packages and library that should be used. Main usage is sharing optimization: reduce eval time when service is instantiated multiple times.

Type: attribute set

Default: "cardano-db-sync pkgs"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.disableLedger

Disables the leger state. Drastically reduces memory usage and it syncs faster, but some data are missing.

Type: boolean

Default: false

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.environment

Type: null or (attribute set)

Default:

This value is long. Click to expand.
{
  confKey = "mainnet_full";
  consensusProtocol = "Cardano";
  dbSyncConfig = {
    EnableLogMetrics = false;
    EnableLogging = true;
    NetworkName = "mainnet";
    NodeConfigFile = "/nix/store/i3vzp0pa9znlhl5bp1g7w8sv7zhwlmhp-config-mainnet.json";
    PrometheusPort = 8080;
    RequiresNetworkMagic = "RequiresNoMagic";
    defaultBackends = [
      "KatipBK"
    ];
    defaultScribes = [
      [
        "StdoutSK"
        "stdout"
      ]
    ];
    minSeverity = "Info";
    options = {
      cfokey = {
        value = "Release-1.0.0";
      };
      mapBackends = { };
      mapSeverity = {
        db-sync-node = "Info";
        "db-sync-node.Mux" = "Error";
        "db-sync-node.Subscription" = "Error";
      };
      mapSubtrace = {
        "#ekgview" = {
          contents = [
            [
              {
                contents = "cardano.epoch-validation.benchmark";
                tag = "Contains";
              }
              [
                {
                  contents = ".monoclock.basic.";
                  tag = "Contains";
                }
              ]
            ]
            [
              {
                contents = "cardano.epoch-validation.benchmark";
                tag = "Contains";
              }
              [
                {
                  contents = "diff.RTS.cpuNs.timed.";
                  tag = "Contains";
                }
              ]
            ]
            [
              {
                contents = "#ekgview.#aggregation.cardano.epoch-validation.benchmark";
                tag = "StartsWith";
              }
              [
                {
                  contents = "diff.RTS.gcNum.timed.";
                  tag = "Contains";
                }
              ]
            ]
          ];
          subtrace = "FilterTrace";
        };
        "#messagecounters.aggregation" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.ekgview" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.katip" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.monitoring" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.switchboard" = {
          subtrace = "NoTrace";
        };
        benchmark = {
          contents = [
            "GhcRtsStats"
            "MonotonicClock"
          ];
          subtrace = "ObservableTrace";
        };
        "cardano.epoch-validation.utxo-stats" = {
          subtrace = "NoTrace";
        };
      };
    };
    rotation = {
      rpKeepFilesNum = 10;
      rpLogLimitBytes = 5000000;
      rpMaxAgeHours = 24;
    };
    setupBackends = [
      "AggregationBK"
      "KatipBK"
    ];
    setupScribes = [
      {
        scFormat = "ScText";
        scKind = "StdoutSK";
        scName = "stdout";
        scRotation = null;
      }
    ];
  };
  domain = "cardano-mainnet.iohk.io";
  edgeNodes = [
    "3.125.75.199"
    "18.177.103.105"
    "18.141.0.112"
    "52.14.58.121"
  ];
  edgePort = 3001;
  explorerConfig = {
    NetworkName = "mainnet";
    NodeConfigFile = "/nix/store/i3vzp0pa9znlhl5bp1g7w8sv7zhwlmhp-config-mainnet.json";
    RequiresNetworkMagic = "RequiresNoMagic";
  };
  explorerUrl = "https://explorer.cardano.org";
  metadataUrl = "https://tokens.cardano.org";
  mithrilSignerConfig = {
    network = "mainnet";
    network_magic = 764824073;
    run_interval = 60000;
    store_retention_limit = 5;
  };
  networkConfig = {
    AlonzoGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/alonzo-genesis.json;
    AlonzoGenesisHash = "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874";
    ByronGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/byron-genesis.json;
    ByronGenesisHash = "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb";
    ConwayGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/conway-genesis.json;
    ConwayGenesisHash = "f7d46bdd3b3c8caf38351c4eef3346a89241707270be0d6106e8a407db294cc6";
    LastKnownBlockVersion-Alt = 0;
    LastKnownBlockVersion-Major = 3;
    LastKnownBlockVersion-Minor = 0;
    MaxKnownMajorProtocolVersion = 2;
    Protocol = "Cardano";
    RequiresNetworkMagic = "RequiresNoMagic";
    ShelleyGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/shelley-genesis.json;
    ShelleyGenesisHash = "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81";
  };
  nodeConfig = {
    AlonzoGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/alonzo-genesis.json;
    AlonzoGenesisHash = "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874";
    ByronGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/byron-genesis.json;
    ByronGenesisHash = "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb";
    ConwayGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/conway-genesis.json;
    ConwayGenesisHash = "f7d46bdd3b3c8caf38351c4eef3346a89241707270be0d6106e8a407db294cc6";
    LastKnownBlockVersion-Alt = 0;
    LastKnownBlockVersion-Major = 3;
    LastKnownBlockVersion-Minor = 0;
    MaxKnownMajorProtocolVersion = 2;
    Protocol = "Cardano";
    RequiresNetworkMagic = "RequiresNoMagic";
    ShelleyGenesisFile = /nix/store/4q1kj9w3iz9pw4l26jjq0bwvlqg4x4am-source/cardano-lib/mainnet/shelley-genesis.json;
    ShelleyGenesisHash = "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81";
    TraceAcceptPolicy = true;
    TraceBlockFetchClient = false;
    TraceBlockFetchDecisions = false;
    TraceBlockFetchProtocol = false;
    TraceBlockFetchProtocolSerialised = false;
    TraceBlockFetchServer = false;
    TraceChainDb = true;
    TraceChainSyncBlockServer = false;
    TraceChainSyncClient = false;
    TraceChainSyncHeaderServer = false;
    TraceChainSyncProtocol = false;
    TraceConnectionManager = true;
    TraceDNSResolver = true;
    TraceDNSSubscription = true;
    TraceDiffusionInitialization = true;
    TraceErrorPolicy = true;
    TraceForge = true;
    TraceHandshake = true;
    TraceInboundGovernor = true;
    TraceIpSubscription = true;
    TraceLedgerPeers = true;
    TraceLocalChainSyncProtocol = false;
    TraceLocalConnectionManager = true;
    TraceLocalErrorPolicy = true;
    TraceLocalHandshake = true;
    TraceLocalRootPeers = true;
    TraceLocalTxSubmissionProtocol = false;
    TraceLocalTxSubmissionServer = false;
    TraceMempool = true;
    TraceMux = false;
    TracePeerSelection = true;
    TracePeerSelectionActions = true;
    TracePublicRootPeers = true;
    TraceServer = true;
    TraceTxInbound = false;
    TraceTxOutbound = false;
    TraceTxSubmissionProtocol = false;
    TracingVerbosity = "NormalVerbosity";
    TurnOnLogMetrics = true;
    TurnOnLogging = true;
    defaultBackends = [
      "KatipBK"
    ];
    defaultScribes = [
      [
        "StdoutSK"
        "stdout"
      ]
    ];
    hasEKG = 12788;
    hasPrometheus = [
      "127.0.0.1"
      12798
    ];
    minSeverity = "Info";
    options = {
      mapBackends = {
        "cardano.node.metrics" = [
          "EKGViewBK"
        ];
        "cardano.node.resources" = [
          "EKGViewBK"
        ];
      };
      mapSubtrace = {
        "cardano.node.metrics" = {
          subtrace = "Neutral";
        };
      };
    };
    rotation = {
      rpKeepFilesNum = 10;
      rpLogLimitBytes = 5000000;
      rpMaxAgeHours = 24;
    };
    setupBackends = [
      "KatipBK"
    ];
    setupScribes = [
      {
        scFormat = "ScText";
        scKind = "StdoutSK";
        scName = "stdout";
        scRotation = null;
      }
    ];
  };
  private = false;
  relays = "relays.cardano-mainnet.iohk.io";
  relaysNew = "relays-new.cardano-mainnet.iohk.io";
  smashUrl = "https://smash.cardano-mainnet.iohk.io";
  submitApiConfig = {
    EnableLogMetrics = false;
    EnableLogging = true;
    GenesisHash = "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb";
    PrometheusPort = 8080;
    RequiresNetworkMagic = "RequiresNoMagic";
    defaultBackends = [
      "KatipBK"
    ];
    defaultScribes = [
      [
        "StdoutSK"
        "stdout"
      ]
    ];
    minSeverity = "Info";
    options = {
      cfokey = {
        value = "Release-1.0.0";
      };
      mapBackends = { };
      mapSeverity = {
        db-sync-node = "Info";
        "db-sync-node.Mux" = "Error";
        "db-sync-node.Subscription" = "Error";
      };
      mapSubtrace = {
        "#ekgview" = {
          contents = [
            [
              {
                contents = "cardano.epoch-validation.benchmark";
                tag = "Contains";
              }
              [
                {
                  contents = ".monoclock.basic.";
                  tag = "Contains";
                }
              ]
            ]
            [
              {
                contents = "cardano.epoch-validation.benchmark";
                tag = "Contains";
              }
              [
                {
                  contents = "diff.RTS.cpuNs.timed.";
                  tag = "Contains";
                }
              ]
            ]
            [
              {
                contents = "#ekgview.#aggregation.cardano.epoch-validation.benchmark";
                tag = "StartsWith";
              }
              [
                {
                  contents = "diff.RTS.gcNum.timed.";
                  tag = "Contains";
                }
              ]
            ]
          ];
          subtrace = "FilterTrace";
        };
        "#messagecounters.aggregation" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.ekgview" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.katip" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.monitoring" = {
          subtrace = "NoTrace";
        };
        "#messagecounters.switchboard" = {
          subtrace = "NoTrace";
        };
        benchmark = {
          contents = [
            "GhcRtsStats"
            "MonotonicClock"
          ];
          subtrace = "ObservableTrace";
        };
        "cardano.epoch-validation.utxo-stats" = {
          subtrace = "NoTrace";
        };
      };
    };
    rotation = {
      rpKeepFilesNum = 10;
      rpLogLimitBytes = 5000000;
      rpMaxAgeHours = 24;
    };
    setupBackends = [
      "AggregationBK"
      "KatipBK"
    ];
    setupScribes = [
      {
        scFormat = "ScText";
        scKind = "StdoutSK";
        scName = "stdout";
        scRotation = null;
      }
    ];
  };
  useByronWallet = true;
  usePeersFromLedgerAfterSlot = 84916732;
}

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.explorerConfig

Type: attribute set

Default:

This value is long. Click to expand.
{
  EnableLogMetrics = false;
  EnableLogging = true;
  NetworkName = "mainnet";
  NodeConfigFile = "/nix/store/i3vzp0pa9znlhl5bp1g7w8sv7zhwlmhp-config-mainnet.json";
  PrometheusPort = 8080;
  RequiresNetworkMagic = "RequiresNoMagic";
  defaultBackends = [
    "KatipBK"
  ];
  defaultScribes = [
    [
      "StdoutSK"
      "stdout"
    ]
  ];
  minSeverity = "Info";
  options = {
    cfokey = {
      value = "Release-1.0.0";
    };
    mapBackends = { };
    mapSeverity = {
      db-sync-node = "Info";
      "db-sync-node.Mux" = "Error";
      "db-sync-node.Subscription" = "Error";
    };
    mapSubtrace = {
      "#ekgview" = {
        contents = [
          [
            {
              contents = "cardano.epoch-validation.benchmark";
              tag = "Contains";
            }
            [
              {
                contents = ".monoclock.basic.";
                tag = "Contains";
              }
            ]
          ]
          [
            {
              contents = "cardano.epoch-validation.benchmark";
              tag = "Contains";
            }
            [
              {
                contents = "diff.RTS.cpuNs.timed.";
                tag = "Contains";
              }
            ]
          ]
          [
            {
              contents = "#ekgview.#aggregation.cardano.epoch-validation.benchmark";
              tag = "StartsWith";
            }
            [
              {
                contents = "diff.RTS.gcNum.timed.";
                tag = "Contains";
              }
            ]
          ]
        ];
        subtrace = "FilterTrace";
      };
      "#messagecounters.aggregation" = {
        subtrace = "NoTrace";
      };
      "#messagecounters.ekgview" = {
        subtrace = "NoTrace";
      };
      "#messagecounters.katip" = {
        subtrace = "NoTrace";
      };
      "#messagecounters.monitoring" = {
        subtrace = "NoTrace";
      };
      "#messagecounters.switchboard" = {
        subtrace = "NoTrace";
      };
      benchmark = {
        contents = [
          "GhcRtsStats"
          "MonotonicClock"
        ];
        subtrace = "ObservableTrace";
      };
      "cardano.epoch-validation.utxo-stats" = {
        subtrace = "NoTrace";
      };
    };
  };
  rotation = {
    rpKeepFilesNum = 10;
    rpLogLimitBytes = 5000000;
    rpMaxAgeHours = 24;
  };
  setupBackends = [
    "AggregationBK"
    "KatipBK"
  ];
  setupScribes = [
    {
      scFormat = "ScText";
      scKind = "StdoutSK";
      scName = "stdout";
      scRotation = null;
    }
  ];
}

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.logConfig

Type: attribute set

Default: { }

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.postgres.database

the postgresql database to use

Type: string

Default: "cdbsync"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.postgres.generatePGPASS

generate pgpass

Type: boolean

Default: true

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.postgres.port

the postgresql port

Type: signed integer

Default: 5432

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.postgres.socketdir

the path to the postgresql socket

Type: string

Default: "/run/postgresql"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.postgres.user

the postgresql user to use

Type: string

Default: "cexplorer"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.restoreSnapshot

Restore a snapshot before starting cardano-db-sync, if the snasphot file given by the option exist. Snapshot file is deleted after restore.

Type: null or string

Default: null

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.restoreSnapshotSha

SHA256 checksum of the snapshot to restore

Type: null or string

Default: null

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.restoreSnapshotSigKey

Key ID for verifying the snaspshot signature. (Signature check disabled if null)

Type: null or string

Default: null

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.socketPath

Type: null or path

Default: null

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.stateDir

Type: null or string

Default: "/var/lib/cexplorer"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix

services.cardano-db-sync.takeSnapshot

Take snapshot before starting cardano-db-sync, “once” (skip if there is one already), “always” (removing previous snapshot), or “never”.

Type: one of “never”, “once”, “always”

Default: "never"

Declared by: - https://github.com/IntersectMBO/cardano-db-sync/tree/master/nix/nixos/cardano-db-sync-service.nix