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

storage keys parsed type doesn't preserve order #1137

Closed
tzemanovic opened this issue Feb 9, 2023 · 0 comments · Fixed by #1256
Closed

storage keys parsed type doesn't preserve order #1137

tzemanovic opened this issue Feb 9, 2023 · 0 comments · Fixed by #1256
Assignees
Labels
bug Something isn't working storage

Comments

@tzemanovic
Copy link
Member

The storage::Key type should have the same order as in its raw string/bytes form. Specifically, this is important for prefix iterators that in the DB follow the order of raw bytes, but in other places like WriteLog where we use storage::Key, the order doesn't match. In #714 we found that this occurs when the storage keys contain addresses, but we should ensure consistency for all the possible values.

Related to #30, I think in long term, the storage::Key type would better be represented as raw bytes instead of the parsed key segments in memory and we can apply segments parsing on demand, which besides other advantages would prevent this issue altogether.

@tzemanovic tzemanovic added bug Something isn't working storage labels Feb 9, 2023
@tzemanovic tzemanovic self-assigned this Mar 27, 2023
@tzemanovic tzemanovic moved this from Todo to WIP in Namada-Old Mar 27, 2023
@tzemanovic tzemanovic moved this from WIP to Pending Devnet in Namada-Old Mar 29, 2023
@github-project-automation github-project-automation bot moved this from Pending Devnet to Tested in Devnet in Namada-Old Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working storage
Projects
No open projects
Status: Tested in Devnet
Development

Successfully merging a pull request may close this issue.

1 participant