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)!: update storage keys locations and values (ENG-898) #1616

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fraser999
Copy link
Contributor

Summary

The storage keys for all components were moved from the top of state_ext modules into new storage::keys modules. The key values were updated to a consistent style.

Background

We wanted the keys to be easy to find and to follow a consistent pattern in terms of their values and locations.

Changes

  • All key consts and functions were moved to <COMPONENT>/storage/keys.
  • All keys were given a prefix matching the component name followed by a /.
  • All keys now use full words (except for a few instances of well-know abbreviations like "init") and _ as word separators.
  • Existing helper structs in various state_ext modules for formatting keys were unified into a new struct AddressPrefixer in crate::storage.
  • The Asset functionality was moved from crate::storage_keys to crate::storage.

Testing

  • All keys have snapshot tests (including const keys - this might be considered overkill?)
  • All keys have tests ensuring they have a component name as prefix.
  • All prefix consts or functions which are used in state_ext modules are tested to ensure they are actually prefixes of the given keys.

Breaking Changelist

  • This breaks the on-disk format of both the verifiable and non-verifiable store.

Related Issues

Closes #1611.

@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Oct 2, 2024
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.

Update storage keys in sequencer
1 participant