Use dedicated cache for HTTP API route#9318
Merged
mergify[bot] merged 7 commits intoMay 19, 2026
Merged
Conversation
|
This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏 |
fa32d82 to
d54e2fa
Compare
dapplion
commented
May 19, 2026
dapplion
commented
May 19, 2026
| sse_logging_components: runtime_context.sse_logging_components.clone(), | ||
| historical_committee_cache: Arc::new(http_api::HistoricalCommitteeCache::new( | ||
| NonZeroUsize::new(self.http_api_config.historical_committee_cache_size) | ||
| .unwrap_or(NonZeroUsize::new(1).expect("1 > 0")), |
Collaborator
Author
There was a problem hiding this comment.
I prefer to not error if the user passes --shuffling-cache-size=0 as this is today a valid value. Instead default to 1. In the future we can make 0 mean disabled.
Merge Queue Status
This pull request spent 29 minutes 9 seconds in the queue, including 27 minutes 37 seconds running CI. Required conditions to merge
|
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
BUT the http API route wants to use the committee cache and insert historical committees (i.e. given state at epoch 1000, compute and store the committee for epoch 900).
If we want a single cache to serve both use cases we need to:
Instead we can add a separate cache for the API, very simple one, that caches committees only. And have the one in the beacon chain compute and cache PTCs always.
Performance impact
Slightly additional memory cost for users of the
beacon/states/committeesroute. Caching is almost equivalent, except for queries of recent committees that may already exist in the beacon chain's committee cache.AI disclousure
This PR was written by hand 90%. Claude fixed some warp type issues