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

Query genesis transactions #4788

Merged
merged 18 commits into from
Aug 1, 2019
Merged

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented Jul 25, 2019

fixes #3867

  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry: clog add [section] [-t <tag>] [-m <msg>]

  • Re-reviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@colin-axner
Copy link
Contributor Author

This pr is stuck on import cycle mentioned in #4785, my fix just pushed the import cycle off of build to tests..

@fedekunze
Copy link
Collaborator

fedekunze commented Jul 26, 2019

imports github.com/cosmos/cosmos-sdk/x/staking/types
imports github.com/cosmos/cosmos-sdk/x/supply

Seems that we'll have to either create a mocked stakingtypes.MsgCreateValidator on genutils or a mocked supply.Supply for the expected keeper on staking

@alexanderbez
Copy link
Contributor

Seems like a mocked supply is better, no?

@colin-axner
Copy link
Contributor Author

Seems like a mocked supply is better, no?

Agree, but just to make sure I follow, add SupplyI interface to x/supply/exported/exported.go?

Also, should this be a separate issue/pr?

@colin-axner
Copy link
Contributor Author

colin-axner commented Jul 30, 2019

After playing around with this for a while, I am still not sure how to do this fix. I tried adding SupplyI to supplies exported but then I get a lot of issues with Supply not implementing pointer receiver functions Inflate/Deflate because NewSupply/DefaultSupply don't return a pointer nor is supply usually used as a pointer. I think I need a bit more direction on how to do this

Edit: Supply was updated to be an interface instead of a concrete type. SupplyI is now used instead of Supply

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 31, 2019

@colin-axner I've made some (incomplete) updates that I believe are in the direction of what we want. I've implemented the SupplyI interface and removed all pointer receivers.

I haven't finished the implementation, but it should give you the general idea on what else needs to be done ⚡️

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #4788 into master will decrease coverage by 0.01%.
The diff coverage is 64.51%.

@@            Coverage Diff             @@
##           master    #4788      +/-   ##
==========================================
- Coverage   54.21%   54.19%   -0.02%     
==========================================
  Files         269      269              
  Lines       17179    17189      +10     
==========================================
+ Hits         9313     9315       +2     
- Misses       7176     7184       +8     
  Partials      690      690

@colin-axner colin-axner added R4R and removed WIP labels Jul 31, 2019
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Small nit, but otherwise LGTM ⚡️

x/auth/client/rest/query.go Outdated Show resolved Hide resolved
x/auth/client/rest/query.go Show resolved Hide resolved
.pending/improvements/rest/3867-Allow-querying- Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK

@alexanderbez alexanderbez merged commit 2e3c52b into master Aug 1, 2019
@alexanderbez alexanderbez deleted the colin/3867-query-genesis-transactions branch August 1, 2019 18:56
@fedekunze
Copy link
Collaborator

Thanks @colin-axner! we forgot to update the spec tho

@colin-axner
Copy link
Contributor Author

Thanks @colin-axner! we forgot to update the spec tho

can you point me to where it is out of date?

alexanderbez pushed a commit that referenced this pull request Aug 2, 2019
@colin-axner colin-axner restored the colin/3867-query-genesis-transactions branch August 2, 2019 17:45
@colin-axner colin-axner deleted the colin/3867-query-genesis-transactions branch August 2, 2019 17:46
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
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 this pull request may close these issues.

Allow querying for genesis transactions on height 0
3 participants