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

docs: add docs on param module deprecation #12611

Merged
merged 8 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Upgrading Cosmos SDK

This guide provides instructions for upgrading to specific versions of Cosmos SDK.

## Unreleased

### Modules

- The `x/param` module has been depreacted in favour of each module housing and providing way to modify their parameters. Each module that has parameters that are changable during runtime have an authority, the authority can be a module or user account. The Cosmos-SDK team recommends migrating modules away from using the param module. An example of how this could look like can be found [here](https://github.com/cosmos/cosmos-sdk/pull/12363).
- The Param module will be maintained until February 18, 2022. At this point the module will reach end of life and be removed from the cosmos-sdk.
4 changes: 3 additions & 1 deletion docs/building-modules/keeper.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type Keeper struct {
// Store key(s)

// codec

// authority
}
```

Expand All @@ -40,7 +42,7 @@ Let us go through the different parameters:

* An expected `keeper` is a `keeper` external to a module that is required by the internal `keeper` of said module. External `keeper`s are listed in the internal `keeper`'s type definition as interfaces. These interfaces are themselves defined in an `expected_keepers.go` file in the root of the module's folder. In this context, interfaces are used to reduce the number of dependencies, as well as to facilitate the maintenance of the module itself.
* `storeKey`s grant access to the store(s) of the [multistore](../core/store.md) managed by the module. They should always remain unexposed to external modules.
* `cdc` is the [codec](../core/encoding.md) used to marshall and unmarshall structs to/from `[]byte`. The `cdc` can be any of `codec.BinaryCodec`, `codec.JSONCodec` or `codec.Codec` based on your requirements. It can be either a proto or amino codec as long as they implement these interfaces.
* `cdc` is the [codec](../core/encoding.md) used to marshall and unmarshall structs to/from `[]byte`. The `cdc` can be any of `codec.BinaryCodec`, `codec.JSONCodec` or `codec.Codec` based on your requirements. It can be either a proto or amino codec as long as they implement these interfaces. The authority listed is a module account or user account that has the right to change module level parameters. Previously this was handled by the param module, which has been deprecated.

Of course, it is possible to define different types of internal `keeper`s for the same module (e.g. a read-only `keeper`). Each type of `keeper` comes with its own constructor function, which is called from the [application's constructor function](../basics/app-anatomy.md). This is where `keeper`s are instantiated, and where developers make sure to pass correct instances of modules' `keeper`s to other modules that require them.

Expand Down
4 changes: 2 additions & 2 deletions docs/core/baseapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ First, the important parameters that are initialized during the bootstrapping of
are relayed to the relevant module's gRPC `Query` service.
* [`TxDecoder`](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/types#TxDecoder): It is used to decode
raw transaction bytes relayed by the underlying Tendermint engine.
* [`ParamStore`](#paramstore): The parameter store used to get and set application consensus parameters.
* [`ParamStore`](#paramstore): The parameter store used to get and set application consensus parameters. <!-- todo: modify to where they are housed now, will not be the param module-->
* [`AnteHandler`](#antehandler): This handler is used to handle signature verification, fee payment,
and other pre-message execution checks when a transaction is received. It's executed during
[`CheckTx/RecheckTx`](#checktx) and [`DeliverTx`](#delivertx).
Expand Down Expand Up @@ -183,7 +183,7 @@ During `InitChain`, the `RequestInitChain` provides `ConsensusParams` which cont
related to block execution such as maximum gas and size in addition to evidence parameters. If these
parameters are non-nil, they are set in the BaseApp's `ParamStore`. Behind the scenes, the `ParamStore`
is actually managed by an `x/params` module `Subspace`. This allows the parameters to be tweaked via
on-chain governance.
on-chain governance. <!-- when new path is chosen migrate docs-->

## Service Routers

Expand Down
2 changes: 1 addition & 1 deletion docs/core/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The documentation on the IAVL Tree is located [here](https://github.com/cosmos/i

`dbadapter.Store` embeds `dbm.DB`, meaning most of the `KVStore` interface functions are implemented. The other functions (mostly miscellaneous) are manually implemented. This store is primarily used within [Transient Stores](#transient-stores)

### `Transient` Store
### `Transient` Store <!-- Todo, figure out if this is deprecated-->

`Transient.Store` is a base-layer `KVStore` which is automatically discarded at the end of the block.

Expand Down
4 changes: 3 additions & 1 deletion x/params/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ parent:
title: "params"
-->

# `params`
# `params` (Depreacted)
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved

> Note: The Params module has been depreacted in favour of each module housing its own parameters.

## Abstract

Expand Down