Cosmos-sdk: Migrate remaining CLI cmd's to proto

Created on 7 Aug 2020  路  5Comments  路  Source: cosmos/cosmos-sdk

A few cli commands are still using amino or couldn't be easily migrated to use the proto pathway. These were discovered and flagged in #6859. Migrate them to use proto.

  • [x] x/auth #6994
  • [x] x/gov #6994
  • [x] x/distribution

    • [x] GetCmdSubmitProposal -> ParseCommunityPoolSpendProposalJSON #7244

    • [x] NewWithdrawAllRewardsCmd #7244

  • [x] x/staking #6994
  • [x] x/ibc (things have been migrated to proto but arrays of interfaces are being printed and jsonpb doesn't know what to do with that. They probably need to be wrapped in Any) /cc @fedekunze
  • [x] Remove client.Context.PrintOutputLegacy (from #6999)
CLI encoding auth gov ibc staking upgrade

Most helpful comment

I would honestly opt to use Tendermint's pagination when it comes to tx searching. I don't think getting all txs behind the scenes is a good strategy.

All 5 comments

@anilCSE @aaronc can you paste an example blob of how the output for the IBC queries looks like? We can tackle it this week

I don't have IBC test data to do that @fedekunze. Once #6999 is done, you just need to try to use PrintOutput instead of PrintOutputLegacy and you'll see the errors.

@alexanderbez QueryTxsByEvents uses TxSearch from tendermint which uses slightly different pagination. This causes some inconsistency in queries using this. https://github.com/cosmos/cosmos-sdk/blob/20c80cfd44a068a592148d648c50de3459fd6295/x/auth/client/query.go#L46
One option I can think of is fetch all data, and paginate in sdk to act similar to other queries. Any thoughs?
cc @aaronc @anilCSE

I would honestly opt to use Tendermint's pagination when it comes to tx searching. I don't think getting all txs behind the scenes is a good strategy.

@anilCSE can you provide a written update for this issue here?

Was this page helpful?
0 / 5 - 0 ratings