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

View query times out for older block #3848

Closed
ilblackdragon opened this issue Jan 24, 2021 · 4 comments · Fixed by #3944
Closed

View query times out for older block #3848

ilblackdragon opened this issue Jan 24, 2021 · 4 comments · Fixed by #3944
Assignees
Labels
A-RPC Area: rpc C-enhancement Category: An issue proposing an enhancement or a PR with one. T-public-interfaces Team: issues relevant to the public interfaces team

Comments

@ilblackdragon
Copy link
Member

Describe the bug
Running view query on a block ~60 days ago returns "Query has timed out", without providing guidance on what to do next.

To Reproduce

http post http://rpc.mainnet.near.org method=query params:='{"request_type": "call_function", "block_id": 23308486, "account_id": "staked.poolv1.near", "method_name": "get_total_staked_balance", "args_base64": "e30="}' jsonrpc=2.0 id=123
HTTP/1.1 200 OK
Via: 1.1 google
content-length: 106
content-type: application/json
date: Sun, 24 Jan 2021 13:31:31 GMT

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

Expected behavior
Get result of view call or report that node is not archival and doesn't contain such data.

Version (please complete the following information):

  • mainnet
@frol
Copy link
Collaborator

frol commented Jan 25, 2021

We are going to address this with #3517. We are on our way with #3805. I don't think we want to change the message itself as it might break some clients given that the message is quite short and they may have hard-coded the whole string. With the structured errors we should be able to provide more details. /cc @khorolets

@bowenwang1996 Can you remind me what was the decision about query routing? I recall we even considered to remove it

@frol frol added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-public-interfaces Team: issues relevant to the public interfaces team A-RPC Area: rpc labels Jan 25, 2021
@bowenwang1996
Copy link
Collaborator

@bowenwang1996 Can you remind me what was the decision about query routing? I recall we even considered to remove it

yes

@frol
Copy link
Collaborator

frol commented Jan 25, 2021

@bowenwang1996 It seems that this means that we should just remove the timeout/retries for query handling on jsonrpc side and replace it with an immediate error response that the node does not have the requested data, right?

@bowenwang1996
Copy link
Collaborator

@bowenwang1996 It seems that this means that we should just remove the timeout/retries for query handling on jsonrpc side and replace it with an immediate error response that the node does not have the requested data, right?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-RPC Area: rpc C-enhancement Category: An issue proposing an enhancement or a PR with one. T-public-interfaces Team: issues relevant to the public interfaces team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants