### Configure Reorg Handler Start Block (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This setting specifies the starting block number from which the reorg handler should begin its scan. It's useful for initializing the scan from a specific point in the blockchain history. The default starting block is 0. ```yaml reorgHandler: fromBlock: 20000000 ``` -------------------------------- ### Run Insight Data API Server Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Executes the compiled Insight application, starting the 'api' component. This launches the data API server, which is typically accessible at `http://localhost:3000` for querying processed blockchain data. ```Bash ./main api ``` -------------------------------- ### Run Insight Orchestrator Component Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Executes the compiled Insight application, specifically starting the 'orchestrator' component. The orchestrator is responsible for coordinating the Poller, Failure Recoverer, and Committer. ```Bash ./main orchestrator ``` -------------------------------- ### Configure Committer From Block Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Specifies the starting block number from which the committer should begin committing. The default value is `0`. This parameter can be controlled using `--committer-from-block` or `COMMITTER_FROMBLOCK`. ```yaml committer: fromBlock: 20000000 ``` -------------------------------- ### Force Reorg Handler Start Block (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This boolean flag controls whether the reorg handler is forced to start scanning from the block specified by `reorgHandler-from-block`. Enabling this ensures the scan always begins at the designated block, overriding any previous state. The default value is `false`. ```yaml reorgHandler: forceFromBlock: true ``` -------------------------------- ### Force Poller Start Block Source: https://github.com/thirdweb-dev/insight/blob/main/README.md If set to `true`, forces the poller to start from the specified `fromBlock` even if previous state exists. The default value is `false`. This setting can be configured using `--poller-force-from-block` or `POLLER_FORCEFROMBLOCK`. ```yaml poller: forceFromBlock: false ``` -------------------------------- ### Configure Poller From Block Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Specifies the starting block number from which the poller should begin polling. The default value is `0`. This parameter can be controlled using `--poller-from-block` or `POLLER_FROMBLOCK`. ```yaml poller: fromBlock: 20000000 ``` -------------------------------- ### Clone Insight Repository Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Clones the Insight project repository from GitHub to your local machine, which is the first step to setting up the development environment. ```Bash git clone https://github.com/thirdweb-dev/insight.git ``` -------------------------------- ### Insight Application Configuration Reference Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Comprehensive documentation for configuring the Insight application. Settings can be applied via command line arguments, environment variables, or YAML configuration files, with a defined priority order. This section details common RPC-related configurations. ```APIDOC Configuration Priority: 1. Command line arguments 2. Environment variables 3. Configuration files RPC URL: Description: URL to use as the RPC client. Command Line Flag: --rpc-url Environment Variable: RPC_URL YAML Path: rpc: url: https://rpc.com RPC Blocks Per Request: Description: How many blocks at a time to fetch from the RPC. Default is 1000. Command Line Flag: --rpc-blocks-blocksPerRequest Environment Variable: RPC_BLOCKS_BLOCKSPERREQUEST YAML Path: rpc: blocks: blocksPerRequest: 1000 ``` -------------------------------- ### Build Insight Go Application Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Compiles the Insight Go application into an executable named 'main'. The '-tags=production' flag ensures the build is optimized for production environments. ```Go go build -o main -tags=production ``` -------------------------------- ### Configure Application Storage (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This section configures the application's various storage types: `main`, `staging`, and `orchestrator`. Each storage type supports different drivers, such as ClickHouse, and requires specific connection details and credentials. These configurations are essential as there are no default values provided for storage. ```yaml storage: main: clickhouse: port: 3000 database: "base" disableTLS: true staging: clickhouse: port: 3000 database: "staging" ``` ```yaml storage: main: clickhouse: host: localhost user: admin password: password staging: clickhouse: host: localhost username: admin password: password ``` -------------------------------- ### Configure Log Level Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the log level for the application's logger. The default level is `warn`. This can be configured using the `--log-level` command-line argument or the `LOG_LEVEL` environment variable. ```yaml log: level: debug ``` -------------------------------- ### Enable RPC Traces Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Controls whether fetching traces from the RPC is enabled. The default value is `true`, but the system will automatically detect if the RPC supports traces. Configurable via `--rpc-traces-enabled` or `RPC_TRACES_ENABLED`. ```yaml rpc: traces: enabled: true ``` -------------------------------- ### Enable Prettified Logs Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Determines whether logs should be printed in a human-readable, prettified format. Enabling this option may affect performance. The default value is `false`. Configurable via `--log-prettify` or `LOG_PRETTIFY`. ```yaml log: prettify: true ``` -------------------------------- ### Enable RPC Block Receipts Source: https://github.com/thirdweb-dev/insight/blob/main/README.md If set to `true`, the system will attempt to use `eth_getBlockReceipts` instead of `eth_getLogs` for fetching receipt data, provided the RPC supports it. This allows access to more detailed transaction receipt information but is not universally supported by all RPCs. The default value is `false`. Configurable via `--rpc-block-receipts-enabled` or `RPC_BLOCKRECEIPTS_ENABLED`. ```yaml rpc: blockReceipts: enabled: true ``` -------------------------------- ### Configure RPC Blocks Batch Delay Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the delay in milliseconds to wait between batches of blocks when fetching data from the RPC. The default value is 0. This setting can be configured using the `--rpc-blocks-batchDelay` command-line argument or the `RPC_BLOCKS_BATCHDELAY` environment variable. ```yaml rpc: blocks: batchDelay: 100 ``` -------------------------------- ### Configure RPC Traces Batch Delay Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the delay in milliseconds to wait between batches of traces when fetching from the RPC. The default value is 0. This parameter can be controlled using `--rpc-traces-batchDelay` or `RPC_TRACES_BATCHDELAY`. ```yaml rpc: traces: batchDelay: 100 ``` -------------------------------- ### Configure Failure Recoverer Interval (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This parameter sets the interval, in milliseconds, at which the failure recoverer attempts to trigger a recovery process. It dictates the frequency of recovery attempts. The default interval is 1000ms. ```yaml failureRecoverer: interval: 3000 ``` -------------------------------- ### Configure RPC Traces Blocks Per Request Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Specifies how many blocks at a time to fetch traces for from the RPC. The default value is 100. This setting has no effect if its value is larger than the RPC blocks per request. It can be set via `--rpc-traces-blocksPerRequest` or `RPC_TRACES_BLOCKSPERREQUEST`. ```yaml rpc: traces: blocksPerRequest: 100 ``` -------------------------------- ### Configure RPC Logs Batch Delay Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Specifies the delay in milliseconds to wait between batches of logs when fetching from the RPC. The default value is 0. This parameter can be controlled using `--rpc-logs-batchDelay` or `RPC_LOGS_BATCHDELAY`. ```yaml rpc: logs: batchDelay: 100 ``` -------------------------------- ### Configure Failure Recoverer Blocks Per Run (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This setting determines the maximum number of blocks the failure recoverer will attempt to process or recover in a single run. It helps manage the workload during recovery operations. The default value is 10 blocks per run. ```yaml failureRecoverer: blocksPerRun: 100 ``` -------------------------------- ### Configure Reorg Handler Interval (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This configuration sets the trigger interval for the reorg handler, specified in milliseconds. It determines how frequently the system checks for blockchain reorgs. The default value is 1000ms. ```yaml reorgHandler: interval: 3000 ``` -------------------------------- ### Configure RPC Logs Blocks Per Request Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Defines the number of blocks to query for logs from the RPC in a single request. The default value is 100. This setting has no effect if its value is larger than the RPC blocks per request. It can be set via `--rpc-logs-blocksPerRequest` or `RPC_LOGS_BLOCKSPERREQUEST`. ```yaml rpc: logs: blocksPerRequest: 100 ``` -------------------------------- ### Configure Reorg Handler Blocks Per Scan (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This parameter defines the number of blocks the reorg handler will scan during each check for reorgs. A higher value means a wider scan range per interval. The default is 100 blocks. ```yaml reorgHandler: blocksPerScan: 1000 ``` -------------------------------- ### Enable Failure Recoverer (YAML) Source: https://github.com/thirdweb-dev/insight/blob/main/README.md This configuration enables or disables the failure recoverer component of the application. When enabled, the system attempts to recover from processing failures. The default state for this feature is `true`. ```yaml failureRecoverer: enabled: true ``` -------------------------------- ### Configure Poller Blocks Per Poll Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Defines how many blocks the poller should process in each interval. The default value is `10`. This setting can be configured using `--poller-blocks-per-poll` or `POLLER_BLOCKSPERPOLL`. ```yaml poller: blocksPerPoll: 3 ``` -------------------------------- ### Configure RPC Block Receipts Batch Delay Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the delay in milliseconds to wait between batches of block receipts when fetching from the RPC. The default value is 0. This setting can be controlled via `--rpc-block-receipts-batchDelay` or `RPC_BLOCKRECEIPTS_BATCHDELAY`. ```yaml rpc: blockReceipts: batchDelay: 100 ``` -------------------------------- ### Configure Committer Blocks Per Commit Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Defines how many blocks the committer should process and commit in each interval. The default value is `10`. This setting can be configured using `--committer-blocks-per-commit` or `COMMITTER_BLOCKSPERCOMMIT`. ```yaml committer: blocksPerCommit: 1000 ``` -------------------------------- ### Configure RPC Block Receipts Blocks Per Request Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Determines how many blocks at a time to fetch block receipts for from the RPC. The default value is 250. This setting has no effect if its value is larger than the RPC blocks per request. It can be configured using `--rpc-block-receipts-blocksPerRequest` or `RPC_BLOCKRECEIPTS_BLOCKSPERREQUEST`. ```yaml rpc: blockReceipts: blocksPerRequest: 100 ``` -------------------------------- ### Enable Reorg Handler Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Controls whether the reorg handler component is enabled. The default value is `true`. This setting can be configured using `--reorgHandler-enabled` or `REORGHANDLER_ENABLED`. ```yaml reorgHandler: enabled: true ``` -------------------------------- ### Configure Committer Interval Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the trigger interval for the committer in milliseconds. The default value is `250`. This parameter can be controlled using `--committer-interval` or `COMMITTER_INTERVAL`. ```yaml committer: interval: 3000 ``` -------------------------------- ### Configure Poller Until Block Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the ending block number until which the poller should continue polling. If this parameter is not set, the poller will continue to poll until the latest available block. This can be configured using `--poller-until-block` or `POLLER_UNTILBLOCK`. ```yaml poller: untilBlock: 20000010 ``` -------------------------------- ### Configure Poller Interval Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Sets the trigger interval for the poller in milliseconds. The default value is `1000`. This parameter can be controlled using `--poller-interval` or `POLLER_INTERVAL`. ```yaml poller: interval: 3000 ``` -------------------------------- ### Enable Committer Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Controls whether the committer component is enabled. The default value is `true`. This setting can be configured using `--committer-enabled` or `COMMITTER_ENABLED`. ```yaml committer: enabled: true ``` -------------------------------- ### Enable Poller Source: https://github.com/thirdweb-dev/insight/blob/main/README.md Controls whether the poller component is enabled. The default value is `true`. This setting can be configured using `--poller-enabled` or `POLLER_ENABLED`. ```yaml poller: enabled: true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.