From 305dbf49d4c916380898a2dc0b796021233ee523 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:00:30 +0100 Subject: [PATCH 1/3] fix: back up Anchor slashing protection and builder definitions --- README.md | 4 +++- dappnode_package.json | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e84718..89f6828 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,6 @@ If you have a registered operator, you should already have a private key with yo Anchor will start to run and after a short time, you should see that Anchor will display the operator id on the log. Note that the upload option will only appear once on a fresh install and it can't be modified afterwards without deleting the whole Anchor package. ### Backup your key -There is a `BACKUP` tab in the Anchor package. It enables you to download the Anchor data which includes the public-private key pair. We strongly recommend you to make a backup copy of the key pair. Once you go to the `BACKUP` tab, click on `Download backup`. This will download a compressed file. After extracting the file, under the folder `keys` lies the private key, named `encrypted_private_key.json` and the password file, named `private_key_password`. Once the operator is registered and the operator id is known to the DKG service, the backup folder also contains `operator_id.txt`. \ No newline at end of file +There is a `BACKUP` tab in the Anchor package. It enables you to download the Anchor data which includes the public-private key pair. We strongly recommend you to make a backup copy of the key pair. Once you go to the `BACKUP` tab, click on `Download backup`. This will download a compressed file. After extracting the file, under the folder `keys` lies the private key, named `encrypted_private_key.json` and the password file, named `private_key_password`. Once the operator is registered and the operator id is known to the DKG service, the backup folder also contains `operator_id.txt`. + +The backup also contains `slashing-protection` (Anchor's slashing protection database, `slashing_protection.sqlite`) and `builder-definitions` (`builder_definitions.yml`, the direct builder configuration). The SSV network state in `anchor_db.sqlite` is not backed up: Anchor re-syncs it from the execution client. Before restoring a backup on a new machine, make sure the Anchor operator on the old machine is switched off, and keep the restored Anchor stopped for a couple of epochs after the old one stopped. diff --git a/dappnode_package.json b/dappnode_package.json index 75cc03b..c09270e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -14,6 +14,16 @@ "name": "dkg-output", "path": "/data/dkg/output", "service": "dkg" + }, + { + "name": "slashing-protection", + "path": "/root/.anchor/slashing_protection.sqlite", + "service": "operator" + }, + { + "name": "builder-definitions", + "path": "/root/.anchor/builder_definitions.yml", + "service": "operator" } ], "bugs": { From 5a1e1ba228d805bb6db2e7ee0ae8d844a82d7a57 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:23:30 +0100 Subject: [PATCH 2/3] fix: give Anchor time to shut down cleanly before a stop or backup --- README.md | 2 +- docker-compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89f6828..aae1b8c 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,4 @@ Anchor will start to run and after a short time, you should see that Anchor will ### Backup your key There is a `BACKUP` tab in the Anchor package. It enables you to download the Anchor data which includes the public-private key pair. We strongly recommend you to make a backup copy of the key pair. Once you go to the `BACKUP` tab, click on `Download backup`. This will download a compressed file. After extracting the file, under the folder `keys` lies the private key, named `encrypted_private_key.json` and the password file, named `private_key_password`. Once the operator is registered and the operator id is known to the DKG service, the backup folder also contains `operator_id.txt`. -The backup also contains `slashing-protection` (Anchor's slashing protection database, `slashing_protection.sqlite`) and `builder-definitions` (`builder_definitions.yml`, the direct builder configuration). The SSV network state in `anchor_db.sqlite` is not backed up: Anchor re-syncs it from the execution client. Before restoring a backup on a new machine, make sure the Anchor operator on the old machine is switched off, and keep the restored Anchor stopped for a couple of epochs after the old one stopped. +The backup also contains `slashing-protection` (Anchor's slashing protection database, `slashing_protection.sqlite`) and `builder-definitions` (`builder_definitions.yml`, the direct builder configuration). The SSV network state in `anchor_db.sqlite` is not backed up: Anchor re-syncs it from the execution client. DAppNode stops Anchor before copying the slashing protection database, so the copy is exact at backup time; an older DAppManager that copies it from the running package gives a best-effort copy. Before restoring a backup on a new machine, make sure the Anchor operator on the old machine is switched off, and keep the restored Anchor stopped for a couple of epochs after the old one stopped. diff --git a/docker-compose.yml b/docker-compose.yml index 3c3d607..e2431ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: UPSTREAM_VERSION: v1.4.1 STAKER_SCRIPTS_VERSION: v0.1.2 restart: unless-stopped + stop_grace_period: 30s volumes: - operator-data:/root/.anchor - operator-keys:/root/keys From ae548c8b8509616992d89854126b99d3ef0291c0 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:56:45 +0100 Subject: [PATCH 3/3] docs: explain how to back up Anchor with a DAppManager without full backup Older DAppManager versions copy the Backup tab items from the running package and restore into the running package before restarting it. Say to stop Anchor before downloading for an exact slashing protection copy, and to switch off the old operator before restoring. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aae1b8c..0c03f40 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,8 @@ Anchor will start to run and after a short time, you should see that Anchor will ### Backup your key There is a `BACKUP` tab in the Anchor package. It enables you to download the Anchor data which includes the public-private key pair. We strongly recommend you to make a backup copy of the key pair. Once you go to the `BACKUP` tab, click on `Download backup`. This will download a compressed file. After extracting the file, under the folder `keys` lies the private key, named `encrypted_private_key.json` and the password file, named `private_key_password`. Once the operator is registered and the operator id is known to the DKG service, the backup folder also contains `operator_id.txt`. -The backup also contains `slashing-protection` (Anchor's slashing protection database, `slashing_protection.sqlite`) and `builder-definitions` (`builder_definitions.yml`, the direct builder configuration). The SSV network state in `anchor_db.sqlite` is not backed up: Anchor re-syncs it from the execution client. DAppNode stops Anchor before copying the slashing protection database, so the copy is exact at backup time; an older DAppManager that copies it from the running package gives a best-effort copy. Before restoring a backup on a new machine, make sure the Anchor operator on the old machine is switched off, and keep the restored Anchor stopped for a couple of epochs after the old one stopped. +The backup also contains `slashing-protection` (Anchor's slashing protection database, `slashing_protection.sqlite`) and `builder-definitions` (`builder_definitions.yml`, the direct builder configuration). The SSV network state in `anchor_db.sqlite` is not backed up: Anchor re-syncs it from the execution client. DAppNode stops Anchor before copying the slashing protection database, so the copy is exact at backup time. Before restoring a backup on a new machine, make sure the Anchor operator on the old machine is switched off, and keep the restored Anchor stopped for a couple of epochs after the old one stopped. + +#### Compatibility with DAppManager versions without full backup + +Older DAppManager versions copy the backup from the running package, so a copy of the slashing protection database taken during a write can be inconsistent. For an exact copy, stop the Anchor package before you click `Download backup` (the download works with the package stopped); if you are moving the operator to another machine, leave it stopped afterwards. Their restore needs the package running and restarts it as soon as the files are copied, so switch off the old operator at least a couple of epochs before you restore.