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

SHARDNET Validators API call with block_height: 2018939 is pointing to a epoch_start_height: 2008940, but this block doesn't exist #104

Open
sotcsa opened this issue Aug 16, 2022 · 0 comments

Comments

@sotcsa
Copy link

sotcsa commented Aug 16, 2022

While I was writing a Python script for big-data challenge, detected a weird response from RPC server:

Step 1

Get validators method with block_height: 2018939
And save result.epoch_start_height (2008940)

BLOCK_HEIGHT_epoch_start_height=$(curl -s -X POST 'https://rpc.shardnet.near.org' \
-H 'Content-Type: application/json' \
-d '{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "method": "validators",
  "params": [2018939]
}' -s | jq .result.epoch_start_height)

Setp 2

Call block method with the epoch_start_height

curl -s -X POST 'https://rpc.shardnet.near.org' \
-H 'Content-Type: application/json' \
-d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "block",
    "params": {
        "block_id": '$BLOCK_HEIGHT_epoch_start_height'
    }
}' -s | jq

Expected result

Validators method should answer 2008939 as epoch_start_height, instead of non-exiting block (2008940)
The 2008941 block says:
"prev_height": 2008939

Actual result

2008940 response is:

  "jsonrpc": "2.0",
  "error": {
    "name": "HANDLER_ERROR",
    "cause": {
      "info": {},
      "name": "UNKNOWN_BLOCK"
    },
    "code": -32000,
    "message": "Server error",
    "data": "DB Not Found Error: BLOCK HEIGHT: 2008940 \n Cause: Unknown"
  },
  "id": "dontcare"
}```
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

1 participant