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

Remove unnecessary prefix / suffix in store keys #1581

Open
robert-zaremba opened this issue Nov 12, 2022 · 3 comments
Open

Remove unnecessary prefix / suffix in store keys #1581

robert-zaremba opened this issue Nov 12, 2022 · 3 comments

Comments

@robert-zaremba
Copy link
Member

In #1578 we cleaned up store key constructors.
Various key have unnecessary length prefix or null terminator. Both are not needed if it is the last and ultimate part of the key.
Example: https://github.com/umee-network/umee/pull/1578/files#diff-b3ff0f6b42fcc3132cbb1a0210e624410a4e1ca4c7027c70928edad4ca1880baR38

It's nice to have, and we need to guarantee that the keys won't be extended.

@robert-zaremba
Copy link
Member Author

up

@robert-zaremba robert-zaremba added this to the v3.4 milestone Dec 21, 2022
@robert-zaremba
Copy link
Member Author

@zarazan or @rbajollari do you think you can handle this?

@toteki
Copy link
Member

toteki commented Dec 21, 2022

If the keys are currently working and consistent with each other, we should avoid unnecessary changes due to

  • requiring store migrations (delete old, add new, for all stored values)
  • unintentionally introducing bugs (removing a null terminator from a prefix | denom | 0x00 could cause hypothetical denom uumee2 to be caught up in iterators over uumee if there was one) - of course no bugs would be introduced if we migrated everything perfectly, but I see no reason to create the possibility

TLDR avoid unnecessary changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants