Skip to content

fix(validator): distributed mode follow-ups after the Charon run - #963

Merged
pablodeymo merged 1 commit into
release/v2.0.0from
backport/v2.0.0-pr-951
Dec 2, 2026
Merged

pablodeymo merged 1 commit into
release/v2.0.0from
backport/v2.0.0-pr-951

Conversation

@pablodeymo

Copy link
Copy Markdown
Collaborator

🗒️ Description / Motivation

Backport of #951 (a53f6be1 on main) to release/v2.0.0, for v2.0.0-rc.2.

What Changed

git cherry-pick -x a53f6be1 on top of release/v2.0.0 (7d5e9f22). It applied without conflicts, and the patch is identical to the one merged on main (same git patch-id). Nothing was edited by hand.

Tests Added / Run

Run on the four backports together (#950, #951, #955, #952 on top of 7d5e9f22; that tree is the same one a merge of main at 64ba9d51 into the release branch gives):

This branch alone was not built locally; CI covers it.

Related Issues / PRs

## 🗒️ Description / Motivation

Two follow-ups to #874, from running `--distributed` behind a real
Charon cluster (the results are in a comment on that PR).

- The partial selection proofs `Distributed` keeps could follow the
schedule generation backwards. An exchange reads the generation, waits
for the store, and only then looks at the kept proofs. One that read the
generation before a schedule swap could get there after an exchange that
read it since, wipe that exchange's proofs and set the generation back.
- `docs/cli.md` still said the mode had not run against real middleware.

## What Changed

- `crates/validator/src/distributed.rs`: `Partials::reusable_at`
replaces the inline "clear when the generation differs". The generation
only moves forward, and an exchange that is behind it reuses nothing.
- `docs/cli.md`, "Distributed validators": says what the mode was run
against (Charon v1.11.4, local fulu devnet, Lighthouse peers and
all-ethlambda) and what that run did not cover.

## Correctness / Behavior Guarantees

- Nothing wrong was ever sent before this: the next exchange under the
current schedule cleared the mislabelled proofs, and the late exchange's
answer is dropped because the generation moved. The cost was signatures
redone. A schedule swap is itself rare (a fork schedule changing under a
running client).
- No change to what is sent to the middleware, or when.

## Tests Added / Run

- New: `the_kept_partial_proofs_never_follow_the_schedule_back`.
- On this branch: `cargo fmt --all -- --check`, `cargo test -p
ethlambda-validator --profile release-fast` (1035 passed), `cargo clippy
-p ethlambda-validator --all-targets -- -D warnings`. CI ran the
workspace-wide lint and test suites on this PR, and every check passes.
- A build of `main` with this branch (and the relative
`--validators-dir` fix) ran on all four operators of a Charon v1.11.4
cluster (threshold 3, 64 validators) for 29 slots across an epoch
boundary: attestations and aggregates in every slot that had attester
duties, sync contributions in 28 slots, 12 blocks proposed through the
cluster, no errors. In the remaining slot Charon did not answer the
contribution requests before the slot ended, and each client abandoned
the step with one warning. The proposal check from #875 reported all 9
blocks it had checked canonical, so it holds behind middleware that
replaces the share's signature with the combined one.

## Related Issues / PRs

- Follows #874.

## ✅ Verification Checklist

- [x] Ran `make fmt` — clean
- [x] `make lint` (clippy with `-D warnings`) — clean in CI; run locally
for `ethlambda-validator`
- [x] `make test` — all passing in CI; run locally for
`ethlambda-validator`

(cherry picked from commit a53f6be)
@pablodeymo

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

AI security review: 0 finding(s) to check

Reviewed by Opus, GPT, Kimi, DeepSeek.
GLM (error, see the run log) did not finish; Opus, GPT, Kimi, DeepSeek reviewed the whole PR. Comment /review continue to retry, with a new budget; reviewers that finished are reused.

No findings to check.

Cost of this review: ~$0.59 of a $30 budget (estimated from token counts).

@pablodeymo
pablodeymo merged commit 6ce646e into release/v2.0.0 Dec 2, 2026
14 checks passed
@pablodeymo
pablodeymo deleted the backport/v2.0.0-pr-951 branch December 2, 2026 17:42
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.

1 participant