Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

state_queryStorage is too verbose #2826

Closed
pepyakin opened this issue Jun 7, 2019 · 3 comments · Fixed by #2906
Closed

state_queryStorage is too verbose #2826

pepyakin opened this issue Jun 7, 2019 · 3 comments · Fixed by #2906
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.
Milestone

Comments

@pepyakin
Copy link
Contributor

pepyakin commented Jun 7, 2019

The state_queryStorage RPC method enumerates storage entries that were changed between the given blocks. However, the resulting list size is proportional to the number of blocks not the number of changes. It would be great if we could omit the storage entries that were unchanged.

cc @svyatonik

@pepyakin pepyakin added the I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. label Jun 7, 2019
@pepyakin pepyakin added this to the As-and-when milestone Jun 7, 2019
@tomusdrw
Copy link
Contributor

tomusdrw commented Jun 7, 2019

@pepyakin Wouldn't it be better to introduce a different RPC method for that then? like state_diffStorage(blockA, blockB)?
AFAIR the point of queryStorage was to be able to trace all changes that happened since given block.

@pepyakin
Copy link
Contributor Author

pepyakin commented Jun 7, 2019

AFAIR the point of queryStorage was to be able to trace all changes that happened since given block.

What I was trying to convey is that it encodes no changes as an empty array whereas it could be just omitted.

@tomusdrw
Copy link
Contributor

tomusdrw commented Jun 7, 2019

Oh, is it? Then yeah, we could simplify that. I think we don't do that if changes trie is disabled, so probably the behaviour differs there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.
Projects
None yet
2 participants