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

[Epic]: Remove legacy params subspace from module #17360

Closed
9 tasks done
julienrbrt opened this issue Aug 11, 2023 · 6 comments · Fixed by #17838
Closed
9 tasks done

[Epic]: Remove legacy params subspace from module #17360

julienrbrt opened this issue Aug 11, 2023 · 6 comments · Fixed by #17838
Assignees
Labels
T:Epic Epics

Comments

@julienrbrt
Copy link
Member

julienrbrt commented Aug 11, 2023

Summary

In v0.47, all SDK modules migrated to store their own parameters and x/params has been deprecated.
There was a module wide migration to do this, which added a hard dependency on params.

Problem Definition

That migration added a hard dependency on x/params for all core modules that had params.

  • // AppModule implements an application module for the bank module.
    type AppModule struct {
    AppModuleBasic
    keeper keeper.Keeper
    accountKeeper types.AccountKeeper
    // legacySubspace is used solely for migration of x/params managed parameters
    legacySubspace exported.Subspace
    }
  • type (
    ParamSet = paramtypes.ParamSet
    // Subspace defines an interface that implements the legacy x/params Subspace
    // type.
    //
    // NOTE: This is used solely for migration of x/params managed parameters.
    Subspace interface {
    GetParamSet(ctx sdk.Context, ps ParamSet)
    }
    )

Given the SDK policy to support the in-place migrations for the last two major versions (https://docs.cosmos.network/main/migrations/intro), we can now remove those migrations and the legacy params subspace from all modules from v0.51.

Work Breakdown

  • auth
  • bank
  • crisis
  • distribution
  • gov
  • mint
  • slashing
  • staking
  • Update UPGRADING.md (make clear that chains migrating to v0.51 must have migrated to v0.47 or v0.50 before. Mention as well that it leads to some API break, but people using depinject won't notice anything).
@julienrbrt julienrbrt added the T:Epic Epics label Aug 11, 2023
@julienrbrt julienrbrt changed the title [Epic]: Remove legacy params subspace from module. [Epic]: Remove legacy params subspace from module Aug 11, 2023
@tac0turtle
Copy link
Member

should we spin params into its own go.mod as well?

@julienrbrt
Copy link
Member Author

should we spin params into its own go.mod as well?

I cannot find @kocubinski's dep graph issue, but I think we should if possible.

@alexanderbez
Copy link
Contributor

Thanks @julienrbrt. ACK on removing these migrations and x/params deps

@tac0turtle
Copy link
Member

it seems we have to remove the migrations as well, is this what you were expecting?

@tac0turtle tac0turtle added the S:blocked Status: Blocked label Aug 18, 2023
@alexanderbez
Copy link
Contributor

Yes, that's exactly the goal

@kocubinski
Copy link
Member

@julienrbrt here it is #13012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:Epic Epics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants