Skip to content

Fix attester/PTC duty cache labeling on probe and bulk refresh - #10094

Open
NikhilSharmaWe wants to merge 2 commits into
sigp:unstablefrom
NikhilSharmaWe:fix-duties-dependent-root-coherent-refresh
Open

NikhilSharmaWe wants to merge 2 commits into
sigp:unstablefrom
NikhilSharmaWe:fix-duties-dependent-root-coherent-refresh

Conversation

@NikhilSharmaWe

Copy link
Copy Markdown

Description

Attester (and PTC) duty polling probes a small validator set for the dependent_root, then optionally fetches the rest. Those two calls can observe different dependent roots (fallback BN or re-org between requests). Bulk duties were stored under the probe root, so the next poll's staleness check could skip refresh and keep the wrong duties.

When a second fetch is needed, fetch all validators that need updating in one request and store only that response's (dependent_root, data). Same for PTC.

Fixes #10091

Test plan

  • cargo check -p validator_services
  • cargo nextest run -p validator_services

Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>

@michaelsproul michaelsproul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feasible to add a regression test for this?

Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
@NikhilSharmaWe

Copy link
Copy Markdown
Author

Added a small unit test around a duties_to_commit helper that locks the no-merge / bulk-root behavior

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.

2 participants