Skip to content

State query is too slow #3938

@bowenwang1996

Description

@bowenwang1996

As reported by @vgrichina, currently on mainnet the following query always times out:

http post https://rpc.mainnet.near.org jsonrpc=2.0 id=dontcare method=query
params:='

{ "request_type": "view_state", "finality": "final", "account_id": "contract.paras.near", "prefix_base64": "" }

'
HTTP/1.1 200 OK
Alt-Svc: clear
Via: 1.1 google
content-length: 111
content-type: application/json
date: Wed, 10 Feb 2021 00:01:49 GMT

{
"error":

{ "code": -32000, "data": "query has timed out", "message": "Server error" }

,
"id": "dontcare",
"jsonrpc": "2.0"
}

I tried it with a node that is running current master node and it still times out. It look like this is likely caused by the slowness in trie iteration, but requires further investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-storageArea: storage and databasesC-incidentCategory: issues that are related to or have caused some incidentT-coreTeam: issues relevant to the core team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions