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

Hierarchical state diffs #5978

Open
wants to merge 52 commits into
base: unstable
Choose a base branch
from
Open

Hierarchical state diffs #5978

wants to merge 52 commits into from

Conversation

michaelsproul
Copy link
Member

@michaelsproul michaelsproul commented Jun 21, 2024

Proposed Changes

This PR contains the freezer DB changes from the main tree-states branch, bringing the small & efficient archive node database to stable Lighthouse 🎉

Additional Info

(From @dapplion): Some resources to get up to speed with HDiff concepts:

@michaelsproul michaelsproul added work-in-progress PR is a work-in-progress optimization Something to make Lighthouse run more efficiently. database tree-states Upcoming state and database overhaul labels Jun 21, 2024
@dapplion
Copy link
Collaborator

dapplion commented Jun 21, 2024

I get a compilation error from xdelta3 trying to compile this branch:

EDIT: Fixed (cropped previous text because it's long)

@michaelsproul
Copy link
Member Author

looks like it might be a Mac thing

I had to fork xdelta3 already, we should move it under sigp and patch it

@dapplion
Copy link
Collaborator

dapplion commented Jun 21, 2024

TODOs

EDIT: completed

@dapplion
Copy link
Collaborator

dapplion commented Jun 21, 2024

TODO ~ Some metrics that we should add:

@michaelsproul michaelsproul added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Sep 9, 2024
@michaelsproul
Copy link
Member Author

Ready for final review and merge. This is confirmed working on test infra, and all FIXMEs have been resolved.

@michaelsproul michaelsproul added the backwards-incompat Backwards-incompatible API change label Sep 9, 2024
beacon_node/src/cli.rs Outdated Show resolved Hide resolved
beacon_node/store/src/hdiff.rs Outdated Show resolved Hide resolved
beacon_node/store/src/hot_cold_store.rs Outdated Show resolved Hide resolved
beacon_node/store/src/hot_cold_store.rs Outdated Show resolved Hide resolved
dapplion and others added 4 commits September 16, 2024 16:02
* Review PR comments and metrics

* Comments

* Add anchor metrics

* drop prev comment

* Update metadata.rs

* Apply suggestions from code review

---------

Co-authored-by: Michael Sproul <micsproul@gmail.com>
Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
* Simplify database anchor

* Update beacon_node/store/src/reconstruct.rs

* Add migration for anchor

* Fix and simplify light_client store tests

* Fix incompatible config test
@jimmygchen jimmygchen self-requested a review October 1, 2024 11:47
* New historic state cache

* Add more metrics

* State cache hit rate metrics

* Fix store metrics

* More logs and metrics

* Fix logger

* Ensure cached states have built caches :O

* Replay blocks in preference to diffing

* Two separate caches

* Distribute cache build time to next slot

* Re-plumb historic-state-cache flag

* Clean up metrics

* Update book

* Update beacon_node/store/src/hdiff.rs

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update beacon_node/store/src/historic_state_cache.rs

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompat Backwards-incompatible API change database optimization Something to make Lighthouse run more efficiently. ready-for-review The code is ready for review tree-states Upcoming state and database overhaul v6.0.0 New major release for hierarchical state diffs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants