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

feat: move CheckpointStates to the db and out of the store #1160

Merged
merged 12 commits into from
Jun 25, 2024

Conversation

Arkenan
Copy link
Collaborator

@Arkenan Arkenan commented Jun 19, 2024

Changes:

  • Added KvSchema macro module so to autogenerate get, delete, put and fold operations by providing encoding and decoding of keys and values.
  • Added CheckpointStates schema module that implements KvSchema and implements the encoding and decoding of checkpoint states.
  • Changed the Handlers and Head modules to use the checkpoint states db instead of the store.
  • Remove the attribute from the store.
  • Added prune using fold.
  • Moved the justified state calculation to get_head and out of get_weight so that the call to the db is only one per head calculation.

Closes #1156
Starts some of the work for #1145

@Arkenan Arkenan changed the title Add KvSchema, CheckpointStates schema and get_checkpoint_state function feat: move CheckpointStates to the db and out of the store Jun 19, 2024
@Arkenan Arkenan marked this pull request as ready for review June 20, 2024 11:37
@Arkenan Arkenan requested a review from a team as a code owner June 20, 2024 11:37
Copy link
Contributor

@avilagaston9 avilagaston9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome PR! Just leave nit comments

@Arkenan Arkenan merged commit 0ed63c9 into main Jun 25, 2024
19 checks passed
@Arkenan Arkenan deleted the checkpoint_states_db branch June 25, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Move CheckpointStates to the db
2 participants