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

Refactor out BaseApp, StoreApp (per spec #1 and #2) #266

Merged
merged 15 commits into from
Oct 25, 2017

Conversation

ethanfrey
Copy link
Contributor

This is a big cleanup of the app subdirectory and removing all basecoin related code and naming from the app common directory. Also code cleanup and better error checking on genesis file parsing.

I changed the tick from a function to an interface and made it top-level. You can still use a function and cast it to sdk.TickerFunc to fulfill the interface. I also added a context there, so you can at least get the current height along with the datastore when processing the ticks.

There are now StoreApp which handles handshaking and queries, and BaseApp which handles DeliverTx, CheckTx, and the Tick functionality.

The genesis loading and InitState functionality was refactored out, but I still don't like the InitState method on BaseApp, but I want to tackle that as part of the bigger changes that come with proposal #3.

All code still runs, breaking changes is how to set up apps (breaking the test code) and the signature for Ticker.

One question I have is package name.

I am afraid putting it top level will lead to import cycles.
I was thinking of putting the contents of app inside server package.

But open to many suggestions

Working on the godoc, please take a look here before looking at the code, this is likely the entry point for new users.

http://localhost:6060/pkg/github.com/cosmos/cosmos-sdk/app/
http://localhost:6060/pkg/github.com/cosmos/cosmos-sdk/genesis

@ethanfrey
Copy link
Contributor Author

Replaces #257 which i accidentally merged before review

@ethanfrey
Copy link
Contributor Author

Verbally approved by Jae in SDK meeting

@ethanfrey ethanfrey merged commit de87ace into develop Oct 25, 2017
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this pull request Apr 19, 2021
* Add ECOSYSTEM.md; update README.md
* Spellcheck; rebuild
* Add section for explorers
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.

1 participant