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

/validatorsets/{height} endpoint returns incorrect address #3501

Closed
4 tasks
joe-bowman opened this issue Feb 5, 2019 · 0 comments · Fixed by #3504
Closed
4 tasks

/validatorsets/{height} endpoint returns incorrect address #3501

joe-bowman opened this issue Feb 5, 2019 · 0 comments · Fixed by #3504
Labels

Comments

@joe-bowman
Copy link
Contributor

joe-bowman commented Feb 5, 2019

Summary of Bug

The /validatorsets/{height} endpoint incorrectly returns a sdk.ValAddress in the address field. The address value that is bech32ified is not the operator address, but the consensus address. In this form, the value is meaningless; it should presumably be displayed in the hex form consistent with other endpoints.

Location of defect:

Address: sdk.ValAddress(validator.Address),

Steps to Reproduce

make a call to the LCDs /validatorsets/{height} endpoint. The returned address field takes the form of a cosmosvaloper address does not match the known operator address for the given consensus address.

where cosmosvalconspub1zcjduepqz7c4m3te2n0rwfz4z30q6m2dvewn04mkv6u3mxdetrfjpflxew7qrltqdg is chorusone's consensus address:

root@sentry07:/gaiad# curl -s https://lcd:1317/validatorsets/latest | jq . | grep cosmosvalconspub1zcjduepqz7c4m3te2n0rwfz4z30q6m2dvewn04mkv6u3mxdetrfjpflxew7qrltqdg -b2
10476-    {
10482-      "address": "cosmosvaloper10why2pfdjk2vpqu5nvypu97f0p8ev0cjczsmsa",
10555:      "pub_key": "cosmosvalconspub1zcjduepqz7c4m3te2n0rwfz4z30q6m2dvewn04mkv6u3mxdetrfjpflxew7qrltqdg",
10659-      "proposer_priority": "-58328903",
10699-      "voting_power": "1650987"

the returned value cosmosvaloper10why2pfdjk2vpqu5nvypu97f0p8ev0cjczsmsa is not chorusone's operator address, but a bech32ified validator address with the cosmosvaloper HRP.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@joe-bowman joe-bowman changed the title /validatorsets/{height} endpoint returns incorrect address /validatorsets/{height} endpoint returns incorrect address Feb 5, 2019
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.

2 participants