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

Block results internal error with validator_updates #7401

Closed
4 tasks
tomtau opened this issue Sep 28, 2020 · 10 comments · Fixed by #7442
Closed
4 tasks

Block results internal error with validator_updates #7401

tomtau opened this issue Sep 28, 2020 · 10 comments · Fixed by #7442
Assignees
Labels

Comments

@tomtau
Copy link
Contributor

tomtau commented Sep 28, 2020

Summary of Bug

block_results (legacy) json-rpc endpoint will return the following error:

{
  "jsonrpc": "2.0",
  "id": -1,
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "error marshalling response: cannot encode unregistered type crypto.PublicKey_Ed25519"
  }
}

Version

04ff40a

Steps to Reproduce

  1. start up a network
  2. change voting power: e.g. trigger slashing (e.g. shut down one node and wait for missed_blocks_counter to go over the threshold network param) or delegate
  3. call /block_results?height=<block height when voting power changed>

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@tomtau
Copy link
Contributor Author

tomtau commented Sep 28, 2020

this may be applicable outside slashing to any module where validator_updates will be non-null in some blocks / block_results

@tomtau tomtau changed the title Block results internal error with slashing events Block results internal error with voting power change Sep 28, 2020
@tomtau
Copy link
Contributor Author

tomtau commented Sep 28, 2020

this may be applicable outside slashing to any module where validator_updates will be non-null in some blocks / block_results

just tried with "delegate" -- the same issue

@tomtau tomtau changed the title Block results internal error with voting power change Block results internal error with voting power changes Sep 28, 2020
@tomtau tomtau changed the title Block results internal error with voting power changes Block results internal error with validator_updates Sep 28, 2020
@alexanderbez alexanderbez added this to the v0.40 [Stargate] milestone Sep 28, 2020
@alexanderbez
Copy link
Contributor

Probably because we're not using the correctly populated client.Context @amaurymartiny @sahith-narahari?

@amaury1093 amaury1093 self-assigned this Sep 29, 2020
@amaury1093
Copy link
Contributor

Hey @tomtau, I just tried this /block_results endpoint, and didn't get this error, even though I also saw PublicKey_Ed25519.

I created a test for this in #7442, would like to confirm with you if you're still seeing this.

@tomtau
Copy link
Contributor Author

tomtau commented Oct 5, 2020

@amaurymartiny I'll try with the latest master.
For reference -- on the current Stargate testnet: http://ec2-18-188-71-91.us-east-2.compute.amazonaws.com:26657/block_results?height=177991

which runs against 27db2cf https://github.com/cosmos/gaia/blob/zaki/stargate-3/go.mod#L6

@tomtau
Copy link
Contributor Author

tomtau commented Oct 5, 2020

@amaurymartiny I tried with 0047099
and still the same. Is there a difference how client.Context is populated in "... start" command and the network integration tests?

@tomtau
Copy link
Contributor Author

tomtau commented Oct 5, 2020

one difference is that in that test, RPCClient is rpc/client/client.Local (instead of HTTP), so it's not doing any JSON marshalling / unmarshalling?

@amaury1093
Copy link
Contributor

one difference is that in that test, RPCClient is rpc/client/client.Local (instead of HTTP), so it's not doing any JSON marshalling / unmarshalling?

Yes, thanks for the lead, that was it! However, the marshalling is handled by Tendermint (tmjson), so I believe a patch needs to be added on the tendermint repo. I pinged @marbar3778 about possible solutions in https://github.com/cosmos/cosmos-sdk/pull/7442/files#r499496017

@tac0turtle
Copy link
Member

ah this is a bug in Tendermint. Will open a PR to fix it

@tac0turtle
Copy link
Member

tac0turtle commented Oct 5, 2020

fix: tendermint/tendermint#5459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants