cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

Account rest query ignores fields with default values

Open sahith-narahari opened this issue 5 years ago • 2 comments

Summary of Bug

On querying account information using rest, the fields with default values(0 for account number and sequence) are being ignored. I remember we had a discussion on something similar, in an ADR if sequence should start with default value 1. I want to bring this up for discussion, if it's ok with clients. I don't have a strong opinion on this, would like to know other's thoughts

cc/ @aaronc @fadeev @amaurymartiny

Version

Current sdk master

Steps to Reproduce


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

sahith-narahari avatar Sep 18 '20 14:09 sahith-narahari

We decided not to start account and sequence values from 1 as a method to deal with SignDoc protobuf encoding.

However, I still think it's not a bad idea to consider this for new chains. It's likely out of scope for stargate. I think we wouldn't want to do this retroactively for existing change. But new chains starting both from 1 I think would be an improvement that we could consider at some point in the future.

aaronc avatar Sep 18 '20 14:09 aaronc

Thanks for filing this issue Sahith and for the discussion Aaron! Given it's been almost 3 years and this issue hasn't come up much nor demand for it, should we perhaps close it?

odeke-em avatar Jun 12 '23 19:06 odeke-em