Skip to content

Conversation

zakir998
Copy link
Contributor

  • replacement for deprecated PrintObjectLegacy method

* replacement for deprecated `PrintObjectLegacy` method
@zakir998 zakir998 requested a review from a team July 29, 2023 12:39
@github-prbot github-prbot requested review from a team, tac0turtle and julienrbrt and removed request for a team July 29, 2023 12:39
@zakir998
Copy link
Contributor Author

Impact on "comet-validator-set" cmd cli

current:

{"block_height":"4541","validators":[{"address":"cosmosvalcons1uh0dwj3u8nx9yh7dcj8lzlmpcunap7vrz94y43","pub_key":{"type":"tendermint/PubKeyEd25519","value":"Nnj0I8yxNgpe2swLEqDPqfNnJCDRenFXROCPp2ay87w="},"proposer_priority":"0","voting_power":"1"}],"total":"1"}

This PR:

{"block_height":"4004","validators":[{"address":"E5DED74A3C3CCC525FCDC48FF17F61C727D0F983","pub_key":{"type":"tendermint/PubKeyEd25519","value":"Nnj0I8yxNgpe2swLEqDPqfNnJCDRenFXROCPp2ay87w="},"voting_power":"1","proposer_priority":"0"}],"count":"1","total":"1"}

@julienrbrt
Copy link
Contributor

julienrbrt commented Jul 29, 2023

Based on the output of above, I think we probably still want to display the bech32 address.

@zakir998
Copy link
Contributor Author

Can use cmtservice.GetLatestValidatorSetResponse as output of comet-validator-set cmd.

{"block_height":"5307","validators":[{"address":"cosmosvalcons1uh0dwj3u8nx9yh7dcj8lzlmpcunap7vrz94y43","pub_key":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Nnj0I8yxNgpe2swLEqDPqfNnJCDRenFXROCPp2ay87w="},"voting_power":"1","proposer_priority":"0"}],"pagination":{"next_key":null,"total":"1"}}

@zakir998
Copy link
Contributor Author

Also I think status and comet-validator-set commands can be moved to server.cmt_cmds.go

@julienrbrt
Copy link
Contributor

Can use cmtservice.GetLatestValidatorSetResponse as output of comet-validator-set cmd.

{"block_height":"5307","validators":[{"address":"cosmosvalcons1uh0dwj3u8nx9yh7dcj8lzlmpcunap7vrz94y43","pub_key":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Nnj0I8yxNgpe2swLEqDPqfNnJCDRenFXROCPp2ay87w="},"voting_power":"1","proposer_priority":"0"}],"pagination":{"next_key":null,"total":"1"}}

Feels a bit hacky, but works! Eventually, I'll investigate how to use AutoCLI for these anyway.
Let's not move them just yet however as they will probably get replaced soon.

@zakir998
Copy link
Contributor Author

Using AutoCLI is a good idea

@julienrbrt julienrbrt self-assigned this Jul 30, 2023
@julienrbrt
Copy link
Contributor

Could you fix the e2e tests and implement this comment: #17187 (comment)

@zakir998
Copy link
Contributor Author

zakir998 commented Aug 1, 2023

I have fixed the e2e tests. Please review the changes in the latest commit. Thank you for pointing out the issue in #17187 (comment).

Copy link
Contributor

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The address still does not have the same format as previously.

@zakir998
Copy link
Contributor Author

zakir998 commented Aug 1, 2023

I test again, The address is the same, the pub_key and total are different, I think it is necessary to keep the pub_key consistent with the type returned by other commands.

current:

{"block_height":"33","validators":[{"address":"cosmosvalcons1kpfyd2mxvse4wnq652cam3a73pwxk4a2uqaaws","pub_key":{"type":"tendermint/PubKeyEd25519","value":"YAmXz9KUXRRpNM1lDQEzt3gxHf9iFSVzRuiKFU4ExEA="},"proposer_priority":"0","voting_power":"1"}],"total":"1"}

This PR:

{"block_height":"6","validators":[{"address":"cosmosvalcons1kpfyd2mxvse4wnq652cam3a73pwxk4a2uqaaws","pub_key":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"YAmXz9KUXRRpNM1lDQEzt3gxHf9iFSVzRuiKFU4ExEA="},"voting_power":"1","proposer_priority":"0"}],"pagination":{"next_key":null,"total":"1"}}

Copy link
Contributor

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK!

@julienrbrt julienrbrt changed the title refactor: get validators from CometRPC refactor(client): use cmtservice for comet-validator-set command Aug 2, 2023
@julienrbrt julienrbrt added the backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release label Aug 2, 2023
@julienrbrt julienrbrt added this pull request to the merge queue Aug 2, 2023
Merged via the queue into cosmos:main with commit 8503c18 Aug 2, 2023
mergify bot pushed a commit that referenced this pull request Aug 2, 2023
…17187)

Co-authored-by: Julien Robert <julien@rbrt.fr>
(cherry picked from commit 8503c18)
julienrbrt added a commit that referenced this pull request Aug 2, 2023
…ackport #17187) (#17257)

Co-authored-by: zakir <80246097+zakir-code@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
@faddat faddat mentioned this pull request Nov 8, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release C:CLI C:x/gov
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants