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

Abigious extra one byte needed when parsing StorageMap keys in get_oracle_headings client function #1180

Open
ameba23 opened this issue Nov 22, 2024 · 0 comments

Comments

@ameba23
Copy link
Contributor

ameba23 commented Nov 22, 2024

See disussion in PR: #1170 (comment)

There is some ambiguity in how StorageMap keys are composed. It appears the are the concatenation of storage address (32 bytes), blake2 hash of key (16 bytes), and key itself (variable length). But there is an extra 1 byte needed.

@HCastano suggested this might be related to theQueryKind being set to OptionQuery.

We should check the storagemap source code and confirm - just in case this is not something which will reliably always be present, and our code breaks sometime.

See also the client function we use to read the key value pairs: subxt::storage::Storage::iter

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

No branches or pull requests

1 participant