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

Update genutils to match module spec #4751

Closed
4 tasks
colin-axner opened this issue Jul 19, 2019 · 2 comments · Fixed by #4757
Closed
4 tasks

Update genutils to match module spec #4751

colin-axner opened this issue Jul 19, 2019 · 2 comments · Fixed by #4757
Assignees
Labels
Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@colin-axner
Copy link
Contributor

Summary

Update genutils to latest module spec.

Problem Definition

I am trying to add the ability to query for gen txs from auth's rest. However, trying to decode into genutils.GenesisState causes an import cycle since all the files/types lie at the top level of the module.

Proposal

There is no keeper in this module, so I am not sure how this module will vary from the module spec. Maybe it follows everything, but just doesn't have an internal keeper folder?


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@fedekunze
Copy link
Collaborator

I started this refactor on #4757. Although I don't know what's the import cycle you mentioned. Can you provide more context so that I can get the refactor to solve that issue too?

@fedekunze fedekunze added the Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. label Jul 22, 2019
@colin-axner
Copy link
Contributor Author

Yea, so when trying to add querying for gen txs I do the following:

  • Add ability to query gentxs using endpoint in x/auth/client/rest which calls genutils helper functions
  • x/genutils calls x/auth/
  • in module.go of x/auth it calls x/auth/client/rest

The main thing I am doing is, pulling genesis doc from tendermint, decoding the genesis doc using GenesisStateFromGenDoc then getting the genesis state using GetGenesisStateFromAppState. If these functions can't isolated from the dependency on x/auth then I can just implement the decoding, but I need access to the GenesisState type or I'd need to create a mock of it if it can't be isolated from the dependency on x/auth as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants