Skip to content

Commit fc898d5

Browse files
Update prysm scripts to support client-stats, deprecate slasher (#8971)
1 parent 91bd477 commit fc898d5

File tree

3 files changed

+35
-25
lines changed

3 files changed

+35
-25
lines changed

prysm.bat

+16-11
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ SetLocal EnableDelayedExpansion & REM All variables are set local to this run &
55
set PRYLABS_SIGNING_KEY=0AE0051D647BA3C1A917AF4072E33E4DF1A5036E
66

77
REM Complain if invalid arguments were provided.
8-
for %%a in (beacon-chain validator slasher) do (
8+
for %%a in (beacon-chain validator client-stats) do (
99
if %1 equ %%a (
1010
goto validprocess
1111
)
1212
)
1313
echo ERROR: PROCESS missing or invalid
1414
echo Usage: ./prysm.bat PROCESS FLAGS.
1515
echo.
16-
echo PROCESS can be beacon-chain, validator, or slasher.
16+
echo PROCESS can be beacon-chain, validator, or client-stats.
1717
echo FLAGS are the flags or arguments passed to the PROCESS.
1818
echo.
1919
echo Use this script to download the latest Prysm release binaries.
@@ -60,7 +60,7 @@ echo Using prysm version %prysm_version%.
6060

6161
set BEACON_CHAIN_REAL=%wrapper_dir%\beacon-chain-%prysm_version%-%system%-%arch%
6262
set VALIDATOR_REAL=%wrapper_dir%\validator-%prysm_version%-%system%-%arch%
63-
set SLASHER_REAL=%wrapper_dir%\slasher-%prysm_version%-%system%-%arch%
63+
set CLIENT_STATS_REAL=%wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%
6464

6565
if [%1]==[beacon-chain] (
6666
if exist %BEACON_CHAIN_REAL% (
@@ -84,20 +84,25 @@ if [%1]==[validator] (
8484
)
8585
)
8686

87-
if [%1]==[slasher] (
88-
if exist %SLASHER_REAL% (
89-
echo [32mSlasher is up to date.[0m
87+
if [%1]==[client-stats] (
88+
if exist %CLIENT_STATS_REAL% (
89+
echo [32mClient-stats is up to date.[0m
9090
) else (
91-
echo [35mDownloading slasher %prysm_version% to %SLASHER_REAL% %reason%[0m
92-
curl -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch% -o %SLASHER_REAL%
93-
curl --silent -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch%.sha256 -o %wrapper_dir%\slasher-%prysm_version%-%system%-%arch%.sha256
94-
curl --silent -L https://prysmaticlabs.com/releases/slasher-%prysm_version%-%system%-%arch%.sig -o %wrapper_dir%\slasher-%prysm_version%-%system%-%arch%.sig
91+
echo [35mDownloading client-stats %prysm_version% to %CLIENT_STATS_REAL% %reason%[0m
92+
curl -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch% -o %CLIENT_STATS_REAL%
93+
curl --silent -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch%.sha256 -o %wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%.sha256
94+
curl --silent -L https://prysmaticlabs.com/releases/client-stats-%prysm_version%-%system%-%arch%.sig -o %wrapper_dir%\client-stats-%prysm_version%-%system%-%arch%.sig
9595
)
9696
)
9797

98+
if [%1]==[slasher] (
99+
echo 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/
100+
exit /b 1
101+
)
102+
98103
if [%1]==[beacon-chain] ( set process=%BEACON_CHAIN_REAL%)
99104
if [%1]==[validator] ( set process=%VALIDATOR_REAL%)
100-
if [%1]==[slasher] ( set process=%SLASHER_REAL%)
105+
if [%1]==[client-stats] ( set process=%CLIENT_STATS_REAL%)
101106

102107
REM GPG not natively available on Windows, external module required
103108
echo WARN GPG verification is not natively available on Windows.

prysm.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ $folderDist = "dist";
22
$ProgressPreference = 'SilentlyContinue' # Disable Invoke-WebRequest progress bar, makes it silent and faster.
33

44
# Complain if invalid arguments were provided.
5-
if ("beacon-chain", "validator", "slasher" -notcontains $args[0]) {
5+
if ("beacon-chain", "validator", "client-stats" -notcontains $args[0]) {
66
Write-Host @"
77
Usage: ./prysm.sh1 PROCESS FLAGS.
88
9-
PROCESS can be beacon-chain, validator, or slasher.
9+
PROCESS can be beacon-chain, validator, or client-stats.
1010
FLAGS are the flags or arguments passed to the PROCESS.
1111
1212
Use this script to download the latest Prysm release binaries.

prysm.sh

+17-12
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function get_realpath() {
6767
if [ "$#" -lt 1 ]; then
6868
color "31" "Usage: ./prysm.sh PROCESS FLAGS."
6969
color "31" " ./prysm.sh PROCESS --download-only."
70-
color "31" "PROCESS can be beacon-chain, validator, or slasher."
70+
color "31" "PROCESS can be beacon-chain, validator, or client-stats."
7171
exit 1
7272
fi
7373

@@ -168,7 +168,7 @@ color "37" "Latest Prysm version is $prysm_version."
168168

169169
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-${system}-${arch}"
170170
VALIDATOR_REAL="${wrapper_dir}/validator-${prysm_version}-${system}-${arch}"
171-
SLASHER_REAL="${wrapper_dir}/slasher-${prysm_version}-${system}-${arch}"
171+
CLIENT_STATS_REAL="${wrapper_dir}/client-stats-${prysm_version}-${system}-${arch}"
172172

173173
if [[ $1 == beacon-chain ]]; then
174174
if [[ ! -x $BEACON_CHAIN_REAL ]]; then
@@ -197,20 +197,25 @@ if [[ $1 == validator ]]; then
197197
fi
198198
fi
199199

200-
if [[ $1 == slasher ]]; then
201-
if [[ ! -x $SLASHER_REAL ]]; then
202-
color "34" "Downloading slasher@${prysm_version} to ${SLASHER_REAL} (${reason})"
200+
if [[ $1 == client-stats ]]; then
201+
if [[ ! -x $CLIENT_STATS_REAL ]]; then
202+
color "34" "Downloading client-stats@${prysm_version} to ${CLIENT_STATS_REAL} (${reason})"
203203

204-
file=slasher-${prysm_version}-${system}-${arch}
205-
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$SLASHER_REAL"
204+
file=client-stats-${prysm_version}-${system}-${arch}
205+
curl -L "https://prysmaticlabs.com/releases/${file}" -o "$CLIENT_STATS_REAL"
206206
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
207207
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
208-
chmod +x "$SLASHER_REAL"
208+
chmod +x "$CLIENT_STATS_REAL"
209209
else
210-
color "37" "Slasher is up to date."
210+
color "37" "Client-stats is up to date."
211211
fi
212212
fi
213213

214+
if [[ $1 == slasher ]]; then
215+
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/"
216+
exit 1
217+
fi
218+
214219
case $1 in
215220
beacon-chain)
216221
readonly process=$BEACON_CHAIN_REAL
@@ -220,15 +225,15 @@ validator)
220225
readonly process=$VALIDATOR_REAL
221226
;;
222227

223-
slasher)
224-
readonly process=$SLASHER_REAL
228+
client-stats)
229+
readonly process=$CLIENT_STATS_REAL
225230
;;
226231

227232
*)
228233
color "31" "Process '$1' is not found!"
229234
color "31" "Usage: ./prysm.sh PROCESS FLAGS."
230235
color "31" " ./prysm.sh PROCESS --download-only."
231-
color "31" "PROCESS can be beacon-chain, validator, or slasher."
236+
color "31" "PROCESS can be beacon-chain, validator, or client-stats."
232237
exit 1
233238
;;
234239
esac

0 commit comments

Comments
 (0)