Skip to content

Commit

Permalink
add update quorum (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur authored Feb 21, 2024
1 parent 84268e2 commit 5356ed9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ docker compose down
```bash
./run.sh opt-out
```

### Update Quorums (Optional)
If you want to update the quorums, update the `NODE_QUORUM_ID_LIST` in your .env file
to have a command separated value of new quorums (for ex: `0,1`) then running the following command:
> **_NOTE:_** This command sends two transactions (opt-out and opt-in again).
> This means if it opts-in again it will have to go via churner and will check the TVL based on lowest stake if the network is full.
```bash
./run.sh update-quorums
```

### Upgrade your node

Upgrade the AVS software for your EigenDA service setup by following the steps below:
Expand Down
22 changes: 19 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

. ./.env

# In both opt-in and opt-out, We have to explicitly set the password again here because
socket="$NODE_HOSTNAME":"${NODE_DISPERSAL_PORT}"\;"${NODE_RETRIEVAL_PORT}"

# In all commands, We have to explicitly set the password again here because
# when docker run loads the `.env` file, it keeps the quotes around the password
# which causes the password to be incorrect.
# To test that try running `docker run --rm --env-file .env busybox /bin/sh -c 'echo $NODE_ECDSA_KEY_PASSWORD'`
Expand All @@ -15,7 +17,6 @@ optIn() {
echo "Error: SRS setup failed. Exiting."
exit 1
fi
socket="$NODE_HOSTNAME":"${NODE_DISPERSAL_PORT}"\;"${NODE_RETRIEVAL_PORT}"
echo "using socket: $socket"
docker run --env-file .env \
--rm \
Expand All @@ -30,7 +31,6 @@ optIn() {
}

optOut() {
socket="$NODE_HOSTNAME":"${NODE_DISPERSAL_PORT}"\;"${NODE_RETRIEVAL_PORT}"
docker run --env-file .env \
--rm \
--volume "${NODE_ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
Expand All @@ -43,10 +43,26 @@ optOut() {
--socket "$socket"
}

updateQuorums() {
echo "using socket: $socket"
docker run --env-file .env \
--rm \
--volume "${NODE_ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${NODE_BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
--volume "${NODE_LOG_PATH_HOST}":/app/logs:rw \
ghcr.io/layr-labs/eigenda/opr-nodeplugin:release-0.3.0 \
--ecdsa-key-password "$NODE_ECDSA_KEY_PASSWORD" \
--bls-key-password "$NODE_BLS_KEY_PASSWORD" \
--operation update-quorums \
--socket "$socket"
}

if [ "$1" = "opt-in" ]; then
optIn
elif [ "$1" = "opt-out" ]; then
optOut
elif [ "$1" = "update-quorums" ]; then
updateQuorums
else
echo "Invalid command"
fi

0 comments on commit 5356ed9

Please sign in to comment.