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 September 13, 2021

slashing-protection

Manage the local slashing protection data used by the validator. To use the slashing-protection subcommand run:

teku slashing-protection [subcommand] [option]

You can also supply the subcommand options using environment variables or a configuration file.

import

Imports the slashing protection database using the validator client interchange format.

config-file

teku slashing-protection import --config-file=<FILE>
teku slashing-protection import --config-file=/home/me/me_node/config.yaml
TEKU_CONFIG_FILE=/home/me/me_node/config.yaml

Path to the YAML configuration file. The default is none.

data-path

teku slashing-protection import --data-path=<PATH>
teku slashing-protection import --data-path=/home/me/me_node

Path to the Teku data directory. The default directory is OS-dependent:

  • macOS: ~/Library/teku
  • Unix/Linux: $XDG_DATA_HOME/teku if $XDG_DATA_HOME is set; otherwise ~/.local/share/teku
  • Windows: %localappdata%\teku.

from

teku slashing-protection import --from=<FILE>
teku slashing-protection import --from=/home/slash/b845...23bed.json

The file to import the slashing protection database from.

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

<data-path> is defined using --data-path.

export

Exports the slashing protection database in the validator client interchange format format.

config-file

teku slashing-protection export --config-file=<FILE>
teku slashing-protection export --config-file=/home/me/me_node/config.yaml
TEKU_CONFIG_FILE=/home/me/me_node/config.yaml

Path to the YAML configuration file. The default is none.

data-path

teku slashing-protection export --data-path=<PATH>
teku slashing-protection export --data-path=/home/me/me_node

Path to the Teku data directory. The default directory is OS-dependent:

  • macOS: ~/Library/teku
  • Unix/Linux: $XDG_DATA_HOME/teku if $XDG_DATA_HOME is set; otherwise ~/.local/share/teku
  • Windows: %localappdata%\teku.

to

teku slashing-protection export --to=<FILE>
teku slashing-protection export --to=/home/slash/b845...23bed.json

The file to export the slashing protection database to.

Exports the database in the validator client interchange format format.

repair

Repairs corrupted slashing-protection data files used by Teku.

check-only-enabled

teku slashing-protection repair --checking-only-enabled[=<BOOLEAN>]
teku slashing-protection repair --checking-only-enabled=false

Reads and reports potential slashing-protection file problems, but doesn’t update any files. You can specify which files are checked using --config-file, --data-base-path.

config-file

teku slashing-protection repair --config-file=<FILE>
teku slashing-protection repair --config-file=/home/me/me_node/config.yaml

Path to the YAML configuration file. The default is none.

data-base-path, data-path

teku slashing-protection repair --data-base-path=<PATH>
teku slashing-protection repair --data-base-path=/home/me/me_node

Path to the Teku data directory. The default directory is OS-dependent:

  • macOS: ~/Library/teku
  • Unix/Linux: $XDG_DATA_HOME/teku if $XDG_DATA_HOME is set; otherwise ~/.local/share/teku
  • Windows: %localappdata%\teku

The default Docker image location is /root/.local/share/teku.

data-validator-path

teku slashing-protection repair --data-validator-path=<PATH>
teku slashing-protection repair --data-validator-path=/home/me/me_validator

Path to validator client data. The default is <data-base-path>/validator where <data-base-path> is specified using --data-base-path.

network

teku slashing-protection repair --network=<NETWORK>
teku slashing-protection repair --network=mainnet

Predefined network configuration. Accepts a predefined network name, or file path or URL to a YAML configuration file. The default is mainnet.

Possible values are:

Network Chain Type Description
mainnet Eth 2.0 Production Main network.
minimal Eth 2.0 Test Used for local testing and development networks.
pyrmont Eth 2.0 Test Multi-client testnet.
prater Eth 2.0 Test Multi-client testnet.

Predefined networks can provide defaults such the initial state of the network, bootnodes, and the address of the Ethereum 1.0 deposit contract.

slot

teku slashing-protection repair --slot=<INTEGER>
teku slashing-protection repair --slot=1028

Updates slashing protection files to contain the specified slot as a minimum. The value should be a future slot, or after when the validators stopped performing duties.

Note

This can be automatically calculated for most networks, and is generally not required.

update-all-enabled

teku slashing-protection repair --update-all-enabled[=<BOOLEAN>]
teku slashing-protection repair --update-all-enabled=false

Enables all slashing-protection records to be updated. The default is false.

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.