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

Process attestations when the state from their target block state is available in cache #7142

Merged
merged 3 commits into from
May 13, 2023

Conversation

ajsutton
Copy link
Contributor

PR Description

When selecting a state to use to process attestation gossip, check if the attestations beaconBlockRoot state is already available in the cache before deciding if it's worth regenerating a state. This allows us to process significantly more attestations without requiring additional state generations - particularly if attestations are received for blocks we just imported on a long fork.

Also potentially reduces the number of generations we'd do during periods of non-finality by better leveraging what we have in cache.

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM! Nice to see you :)

@rolfyone rolfyone enabled auto-merge (squash) May 13, 2023 00:34
@rolfyone rolfyone merged commit 32a8074 into Consensys:master May 13, 2023
@ajsutton ajsutton deleted the use-cached-states branch May 13, 2023 06:33
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