Replace operator

From ObolNetwork/charon-distributed-validator-node · View interactive version

Replace operator is an AI agent skill from the GitHub repository ObolNetwork/charon-distributed-validator-node. Replace a single operator in a Charon distributed validator cluster

How to use this skill

Skill file

Replace Operator

Warning: This is an alpha feature and is not yet recommended for production use.

Replace a single operator in a Charon cluster with a new one. All participating operators (remaining + new) run a charon alpha edit replace-operator ceremony together (P2P via relay). The new operator must receive the current cluster-lock.json before the ceremony begins.

Prerequisites

Read scripts/edit/replace-operator/README.md for full details if needed.

Common prerequisites:

  1. .env file exists with NETWORK and VC variables set
  2. .charon directory with cluster-lock.json and charon-enr-private-key
  3. Docker is running
  4. jq installed

Role Selection

Ask the user: "Are you a remaining operator (performing the replacement) or the new operator joining as a replacement?"

If Remaining Operator

Script: scripts/edit/replace-operator/remaining-operator.sh

Additional prerequisites:

Arguments to gather:

Run:

./scripts/edit/replace-operator/remaining-operator.sh \
    --new-enr "enr:-..." \
    --old-enr "enr:-..." \
    [--skip-export] \
    [--dry-run]

Set WORK_DIR env var to override the repository root directory if running from a custom location.

After completion, the script will print commands to start containers manually. Remind the user to wait ~2 epochs before starting containers.

If New Operator

Script: scripts/edit/replace-operator/new-operator.sh

This is a two-step process:

Step 1: Generate ENR

Ask if the user needs to generate an ENR:

./scripts/edit/replace-operator/new-operator.sh --generate-enr

This creates .charon/charon-enr-private-key and displays the ENR. Tell the user to share this ENR with the existing operators.

The existing operators, in turn, need to share the cluster-lock.json with the new operators, which contains the current cluster configuration and is required for the P2P ceremony.

Step 2: Run the Ceremony

After receiving the current cluster-lock.json from remaining operators:

./scripts/edit/replace-operator/new-operator.sh \
    --cluster-lock ./received-cluster-lock.json \
    --old-enr "enr:-..." \
    [--dry-run]

Set WORK_DIR env var to override the repository root directory if running from a custom location.

The new operator runs this at the same time as the remaining operators run their ceremony. All operators must participate together.

After the ceremony completes, the script automatically:

Note: the new operator does NOT have slashing protection history (fresh start).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.