Skip to content

Conversation

etan-status
Copy link
Contributor

When there are long periods of non-finality, nodeIsViableForHead has been observed to consume significant time as it repeatedly walks the non-finalized check graph as part of determining what heads are eligible for fork choice. Caching the result resolves that.

Overall, it may still be better to prune fork choice more aggressively when finality advances, to fully avoid the case specced out using the linear scan. The current implementation is very close to spec, though, so such a change should not be introduced without thorough testing.

The simple cache should allow significantly better performance on Goerli while the network is still supported (Mid April).

When there are long periods of non-finality, `nodeIsViableForHead` has
been observed to consume significant time as it repeatedly walks the
non-finalized check graph as part of determining what heads are eligible
for fork choice. Caching the result resolves that.

Overall, it may still be better to prune fork choice more aggressively
when finality advances, to fully avoid the case specced out using the
linear scan. The current implementation is very close to spec, though,
so such a change should not be introduced without thorough testing.

The simple cache should allow significantly better performance on Goerli
while the network is still supported (Mid April).
Copy link

Unit Test Results

         9 files  ±0    1 115 suites  ±0   31m 47s ⏱️ + 1m 12s
  4 243 tests ±0    3 896 ✔️ ±0  347 💤 ±0  0 ±0 
16 923 runs  ±0  16 525 ✔️ ±0  398 💤 ±0  0 ±0 

Results for commit 9898db6. ± Comparison against base commit 0a6d189.

@etan-status etan-status merged commit 1bd5819 into unstable Mar 15, 2024
@etan-status etan-status deleted the dev/etan/fc-ancestrycache branch March 15, 2024 21: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.

1 participant