Remove Operators
Warning: This is an alpha feature and is not yet recommended for production use.
Remove one or more operators from a Charon cluster. Whether removed operators need to participate depends on fault tolerance.
Prerequisites
Read scripts/edit/remove-operators/README.md for full details if needed.
Common prerequisites:
.envfile exists withNETWORKandVCvariables set.charondirectory withcluster-lock.jsonandvalidator_keys- Docker is running
jqinstalled
Fault Tolerance Context
Explain to the user:
- Fault tolerance
f = operators - threshold - If removing <= f operators: removed operators do NOT need to participate (they just stop their nodes)
- If removing > f operators: removed operators MUST also participate using
removed-operator.sh
Role Selection
Ask the user: "Are you a remaining operator (staying in the cluster) or a removed operator (leaving the cluster)?"
If Remaining Operator
Script: scripts/edit/remove-operators/remaining-operator.sh
Additional prerequisites:
.charon/validator_keys/must exist- The script will automatically stop the VC container for ASDB export
Arguments to gather:
--operator-enrs-to-remove: Comma-separated ENRs of operators being removed--participating-operator-enrs(only if removal exceeds fault tolerance): Comma-separated ENRs of ALL participating operators--new-threshold(optional): Override the default threshold (defaults to ceil(n * 2/3))- Whether to use
--dry-runfirst
Run:
./scripts/edit/remove-operators/remaining-operator.sh \
--operator-enrs-to-remove "enr:-...,enr:-..." \
[--participating-operator-enrs "enr:-...,enr:-..."] \
[--new-threshold N] \
[--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 Removed Operator
Script: scripts/edit/remove-operators/removed-operator.sh
This is only needed when the removal exceeds fault tolerance. If within fault tolerance, the removed operator simply stops their node.
Additional prerequisites:
.charon/charon-enr-private-keymust exist.charon/validator_keys/must exist
Arguments to gather:
--operator-enrs-to-remove: Comma-separated ENRs of operators being removed--participating-operator-enrs: Comma-separated ENRs of ALL participating operators (must include your own ENR)--new-threshold(optional): Override the default threshold- Whether to use
--dry-runfirst
Run:
./scripts/edit/remove-operators/removed-operator.sh \
--operator-enrs-to-remove "enr:-...,enr:-..." \
--participating-operator-enrs "enr:-...,enr:-..." \
[--new-threshold N] \
[--dry-run]
Set WORK_DIR env var to override the repository root directory if running from a custom location.
The script will participate in the ceremony and then stop your charon and VC containers. No ASDB operations are needed since you're leaving the cluster.