Skip to content

Document slashing protection repair - #815

Open
rolfyone wants to merge 8 commits into
Consensys-Incorporated:mainfrom
rolfyone:slashing-protection-repair-docs
Open

rolfyone wants to merge 8 commits into
Consensys-Incorporated:mainfrom
rolfyone:slashing-protection-repair-docs

Conversation

@rolfyone

@rolfyone rolfyone commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #787.

Also covers #829 (closed in favour of this PR): the preserved genesis validators root, the network check, --slot skipping that check, and the genesis-state fallback.

Documents teku slashing-protection repair, including the changes in two Teku PRs, both merged on 2026-11-17:

Changes (docs/)

  • New how-to, "Repair slashing protection files" (how-to/prevent-slashing/repair-slashing-protection.md), placed second under "Prevent slashing offenses". It covers:

    • when to use repair, and how the repair slot works (current slot plus one epoch, values only raised, the network check);
    • prerequisites (stop the validator client; the default mainnet network);
    • checking only, repairing damaged files, and update-all creating missing files;
    • which validator keys are checked;
    • using a specific slot, and fixing a slot that's too high.

    The example output is taken from the commands' actual messages.

  • Reference page, repair section rewritten:

    • what the command does, the confirmation prompt, and stopping the validator client first;
    • examples that do something instead of =false;
    • a network description specific to repair, with a warning about the default;
    • new sections for checkpoint-sync-url, genesis-state, initial-state, validator-keys and validators-external-signer-public-keys;
    • the --data-base-path alias.
  • Concept page:

    • a warning that a validator with no slashing protection file signs anything;
    • repair added as a way to migrate keys from another client.

Other fixes on the slashing protection pages

  • --checking-only-enabled → --check-only-enabled; the documented flag doesn't exist.
  • The import and repair sections' --data-path links pointed at the export section's heading.
  • The slashing protection directory is <data-path>/validator/slashprotection/, not validators/. One example also included a data/ directory that doesn't exist.

Only the development version (docs/) changes; versioned_docs/ is untouched. The released versions still have these three errors.

Checks

  • npm run build succeeds; the build fails on broken links, and there were no anchor warnings.
  • prettier --check passes on the changed docs/ files.
  • Each documented behaviour was checked against the code and tests of both Teku PRs.

Note

Low Risk
Documentation-only changes with no runtime or security impact; risk is limited to doc accuracy relative to unreleased Teku PRs noted in the description.

Overview
Adds end-user documentation for teku slashing-protection repair, including a new how-to and an expanded CLI reference aligned with upcoming Teku behavior.

New content: repair-slashing-protection.md explains when to repair, prerequisites (stop the validator client, match network/config), --check-only-enabled, repairing damaged YAML, --update-all-enabled to raise valid files and create missing records, manual --slot selection, and lowering values by hand.

Updated pages: The slashing protection concept page adds a repair section (repair slot rules, raise-only semantics, network/genesisValidatorsRoot checks) plus warnings that missing files allow signing. Migration guidance now includes repair with --update-all-enabled when importing keys without interchange data.

Reference & fixes: The repair section is rewritten with options such as checkpoint-sync-url, genesis-state, initial-state, validator-keys, and network cautions. Docs correct --checking-only-enabled → --check-only-enabled, slashprotection paths to <data-path>/validator/slashprotection/ (not validators/), and sidebar order under “Prevent slashing.”

Reviewed by Cursor Bugbot for commit ee38b4d. Bugbot is set up for automated code reviews on this repo. Configure here.

Add a how-to for `teku slashing-protection repair`, rewrite its
reference section, and point the slashing protection concept page at
it. The docs cover the behaviour in Consensys-Incorporated/teku#11621
(genesis root kept, network check, --slot loads no state, genesis state
fallback) and #11622 (update-all creates records for validator keys
without one, and --help only lists the options repair uses).

Fix errors in every version of the slashing protection pages: the flag
is --check-only-enabled, not --checking-only-enabled; the import and
repair --data-path links pointed at the export section; and the
directory is <data-path>/validator/slashprotection, not validators/.
Only the development docs change; the released versioned_docs keep their current text.
The pre-commit Prettier run reformatted a table row in the restored versioned_docs; keep them identical to main.
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

@rolfyone is attempting to deploy a commit to the Consensys Incorporated Team on Vercel.

A member of the Team first needs to authorize it.

rolfyone and others added 3 commits November 10, 2026 10:55
Co-authored-by: Cursor <cursoragent@cursor.com>
Move the missing-file explanation into the update-all section, add the repair concept section, and rename headings to describe the actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rolfyone
rolfyone marked this pull request as ready for review November 17, 2026 03:51
@bgravenorst

Copy link
Copy Markdown
Contributor

We need to ensure we are covering #829 in the PR as well. Adding this note to reference the issue and close the loop.

This branch was previously deployed

1 inactive deployment
security — ee38b4d4 Deployed Nov 18, 2026 by rolfyone via trivy / Trivy #546
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add slashing protection repair to documentation

2 participants