From 5356ed9dbaf370789514f650a556e826de6f98b4 Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Wed, 21 Feb 2024 15:13:11 -0800 Subject: [PATCH] add update quorum (#66) --- README.md | 10 ++++++++++ run.sh | 22 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00d855b..f4e8c99 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/run.sh b/run.sh index c3f2e6a..fb768e0 100755 --- a/run.sh +++ b/run.sh @@ -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'` @@ -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 \ @@ -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 \ @@ -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 \ No newline at end of file