-
Notifications
You must be signed in to change notification settings - Fork 3
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
Is it planned to support storage iterations? #21
Comments
CC @tomaka |
It's not planned but we can add it. We can definitely add it to the For the |
Yeah, at least having it in
That is a good question. I think the main question would here be, can we build UIs without this? Maybe a dumb question as this for sure would be possible, but maybe more complicated UIs need this kind of support. |
Sorry I don't get the question.
Thinking about it, the JSON-RPC functions that allow you to access the storage are here to allow you to access the keys indicated by the metadata. For example, if the metadata tells you "information X is at key K", you then try to read key K. So I don't think that "get the next key" makes sense, however "get all the keys that start with a certain prefix" makes sense to me. |
What I meant is that there are maybe some other RPC functions which are not yet specified here. So, that we may also have some other functions that need to be described here.
In the end probably boils down to the same. I think one of the reasons for having this kind of "iteration" support on the JSON rpc level is that there are maps that are too big to send at once, so you do multiple requests to fetch them. The best would be some kind of stream to poll for elements (you could still fetch all keys at once with a storage proof for example). However, this is probably not supported by JSON rpc? |
Is it planned to support any kind of storage iterations? Similar to the current
state_getKeysPaged
in Substrate?The text was updated successfully, but these errors were encountered: