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

chore(sequencer): Move all storage keys to a single parent module (ENG-813) #1548

Closed
wants to merge 6 commits into from

Conversation

Fraser999
Copy link
Contributor

Summary

This groups all keys used for DB entries to a single module, with two submodules, one for verifiable and the other for non-verifiable storage.

Background

DB keys must be unique, and it's easier to assess this when reviewing, updating or adding new keys if the keys are held in a single location.

Changes

  • Consts and functions for generating DB keys were moved to storage::verifiable_keys or storage::nonverifiable_keys as appropriate. The const or generated value of every DB key should be unchanged by this PR.

Testing

  • Existing snapshot tests were moved. New snapshot tests were added for all functions used to generate DB keys. The snapshot values in new .snap files which correspond to moved snapshot tests are unchanged.
  • New tests added to ensure prefix keys are indeed prefixes of the relevant keys.

Related Issues

Closes #1494.

@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Sep 23, 2024
Base automatically changed from fraser/blocks-to-non-verified-storage to main September 26, 2024 12:40
@Fraser999
Copy link
Contributor Author

Closed in favour of #1616.

@Fraser999 Fraser999 closed this Oct 4, 2024
@Fraser999 Fraser999 deleted the fraser/db-keys-to-module branch October 4, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move all sequencer storage (DB) keys to a single location
1 participant