Skip to content
You are reading the Teku development version documentation and some features may not be available in the stable release. You can switch to the stable version using the version box at the bottom of the screen.

Updated on January 13, 2021

Slashing Protection

Teku implements slashing protection to prevent validators from signing incorrect blocks or attestations.

You can import and export the slashing-protection file when migrating validator keys between validator clients. Teku supports the validator client interchange format when importing or exporting the slashing-protection file.

Note

If using an external signer that implements its own slashing protection (for example Web3Signer), then you can disable Teku’s built-in slashing protection using the --validators-external-signer-slashing-protection-enabled command line option.

Importing a slashing-protection file

When importing the slashing-protection file, Teku imports the file to the <data-path>/validators/slashprotection/ directory in the format <validator-pubkey>.yml (with no 0x prefix).

Example

teku slashing-protection import --data-path=/home/me/me_node --from=/home/slash/slashing-interchange-format.json

In the command line:

  • --data-path specifies the location of the Teku data directory.
  • --from specifies the location of the slashing-protection file.

In this example, Teku imports the file to the /home/me/me_node/data/validators/slashprotection/ directory.

Exporting a slashing-protection file

Export the slashing-protection file when migrating a validator to a different Teku, or non-Teku node.

Example

teku slashing-protection export --data-path=/home/me/me_node --to=/home/slash/slashing-interchange-format-minimal.json

In the command line:

  • --data-path specifies the location of the Teku data directory.
  • --to specifies the file to export the slashing-protection data to.

You can now import the slashing-protection file in a Teku, or non-Teku node.

Questions or feedback? You can discuss issues and obtain free support on Teku Discord channel.
For paid professional support by Consensys, contact us at quorum@consensys.net