From 6095e96ba26474066bcaae30eb2940d01dc6b8fc Mon Sep 17 00:00:00 2001 From: bgravenorst <50852695+bgravenorst@users.noreply.github.com> Date: Wed, 13 Jan 2021 15:12:13 +1000 Subject: [PATCH] Update slashing protection information. (#241) * Add CLI option to disable built-in slashing protection for external signers. Signed-off-by: Byron Gravenorst * Add instructions to connect to mainnet. Signed-off-by: Byron Gravenorst * updating submodule to latest * Add instructions to connect to mainnet. Signed-off-by: Byron Gravenorst * Fix markdown issue. Signed-off-by: Byron Gravenorst * Update slashing protection information. Signed-off-by: Byron Gravenorst * Update slashing protection information. Signed-off-by: Byron Gravenorst --- docs/Concepts/Slashing-Protection.md | 12 +++++++++++- docs/HowTo/Prevent-Slashing.md | 10 ++++------ .../Reference/CLI/Subcommands/Slashing-Protection.md | 9 ++++----- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/Concepts/Slashing-Protection.md b/docs/Concepts/Slashing-Protection.md index e98b510fe..9d4228397 100644 --- a/docs/Concepts/Slashing-Protection.md +++ b/docs/Concepts/Slashing-Protection.md @@ -31,13 +31,14 @@ Teku provides command line options to [import] or [export] the slash protection ## Validator slash protection file -The slash protection file records three values that protects the validator from incorrectly +The slash protection file records multiple values that protects the validator from incorrectly signing blocks or attestations. !!! example ```bash --- + genesisValidatorsRoot: "0x9436e8a630e3162b7ed4f449b12b8a5a368a4b95bc46b941ae65c11613bfa4c1" lastSignedBlockSlot: 71090 lastSignedAttestationSourceEpoch: 2290 lastSignedAttestationTargetEpoch: 3247 @@ -49,6 +50,15 @@ The following rules apply to the file: * A validator will not sign an attestation unless the attestation source is less than or equal to `lastSignedAttestationSourceEpoch`, and the attestation target epoch is greater than `lastSignedAttestationTargetEpoch`. +* `genesisValidatorsRoot` is a hash of the validators active at genesis, and is used to + differentiate between different chains. Teku does not require this field to be present, but if + it is present and differs from the required value, then Teku returns an error. + +!!! info + + You can obtain the `genesisValidatorsRoot` value by using the + [`/eth/v1/beacon/genesis`](https://consensys.github.io/teku/#operation/getEthV1BeaconGenesis) + API. These rules guarantee the validator does not sign anything that is slashable. diff --git a/docs/HowTo/Prevent-Slashing.md b/docs/HowTo/Prevent-Slashing.md index 890e14a27..59d7aab94 100644 --- a/docs/HowTo/Prevent-Slashing.md +++ b/docs/HowTo/Prevent-Slashing.md @@ -8,7 +8,8 @@ title: Import or export a slashing protection file blocks or attestations. You can import and export the slashing-protection file when migrating validator keys between -validator clients. +validator clients. Teku supports the [validator client interchange format] when importing or +exporting the slashing-protection file. !!! note @@ -23,8 +24,6 @@ When importing the slashing-protection file, Teku imports the file to the `/validators/slashprotection/` directory in the format `.yml` (with no 0x prefix). -Teku supports files using the [Minimal] or [Complete] interchange format when importing. - !!! example ``` @@ -43,7 +42,7 @@ In this example, Teku imports the file to the `/home/me/me_node/data/validators/ ## Exporting a slashing-protection file Export the slashing-protection file when migrating a validator to a different Teku, or non-Teku -node. Teku exports the slashing protection file in the [Minimal] format. +node. !!! example @@ -63,6 +62,5 @@ You can now import the slashing-protection file in a Teku, or non-Teku node. [Teku implements slashing protection]: ../Concepts/Slashing-Protection.md [data path directory when starting Teku]: ../Reference/CLI/CLI-Syntax.md#data-path -[Minimal]: https://hackmd.io/@sproul/Bk0Y0qdGD#Format-2-Minimal -[Complete]: https://hackmd.io/@sproul/Bk0Y0qdGD#Format-1-Complete +[validator client interchange format]: https://eips.ethereum.org/EIPS/eip-3076 [Web3Signer]: https://docs.web3signer.consensys.net/en/latest/ diff --git a/docs/Reference/CLI/Subcommands/Slashing-Protection.md b/docs/Reference/CLI/Subcommands/Slashing-Protection.md index ced37db4a..21b21ada8 100644 --- a/docs/Reference/CLI/Subcommands/Slashing-Protection.md +++ b/docs/Reference/CLI/Subcommands/Slashing-Protection.md @@ -15,7 +15,7 @@ You can also supply the subcommand options using [environment variables or a con ## `import` -Imports the slashing protection database. Supports the [Minimal] or [Complete] interchange format. +Imports the slashing protection database using the [validator client interchange format]. ### config-file @@ -83,7 +83,7 @@ Teku imports the file to the `/validators/slashprotection/` directory ## `export` -Exports the slashing protection database in [Minimal] format. +Exports the slashing protection database in the [validator client interchange format] format. ### config-file @@ -144,10 +144,9 @@ The path to the Teku data directory. The default directory is OS dependent: The file to export the slashing protection database to. -Exports the database in the [Minimal] format. +Exports the database in the [validator client interchange format] format. [slashing protection data]: ../../../Concepts/Slashing-Protection.md -[Minimal]: https://hackmd.io/@sproul/Bk0Y0qdGD#Format-2-Minimal -[Complete]: https://hackmd.io/@sproul/Bk0Y0qdGD#Format-1-Complete +[validator client interchange format]: https://eips.ethereum.org/EIPS/eip-3076 [environment variables or a configuration file]: ../CLI-Syntax.md#specifying-options