!!! info "Reminder !!"
Ensure the [Pre-Requisites](../basics.md#pre-requisites) are in place before you proceed.
`cncli.sh` is a script to download and deploy [CNCLI](https://github.com/cardano-community/cncli) created and maintained by Andrew Westberg. It's a community-based CLI tool written in RUST for low-level `cardano-node` communication. Usage is **optional** and no script is dependent on it. The main features include:
- **PING** - Validates that the remote server is on the given network and returns its response time. Utilized by `gLiveView` for peer analysis if available.
- **SYNC** - Connects to a node (local or remote) and synchronizes blocks to a local `sqlite` database.
- **VALIDATE** - Validates that a block hash or partial block hash is on-chain.
- **LEADERLOG** - Calculates a stakepool's expected slot list. On the mainnet and the official testnet, the next epoch's leader schedule is available 1.5 days before the end of the epoch (`firstSlotOfNextEpoch - (3 * k / f)`).
- **SENDTIP** - Send node tip to [PoolTool](https://pooltool.io/) for network analysis and to show that your node is alive and well with a green badge.
- **SENDSLOTS** - Securely sends PoolTool the number of slots you have assigned for an epoch and validates the correctness of your past epochs.
#### Installation
`cncli.sh` script's main functions, `sync`, `leaderlog`, `validate` and PoolTool `sendslots`/`sendtip` are not meant to be run manually, but instead deployed as systemd services that run in the background to do the block scraping and validation automatically. Additional commands exist for manual execution to initiate the `sqlite` db, filling the blocklog DB with all blocks created by the pool known to the blockchain, migration of old cntoolsBlockCollector JSON blocklog, and re-validation of blocks and leaderlogs. See usage output below for a complete list of available commands.
The script works in tandem with [Log Monitor](../Scripts/logmonitor.md) to provide faster adopted status but mainly to catch slots the node is leader for but are unable to create a block for. These are marked as invalid. Blocklog will however work fine without the `logMonitor` service and `CNCLI` is able to handle everything except catching invalid blocks.
1. Run the latest version of `guild-deploy.sh` with `guild-deploy.sh -s c` to download and install RUST and CNCLI. IOG fork of libsodium required by CNCLI is automatically compiled by CNCLI build process. If a previous installation is found, RUST and CNCLI will be updated to the latest version.
2. Run `deploy-as-systemd.sh` to deploy the systemd services that handle all the work in the background. Six systemd services in total are deployed whereof four are related to CNCLI. See above for the different purposes they serve.
3. If you want to disable some of the deployed services, run `sudo systemctl disable <service>`
This file has been truncated. show original