Skip to content

Commit

Permalink
update how we do opt-in and out based on quorums (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur authored Apr 3, 2024
1 parent 3abc785 commit 44e0e61
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 39 deletions.
4 changes: 4 additions & 0 deletions holesky/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ NODE_EXPIRATION_POLL_INTERVAL=180
NODE_CACHE_ENCODED_BLOBS=true
NODE_NUM_WORKERS=1
NODE_DISPERSAL_PORT=32005

# This is a dummy value for now. This won't be used as we are explicitly asking for quorum while opting in/out
# In future release, this will be removed
NODE_QUORUM_ID_LIST=0

NODE_VERBOSE=true
NODE_RETRIEVAL_PORT=32004
NODE_TIMEOUT=20s
Expand Down
39 changes: 23 additions & 16 deletions holesky/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Holesky

<!-- :::info -->
> **_INFO:_**
Please ensure you have reviewed the [current Active Operator Set cap](https://docs.eigenlayer.xyz/operator-guides/avs-installation-and-registration/eigenda-operator-guide#eigenda-churn-approver) and ensure you have sufficient delegated restaked ETH TVL before proceeding.
<!-- ::: -->

Expand Down Expand Up @@ -58,16 +58,12 @@ In order to limit traffic from the EigenLabs hosted Disperser, please restrict y

#### Step 5: Quorum Configuration

EigenDA maintains two [quorums](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-introduction#quorums): Restaked ETH (including Native and LST Restaked ETH) and Restaked WETH. EigenDA allows the Operator to opt-in to either quorum or both quorums at once (aka dual-quorum). The following configuration values for NODE_QUORUM_ID_LIST are allowed:
EigenDA maintains two [quorums](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-introduction#quorums): Restaked ETH (including Native and LST Restaked ETH) and Restaked WETH. EigenDA allows the Operator to opt-in to either quorum or both quorums at once (aka dual-quorum).

- ETH (Native & LST) Quorum: `0`
- WrappedEth (WETH) Quorum: `1`
- Dual Quorum: `0,1`

Prior to running the opt-in command below set `NODE_QUORUM_ID_LIST` in the [.env](https://github.com/Layr-Labs/eigenda-operator-setup/blob/a069ad58a33222e12130e9989d743215a9293549/holesky/.env.example#L14) to either `0` or `1` or `0,1`.

You only set quorums that you are currently not registered to in the NODE_QUORUM_ID_LIST. For example if you are already registered to quorum 0 and want to opt-in one more quorum 1, then you must set NODE_QUORUM_ID_LIST to `1` (not `0,1`).


#### Step 6: Opt-in into EigenDA

Expand All @@ -77,15 +73,23 @@ In order to opt-in into EigenDA as an Operator, you must meet the following dele
- Have more than 1.1x current lowest-stake Operator in the active Operator set. Please see [EigenDA Churn Approver](https://docs.eigenlayer.xyz/operator-guides/avs-installation-and-registration/eigenda-operator-guide#eigenda-churn-approver) for more detail.
- The operator to churn out has less than 10.01% of the total stake

Execute the following command to opt-in to EigenDA AVS:
Execute the following command based on the quorum you want to opt-in in EigenDA AVS:

```
./run.sh opt-in
./run.sh opt-in <quorum>
# for opting in to quorum 0:
./run.sh opt-in 0
# for opting in to quorum 0 and 1:
./run.sh opt-in 0,1
```
You only need to provide the quorum which you want to opt into. For example if you are already registered to quorum `0` and want to opt-in one more quorum `1`, then you just need to set `<quorum>` as `1` while opting in again.

:::warn
> **_WARNING:_**
Operator must wait up to 6 hours if the delegation happened after you opt-in to the EigenDA AVS. EigenLayer's AVS-Sync component runs at 6 hour batch intervals to update the delegation totals on chain for each operator. If you are unable to opt in despite having sufficient delegated stake, please wait at least 6 hours, then retry opt-in.
:::


The opt-in command also downloads the latest SRS points if they don't exist on the node. The file is approximately 8GB in size and the opt-in process can some time to complete depending on the network bandwidth.

Expand Down Expand Up @@ -160,16 +164,19 @@ docker compose down

### Opt-Out of EigenDA

Prior to running this command set `NODE_QUORUM_ID_LIST` in the [.env](https://github.com/Layr-Labs/eigenda-operator-setup/blob/a069ad58a33222e12130e9989d743215a9293549/holesky/.env.example#L14) to either `0` or `1` or `0,1` to opt-out of one or both quorums.

:::warn
> **_WARNING:_**
Please be careful to ensure that you opt-out of your current (or intended) quorum.
:::

The following command will unregister you from the EigenDA AVS:
The following command can be used to opt out from the EigenDA AVS:

```
./run.sh opt-out
./run.sh opt-out <quorum>
# for opting out to quorum 0:
./run.sh opt-out 0
# for opting out to quorum 0 and 1:
./run.sh opt-out 0,1
```

## Upgrade your node
Expand Down
27 changes: 23 additions & 4 deletions holesky/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ optIn() {
--ecdsa-key-password "$NODE_ECDSA_KEY_PASSWORD" \
--bls-key-password "$NODE_BLS_KEY_PASSWORD" \
--operation opt-in \
--socket "$socket"
--socket "$socket" \
--quorum-id-list "$1"
}

optOut() {
Expand All @@ -40,14 +41,32 @@ optOut() {
--ecdsa-key-password "$NODE_ECDSA_KEY_PASSWORD" \
--bls-key-password "$NODE_BLS_KEY_PASSWORD" \
--operation opt-out \
--socket "$socket"
--socket "$socket" \
--quorum-id-list "$1"
}

listQuorums() {
# we have to pass a dummy quorum-id-list as it is required by the plugin
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.6.0 \
--ecdsa-key-password "$NODE_ECDSA_KEY_PASSWORD" \
--bls-key-password "$NODE_BLS_KEY_PASSWORD" \
--socket "$socket" \
--operation list-quorums \
--quorum-id-list 0
}


if [ "$1" = "opt-in" ]; then
optIn
optIn "$2"
elif [ "$1" = "opt-out" ]; then
optOut
optOut "$2"
elif [ "$1" = "list-quorums" ]; then
listQuorums
else
echo "Invalid command"
fi
Loading

0 comments on commit 44e0e61

Please sign in to comment.