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

Genesis Account Command + Types #122

Merged
merged 15 commits into from
Sep 15, 2019
Merged

Conversation

fedekunze
Copy link
Collaborator

@fedekunze fedekunze commented Sep 11, 2019

  • Remove usage of deprecated x/genaccounts module
  • Port/adjust over add genesis account command

Ref: cosmos/cosmos-sdk#5017


  • 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 to the Unreleased section in CHANGELOG.md

  • 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 PR #XYZ: [title]" (coding standards)

@fedekunze fedekunze added the WIP label Sep 11, 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.

We also need to implement and register the concrete GenesisAccount type

@alexanderbez alexanderbez changed the title add Gaia genesis account command Genesis Account Command + Types Sep 13, 2019
@alexanderbez
Copy link
Contributor

Blocked on cosmos/cosmos-sdk#5042

}

genesisState := simapp.NewDefaultGenesisState()
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea why we were using simapp's default genesis state...

@rhuairahrighairidh
Copy link

What’s the reason for the concrete GenesisAccount type?
As I understood, the genesis file would just contain marshalled account types (base, vesting, etc). These concrete types would implement the GenesisAccount interface (allowing them be validated) and InitGenesis would just load them straight into auth’s keeper.

@alexanderbez
Copy link
Contributor

alexanderbez commented Sep 13, 2019

@rhuairahrighairidh great question! My initial intention and idea was that we could avoid too many layers of abstraction and simply deal with a single concrete type and also avoid migration headaches. After experimenting with adding genesis accounts, exporting and importing, I've found this to be futile. So we can deal with the core types defined in the SDK for Gaia. Other apps may possibly do the same or define their own...

This also means we'll have to modify the v0.38 migration process for accounts by creating the appropriate concrete type.

/cc @fedekunze

@alexanderbez alexanderbez marked this pull request as ready for review September 13, 2019 18:44
@alexanderbez alexanderbez added status: blocked Blocked by an external issue. R4R and removed WIP labels Sep 13, 2019
@alexanderbez alexanderbez removed the status: blocked Blocked by an external issue. label Sep 13, 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.

testedACK

@codecov-io
Copy link

Codecov Report

Merging #122 into master will decrease coverage by 0.2%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   66.32%   66.12%   -0.21%     
==========================================
  Files           4        5       +1     
  Lines         490      493       +3     
==========================================
+ Hits          325      326       +1     
- Misses        134      136       +2     
  Partials       31       31

@alexanderbez alexanderbez merged commit 6970ebe into master Sep 15, 2019
@alexanderbez alexanderbez deleted the fedekunze/genaccount-command branch September 15, 2019 00:19
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.

4 participants