Interface TezosNodeDappetizerConfig

Configures connection to Tezos node to be used to fetch blockchain data. This is used as a part of DappetizerConfigUsingDb.

Example

Sample usage (all properties specified explicitly) within dappetizer.config.ts file:

import { DappetizerConfigUsingDb } from '@tezos-dappetizer/database';

const config: DappetizerConfigUsingDb = {
networks: {
mainnet: {
tezosNode: {
url: 'https://mainnet-tezos.giganode.io',
retryDelaysMillis: [50, 500, 1_000, 2_000, 4_000],
monitor: {
reconnectIfStuckMillis: 180_000,
chunkCount: {
warn: 100,
fail: 1_000,
},
},
},
... // Other config parts.
},
testnet: {
tezosNode: {
url: 'https://testnet-tezos.giganode.io',
retryDelaysMillis: [50, 500, 1_000, 2_000, 4_000],
monitor: {
reconnectIfStuckMillis: 180_000,
chunkCount: {
warn: 100,
fail: 1_000,
},
},
},
... // Other config parts.
},
},
... // Other config parts.
};

export default config;

Hierarchy

  • TezosNodeDappetizerConfig

Properties

health?: { watcherCacheMillis?: number }

Configures reporting of health status of the Tezos node connection.

Type declaration

  • Optional watcherCacheMillis?: number

    The time in milliseconds for how long health state of Tezos node watcher is cached. Tezos node watcher gets HEAD block header on demand and reports respective error if any.

    Limits

    An integer with minimum 0.

    Default

    `5_000``

monitor?: { chunkCount?: { fail?: number; warn?: number }; reconnectIfStuckMillis?: number }

Configures connection to Tezos node monitor.

Type declaration

  • Optional chunkCount?: { fail?: number; warn?: number }

    Tezos node monitor responds with chunks of incomplete JSON. So they need to be joined.

    • Optional fail?: number

      The number of chunks from Tezos node monitor when it fails and the connection is reestablished.

      Limits

      An integer with minimum 1.

      Default

      1_000

    • Optional warn?: number

      The number of chunks from Tezos node monitor when a warning is logged.

      Limits

      An integer with minimum 1.

      Default

      100

  • Optional reconnectIfStuckMillis?: number

    If Tezos node monitor does not send a new item (block or mempool operation group respectively) for specified number of milliseconds, then the connection is considered as stuck and it is restarted.

    Limits

    An integer with minimum 1.

    Default

    180_000 (3 minutes)

retryDelaysMillis?: number[]

The array which configures how many times an RPC request is retried when it fails. An array item is a sleep delay is milliseconds until the retry.

Default

[50, 500, 1_000, 2_000, 4_000]

url: string

The URL of Tezos node RPC to which the indexer should connect. It must be an absolute URL string.

Generated using TypeDoc