# How to Run a Verifier Node

### 1. Overview

ZK verifier nodes are one of the critical roles in Cysic Network. Their job is to verify the ZK proofs generated by the Prover Node, and obtain Cysic Network credits as the rewards. Operating a verifier node requires minimum understand of the DeeOps and requirement on the hardware.

### 2. Prerequisites

Before proceeding, ensure your system meets the following requirements:

* Basic understanding of command-line operations
* Reliable internet connection
* Compatible operating system (Linux, macOS, or Windows)

### 3. Deploying the Verifier Node

#### 3.1 Linux Installation

1. Launch your terminal application on Linux.
2. Execute the following command, replacing `0x-Fill-in-your-reward-address-here` with your designated reward address:

   ```bash
   # Replace with your actual reward address
   curl -L https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/setup_linux.sh > ~/setup_linux.sh && bash ~/setup_linux.sh 0x-Fill-in-your-reward-address-here
   ```
3. Start the Verifier Node service:

   ```bash
   cd ~/cysic-verifier && bash start.sh
   ```

#### 3.2 macOS Installation

1. Open your terminal application on macOS.
2. Run the following command, substituting `0x-Fill-in-your-reward-address-here` with your reward address:

   ```bash
   # Replace with your actual reward address
   curl -L https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/setup_mac.sh > ~/setup_mac.sh && bash ~/setup_mac.sh 0x-Fill-in-your-reward-address-here
   ```
3. Initiate the Verifier Node service:

   ```bash
   cd ~/cysic-verifier && bash start.sh
   ```

#### 3.3 Windows Installation

1. Open PowerShell as an administrator on Windows.
2. Execute the following commands sequentially, replacing `0x-Fill-in-your-reward-address-here` with your reward address:

   ```powershell
   # Replace with your actual reward address
   cd $env:USERPROFILE
   Invoke-WebRequest -Uri "https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/setup_win.ps1" -OutFile "setup_win.ps1"
   .\setup_win.ps1 -CLAIM_REWARD_ADDRESS "0x-Fill-in-your-reward-address-here"
   ```
3. Start the Verifier Node service:

   ```powershell
   # run the verifier
   cd $env:USERPROFILE\cysic-verifier

   .\start.ps1
   ```

### 4. Post-Deployment Configuration

#### 4.1 Verifier Node Initialization Output

Upon successful startup of the Verifier Node using the `start.sh` script, you will observe terminal output similar to the following:

```bash
2025/12/07 10:02:40 start setup config
2025/12/07 10:02:40 always submit result pass: true
2025/12/07 10:02:40 start setup service
2025/12/07 10:02:40 start load default sender
2025/12/07 10:02:40 start load secret file from path: ./data/assets
2025/12/07 10:02:40 file: data/assets/0x179745B18af3975582078aa9B55802F9A9Db9fdD.key not exist, we will create it.
2025/12/07 10:02:40 your worker address mnemonic file is in: data/assets/0x179745B18af3975582078aa9B55802F9A9Db9fdD.key, please keep it!!!
2025/12/07 10:02:40 your worker address mnemonic file is in: data/assets/0x179745B18af3975582078aa9B55802F9A9Db9fdD.key, please keep it!!!
2025/12/07 10:02:40 your worker address mnemonic file is in: data/assets/0x179745B18af3975582078aa9B55802F9A9Db9fdD.key, please keep it!!!
2025/12/07 10:02:42 send register info to server
2025/12/07 10:02:42 received message:  {"code":0,"message":"your current worker address is: 0x70054B7BC1a25D3fff3eE9A95Cb13CD611009D2d","respType":0,"data":null}

2025/12/07 10:02:42 received message:  {"code":0,"message":"","respType":1,"data":"eyJoZWFydGJlYXREdXJhdGlvbiI6MTV9Cg=="}

2025/12/07 10:04:46 received message:  {"code":0,"message":"please Reserve first","respType":0,"data":null}
```

#### 4.2 Critical Post-Deployment Steps

After starting the Verifier Node, complete the following mandatory steps:

1. **Secure Key Management**: Immediately backup all worker key files located in the `data/assets` directory. These keys are essential for node operation and reward claiming; store them in a secure, offline location.
2. **Node Registration**: Proceed to the Cysic Mainnet Website to reserve CYS tokens for your worker node, enabling it to participate in proof verification tasks.

#### 4.3 Reserving CYS for Your Worker Node

> A reserve of 10 CYS is required for each Verifier Worker Node.

To activate your Verifier Node, follow these steps to reserve CYS tokens:

1. **Access the Cysic Mainnet Portal**: Navigate to the official Cysic Mainnet Website: <https://app.cysic.xyz/verifier>
2. **Authenticate Your Account**: Click the sign-in button and follow the prompts to authenticate.

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2F8heqxSg5qkS552qrDbHQ%2Fimage.png?alt=media&#x26;token=6edec903-9089-4718-a57c-6211ac8291f2" alt=""><figcaption></figcaption></figure>
3. **Connect Your Wallet**: Establish a connection between your wallet and the Cysic Mainnet Portal.<br>

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2FUjzwEgJ38aR3KzZ7DLpC%2Fimage-2.png?alt=media&#x26;token=cd4e0ec3-baa0-4578-95de-380050e7313a" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2FRFiOE5LHHwe1nCJB7XuY%2Fimage-3.png?alt=media&#x26;token=1e361f3e-0768-4bc1-8401-b6ff56b22f8d" alt=""><figcaption></figcaption></figure>

   <br>

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2FkZ07ClVKqVKenA95sma1%2Fimage-4.png?alt=media&#x26;token=6bfb8c8e-7659-49eb-8034-2f8e12a9a307" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2F1qTZIrMnBK2EZ4nzCvGs%2Fimage-5.png?alt=media&#x26;token=5f40e132-7ea9-40d4-bc18-8ada488129b5" alt=""><figcaption></figcaption></figure>
4. **Connect Keplr Wallet**: Select the *CONNECT KEPLR* button and confirm the connection request.

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2FOSNqRJCzNwjgW5Q5yxmB%2Fimage-6.png?alt=media&#x26;token=c2d0e939-94bb-4633-ac0a-beba8c0d7a5b" alt=""><figcaption></figcaption></figure>
5. **Reserve CYS Tokens**: Scroll to the RESERVE CYS section, click the *RESERVE* button, select your worker node from the dropdown menu, and specify the required amount of CYS tokens to reserve.

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2FgoI82Fg4PVyXQL6Ssp72%2Fimage-7.png?alt=media&#x26;token=5451ed20-05a1-4571-b537-6757261d4371" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2406098683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGVogr2MITqNj2IDnHOl%2Fuploads%2F7mttnQyNldyqkgl1OKeA%2Fimage-8.png?alt=media&#x26;token=ab567388-692f-4132-9de7-8c61ce77bf30" alt=""><figcaption></figcaption></figure>
6. **Verification of Activation**: After successfully reserving CYS tokens, your Verifier Node terminal will display output similar to the following, indicating the node is ready to receive verification tasks:

   ```bash
   2025/12/08 00:55:12 send heartbeat to server
   2025/12/08 00:55:12 received message:  {"code":0,"message":"","respType":1,"data":"eyJoZWFydGJlYXREdXJhdGlvbiI6MTV9Cg=="}
   ```

**Important Note**: Ensure your Verifier Node maintains a sufficient balance of CYS tokens to cover transaction fees when submitting verification results.

## Appendix

### (Optional) Convert Reward Address to Private Key

> **Warning:** Below command can convert the verifier reward address key file to private key.
>
> This step is only needed if you want to use the private key for other operations. Don't share the private key with anyone.

Run Below command according to your operating system:

1. Linux:

   ```bash
   cd ~/cysic-verifier
   curl -L https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/reward_address_decryptor_linux.sh > reward_address_decryptor_linux.sh
   bash reward_address_decryptor_linux.sh
   ```
2. MacOS:

   ```bash
   cd ~/cysic-verifier
   curl -L https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/reward_address_decryptor_mac.sh > reward_address_decryptor_mac.sh
   bash reward_address_decryptor_mac.sh
   ```
3. Windows:

   ```ps1
   cd $env:USERPROFILE\cysic-verifier
   Invoke-WebRequest -Uri "https://github.com/cysic-labs/cysic-mainnet-scripts/releases/download/v1.0.0/reward_address_decryptor_win.ps1" -OutFile "reward_address_decryptor_win.ps1"
   .\reward_address_decryptor_win.ps1
   ```

Above command will do the following task:

* Download the decryptor script to the `~/cysic-verifier` folder.
* Execute the decryptor script, the script will do the following steps:
  * Download the decryptor program to the `~/cysic-verifier/data/assets/` folder.
  * Make the decryptor program executable.
  * Run the decryptor program(the program will try to decrypt the reward address key file in current folder and print the private key to the console. If you have other key files need to decrypt, please copy them to this folder and the program will decrypt them as well).

The output of the decryptor program will be similar to below:

```
read privatekey from current dir
found 1 privatekey file
==========================================
reward address: 0x6e1fC643be3fDBeA1d80BA7e6E373491246E60D6
	 privatekey: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
==========================================
```
