Skip to content

fix cache contention#10528

Draft
mehdi-aouadi wants to merge 4 commits intoConsensys:masterfrom
mehdi-aouadi:cache-contention
Draft

fix cache contention#10528
mehdi-aouadi wants to merge 4 commits intoConsensys:masterfrom
mehdi-aouadi:cache-contention

Conversation

@mehdi-aouadi
Copy link
Copy Markdown
Contributor

@mehdi-aouadi mehdi-aouadi commented Mar 25, 2026

PR Description

Fix validators public key cache contention

Fixed Issue(s)

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.

Note

Medium Risk
Changes a hot-path cache used during state transition from an unbounded LRU to a new array-indexed implementation, which could affect memory growth and concurrency behavior under large/sparse validator indices.

Overview
Replaces the validatorsPubKeys cache in TransitionCaches with a new ArrayIndexedCache that stores values directly in an array slot derived from the UInt64 validator index, aiming to reduce contention/overhead compared to the previous effectively-unbounded LRUCache.

Adds ArrayIndexedCache (with bounds checks, copy/clear/invalidate support, and non-blocking growth semantics) plus focused unit tests including concurrency and growth-capping behavior. Also updates .gitignore to ignore agents.md.

Written by Cursor Bugbot for commit e971ed5. This will update automatically on new commits. Configure here.

@mehdi-aouadi mehdi-aouadi self-assigned this Mar 25, 2026
@mehdi-aouadi mehdi-aouadi marked this pull request as draft March 25, 2026 10:36
@mehdi-aouadi mehdi-aouadi marked this pull request as ready for review March 25, 2026 10:36
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

@mehdi-aouadi mehdi-aouadi marked this pull request as draft March 25, 2026 11:47
@mehdi-aouadi mehdi-aouadi marked this pull request as ready for review March 25, 2026 14:54
@mehdi-aouadi mehdi-aouadi marked this pull request as draft March 25, 2026 15:02
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