diff --git a/docs/getting-started/assets/signature_checking/check-validator-up.sh b/docs/getting-started/assets/signature_checking/check-validator-up.sh index 4b3e1685..70d0d4aa 100755 --- a/docs/getting-started/assets/signature_checking/check-validator-up.sh +++ b/docs/getting-started/assets/signature_checking/check-validator-up.sh @@ -22,6 +22,17 @@ check_chain_maind() { RET_VALUE=$? set -e } +helpFunction() { + cat << EOF +Flags: + --help help for the script + --tendermint-url tendermint rpc interface for this chain (default "http://127.0.0.1:26657") + --pubkey tendermint Ed25519 PubKey; can be found in ".chain-maind/config/priv_validator_key.json" + --bechpubkey bech32 consensus PubKey; converted to tendermint Ed25519 PubKey automatically; useful for node using tmkms. + +EOF + exit 1 # Exit script after printing help +} check_curl if [[ "${RET_VALUE}" != 0 ]]; then echoerr "curl is not installed. Please install it first." @@ -47,8 +58,12 @@ while [[ $# > 0 ]]; do BECH_PUBKEY="$1" shift 1 ;; + --help) + helpFunction + ;; *) - echoerr "Unknown argument: $1" + echo "Unknown argument: $1" + helpFunction ;; esac done @@ -56,7 +71,7 @@ set +u if [[ ! -z "${BECH_PUBKEY}" ]]; then check_chain_maind if [[ "${RET_VALUE}" != 0 ]]; then - echoerr "curl is not installed. Please install it first for key conversion" + echoerr "chain-maind is not installed or not in PATH. Please install it first or check chain-maind is added to PATH for pubkey key conversion." fi PUBKEY=$(chain-maind debug pubkey ${BECH_PUBKEY} 2>&1 | grep "tendermint/PubKeyEd25519" | cut -d : -f2- | jq -r .value || echoerr "Decode Pubkey Failed ❌") fi diff --git a/docs/getting-started/croeseid-testnet.md b/docs/getting-started/croeseid-testnet.md index 50910b6c..e80b1417 100644 --- a/docs/getting-started/croeseid-testnet.md +++ b/docs/getting-started/croeseid-testnet.md @@ -259,7 +259,15 @@ Once the `create-validator` transaction completes, you can check if your validat To further check if the validator is signing blocks, kindly run this [script](https://github.com/crypto-com/chain-docs/blob/master/docs/getting-started/assets/signature_checking/check-validator-up.sh), for example: ```bash -$ ./check-validator-up.sh --tendermint-url https://testnet-croeseid.crypto.com:26657 --pubkey $(cat ~/.chain-maind/config/priv_validator_key.json | jq -r '.pub_key.value') +$ curl -sSL https://raw.githubusercontent.com/crypto-com/chain-docs/master/docs/getting-started/assets/signature_checking/check-validator-up.sh | bash -s -- --tendermint-url https://testnet-croeseid.crypto.com:26657 --pubkey $(cat ~/.chain-maind/config/priv_validator_key.json | jq -r '.pub_key.value') + +The validator is in the active validator set under the address +The validator is signing @ Block# 👍 +``` + +For those who are using tmkms in background([AWS](./testnet-aws-1click.html)/[Azure](./testnet-azure-1click.html) 1-click deployment are using tmkms), you should use `--bechpubkey` the consensus pubkey with prefix `tcrocnclconspub1....` directly instead of `--pubkey` tendermint pubkey since the node is not using `~/.chain-maind/config/priv_validator_key.json` for signing. +```bash +$ curl -sSL https://raw.githubusercontent.com/crypto-com/chain-docs/master/docs/getting-started/assets/signature_checking/check-validator-up.sh | bash -s -- --tendermint-url https://testnet-croeseid.crypto.com:26657 --bechpubkey tcrocnclconspub1.... The validator is in the active validator set under the address The validator is signing @ Block# 👍