From 44e0e6148d97fe15d73499a5362ee0ed8ca0dc1a Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Wed, 3 Apr 2024 16:11:55 -0700 Subject: [PATCH] update how we do opt-in and out based on quorums (#93) --- holesky/.env.example | 4 + holesky/README.md | 39 ++-- holesky/run.sh | 27 ++- monitoring/dashboards/eigenda-metrics.json | 242 +++++++++++++++++++-- 4 files changed, 273 insertions(+), 39 deletions(-) diff --git a/holesky/.env.example b/holesky/.env.example index 7e08926..14f62aa 100644 --- a/holesky/.env.example +++ b/holesky/.env.example @@ -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 diff --git a/holesky/README.md b/holesky/README.md index 0ca4d82..abfe403 100644 --- a/holesky/README.md +++ b/holesky/README.md @@ -1,6 +1,6 @@ # Holesky - +> **_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. @@ -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 @@ -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 + +# 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 `` 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. @@ -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 + +# 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 diff --git a/holesky/run.sh b/holesky/run.sh index 9c3c173..716cdbd 100755 --- a/holesky/run.sh +++ b/holesky/run.sh @@ -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() { @@ -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 \ No newline at end of file diff --git a/monitoring/dashboards/eigenda-metrics.json b/monitoring/dashboards/eigenda-metrics.json index 40c6ed1..c131eda 100644 --- a/monitoring/dashboards/eigenda-metrics.json +++ b/monitoring/dashboards/eigenda-metrics.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 4, + "id": 3, "links": [], "liveNow": false, "panels": [ @@ -27,7 +27,6 @@ "type": "prometheus", "uid": "prometheus" }, - "description": "the total number of batches processed by the DA node", "fieldConfig": { "defaults": { "color": { @@ -88,6 +87,206 @@ "x": 0, "y": 0 }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "node_eigenda_blobs_total{type=\"number\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "quorum {{quorum}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Number of EigenDA Blobs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "node_eigenda_blobs_total{type=\"size\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "quorum {{quorum}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Size of EigenDA Blobs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "the total number of batches processed by the DA node", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, "id": 9, "options": { "legend": { @@ -205,7 +404,7 @@ "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 8 }, "id": 5, "options": { @@ -305,7 +504,7 @@ "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 16 }, "id": 1, "options": { @@ -406,7 +605,7 @@ "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 16 }, "id": 10, "options": { @@ -506,7 +705,7 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 24 }, "id": 3, "options": { @@ -626,7 +825,7 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 24 }, "id": 12, "options": { @@ -723,7 +922,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -739,7 +939,7 @@ "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 32 }, "id": 4, "options": { @@ -822,7 +1022,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -838,7 +1039,7 @@ "h": 8, "w": 12, "x": 12, - "y": 24 + "y": 32 }, "id": 7, "options": { @@ -910,7 +1111,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -925,7 +1127,7 @@ "h": 8, "w": 12, "x": 0, - "y": 32 + "y": 40 }, "id": 8, "options": { @@ -1011,7 +1213,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1027,7 +1230,7 @@ "h": 8, "w": 12, "x": 12, - "y": 32 + "y": 40 }, "id": 6, "options": { @@ -1110,7 +1313,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1125,7 +1329,7 @@ "h": 8, "w": 12, "x": 0, - "y": 40 + "y": 48 }, "id": 11, "options": { @@ -1169,13 +1373,13 @@ "list": [] }, "time": { - "from": "now-1h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "EigenDA", "uid": "dcd9d495-ff1e-4794-b2b6-62634e4b40d1", - "version": 3, + "version": 4, "weekStart": "" } \ No newline at end of file