Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache historical height when streaming attestations #1860

Closed
corverroos opened this issue Sep 12, 2024 · 1 comment
Closed

Cache historical height when streaming attestations #1860

corverroos opened this issue Sep 12, 2024 · 1 comment
Assignees

Comments

@corverroos
Copy link
Collaborator

Problem to Solve

When using cprovider to stream attestations, we do a full historical search when fetching each subsequent batch of attestations.

But subsequent attestations will never be at an earlier height, so if the previous fetched height is known, the lookback step can be skipped.

This should decrease the historical baseline metric.

Proposed Solution

Cache the height used to fetch the next back of attestations when streaming.
Use this as lookback result when fetching the next batch

@corverroos corverroos added this to the 3 - Mainnet v1 milestone Sep 12, 2024
@ttarsi ttarsi added the good first issue Good for newcomers label Sep 25, 2024
@sideninja sideninja self-assigned this Oct 2, 2024
@sideninja sideninja removed the good first issue Good for newcomers label Oct 4, 2024
@sideninja
Copy link
Contributor

sideninja added a commit that referenced this issue Nov 4, 2024
Cache the height found during attestation offset lookback search so it
can be reused on the next offset search.

issue: #1860
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

No branches or pull requests

3 participants