Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/scripts/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@

content = skill_md.read_text()

# Check frontmatter exists
if not content.startswith("```skill\n---"):
errors.append(f"{skill_dir.name}: SKILL.md must start with ```skill frontmatter block")
# Check frontmatter exists (plain YAML frontmatter only)
if not content.startswith("---"):
errors.append(f"{skill_dir.name}: SKILL.md must start with plain --- frontmatter")
continue

# Extract frontmatter
try:
# Find the YAML between --- markers inside the ```skill block
first_marker = content.index("---") + 3
second_marker = content.index("---", first_marker)
frontmatter = content[first_marker:second_marker]
Expand Down
46 changes: 41 additions & 5 deletions skills/dvpod/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
```skill
---
name: dvpod
description: |
Expand Down Expand Up @@ -53,6 +52,20 @@ helm repo add obol https://obolnetwork.github.io/helm-charts
helm repo update
```

## Deployment Prerequisites

Use this quick check before deploy:

- **Mode 1: Helm chart mode**
Comment thread
HananINouman marked this conversation as resolved.
Resolved
- Use when the user already has a reachable beacon API endpoint (external or locally managed).
- Example endpoints:
- external: `https://ethereum-beacon-api.publicnode.com`
- local/in-cluster: `http://<your-beacon-service>:5052`
- Pros: fastest DVpod setup.

The key requirement is that
`charon.beaconNodeEndpoints[0]` is reachable from the DVpod.

## Action: deploy

Deploy a new DVpod. Gather the following from the user before deploying:
Expand All @@ -61,7 +74,15 @@ Deploy a new DVpod. Gather the following from the user before deploying:
1. **Release name** — a name for this deployment (e.g., `my-dv-pod`)
2. **Namespace** — Kubernetes namespace (default: `dv-pod`)
3. **Operator address** — Ethereum address (0x...) for the operator
4. **Network** — mainnet, sepolia, or hoodi (default: mainnet)
4. **Network** — `mainnet`, `sepolia`, or `hoodi`

**Input collection rules before deploy:**
- Ask the user for all four deploy inputs: release name, namespace, operator address, and network.
- If release name is not provided, the agent may choose a sensible release default and confirm it.
- If namespace is not provided, the agent may choose `dv-pod` (or an existing DVpod namespace) and confirm it.
- **Do not invent or default** `operatorAddress`; it must come from the user.
- **Do not invent or default** `network`; it must come from the user.
- The operator address must be the same address the user will use to sign in Obol Launchpad.

### Optional but Important
5. **Beacon node endpoint(s)** — URL(s) of beacon node(s). If not provided, the user will need to configure this later.
Expand Down Expand Up @@ -97,11 +118,12 @@ indefinitely without finding an invite — this is a common source of confusion.

### Deployment Scenarios

**Scenario A: Fresh group cluster (most common)**
**Scenario A: Fresh group cluster**
- Auto-generates ENR
- DKG sidecar polls Obol API waiting for cluster creation on Launchpad
- User creates/joins cluster on the network-specific Launchpad after deploy
- Each node must have the correct operator address matching its Launchpad registration
- Ask the user for the real `charon.operatorAddress` before running Helm

```bash
helm upgrade --install <release> obol/dv-pod \
Expand Down Expand Up @@ -152,7 +174,13 @@ helm upgrade --install <release> obol/dv-pod \
After deploying, automatically:
1. Wait for pods to be ready
2. Retrieve and display the public ENR
3. Show next steps (Launchpad URL, DKG monitoring)
3. Show next steps:
- remind the user which operator address they deployed with
- give the correct Launchpad URL for the selected network
- tell them to sign with that same operator address in Launchpad
4. Start DKG monitoring
5. Validate beacon reachability from charon:
`kubectl exec -n <namespace> <pod> -c charon -- wget -qO- <beacon-url>/eth/v1/node/health`

## Action: status

Expand Down Expand Up @@ -320,7 +348,8 @@ kubectl delete secret charon-enr-private-key -n <namespace>

- When the user's request doesn't match a specific action, use your knowledge of the chart to help.
- Always check `helm list` and `kubectl get pods` first to understand existing state.
- If the user provides a namespace, use it. If not, check for existing DVpod deployments or default to `dv-pod`.
- If the user provides a namespace, use it. If not, check for existing DVpod deployments or default to `dv-pod` and confirm.
- Require the user to explicitly provide `network` and `operatorAddress` before deployment.
- When showing ENRs, format them clearly — they are long strings the user may need to copy.
- For network selection, map friendly names: mainnet=1, sepolia=11155111, hoodi=560048.
- The Obol Launchpad URLs are network-specific:
Expand All @@ -330,6 +359,13 @@ kubectl delete secret charon-enr-private-key -n <namespace>
- The Obol API endpoint is https://api.obol.tech
- If the user mentions `$ARGUMENTS`, parse it to determine the action and any additional context.

## Capabilities and Limits

- This skill can deploy, upgrade, monitor, and troubleshoot `dv-pod` on Kubernetes.
- This skill cannot perform Launchpad actions for the user (cluster creation, invite acceptance, operator signatures).
- DKG completion depends on all external operator steps being completed on Launchpad.
- Solo-flow DKG is not supported.

## Parsing $ARGUMENTS

Parse the first word of `$ARGUMENTS` as the action. Everything after is context:
Expand Down
24 changes: 24 additions & 0 deletions skills/dvpod/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ kubectl get secrets -n <ns> | grep -E "enr|charon"

## Common Issues

## Interpreting Results Quickly
Comment thread
HananINouman marked this conversation as resolved.
Resolved

- DKG sidecar polling is normal right after deploy; persistent polling usually means Launchpad/operator mismatch or pending signatures.
- Missing `/charon-data/cluster-lock.json` means DKG has not completed yet.
- Charon restart loops with beacon errors usually indicate bad/unreachable `charon.beaconNodeEndpoints`.
- Healthy pods but no DKG progress usually means external coordination (other operators) is incomplete.

### Pod stuck in Pending

**Symptoms:** Pod stays in `Pending` state.
Expand Down Expand Up @@ -141,6 +148,23 @@ done
- **Invalid cluster-lock.json:** Check Charon logs for specific error messages.
- **Port conflicts:** Ensure ports 3600, 3610, 3620 are not conflicting.

### Local k3d/macOS Mount Error in dkg-sidecar

**Symptoms:** Init container fails with an error similar to:
`error mounting ... /charon-data/charon-enr-private-key ... mountpoint ... is outside of rootfs`.

**Cause:** Environment-specific mount behavior when a secret subPath is mounted under a PVC path.

**Testing workaround:** disable charon-data persistence for the test run:
```bash
helm upgrade <release> obol/dv-pod -n <ns> \
--reuse-values \
--set persistence.enabled=false
```

**Note:** This workaround is for test/dev only; data is not persisted across restarts.
This chart-level mount-path issue is expected to be fixed soon.

### Validator Client Not Starting

**Symptoms:** validator-client container in CrashLoopBackOff or Error.
Expand Down
2 changes: 0 additions & 2 deletions skills/obol-monitoring/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
```skill
---
name: obol-monitoring
description: Monitor and diagnose Obol DVT cluster performance using their hosted Grafana (Prometheus metrics + Loki logs)
Expand Down Expand Up @@ -314,4 +313,3 @@ If the issue is intermittent or slot-specific, use `duty_analysis.py` for a spec
- [CDVN Repo](https://github.com/ObolNetwork/charon-distributed-validator-node) — Standard deployment
- [LCDVN Repo](https://github.com/ObolNetwork/lido-charon-distributed-validator-node) — Lido-specific deployment
- [Charon Source](https://github.com/ObolNetwork/charon) — Charon source code
```
27 changes: 17 additions & 10 deletions skills/obol-monitoring/scripts/duty_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
import argparse
import json
import os
import re
import sys

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from lib.grafana import (
get_auth_headers, discover_datasources, prom_query, loki_query,
get_auth_headers, discover_datasources, loki_query,
cluster_selector, slot_to_time, slot_to_timestamp,
parse_embedded_ts, extract_logfmt, get_cluster_size,
)
Expand Down Expand Up @@ -84,14 +83,22 @@ def main():
"level": level,
"msg": msg,
}
if rnd: event["round"] = rnd
if new_round: event["new_round"] = new_round
if rule: event["rule"] = rule
if timeout_reason: event["timeout_reason"] = timeout_reason
if leader_name: event["leader_name"] = leader_name
if leader_index: event["leader_index"] = leader_index
if endpoint: event["endpoint"] = endpoint
if rtt: event["rtt"] = rtt
if rnd:
event["round"] = rnd
if new_round:
event["new_round"] = new_round
if rule:
event["rule"] = rule
if timeout_reason:
event["timeout_reason"] = timeout_reason
if leader_name:
event["leader_name"] = leader_name
if leader_index:
event["leader_index"] = leader_index
if endpoint:
event["endpoint"] = endpoint
if rtt:
event["rtt"] = rtt

events.append(event)

Expand Down
42 changes: 28 additions & 14 deletions skills/obol-monitoring/scripts/fleet_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,34 @@
def categorise_cluster(name, size):
"""Categorise cluster by operator type."""
n = name.lower()
if "curated" in n and "etherfi" in n: return "etherfi_curated"
if name.startswith("EtherFi:"): return "etherfi_curated"
if name.startswith("Pier Two x Etherfi"): return "etherfi_curated"
if "etherfi" in n: return "etherfi_solo"
if "stakely" in n and ("lido" in n or "obol" in n): return "lido_curated"
if "rocklogic" in n: return "lido_curated"
if "ebunker" in n: return "lido_curated"
if name == "?" and size == 4: return "lido_curated"
if "lido x obol" in n: return "lido_sdvt"
if "stakewise" in n: return "protocol_curated"
if "swell" in n: return "protocol_curated"
if "obol" in n and ("mainnet" in n or "eigensquad" in n): return "obol_internal"
if name == "Stakely Obol Portal": return "obol_internal"
if name == "?" or size <= 1: return "unknown"
if "curated" in n and "etherfi" in n:
return "etherfi_curated"
if name.startswith("EtherFi:"):
return "etherfi_curated"
if name.startswith("Pier Two x Etherfi"):
return "etherfi_curated"
if "etherfi" in n:
return "etherfi_solo"
if "stakely" in n and ("lido" in n or "obol" in n):
return "lido_curated"
if "rocklogic" in n:
return "lido_curated"
if "ebunker" in n:
return "lido_curated"
if name == "?" and size == 4:
return "lido_curated"
if "lido x obol" in n:
return "lido_sdvt"
if "stakewise" in n:
return "protocol_curated"
if "swell" in n:
return "protocol_curated"
if "obol" in n and ("mainnet" in n or "eigensquad" in n):
return "obol_internal"
if name == "Stakely Obol Portal":
return "obol_internal"
if name == "?" or size <= 1:
return "unknown"
return "community"


Expand Down
36 changes: 24 additions & 12 deletions skills/obol-monitoring/scripts/lib/grafana.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,18 @@ def extract_logfmt(line, field):

def parse_bn_client(version):
"""Extract BN client name from version string."""
if "Lighthouse" in version: return "Lighthouse"
if "teku" in version.lower(): return "Teku"
if "Prysm" in version: return "Prysm"
if "Nimbus" in version: return "Nimbus"
if "Lodestar" in version: return "Lodestar"
if "Grandine" in version: return "Grandine"
if "Lighthouse" in version:
return "Lighthouse"
if "teku" in version.lower():
return "Teku"
if "Prysm" in version:
return "Prysm"
if "Nimbus" in version:
return "Nimbus"
if "Lodestar" in version:
return "Lodestar"
if "Grandine" in version:
return "Grandine"
return "Unknown"


Expand All @@ -221,10 +227,16 @@ def parse_vc_client(user_agent):
if not user_agent:
return "Lighthouse" # Lighthouse VC doesn't send user-agent
ua = user_agent.lower()
if "lodestar" in ua: return "Lodestar"
if "prysm" in ua: return "Prysm"
if "teku" in ua: return "Teku"
if "nim-presto" in ua or "nimbus" in ua: return "Nimbus"
if "vouch" in ua: return "Vouch"
if "go-http-client" in ua: return "Go-http-client"
if "lodestar" in ua:
return "Lodestar"
if "prysm" in ua:
return "Prysm"
if "teku" in ua:
return "Teku"
if "nim-presto" in ua or "nimbus" in ua:
return "Nimbus"
if "vouch" in ua:
return "Vouch"
if "go-http-client" in ua:
return "Go-http-client"
return user_agent[:30]
Loading