Skip to content

Commit

Permalink
refactor!: remove x/params (#22995)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex | Skip authored Dec 20, 2024
1 parent 6a550b9 commit c12136b
Show file tree
Hide file tree
Showing 59 changed files with 14 additions and 5,808 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
/x/group/ @kocubinski @akhilkumarpilli @cosmos/sdk-core-dev
/x/mint/ @lucaslopezf @facundomedica @cosmos/sdk-core-dev
/x/nft/ @alpe @lucaslopezf @cosmos/sdk-core-dev
/x/params/ @cosmos/sdk-core-dev # deprecated so whole team
/x/protocolpool/ @facundomedica @hieuvubk @alpe @cosmos/sdk-core-dev
/x/simulation/ @cosmos/sdk-core-dev # deprecated so whole team
/x/slashing/ @testinginprod @raynaudoe @lucaslopezf @cosmos/sdk-core-dev
Expand Down
9 changes: 0 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,6 @@ updates:
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/x/params"
schedule:
interval: weekly
day: wednesday
time: "03:05"
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/x/auth"
schedule:
Expand Down
2 changes: 0 additions & 2 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
- x/mint/**/*
"C:x/nft":
- x/nft/**/*
"C:x/params":
- x/params/**/*
"C:x/protocolpool":
- x/protocolpool/**/*
"C:x/slashing":
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1136,36 +1136,6 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/evidence/
test-x-params:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: x/params/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/params/**/*.go
x/params/go.mod
x/params/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/params
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/params/
test-x-upgrade:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i

### API Breaking Changes

* (x/params) [#22995](https://github.com/cosmos/cosmos-sdk/pull/22995) Remove `x/params`. Migrate to the new params system introduced in `v0.47` as demonstrated [here](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#xparams).
* (testutil) [#22392](https://github.com/cosmos/cosmos-sdk/pull/22392) Remove `testutil/network` package. Use the integration framework or systemtests framework instead.

### Deprecated
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Core dependencies not mentioned here as compatible across all maintained SDK ver
See an exhaustive list of core dependencies at [cosmossdk.io](https://cosmossdk.io).

| Version | v2 | 0.52.z | 0.50.z | 0.47.z |
| ------------------------ | ----- | --------- | -------------- | ------- |
|--------------------------|-------|-----------|----------------|---------|
| cosmossdk.io/core | 1.y.z | 1.y.z | 0.11.z | 0.5.z |
| cosmossdk.io/api | 0.8.z | 0.8.z | 0.7.z | 0.3.z |
| cosmossdk.io/x/tx | 1.y.z | 1.y.z | < 1.y.z | N/A |
Expand All @@ -89,7 +89,7 @@ Module Dependencies are the modules that an application may depend on and which
> N/A signals that the module was not available in the Cosmos SDK at that time.
| Cosmos SDK | v2 | 0.52.z | 0.50.z |
| --------------------------- | ----- | ------ | ------ |
|-----------------------------|-------|--------|--------|
| cosmossdk.io/x/accounts | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/bank | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/circuit | 0.2.z | 0.2.z | 0.1.z |
Expand All @@ -102,6 +102,7 @@ Module Dependencies are the modules that an application may depend on and which
| cosmossdk.io/x/group | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/mint | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/nft | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/params | N/A | 0.2.z | X |
| cosmossdk.io/x/protocolpool | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/slashing | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/staking | 0.2.z | 0.2.z | X |
Expand Down
11 changes: 10 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ To be able to simulate nested messages within a transaction, message types conta
the nested messages. By implementing this interface, the BaseApp can simulate these nested messages during
transaction simulation. -->

### Modules

#### `x/params`

The `x/params` module has been removed from the Cosmos SDK. The following [migration](https://github.com/cosmos/cosmos-sdk/blob/828fcf2f05db0c4759ed370852b6dacc589ea472/x/mint/migrations/v2/migrate.go)
and [PR])(https://github.com/cosmos/cosmos-sdk/pull/12363) can be used as a reference for migrating a legacy params module to the supported module-managed params paradigm.

More information can be found in the [deprecation notice](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#xparams).

## [v0.52.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0-beta.1)

Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.
Expand Down Expand Up @@ -1276,7 +1285,7 @@ The `params` module was deprecated since v0.46. The Cosmos SDK has migrated away
Cosmos SDK modules now store their parameters directly in its respective modules.
The `params` module will be removed in `v0.50`, as mentioned [in v0.46 release](https://github.com/cosmos/cosmos-sdk/blob/v0.46.1/UPGRADING.md#xparams). It is strongly encouraged to migrate away from `x/params` before `v0.50`.

When performing a chain migration, the params table must be initizalied manually. This was done in the modules keepers in previous versions.
When performing a chain migration, the params table must be initialized manually. This was done in the modules keepers in previous versions.
Have a look at `simapp.RegisterUpgradeHandlers()` for an example.

#### `x/crisis`
Expand Down
149 changes: 0 additions & 149 deletions baseapp/params_legacy.go

This file was deleted.

1 change: 0 additions & 1 deletion buf.work.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ directories:
- x/group/proto
- x/mint/proto
- x/nft/proto
- x/params/proto
- x/protocolpool/proto
- x/slashing/proto
- x/staking/proto
Expand Down
1 change: 0 additions & 1 deletion go.work.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ use (
./x/group
./x/mint
./x/nft
./x/params
./x/protocolpool
./x/slashing
./x/staking
Expand Down
1 change: 0 additions & 1 deletion simapp/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ replace (
cosmossdk.io/x/group => ../../x/group
cosmossdk.io/x/mint => ../../x/mint
cosmossdk.io/x/nft => ../../x/nft
cosmossdk.io/x/params => ../../x/params
cosmossdk.io/x/protocolpool => ../../x/protocolpool
cosmossdk.io/x/slashing => ../../x/slashing
cosmossdk.io/x/staking => ../../x/staking
Expand Down
1 change: 0 additions & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ replace (
cosmossdk.io/x/group => ../x/group
cosmossdk.io/x/mint => ../x/mint
cosmossdk.io/x/nft => ../x/nft
cosmossdk.io/x/params => ../x/params
cosmossdk.io/x/protocolpool => ../x/protocolpool
cosmossdk.io/x/slashing => ../x/slashing
cosmossdk.io/x/staking => ../x/staking
Expand Down
28 changes: 0 additions & 28 deletions x/params/CHANGELOG.md

This file was deleted.

Loading

0 comments on commit c12136b

Please sign in to comment.