Skip to content

Conversation

@moshe-blox
Copy link
Contributor

Optimizes the process of finding beacon validator information within the SyncValidatorEvents function.

Previously, the code iterated through the beaconValidators slice for each knownValidator. This change introduces a map (beaconValidatorsByPublicKey) to store beacon validators keyed by their public key, allowing for direct O(1) lookups instead of O(n) searches within the loop. This significantly improves performance, especially when dealing with a large number of validators.

@moshe-blox moshe-blox mentioned this pull request Apr 8, 2025
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