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

leaf cache fixes #2637

Merged
merged 2 commits into from
Sep 19, 2024
Merged

leaf cache fixes #2637

merged 2 commits into from
Sep 19, 2024

Conversation

arnetheduck
Copy link
Member

  • Add missing leaf cache update when a leaf turns to a branch with two leaves (on merge) and vice versa (on delete) - this could lead to stale leaves being returned from the cache causing validation failures - it didn't happen because the leaf caches were not being used efficiently :)
  • Replace seq with ArrayBuf in Hike allowing it to become allocation-free - this PR also works around an inefficiency in nim in returning large types via a var parameter
  • Use the leaf cache instead of getVtxRc to fetch recent leaves - this makes the vertex cache more efficient at caching branches because fewer leaf requests pass through it.

* Add missing leaf cache update when a leaf turns to a branch with two
leaves (on merge) and vice versa (on delete) - this could lead to stale
leaves being returned from the cache causing validation failures - it
didn't happen because the leaf caches were not being used efficiently :)
* Replace `seq` with `ArrayBuf` in `Hike` allowing it to become
allocation-free - this PR also works around an inefficiency in nim in
returning large types via a `var` parameter
* Use the leaf cache instead of `getVtxRc` to fetch recent leaves - this
makes the vertex cache more efficient at caching branches because fewer
leaf requests pass through it.
@arnetheduck arnetheduck merged commit 2fe8cc4 into master Sep 19, 2024
26 checks passed
@arnetheduck arnetheduck deleted the leaf-cache-fixes branch September 19, 2024 08:39
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