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

Storage query errors: - TrieRootNotFound #2771

Closed
gilescope opened this issue Sep 22, 2022 · 2 comments
Closed

Storage query errors: - TrieRootNotFound #2771

gilescope opened this issue Sep 22, 2022 · 2 comments

Comments

@gilescope
Copy link
Contributor

In polkadot.js I can do this against a normal rpc node, but flicking over to the light client I get the error:

-32000: Error while querying block storage: Storage query errors: - TrieRootNotFound
{"id":1,"jsonrpc":"2.0","method":"state_getMetadata","params":["0xe33568bff8e6f30fee6f217a93523a6b29c31c8fe94c076d818b97b97cfd3a16"]}

(this is against the polkadot relay chain)

Is this expected behaviour - is it that smoldot can only answer requests for things that are recent?

@tomaka
Copy link
Contributor

tomaka commented Sep 22, 2022

Yes it is expected.

Nodes prune the state of old blocks, and so when the light client asks them they answer that they don't know.
There exists archive nodes, but smoldot is incapable of knowing which node is an archive node and which isn't.

To me, this is a defect in the JSON-RPC API rather than a smoldot issue. You are able to ask smoldot for the metadata of a specific block, but it has just no way to answer that request properly unless the block is very recent.

In reality, asking for the metadata of an old block is simply out of scope of smoldot.
We are working on a new version of the JSON-RPC API, in which you simply can't ask smoldot for old stuff like that. The only way to answer your request would be to ask an archive node.

@tomaka
Copy link
Contributor

tomaka commented Sep 29, 2022

Closing in favor of #2804

@tomaka tomaka closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants