fairyringclient is a client for submitting their keyshare to fairyring.
This command will build the project to an executable in this directory
go buildIf you would like to have the executable in GOPATH
go installInitialize the FairyRing Client by the following command,
It will create a config directory under your $HOME directory: $HOME/.fairyringclient.
fairyringclient config initAfter initializing the config directory,
If your node is not running on localhost / the GRPC port is not 9090 / the tendermint port is not 26657,
Run the following command to update the config:
fairyringclient config --ip 'node-ip' --port 'tendermint port' --grpc-port 'grpc port'For example if your node endpoint is on 192.168.1.100 and the tendermint port is updated to 26666,
then you can run the following command to update the ip & port:
fairyringclient config update --ip "192.168.1.100" --port 26666After upgrading the config, run the following command to show your config to make sure the config is correct:
fairyringclient config showHere is an example output of the command:
> fairyringclient config show
Using config file: /Users/fairblock/.fairyringclient/config.yml
GRPC Endpoint: 192.168.1.100:9090
FairyRing Node Endpoint: http://192.168.1.100:26666
Chain ID: fairyring-testnet-3
Chain Denom: ufairy
InvalidSharePauseThreshold: 5
MetricsPort: 2222
You can add your validator private key by the following command:
fairyringclient keys set "private key in hex"The private key should be the validator address that is staking on Fairyring chain
Example:
> fairyringclient keys set f5c691d4b53ec8c3a3ad35e88525f9b8f33d307b3414c93f1b856265409a3a04
Using config file: /Users/fairblock/.fairyringclient/config.yml
Successfully added cosmos private key to config!Then you can see all the private key added to the client by following command:
> fairyringclient keys show
Using config file: /Users/fairblock/.fairyringclient/config.yml
Private Key: f5c691d4b53ec8c3a3ad35e88525f9b8f33d307b3414c93f1b856265409a3a04If you would like to remove the private key:
fairyringclient keys removeExample:
> fairyringclient keys remove
Using config file: /Users/fairblock/.fairyringclient/config.yml
Successfully removed cosmos private key in config!
> fairyringclient keys show
Using config file: /Users/fairblock/.fairyringclient/config.yml
Private Key:You can now delegate another address to submit the key share for you.
Your address need to be a validator in the keyshare module in order to do this.
You will also need the private key for your validator account set in the client config before running this command
After delegating, you can remove the validator's private key and add the delegated address private key to the client instead
fairyringclient delegate add [address]fairyringclient delegate remove [address]Make sure the account you are delegating is already activated and have enough balance for sending transaction
You can start the client by the following command, if will automatically use the config under
$HOME/.fairyringclient/config.yml directory.
fairyringclient start
If you get this error fairyringclient: command not found, Run the following command
export PATH=$PATH:$(go env GOPATH)/binor you can run the executable by ./fairyringclient start after go build