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

Error while decoding validator updates due to slashing #1177

Closed
blorgon1 opened this issue Jun 15, 2022 · 7 comments · Fixed by #1178
Closed

Error while decoding validator updates due to slashing #1177

blorgon1 opened this issue Jun 15, 2022 · 7 comments · Fixed by #1178

Comments

@blorgon1
Copy link
Contributor

As seen in the results for Cosmos block 10883046, when a validator is slashed the validator_updates entry does not have a power attribute. The decoder for this should be changed to make this property optional, as it is currently required and cannot be parsed.

Full error:

Error: Value must not be undefined
    at assertSet (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/encodings.js:13:15)
    at assertNotEmpty (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/encodings.js:107:5)
    at decodeValidatorUpdate (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:122:79)
    at Array.map (<anonymous>)
    at decodeBlockResults (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:130:58)
    at decodeBlockResults (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:384:16)
    at Tendermint34Client.doCall (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js:306:16)

Related to #1142.

@y-pakorn
Copy link

Good catch! Tendermint proto also not stated this field as non-nullable.
https://github.com/tendermint/tendermint/blob/master/proto/tendermint/abci/types.proto#L421

@webmaster128
Copy link
Member

There is this data dump from protobuf generated Go code with omitempty: https://github.com/tendermint/tendermint/blob/v0.35.6/abci/types/types.pb.go#L2656

@webmaster128
Copy link
Member

This was backported to 0.28 in #1185 and released as part of 0.28.8.

@blorgon1
Copy link
Contributor Author

@webmaster128 should the latest tag have been v0.28.8 instead of v0.26.8?

@webmaster128
Copy link
Member

Indeed. The entire commit 5ec2da1 uses the wrong version everywhere. Big fail. Will release 0.28.9 now to clean up the mess.

@blorgon1
Copy link
Contributor Author

Thank you!!

@webmaster128
Copy link
Member

0.28.9 is out

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

Successfully merging a pull request may close this issue.

3 participants