Skip to content

Commit

Permalink
chore: remove v2 from 0.52 release branch (#23445)
Browse files Browse the repository at this point in the history
Co-authored-by: aljo242 <[email protected]>
  • Loading branch information
aljo242 and aljo242 authored Jan 17, 2025
1 parent 84186b0 commit 3a48b29
Show file tree
Hide file tree
Showing 77 changed files with 31 additions and 13,494 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
- name: Build with Secp_cgo
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=secp make build
- name: Build v2 with sqlite backend
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=v2,sqlite make build
###################
## Build Tooling ##
###################
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -531,48 +531,6 @@ jobs:
cd simapp
go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock' ./...
test-simapp-v2:
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: go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
- name: tests simapp
if: env.GIT_DIFF
run: |
cd simapp/v2
go test -mod=readonly -timeout 30m -tags='norace ledger test_ledger_mock' ./...
- name: simapp-v2-smoke-test
if: env.GIT_DIFF
run: |
COSMOS_BUILD_OPTIONS=v2 make install
./scripts/init-simapp-v2.sh
simdv2 start &
SIMD_PID=$!
cnt=0
while ! simdv2 query comet block --type=height 5; do
cnt=$((cnt + 1))
if [ $cnt -gt 30 ]; then
kill -9 "$SIMD_PID"
exit 1
fi
sleep 1
done
kill -9 "$SIMD_PID"
test-collections:
runs-on: ubuntu-latest
steps:
Expand Down
151 changes: 0 additions & 151 deletions .github/workflows/v2-test.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i

### Improvements

* (all) [#23445](https://github.com/cosmos/cosmos-sdk/pull/23445) Remove `v2` code from codebase.
* (codec) [#22988](https://github.com/cosmos/cosmos-sdk/pull/22988) Improve edge case handling for recursion limits.

### Bug Fixes
Expand Down
54 changes: 25 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,19 @@ The IBC module for the Cosmos SDK has its own [cosmos/ibc-go repository](https:/

The version matrix below shows which versions of the Cosmos SDK, modules and libraries are compatible with each other.

> [!IMPORTANT]
> Cosmos SDK `v2` corresponds to a chain using the `runtime/v2`, `server/v2/**`, and `store/v2` packages. The `github.com/cosmos/cosmos-sdk` module has a less important role in a `v2` chain.
#### Core Dependencies

Core dependencies are the core libraries that an application may depend on.
Core dependencies not mentioned here as compatible across all maintained SDK versions.
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 |
| cosmossdk.io/store | N/A | >= 1.10.z | 1.0.0 >= 1.9.z | N/A |
| cosmossdk.io/store/v2 | 2.y.z | N/A | N/A | N/A |
| cosmossdk.io/collections | 1.y.z | 1.y.z | < 1.y.z | < 1.y.z |
| Version | 0.52.z | 0.50.z | 0.47.z |
|--------------------------|-----------|----------------|---------|
| cosmossdk.io/core | 1.y.z | 0.11.z | 0.5.z |
| cosmossdk.io/api | 0.8.z | 0.7.z | 0.3.z |
| cosmossdk.io/x/tx | 1.y.z | < 1.y.z | N/A |
| cosmossdk.io/store | >= 1.10.z | 1.0.0 >= 1.9.z | N/A |
| cosmossdk.io/collections | 1.y.z | < 1.y.z | < 1.y.z |

#### Module Dependencies

Expand All @@ -88,24 +84,24 @@ Module Dependencies are the modules that an application may depend on and which
> X signals that the module was not spun out into its own go.mod file.
> 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 |
| cosmossdk.io/x/consensus | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/distribution | 0.2.z | 0.2.z | X |
| cosmossdk.io/x/epochs | 0.2.z | 0.2.z | N/A |
| cosmossdk.io/x/evidence | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/feegrant | 0.2.z | 0.2.z | 0.1.z |
| cosmossdk.io/x/gov | 0.2.z | 0.2.z | X |
| 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/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 |
| cosmossdk.io/x/upgrade | 0.2.z | 0.2.z | 0.1.z |
| Cosmos SDK | 0.52.z | 0.50.z |
|-----------------------------|--------|--------|
| cosmossdk.io/x/accounts | 0.2.z | N/A |
| cosmossdk.io/x/bank | 0.2.z | X |
| cosmossdk.io/x/circuit | 0.2.z | 0.1.z |
| cosmossdk.io/x/consensus | 0.2.z | X |
| cosmossdk.io/x/distribution | 0.2.z | X |
| cosmossdk.io/x/epochs | 0.2.z | N/A |
| cosmossdk.io/x/evidence | 0.2.z | 0.1.z |
| cosmossdk.io/x/feegrant | 0.2.z | 0.1.z |
| cosmossdk.io/x/gov | 0.2.z | X |
| cosmossdk.io/x/group | 0.2.z | X |
| cosmossdk.io/x/mint | 0.2.z | X |
| cosmossdk.io/x/nft | 0.2.z | 0.1.z |
| cosmossdk.io/x/protocolpool | 0.2.z | N/A |
| cosmossdk.io/x/slashing | 0.2.z | X |
| cosmossdk.io/x/staking | 0.2.z | X |
| cosmossdk.io/x/upgrade | 0.2.z | 0.1.z |

## Disambiguation

Expand Down
11 changes: 3 additions & 8 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Note, always read the **SimApp** section for more information on application wir

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

Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.
It is additional to the changes described here.

### SimApp

Expand All @@ -33,7 +31,7 @@ clientCtx = clientCtx.

**When using `depinject` / `app_di`, the client codecs can be provided directly from application config.**

Refer to SimApp `root_v2.go` and `root.go` for an example with an app di and a legacy app.
Refer to SimApp `root.go` for an example with an app di and a legacy app.

Additionally, a simplification of the start command leads to the following change:

Expand Down Expand Up @@ -329,7 +327,7 @@ All modules (expect `auth`) were spun out into their own `go.mod`. Replace their

##### Core API

Core API has been introduced for modules since v0.47. With the deprecation of `sdk.Context`, we strongly recommend to use the `cosmossdk.io/core/appmodule` interfaces for the modules. This will allow the modules to work out of the box with server/v2 and baseapp, as well as limit their dependencies on the SDK.
Core API has been introduced for modules since v0.47. With the deprecation of `sdk.Context`, we strongly recommend to use the `cosmossdk.io/core/appmodule` interfaces for the modules. This will allow the modules to work out of the box with baseapp, as well as limit their dependencies on the SDK.

Additionally, the `appmodule.Environment` struct is introduced to fetch different services from the application.
This should be used as an alternative to using `sdk.UnwrapContext(ctx)` to fetch the services.
Expand Down Expand Up @@ -465,9 +463,6 @@ Existing chains using `x/distribution` module must add the new `x/protocolpool`
#### `x/gov`

Gov v1beta1 proposal handler has been changed to take in a `context.Context` instead of `sdk.Context`.
This change was made to allow legacy proposals to be compatible with server/v2.
If you wish to migrate to server/v2, you should update your proposal handler to take in a `context.Context` and use services.
On the other hand, if you wish to keep using baseapp, simply unwrap the sdk context in your proposal handler.

#### `x/mint`

Expand Down Expand Up @@ -510,7 +505,7 @@ storetypes.StoreUpgrades{

#### `x/validate`

Introducing `x/validate` a module that is solely used for registering default ante/post handlers and global tx validators when using runtime and runtime/v2. If you wish to set your custom ante/post handlers, no need to use this module.
Introducing `x/validate` a module that is solely used for registering default ante/post handlers and global tx validators when using runtime. If you wish to set your custom ante/post handlers, no need to use this module.
You can however always extend them by adding extra tx validators (see `x/validate` documentation).

#### `tools/benchmark`
Expand Down
50 changes: 0 additions & 50 deletions UPGRADING_v2.md

This file was deleted.

Loading

0 comments on commit 3a48b29

Please sign in to comment.