Update prysm scripts to support client-stats, deprecate slasher (#8971)

This commit is contained in:
Preston Van Loon
2021-06-02 14:06:59 -05:00
committed by GitHub
parent 91bd477f4f
commit fc898d541f
3 changed files with 35 additions and 25 deletions

View File

@@ -67,7 +67,7 @@ function get_realpath() {
if [ "$#" -lt 1 ]; then
color "31" "Usage: ./prysm.sh PROCESS FLAGS."
color "31" " ./prysm.sh PROCESS --download-only."
color "31" "PROCESS can be beacon-chain, validator, or slasher."
color "31" "PROCESS can be beacon-chain, validator, or client-stats."
exit 1
fi
@@ -168,7 +168,7 @@ color "37" "Latest Prysm version is $prysm_version."
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-${system}-${arch}"
VALIDATOR_REAL="${wrapper_dir}/validator-${prysm_version}-${system}-${arch}"
SLASHER_REAL="${wrapper_dir}/slasher-${prysm_version}-${system}-${arch}"
CLIENT_STATS_REAL="${wrapper_dir}/client-stats-${prysm_version}-${system}-${arch}"
if [[ $1 == beacon-chain ]]; then
if [[ ! -x $BEACON_CHAIN_REAL ]]; then
@@ -197,20 +197,25 @@ if [[ $1 == validator ]]; then
fi
fi
if [[ $1 == slasher ]]; then
if [[ ! -x $SLASHER_REAL ]]; then
color "34" "Downloading slasher@${prysm_version} to ${SLASHER_REAL} (${reason})"
if [[ $1 == client-stats ]]; then
if [[ ! -x $CLIENT_STATS_REAL ]]; then
color "34" "Downloading client-stats@${prysm_version} to ${CLIENT_STATS_REAL} (${reason})"
file=slasher-${prysm_version}-${system}-${arch}
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$SLASHER_REAL"
file=client-stats-${prysm_version}-${system}-${arch}
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$CLIENT_STATS_REAL"
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
chmod +x "$SLASHER_REAL"
chmod +x "$CLIENT_STATS_REAL"
else
color "37" "Slasher is up to date."
color "37" "Client-stats is up to date."
fi
fi
if [[ $1 == slasher ]]; then
color "41" "The slasher binary is no longer available. Please use the --slasher flag with your beacon node. See: https://docs.prylabs.network/docs/prysm-usage/slasher/"
exit 1
fi
case $1 in
beacon-chain)
readonly process=$BEACON_CHAIN_REAL
@@ -220,15 +225,15 @@ validator)
readonly process=$VALIDATOR_REAL
;;
slasher)
readonly process=$SLASHER_REAL
client-stats)
readonly process=$CLIENT_STATS_REAL
;;
*)
color "31" "Process '$1' is not found!"
color "31" "Usage: ./prysm.sh PROCESS FLAGS."
color "31" " ./prysm.sh PROCESS --download-only."
color "31" "PROCESS can be beacon-chain, validator, or slasher."
color "31" "PROCESS can be beacon-chain, validator, or client-stats."
exit 1
;;
esac