Skip to content

Commit

Permalink
update woring
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Dec 21, 2023
1 parent 5cde764 commit 28b07fe
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 58 deletions.
52 changes: 0 additions & 52 deletions docs/how-to/enable-validator-slashing-protection.md

This file was deleted.

51 changes: 51 additions & 0 deletions docs/how-to/stop-vc-when-validator-slashed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Enable shut down Validator Client if any owned validator is slashed
description: Shut down the validator client if any owned validator is slashed.
sidebar_position: 8
---

# Shut down the validator client if any owned validator is slashed

When enabled, this feature will monitor the validators slashing and shut down the validator client when any of the owned validator is slashed.

When enabled, the validator client will shut down with exit code `2` if any owned validator is slashed (based on the attester and proposer slashing events received through the peer to peer network).
When that happens, the validator client should not be restarted by default because more slashing are likely to happen. We recommend restarting the validator client with the [Doppelganger Detection](./enable-doppelganger-detection.md) enabled.

:::warning

This feature is imperfect and might fail to detect slashing events rapidly. Use it as a last resort option that might prevent validators from being slashed.

:::

## Enable shut down Validator Client if any owned validator is slashed

Enable this feature by setting the [`--stop-vc-when-validator-slashed-enabled`](../reference/cli/index.md#stop-vc-when-validator-slashed-enabled) option to `true`.

Your validator client must be connected to a beacon node that supports the `proposer_slashing` and `attester_slashing` SSE event streams (both supported by Teku beacon node).

## Side effects

The Validator Client shut down is intended to prevent a massive slashing.
When triggered, the validator client will terminate and all the running validators will stop performing their duties.

:::warning

Stopping the validators might cause:

- Missed attestations.
- Missed sync committee contributions.
- Missed block proposals.

These side effects result in penalties and missed rewards.

:::

You might still consider these side effects a worthwhile trade-off since they can prevent more slashing.

## Logs

When enabled, the following log will be printed when any owned validator is slashed:

```bash title="Example validator client shut down when an owned validator is slashed"
Validator(s) with public key(s) {} got slashed: b28ab22. Shutting down validator client...
```
12 changes: 6 additions & 6 deletions docs/reference/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2570,41 +2570,41 @@ This option can't be used with [`--beacon-node-api-endpoint`](subcommands/valida

:::

### `validator-slashing-protection-enabled`
### `stop-vc-when-validator-slashed-enabled`

<Tabs>
<TabItem value="Syntax" label="Syntax" default>

```bash
--validator-slashing-protection-enabled[=<BOOLEAN>]
--stop-vc-when-validator-slashed-enabled[=<BOOLEAN>]
```

</TabItem>
<TabItem value="Example" label="Example" >

```bash
--validator-slashing-protection-enabled=true
--stop-vc-when-validator-slashed-enabled=true
```

</TabItem>
<TabItem value="Environment variable" label="Environment variable" >

```bash
TEKU_VALIDATOR_SLASHING_PROTECTION_ENABLED=true
TEKU_STOP_VC_WHEN_VALIDATOR_SLASHED_ENABLED=true
```

</TabItem>
<TabItem value="Configuration file" label="Configuration file" >

```bash
validator-slashing-protection-enabled: true
stop-vc-when-validator-slashed-enabled: true
```

</TabItem>
</Tabs>


Set to `true` to enable the [validators slashing protection](../../how-to/enable-validator-slashing-protection.md) and shut down the Validator Client when any owned validator is slashed. The default is `false`.
Set to `true` to enable the [validators slashing protection](../../how-to/stop-vc-when-validator-slashed.md) and shut down the Validator Client when any owned validator is slashed. The default is `false`.


### version
Expand Down

0 comments on commit 28b07fe

Please sign in to comment.