Scripts to export, import, and update validator anti-slashing databases (ASDB) in EIP-3076 format for Charon distributed validators.
When performing cluster edit operations (replace-operator, recreate-private-keys, add-operators, remove-operators), the anti-slashing database must be exported, updated with new pubkeys, and re-imported to prevent slashing violations. These scripts automate that process across all supported validator clients.
.envfile withNETWORKandVCvariables set- Docker running
jqinstalled (forupdate-anti-slashing-db.sh)
| Script | Description |
|---|---|
export_asdb.sh |
Routes to the appropriate VC-specific export script based on VC env var |
import_asdb.sh |
Routes to the appropriate VC-specific import script based on VC env var |
Usage:
# Export ASDB (VC container must be stopped)
VC=vc-lodestar ./scripts/edit/vc/export_asdb.sh --output-file ./asdb-export/slashing-protection.json
# Import ASDB (VC container must be stopped)
VC=vc-lodestar ./scripts/edit/vc/import_asdb.sh --input-file ./asdb-export/slashing-protection.jsonUpdates pubkeys in an EIP-3076 file by mapping them between source and target cluster-lock files.
./scripts/edit/vc/update-anti-slashing-db.sh <eip3076-file> <source-cluster-lock> <target-cluster-lock>Each client has its own export_asdb.sh and import_asdb.sh in a subdirectory:
| Client | Directory | Export requires | Import requires |
|---|---|---|---|
| Lodestar | lodestar/ |
Container stopped | Container stopped |
| Prysm | prysm/ |
Container stopped | Container stopped |
| Teku | teku/ |
Container stopped | Container stopped |
| Nimbus | nimbus/ |
Container stopped | Container stopped |
Note: All validator clients require the container to be stopped before export/import to avoid database locking issues. The main ceremony scripts (e.g., replace-operator, recreate-private-keys) handle stopping the VC automatically.
See test/README.md for integration tests.