Skip to content

Commit 45768aa

Browse files
authored
Merge pull request #1169 from input-output-hk/damien/1152/call-aggregator-api-to-verify-signer-registration
Call Aggregator API to verify Signer registration
2 parents f03bad9 + bbd4cc7 commit 45768aa

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

docs/website/root/manual/getting-started/run-signer-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ chmod +x verify_signer_registration.sh
640640

641641
Finally, execute the script:
642642
```bash
643-
SIGNER_LOGS_PATH=**YOUR_SIGNER_LOGS_PATH** ./verify_signer_registration.sh
643+
PARTY_ID=**YOUR_PARTY_ID** AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT** ./verify_signer_registration.sh
644644
```
645645

646646
:::tip
@@ -660,7 +660,7 @@ If your signer is registered, you should see this message:
660660

661661
Otherwise, you should see this error message:
662662
```bash
663-
>> Oops, your signer node is not registered. Check your configuration.
663+
>> Oops, your signer node is not registered. Party ID not found among the signers registered at epoch 430.
664664
```
665665

666666
### Verify your signer contributes with individual signatures

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

docs/website/versioned_docs/version-maintained/manual/getting-started/run-signer-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ chmod +x verify_signer_registration.sh
640640

641641
Finally, execute the script:
642642
```bash
643-
SIGNER_LOGS_PATH=**YOUR_SIGNER_LOGS_PATH** ./verify_signer_registration.sh
643+
PARTY_ID=**YOUR_PARTY_ID** AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT** ./verify_signer_registration.sh
644644
```
645645

646646
:::tip
@@ -660,7 +660,7 @@ If your signer is registered, you should see this message:
660660

661661
Otherwise, you should see this error message:
662662
```bash
663-
>> Oops, your signer node is not registered. Check your configuration.
663+
>> Oops, your signer node is not registered. Party ID not found among the signers registered at epoch 430.
664664
```
665665

666666
### Verify your signer contributes with individual signatures

0 commit comments

Comments
 (0)