Using Source Code

Clone the source code

The verifier code is open source and currently in development. You can clone the GitHub repository: https://github.com/carv-protocol/verifier.

Build from the source code

Building verifier requires a Go (version 1.21 or later). You can install it using your preferred package manager. Then run

make build

After this, the verifier executable program has been compiled. If you just need to run the node, you can jump directly to Run via binary program.

If you want to become a contributor to this project, you can follow the following steps to compile verifier after completing the modifications.

To download dependencies during compilation, run

make init

These dependencies will be downloaded and compiled to $GOPATH/bin. This path needs to be added to the environment variable by running export PATH=$PATH:$GOPATH/bin. If it has already been added, ignore it.

Then, build the project by running

make all

Run via binary program

After executing make build or make all, the verifier executable file will be compiled into the ./bin directory. You need to switch to the ./bin directory before executing verifier. run

cd bin

If this is your first time running verifier, you need to specify a private key. The private key will sign the verification transaction, and the corresponding address will receive carv rewards.

The private key can be passed to the verifier through startup parameters, or written into the configuration file.

We have prepared a config.yaml file template in the ./configs directory, and have written some basic default configurations into the file. If you need to use more customized configurations, you can refer to Configuration

Through startup parameters

If you want to pass the private key through startup parameters, you need to set wallet.mode in the configuration file to 0.

# Pass the private key in clear text
./verifier -conf ../configs/config.yaml -private-key <Your Private Key>

# By specifying keystore
./verifier -conf ../configs/config.yaml -keystore-path <Path to keystore file> -keystore-password <keystore's password>

In order to facilitate user operation, verifier provides a tool to generate a new keystore, run

./verifier -generate-keystore -keystore-path <path to generate your keystore file>

Through configuration file

Configure the plain text private key: Set wallet.mode in the configuration file to 1, and write the plain text private key into wallet.private_key. Then run

./verifier -conf ../configs/config.yaml
  • Configure the path and password of the keystore: Set wallet.mode in the configuration file to 2, and write the path and password of the keystore file into wallet.keystore_path and wallet.keystore_password. Then run

./verifier -conf ../configs/config.yaml

Last updated