Using Source Code
Before you start
The verifier is written in Golang. Before you start, you should make sure you have Golang installed correctly. For more details check: https://go.dev/doc/install.
Clone the source code
The verifier code is open source and currently in development. You can clone the GitHub repository and build the source: https://github.com/carv-protocol/verifier.
git clone https://github.com/carv-protocol/verifier.git && \
cd verifier && \
make build
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.
The private key can be passed to the verifier through startup parameters, or written into the configuration file.
Through startup parameters
If you already have a brand new private key generated, you can start your node with the command below.
# Pass the pre-generated private key in clear text
./verifier -private-key <Your Private Key> -reward-address <Your Reward Address> -commission-rate <Your Commission Rate>
# By specifying keystore
./verifier -keystore-path <Path to keystore file> -keystore-password <keystore password> -reward-address <Your Reward Address> -commission-rate <Your Commission Rate>
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>
After running the command, you will be prompted to enter a password for the keystore. After entering the password, the keystore file will be generated in the specified path. And then you can run the verifier with the keystore file path and password before you delegate to the keystore address.
Through configuration file
If you prefer to config your own parameters, including RPC url, private key mode, etc. you can operate your node using config file, check details below:
Set
wallet.mode
in the configuration file (../configs/config.yaml
) to1
,Write the plain text private key into
wallet.private_key
,Write your reward address into
wallet.reward_claimer_addr
,Write your commission rate into
wallet.commission_rate
. Then run
./verifier -conf ../configs/config.yaml
Configure the path and password of the keystore:
Set
wallet.mode
in the configuration file (../configs/config.yaml
) to2
,Write the path and password of the keystore file into
wallet.keystore_path
Write the keystore password into
wallet.keystore_password
.Write your reward address into
wallet.reward_claimer_addr
,Write your commission rate into
wallet.commission_rate
. Then run
./verifier -conf ../configs/config.yaml
Last updated