Skip to content

Commit 46ea221

Browse files
author
Damien LACHAUME / PALO-IT
committed
Use /signers/registered route in verify_signer_registration script
1 parent f03bad9 commit 46ea221

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/website/static/scripts/verify_signer_registration.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
set -e
44

5-
if [ -z "$SIGNER_LOGS_PATH" ]; then
6-
echo ">> ERROR: Required environment variable SIGNER_LOGS_PATH is not set."
5+
if [ -z "$AGGREGATOR_ENDPOINT" ] || [ -z "$PARTY_ID" ]; then
6+
echo ">> ERROR: Required environment variables AGGREGATOR_ENDPOINT and/or PARTY_ID are not set."
77
exit 1
88
fi
99

10-
if grep -q "STATE MACHINE: new cycle: Registered" "$SIGNER_LOGS_PATH"; then
10+
CURRENT_EPOCH=$(curl -s "$AGGREGATOR_ENDPOINT/epoch-settings" -H 'accept: application/json' | jq -r '.epoch')
11+
SIGNERS_REGISTERED_RESPONSE=$(curl -s "$AGGREGATOR_ENDPOINT/signers/registered/$CURRENT_EPOCH" -H 'accept: application/json')
12+
13+
if echo "$SIGNERS_REGISTERED_RESPONSE" | grep -q "$PARTY_ID"; then
1114
echo ">> Congrats, your signer node is registered!"
1215
else
13-
echo ">> Oops, your signer node is not registered. Check your configuration."
16+
echo ">> Oops, your signer node is not registered. Party ID not found among the signers registered at epoch ${CURRENT_EPOCH}."
1417
fi

0 commit comments

Comments
 (0)