Skip to content

fix(validator): wait for the beacon node before giving up on the VRF state file - #970

Open
pablodeymo wants to merge 1 commit into
pq-devnet-2from
fix/pq-devnet-2-vrf-state
Open

pablodeymo wants to merge 1 commit into
pq-devnet-2from
fix/pq-devnet-2-vrf-state

Conversation

@pablodeymo

Copy link
Copy Markdown
Collaborator

Port of #939 (84e36a7f) onto pq-devnet-2 (refs #936).

Motivation

On pq-devnet-2 (65,536 validators, ~3,200 keys per host), giving up on --vrf-state-url after 2 minutes (REGISTRY_ATTEMPTS = 60 × 2s) or after a single transient read error on the first .vrf record forces every validator key on the host to hash its full VRF tree sequentially (~100s per key = tens of hours of missed proposals on a fresh start).

Changes

  • Index lookup (resolve_indices): retries every REGISTRY_RETRY (2s) without a 2-minute cap until the beacon node answers and knows at least one of the validator's keys (runs on the dedicated pq-vrf-trees thread, so it never blocks attestations, aggregations, or PTC votes).
  • Record reads (read_vrf_state): retries each .vrf record read up to 5 times with doubling backoff (~30s total) before falling back to hashing.
  • Logging: collapses per-key warnings into a single summary warn! counting misses by reason (no_index, no_record, unreadable, refused, plus first_refusal).
  • Docs & tests: updates docs/beacon_pq.md and ports the 4 unit tests from fix(validator): wait for the beacon node before giving up on the VRF state file #939.

…state file

On pq-devnet-1 the validator client hashed every key's VRF tree (minutes
each, hours for 500 keys) instead of loading the published .vrf file,
and missed its proposals meanwhile. The file's records fold to their roots
under this client's VRF rule (checked against the published kurtosis set),
so the file is fine; the loader gave up on it too easily.

- resolve_indices retries until the node answers and knows at least one
  key, with no two-minute limit: a client started before its node, or a
  node still loading, lost every key's state.
- Each record read is retried five times with backoff before its key is
  hashed, rather than one failed first read abandoning the file.
- One warning counts the keys that fell through by reason (no_index,
  no_record, unreadable, refused, with the first refusal's error), in
  place of a warning per key.

Refs #936

This branch has not been deployed

No deployments
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