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

lite2: block_results RPC call doesn't correctly return the result of the latest block #4837

Closed
4 tasks
cmwaters opened this issue May 13, 2020 · 1 comment · Fixed by #4931
Closed
4 tasks
Assignees
Labels
C:light Component: Light C:rpc Component: JSON RPC, gRPC

Comments

@cmwaters
Copy link
Contributor

Problem Definition

When I run a local light client and query for block_results of the latest height (at height 6 in this example), the following is returned

{
  "jsonrpc": "2.0",
  "id": -1,
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "failed to update light client to 7: failed to obtain the header #7: signed header not found"
  }
}

It should however return the result for the header #6


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@cmwaters cmwaters added C:light Component: Light C:rpc Component: JSON RPC, gRPC labels May 13, 2020
@melekes melekes self-assigned this Jun 1, 2020
@melekes
Copy link
Contributor

melekes commented Jun 1, 2020

The problem is we need 7 to prove that 6 LastResultsHash is valid.

melekes added a commit that referenced this issue Jun 1, 2020
Closes #4837

- `/block_results`

  before:

  failed to update light client to 7: failed to obtain the header #7: signed header not found

  after:

  We can't return the latest block results because we won't be able to
  prove them. Return the results for the previous block instead.

- /block_results?height=X`

  no changes
melekes added a commit that referenced this issue Jun 2, 2020
Closes #4837

- `/block_results`

  before:

  failed to update light client to 7: failed to obtain the header #7: signed header not found

  after:

  We can't return the latest block results because we won't be able to
  prove them. Return the results for the previous block instead.

- /block_results?height=X`

  no changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:light Component: Light C:rpc Component: JSON RPC, gRPC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants