This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
RPC: Query multiple storage keys at single block at once #5220
Labels
I4-annoyance
The client behaves within expectations, however this “expected behaviour” itself is at issue.
Milestone
Currently it's either possible to:
state_queryStorage(Vec<Key>, BlockHash, Option<BlockHash>)
state_getStorageAt(Key, Option<BlockHash>)
With (1) the node has to query a range of blocks (setting
from=to=latest
does not seem to work at all). Also if you specify the mandatory argumentfrom=latest_hash
you are risking a race condition between querying a single block or two blocks (if a new one is imported in the meantime).With (2) you can only query one key at the time, and the latest block is optional.
The idea would be to provide another method that allows you to query a vector of keys, but also be sure that it will fetch only the latest block data. So something like:
state_queryStorageAt(Vec<Key>, Option<BlockHash>)
Potentially we could implement
state_queryStorageAt
as:if we fix
state_queryStorage
to work with a single block in range too.CC @jacogr
The text was updated successfully, but these errors were encountered: