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

CoreDescriptors and CoreSchedules do not use a transparent hasher for keys #6563

Open
seadanda opened this issue Nov 20, 2024 · 3 comments
Open
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Comments

@seadanda
Copy link
Contributor

Both use Twox256 instead of e.g. Twox64Concat, obfuscating the value of the keys.

from a conversation here

Suggest using either Twox64Concat or Blake2_128Concat for the keys

@seadanda seadanda added the T8-polkadot This PR/Issue is related to/affects the Polkadot network. label Nov 20, 2024
@bkchr
Copy link
Member

bkchr commented Nov 20, 2024

If you don't need to iterate the keys, there is no need to use a reconstructable hash.

@seadanda
Copy link
Contributor Author

I think about it the other way round: why use one that isn't reconstructable without reason?
In this case I get that we don't need to iterate them, but I think UIs and anybody reading the state would find it useful to have readable keys.

Happy either way, especially since this is already live and would be a breaking change to change it. I could easily be convinced it's not worth the change, but it's definitely a minor inconvenience.

@eskimor
Copy link
Member

eskimor commented Nov 22, 2024

Good catch @seadanda ! Will be fixed as part of #1312 . ( I am changing the storage there anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
None yet
Development

No branches or pull requests

3 participants