Skip to content

Commit eb9bb79

Browse files
committed
Unified skills and scripts
1 parent 1b9f35b commit eb9bb79

13 files changed

Lines changed: 41 additions & 60 deletions

File tree

.claude/skills/add-operators/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Ask the user: **"Are you an existing operator in the cluster, or a new operator
3939
[--dry-run]
4040
```
4141

42-
The script will export the anti-slashing database, run the P2P ceremony, update keys, and provide restart instructions. After completion, remind the user to **wait ~2 epochs before restarting** containers.
42+
The script will export the anti-slashing database, run the P2P ceremony, update keys, and print commands to start containers manually. After completion, remind the user to **wait ~2 epochs before starting** containers.
4343

4444
### If New Operator
4545

@@ -71,4 +71,4 @@ After the existing operators have the ENR, gather:
7171
[--dry-run]
7272
```
7373

74-
Remind the user that **all operators (existing AND new) must participate simultaneously** in the P2P ceremony.
74+
Remind the user that **all operators (existing AND new) must participate simultaneously** in the P2P ceremony. After completion, the script will print commands to start containers manually. The new operator does NOT have slashing protection history (fresh start).

.claude/skills/add-validators/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ The script will:
4646
1. Validate prerequisites
4747
2. Display current cluster info (operators, validators)
4848
3. Run a P2P ceremony (all operators must participate simultaneously)
49-
4. Backup `.charon/` to `./backups/`
50-
5. Install new configuration
51-
6. Restart containers if they were previously running
49+
4. Stop containers if they were running
50+
5. Backup `.charon/` to `./backups/`
51+
6. Install new configuration
52+
7. Print commands to start containers manually
5253

5354
Remind the user that **all operators must run this script at the same time** for the P2P ceremony to succeed.

.claude/skills/recreate-private-keys/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ The script will:
4141
6. Backup `.charon/` to `./backups/`
4242
7. Install new key shares
4343
8. Import updated ASDB
44+
9. Print commands to start containers manually
4445

45-
After completion, remind the user to **wait ~2 epochs before restarting** containers.
46+
After completion, remind the user to **wait ~2 epochs before starting** containers.
4647

4748
Remind the user that **all operators must run this script at the same time** for the P2P ceremony to succeed.

.claude/skills/remove-operators/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Ask the user: **"Are you a remaining operator (staying in the cluster) or a remo
5151
[--dry-run]
5252
```
5353

54-
After completion, remind the user to **wait ~2 epochs before restarting** containers.
54+
After completion, the script will print commands to start containers manually. Remind the user to **wait ~2 epochs before starting** containers.
5555

5656
### If Removed Operator
5757

.claude/skills/replace-operator/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Ask the user: **"Are you a remaining operator (performing the replacement) or th
4343
[--dry-run]
4444
```
4545

46-
After completion, the script will output the new `cluster-lock.json`. Remind the user to **share the new cluster-lock.json with the new operator** and to **wait ~2 epochs before restarting** containers.
46+
After completion, the script will print commands to start containers manually. Remind the user to **share the new cluster-lock.json with the new operator** and to **wait ~2 epochs before starting** containers.
4747

4848
### If New Operator
4949

@@ -73,4 +73,4 @@ After receiving the new `cluster-lock.json` from remaining operators:
7373
[--dry-run]
7474
```
7575

76-
The script will verify the ENR is present in the cluster-lock, install the configuration, and start charon and VC containers. Note: the new operator does NOT have slashing protection history (fresh start).
76+
The script will verify the ENR is present in the cluster-lock, install the configuration, and print commands to start containers manually. Note: the new operator does NOT have slashing protection history (fresh start).

scripts/edit/add-operators/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ Automates the complete workflow for operators already in the cluster:
4646

4747
### Workflow
4848

49-
1. **Export ASDB** - Export anti-slashing database from running VC
49+
1. **Export ASDB** - Stop VC if running and export anti-slashing database
5050
2. **Run ceremony** - P2P coordinated add-operators ceremony with all operators
5151
3. **Update ASDB** - Replace pubkeys in exported ASDB to match new cluster-lock
5252
4. **Stop containers** - Stop charon and VC
5353
5. **Backup and replace** - Backup current `.charon/` to `./backups/`, install new configuration
5454
6. **Import ASDB** - Import updated anti-slashing database
55-
7. **Print restart commands** - Display commands to start containers after waiting ~2 epochs
55+
7. **Print start commands** - Display commands to start containers manually (wait ~2 epochs before starting)
5656

5757
## For New Operators
5858

scripts/edit/add-operators/new-operator.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -349,24 +349,19 @@ log_info "New cluster configuration installed to .charon/"
349349

350350
echo ""
351351

352-
# Step 4: Start containers
353-
log_step "Step 4: Starting containers..."
354-
355-
run_cmd docker compose up -d charon "$VC"
356-
357-
log_info "Containers started"
358-
359352
echo ""
360353
echo "╔════════════════════════════════════════════════════════════════╗"
361354
echo "║ New Operator Setup COMPLETED ║"
362355
echo "╚════════════════════════════════════════════════════════════════╝"
363356
echo ""
364357
log_info "Summary:"
365358
log_info " - Cluster configuration installed in: .charon/"
366-
log_info " - Containers started: charon, $VC"
367359
echo ""
368-
log_info "Next steps:"
369-
log_info " 1. Wait for charon to sync with peers: docker compose logs -f charon"
360+
log_info "When ready, start containers with:"
361+
echo " docker compose up -d charon $VC"
362+
echo ""
363+
log_info "After starting, verify:"
364+
log_info " 1. Check charon logs: docker compose logs -f charon"
370365
log_info " 2. Verify VC is running: docker compose logs -f $VC"
371366
log_info " 3. Monitor validator duties once synced"
372367
echo ""

scripts/edit/add-validators/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The script performs the following steps:
5151
2. **Run ceremony** - P2P coordinated add-validators ceremony with all operators
5252
3. **Stop containers** - Stop charon and VC (only if they were running)
5353
4. **Backup and replace** - Backup current `.charon/` to `./backups/`, install new configuration
54-
5. **Restart containers** - Start charon and VC (only if they were running before)
54+
5. **Print start commands** - Display commands to start containers manually
5555

5656
## Related
5757

scripts/edit/add-validators/add-validators.sh

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -305,22 +305,6 @@ log_info "Current .charon backed up to $BACKUP_DIR/.charon-backup.$TIMESTAMP"
305305
run_cmd mv "$OUTPUT_DIR" .charon
306306
log_info "New cluster configuration installed to .charon/"
307307

308-
echo ""
309-
310-
# Step 4: Restart containers (if they were running before)
311-
log_step "Step 4: Restarting containers..."
312-
313-
if [ "$CHARON_WAS_RUNNING" = true ] || [ "$VC_WAS_RUNNING" = true ]; then
314-
if [ "$UNVERIFIED" = true ]; then
315-
log_warn "Starting charon with CHARON_NO_VERIFY=true (required for --unverified mode)"
316-
fi
317-
run_cmd docker compose up -d charon "$VC"
318-
log_info "Containers restarted"
319-
else
320-
log_info "Containers were not running before, skipping restart"
321-
log_info "Start manually with: docker compose up -d charon $VC"
322-
fi
323-
324308
echo ""
325309
echo "╔════════════════════════════════════════════════════════════════╗"
326310
echo "║ Add Validators Workflow COMPLETED ║"
@@ -330,17 +314,22 @@ log_info "Summary:"
330314
log_info " - Old .charon backed up to: $BACKUP_DIR/.charon-backup.$TIMESTAMP"
331315
log_info " - New cluster configuration installed in: .charon/"
332316
log_info " - $NUM_VALIDATORS new validator(s) added"
333-
if [ "$CHARON_WAS_RUNNING" = true ] || [ "$VC_WAS_RUNNING" = true ]; then
334-
log_info " - Containers restarted: charon, $VC"
335-
else
336-
log_info " - Containers not restarted (were not running)"
337-
fi
338-
317+
echo ""
318+
log_info "When ready, start containers with:"
319+
echo " docker compose up -d charon $VC"
320+
echo ""
321+
log_info "After starting, verify:"
322+
log_info " 1. Check charon logs: docker compose logs -f charon"
323+
log_info " 2. Verify VC is running: docker compose logs -f $VC"
324+
log_info " 3. Verify cluster is producing attestations"
325+
echo ""
339326
if [ "$UNVERIFIED" = true ]; then
340-
echo ""
341327
log_warn "IMPORTANT: You used --unverified mode."
342328
log_warn "Ensure CHARON_NO_VERIFY=true is set in your .env file for future restarts."
329+
echo ""
343330
fi
331+
log_warn "Keep the backup until you've verified normal operation for several epochs."
332+
echo ""
344333

345334
echo ""
346335
log_info "Next steps:"

scripts/edit/recreate-private-keys/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The script will:
3838
5. Backup current `.charon` directory to `./backups/`
3939
6. Move new keys from `./output/` to `.charon/`
4040
7. Import the updated anti-slashing database
41-
8. Print restart commands (wait ~2 epochs before starting)
41+
8. Print start commands (wait ~2 epochs before starting)
4242

4343
## Options
4444

0 commit comments

Comments
 (0)