Configuration

Indexer node configuration

Configuration File

The storetheindex config file is a JSON document located at $STORETHEINDEX_PATH/config. It is read once at indexer instantiation, either for an offline command, or when starting the daemon. Commands that execute on a running daemon do not read the config file at runtime.

Sample Config file

{
  "Version": 2,
  "Identity": {
    "PeerID": "12D3KooWJZSPZN7cudwBJ6UdTm8V5FmgWhAd2oVa8qFagU7bZSm1",
    "PrivKey": "CAESQKP70L69Q7An97xPH6g3PgSypws6mHYcAZ77t9pC2a0/geY+Kh3gaSzfPqHpSyjy7Fd3hQPweU+BNbhhKHSHrJw="
  },
  "Addresses": {
    "Admin": "/ip4/127.0.0.1/tcp/3002",
    "Finder": "/ip4/0.0.0.0/tcp/3000",
    "Ingest": "/ip4/0.0.0.0/tcp/3001",
    "P2PAddr": "/ip4/0.0.0.0/tcp/3003",
    "NoResourceManager": false
  },
  "Bootstrap": {
    "Peers": [
      "/dns4/bootstrap-1.mainnet.filops.net/tcp/1347/p2p/12D3KooWCwevHg1yLCvktf2nvLu7L9894mcrJR4MsBCcm4syShVc",
      "/dns4/bootstrap-3.mainnet.filops.net/tcp/1347/p2p/12D3KooWKhgq8c7NQ9iGjbyK7v7phXvG6492HQfiDaGHLHLQjk7R",
      "/dns4/bootstrap-8.mainnet.filops.net/tcp/1347/p2p/12D3KooWScFR7385LTyR4zU1bYdzSiiAb5rnNABfVahPvVSzyTkR",
      "/dns4/bootstrap-0.ipfsmain.cn/tcp/34721/p2p/12D3KooWQnwEGNqcM2nAcPtRR9rAX8Hrg4k9kJLCHoTR5chJfz6d",
      "/dns4/bootstrap-0.mainnet.filops.net/tcp/1347/p2p/12D3KooWCVe8MmsEMes2FzgTpt9fXtmCY7wrq91GRiaC8PHSCCBj",
      "/dns4/bootstrap-2.mainnet.filops.net/tcp/1347/p2p/12D3KooWEWVwHGn2yR36gKLozmb4YjDJGerotAPGxmdWZx2nxMC4",
      "/dns4/bootstrap-5.mainnet.filops.net/tcp/1347/p2p/12D3KooWLFynvDQiUpXoHroV1YxKHhPJgysQGH2k3ZGwtWzR4dFH",
      "/dns4/bootstrap-6.mainnet.filops.net/tcp/1347/p2p/12D3KooWP5MwCiqdMETF9ub1P3MbCvQCcfconnYHbWg6sUJcDRQQ",
      "/dns4/bootstrap-1.starpool.in/tcp/12757/p2p/12D3KooWQZrGH1PxSNZPum99M1zNvjNFM33d1AAu5DcvdHptuU7u",
      "/dns4/lotus-bootstrap.ipfsforce.com/tcp/41778/p2p/12D3KooWGhufNmZHF3sv48aQeS13ng5XVJZ9E6qy2Ms4VzqeUsHk",
      "/dns4/bootstrap-0.starpool.in/tcp/12757/p2p/12D3KooWGHpBMeZbestVEWkfdnC9u7p6uFHXL1n7m1ZBqsEmiUzz",
      "/dns4/bootstrap-4.mainnet.filops.net/tcp/1347/p2p/12D3KooWL6PsFNPhYftrJzGgF5U18hFoaVhfGk7xwzD8yVrHJ3Uc",
      "/dns4/bootstrap-7.mainnet.filops.net/tcp/1347/p2p/12D3KooWRs3aY1p3juFjPy8gPN95PEQChm2QKGUCAdcDCC4EBMKf",
      "/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt",
      "/dns4/bootstrap-1.ipfsmain.cn/tcp/34723/p2p/12D3KooWMKxMkD5DMpSWsW7dBddKxKT7L2GgbNuckz9otxvkvByP"
    ],
    "MinimumPeers": 4
  },
  "Datastore": {
    "Dir": "datastore",
    "Type": "levelds"
  },
  "Discovery": {
    "LotusGateway": "https://api.chain.love",
    "Policy": {
      "Allow": true,
      "Except": ["12D3KooWEbhQxDZpDwvqBVPbxUXz8AquMziyUv2HT77YNKQYPiDx"],
      "Publish": true,
      "PublishExcept": null
    },
    "PollInterval": "24h0m0s",
    "PollRetryAfter": "5h0m0s",
    "PollStopAfter": "168h0m0s",
    "PollOverrides": [
      {
        "ProviderID": "12D3KooWRYLtcVBtDpBZDt5zkAVFceEHyozoQxr4giccF7fquHR2",
        "Interval": "12h0m0s",
        "RetryAfter": "45m0s",
        "StopAfter": "3h0m0s"
      }
    ],
    "RediscoverWait": "5m0s",
    "Timeout": "2m0s"
  },
  "Indexer": {
    "CacheSize": 300000,
    "ConfigCheckInterval": "30s",
    "GCInterval": "30m0s",
    "ShutdownTimeout": "10s",
    "ValueStoreDir": "valuestore",
    "ValueStoreType": "sth"
  },
  "Ingest": {
    "AdvertisementDepthLimit": 33554432,
    "EntriesDepthLimit": 65536,
    "HttpSyncRetryMax": 4,
    "HttpSyncRetryWaitMax": "30s",
    "HttpSyncRetryWaitMin": "1s",
    "HttpSyncTimeout": "10s",
    "IngestWorkerCount": 10,
    "PubSubTopic": "/indexer/ingest/mainnet",
    "RateLimit": {
      "Apply": false,
      "Except": null,
      "BlocksPerSecond": 100,
      "BurstSize": 500
    },
    "ResendDirectAnnounce": true,
    "StoreBatchSize": 4096,
    "SyncSegmentDepthLimit": 2000,
    "SyncTimeout": "2h0m0s"
  },
  "Logging": {
    "Level": "info",
    "Loggers": {
      "basichost": "warn",
      "bootstrap": "warn",
      "dt-impl": "warn",
      "dt_graphsync": "warn",
      "graphsync": "warn"
    }
  }
  "Peering": {
    "Peers": [
      "/ip4/10.11.12.13/3003/p2p/12D3KooWH1cT2UxrKYikmrksmCsdekvb6yuhxvNMup68DLpFEKZ3"
    ]
  }
}

Version

Identity

Addresses

Bootstrap

Datastore

Discovery

Discovery.Policy

Discovery.PollOverrides

There are no default Discovery.PollOverrides elements. These are created manually.

Indexer

Ingest

Ingest.RateLimit

Logging

Peering

Runtime Reloadable Items

The storetheindex daemon can reload some portions of its config without restarting the entire daemon. This is done by editing the config file and then using the admin sub-command reload-config or sending the daemon process a SIGHUP signal. The daemon will automatically reload the edited config after 30 seconds when the daemon is run with the --watch-config flag or with the environ variable STORETHEINDEX_WATCH_CONFIG=true. The reloadable portions of the config files are:

  • Discovery.Policy

  • Indexer.ConfigCheckInterval

  • Indexer.ShutdownTimeout

  • Ingest.IngestWorkerCount

  • Ingest.RateLimit

  • Ingest.StoreBatchSize

  • Logging

  • Peering

Last updated