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

avoid quadratic attestation queue iteration #5288

Merged
merged 3 commits into from
Aug 14, 2023
Merged

avoid quadratic attestation queue iteration #5288

merged 3 commits into from
Aug 14, 2023

Conversation

arnetheduck
Copy link
Member

every attestation is processed with a new wall time so we end up iterating over all attestations for every attestation we queue - this is 4% of cpu time on a subscribe-all-subnets node

  • remove redundant zero checks - block root must be an existing block and therefore cannot be zero
  • simplify "hasn't-voted" check to root only (isZeroMemory is dubiously implemented for objects)

every attestation is processed with a new wall time so we end up
iterating over all attestations for every attestation we queue - this is
4% of cpu time on a subscribe-all-subnets node

* remove redundant zero checks - block root must be an existing block
and therefore cannot be zero
* simplify "hasn't-voted" check to root only (isZeroMemory is dubiously
implemented for objects)
@github-actions
Copy link

github-actions bot commented Aug 13, 2023

Unit Test Results

         9 files  ±0    1 077 suites  ±0   37m 34s ⏱️ - 4m 45s
  3 723 tests ±0    3 444 ✔️ ±0  279 💤 ±0  0 ±0 
15 874 runs  ±0  15 569 ✔️ ±0  305 💤 ±0  0 ±0 

Results for commit 639f8ec. ± Comparison against base commit d171303.

♻️ This comment has been updated with latest results.

@zah zah merged commit f775483 into unstable Aug 14, 2023
9 checks passed
@zah zah deleted the att-queue-quad branch August 14, 2023 13:48
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