You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is difficult to be sure that a given storage key is unique since they are defined in multiple different locations in the sequencer codebase, and we have no convention regarding naming/prefixes.
For each component, move its keys (const values and functions generating DB keys) to a new module named keys inside the component's storage module. All keys should be given a prefix relevant to the component's name.
┆Issue Number: ENG-898
The text was updated successfully, but these errors were encountered:
…#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.
It is difficult to be sure that a given storage key is unique since they are defined in multiple different locations in the sequencer codebase, and we have no convention regarding naming/prefixes.
For each component, move its keys (const values and functions generating DB keys) to a new module named
keys
inside the component'sstorage
module. All keys should be given a prefix relevant to the component's name.┆Issue Number: ENG-898
The text was updated successfully, but these errors were encountered: