Skip to content

Conversation

@pinebit
Copy link
Contributor

@pinebit pinebit commented Dec 17, 2025

Summary

Introduces a suite of automation scripts to streamline the charon alpha edit replace-operator workflow. This initial version supports the Lodestar validator client, handling the orchestration, anti-slashing database (ASDB) migration, and configuration swapping with built-in safety checks.

Key Changes

Orchestration: Added replace_operator.sh to guide operators through the ceremony (supports both continuing & new operator roles).
ASDB Management: Added export_asdb.sh and import_asdb.sh to handle Lodestar's slashing protection data using the EIP-3076 interchange format.
Library Refactor: Moved update-anti-slashing-db.sh to lib to serve as a reusable utility for public key translation.
Documentation: Added README.md with detailed workflows, example sessions, and troubleshooting guides.

Features

Interactive & CLI Modes: Scripts support full automation via flags or guided interactive prompts.
Safety: Automatically creates .charon backups before modifying state and prevents overwriting existing data.
Docker Integration: Uses ephemeral containers for the ceremony and proper entrypoint overrides for Lodestar management commands.

Usage

See README.md for complete instructions.

# Run interactively
./scripts/edit/lodestar/replace_operator.sh

# Or via CLI flags
./scripts/edit/lodestar/replace_operator.sh --role continuing --old-enr ... --new-enr ...

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new bash script to update an EIP-3076 anti-slashing database JSON file by mapping public keys from a source cluster-lock.json to a target cluster-lock.json. The script is designed to support the workflow where validators are edited via an edit command, producing new cluster-lock files with updated validator configurations.

Key changes:

  • Implements pubkey lookup and replacement logic using jq for JSON manipulation
  • Validates cluster-lock structure and ensures target has sufficient validators/shares
  • Provides comprehensive error handling and validation throughout the update process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pinebit pinebit force-pushed the pinebit/asdb-update-script branch from ccf2d22 to cfdbe54 Compare January 20, 2026 12:23
@pinebit pinebit changed the title ASDB update script Add automated scripts for Charon replace-operator ceremony Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants