mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-21 11:10:36 +00:00
Update prysm scripts to support client-stats, deprecate slasher (#8971)
This commit is contained in:
parent
91bd477f4f
commit
fc898d541f
27
prysm.bat
27
prysm.bat
@ -5,7 +5,7 @@ SetLocal EnableDelayedExpansion & REM All variables are set local to this run &
|
||||
set PRYLABS_SIGNING_KEY=0AE0051D647BA3C1A917AF4072E33E4DF1A5036E
|
||||
|
||||
REM Complain if invalid arguments were provided.
|
||||
for %%a in (beacon-chain validator slasher) do (
|
||||
for %%a in (beacon-chain validator client-stats) do (
|
||||
if %1 equ %%a (
|
||||
goto validprocess
|
||||
)
|
||||
@ -13,7 +13,7 @@ for %%a in (beacon-chain validator slasher) do (
|
||||
echo [31mERROR: PROCESS missing or invalid[0m
|
||||
echo Usage: ./prysm.bat PROCESS FLAGS.
|
||||
echo.
|
||||
echo PROCESS can be beacon-chain, validator, or slasher.
|
||||
echo PROCESS can be beacon-chain, validator, or client-stats.
|
||||
echo FLAGS are the flags or arguments passed to the PROCESS.
|
||||
echo.
|
||||
echo Use this script to download the latest Prysm release binaries.
|
||||
@ -60,7 +60,7 @@ echo Using prysm version %prysm_version%.
|
||||
|
||||
set BEACON_CHAIN_REAL=%wrapper_dir%\beacon-chain-%prysm_version%-%system%-%arch%
|
||||
set VALIDATOR_REAL=%wrapper_dir%\validator-%prysm_version%-%system%-%arch%
|
||||
set SLASHER_REAL=%wrapper_dir%\slasher-%prysm_version%-%system%-%arch%
|
||||
set CLIENT_STATS_REAL=%wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%
|
||||
|
||||
if [%1]==[beacon-chain] (
|
||||
if exist %BEACON_CHAIN_REAL% (
|
||||
@ -84,20 +84,25 @@ if [%1]==[validator] (
|
||||
)
|
||||
)
|
||||
|
||||
if [%1]==[slasher] (
|
||||
if exist %SLASHER_REAL% (
|
||||
echo [32mSlasher is up to date.[0m
|
||||
if [%1]==[client-stats] (
|
||||
if exist %CLIENT_STATS_REAL% (
|
||||
echo [32mClient-stats is up to date.[0m
|
||||
) else (
|
||||
echo [35mDownloading slasher %prysm_version% to %SLASHER_REAL% %reason%[0m
|
||||
curl -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch% -o %SLASHER_REAL%
|
||||
curl --silent -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch%.sha256 -o %wrapper_dir%\slasher-%prysm_version%-%system%-%arch%.sha256
|
||||
curl --silent -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch%.sig -o %wrapper_dir%\slasher-%prysm_version%-%system%-%arch%.sig
|
||||
echo [35mDownloading client-stats %prysm_version% to %CLIENT_STATS_REAL% %reason%[0m
|
||||
curl -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch% -o %CLIENT_STATS_REAL%
|
||||
curl --silent -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch%.sha256 -o %wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%.sha256
|
||||
curl --silent -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch%.sig -o %wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%.sig
|
||||
)
|
||||
)
|
||||
|
||||
if [%1]==[slasher] (
|
||||
echo [31mThe slasher binary is no longer available. Please use the --slasher flag with your beacon node. See: https://docs.prylabs.network/docs/prysm-usage/slasher/[0m
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if [%1]==[beacon-chain] ( set process=%BEACON_CHAIN_REAL%)
|
||||
if [%1]==[validator] ( set process=%VALIDATOR_REAL%)
|
||||
if [%1]==[slasher] ( set process=%SLASHER_REAL%)
|
||||
if [%1]==[client-stats] ( set process=%CLIENT_STATS_REAL%)
|
||||
|
||||
REM GPG not natively available on Windows, external module required
|
||||
echo [33mWARN GPG verification is not natively available on Windows.[0m
|
||||
|
@ -2,11 +2,11 @@ $folderDist = "dist";
|
||||
$ProgressPreference = 'SilentlyContinue' # Disable Invoke-WebRequest progress bar, makes it silent and faster.
|
||||
|
||||
# Complain if invalid arguments were provided.
|
||||
if ("beacon-chain", "validator", "slasher" -notcontains $args[0]) {
|
||||
if ("beacon-chain", "validator", "client-stats" -notcontains $args[0]) {
|
||||
Write-Host @"
|
||||
Usage: ./prysm.sh1 PROCESS FLAGS.
|
||||
|
||||
PROCESS can be beacon-chain, validator, or slasher.
|
||||
PROCESS can be beacon-chain, validator, or client-stats.
|
||||
FLAGS are the flags or arguments passed to the PROCESS.
|
||||
|
||||
Use this script to download the latest Prysm release binaries.
|
||||
|
29
prysm.sh
29
prysm.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user