-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sequencer)!: update storage keys locations and values (ENG-898) (…
…#1616) ## 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.
- Loading branch information
Showing
95 changed files
with
1,277 additions
and
773 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
...pshots/astria_sequencer__accounts__state_ext__tests__storage_keys_have_not_changed-2.snap
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...napshots/astria_sequencer__accounts__state_ext__tests__storage_keys_have_not_changed.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.