diff --git a/README.md b/README.md index 2e84718..0c03f40 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,10 @@ 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. 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. 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": { 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