CosmosContracts / juno

Open Source Platform for Interoperable Smart Contracts
Apache License 2.0
311 stars 172 forks source link

Cleaner juno/app #245

Closed Anmol1696 closed 1 year ago

Anmol1696 commented 2 years ago

Overview

Create app/upgrades dir to have all the upgrades in one place with versions and abstract out all keepers to app/keepers to make the the app/app.go cleaner and more maintainable.

Problem Definition

app/app.go is too big file.

Proposal

split app/app.go into app.go, upgrade/, keepers/ , module.go

ref: osmosis/app provenance/app

faddat commented 2 years ago

Hi there! I really liked your PR for the hub, this one:

I have been in seoul and unable to give it a proper review.

Are the osmo and provenance styles different?

Point blank: I agree with you.

sascha1337 commented 2 years ago

@faddat - refactor useful? might be some good practice to get warm.

regarding the git workflow here - already made a decision on how to get started? ( the pull / branch strategy we should go for )

https://github.com/cosmos/gaia/pull/1580#pullrequestreview-1064435553

Anmol1696 commented 2 years ago

@faddat provenance style is a little different in the sense they define there upgrades as a map with values as the upgrade function like this, then they have functions to deal with this map and create handlers out of this.

In osmo this is more modular and we create a package itself per upgrade version, instead of a key value in map.

I prefer the osmo way since it is cleaner and will be able to do alot more, includig handling forks better as well.

PS. Would like to contribute to this, once we agree on the approach, i dont mind raising a PR and then have discussion then.

faddat commented 2 years ago

I'm very happy ot use the osmo style :D