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

refactor(x)!: rename x/consensus to x/comet #21497

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/x/authz/ @akhilkumarpilli @raynaudoe @cosmos/sdk-core-dev
/x/bank/ @julienrbrt @sontrinh16 @cosmos/sdk-core-dev
/x/circuit/ @kocubinski @akhilkumarpilli @raynaudoe @cosmos/sdk-core-dev
/x/consensus/ @testinginprod @raynaudoe @cosmos/sdk-core-dev
/x/comet/ @testinginprod @raynaudoe @cosmos/sdk-core-dev
/x/distribution/ @alpe @JulianToledano @cosmos/sdk-core-dev
/x/epochs/ @alpe @facundomedica @cosmos/sdk-core-dev
/x/evidence/ @alpe @akhilkumarpilli @cosmos/sdk-core-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ v without deliberation
* [ ] Audit x/authz
* [ ] Audit x/bank
* [ ] Audit x/circuit
* [ ] Audit x/consensus
* [ ] Audit x/comet
* [ ] Audit x/crisis
* [ ] Audit x/distribution
* [ ] Audit x/evidence
Expand Down
4 changes: 2 additions & 2 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
- x/bank/**/*
"C:x/circuit":
- x/circuit/**/*
"C:x/consensus":
- x/consensus/**/*
"C:x/comet":
- x/comet/**/*
"C:x/crisis":
- x/crisis/**/*
"C:x/distribution":
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1516,18 +1516,18 @@ jobs:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: x/consensus/go.sum
cache-dependency-path: x/comet/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/consensus/**/*.go
x/consensus/go.mod
x/consensus/go.sum
x/comet/**/*.go
x/comet/go.mod
x/comet/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/consensus
cd x/comet
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 }}
Expand All @@ -1536,4 +1536,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/consensus/
projectBaseDir: x/comet/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i

### API Breaking Changes

* [#21497](https://github.com/cosmos/cosmos-sdk/pull/21497) Rename `x/consensus` to `x/comet`. Only the go module name has changed, appmodule, endpoints, proto package, and other references remain the same.

### Deprecated

* (types) [#21435](https://github.com/cosmos/cosmos-sdk/pull/21435) The `String()` method on `AccAddress`, `ValAddress` and `ConsAddress` have been deprecated. This is done because those are still using the deprecated global `sdk.Config`. Use an `address.Codec` instead.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
FROM golang:1.23-alpine AS build-env

# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
RUN apk add --no-cache $PACKAGES

# Set working directory for the build
Expand All @@ -40,7 +40,7 @@
COPY x/bank/go.mod x/bank/go.sum ./x/bank/
COPY x/mint/go.mod x/mint/go.sum ./x/mint/
COPY x/tx/go.mod x/tx/go.sum ./x/tx/
COPY x/consensus/go.mod x/consensus/go.sum ./x/consensus/
COPY x/comet/go.mod x/comet/go.sum ./x/comet/
COPY depinject/go.mod depinject/go.sum ./depinject/
COPY core/testing/go.mod core/testing/go.sum ./core/testing/
COPY log/go.mod log/go.sum ./log/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Module Dependencies are the modules that an application may depend on and which
| cosmossdk.io/x/accounts | N/A | 0.2.z |
| cosmossdk.io/x/bank | X | 0.2.z |
| cosmossdk.io/x/circuit | 0.1.z | 0.2.z |
| cosmossdk.io/x/consensus | X | 0.2.z |
| cosmossdk.io/x/comet | X | 0.2.z |
| cosmossdk.io/x/distribution | X | 0.2.z |
| cosmossdk.io/x/epochs | N/A | 0.2.z |
| cosmossdk.io/x/evidence | 0.1.z | 0.2.z |
Expand Down
51 changes: 12 additions & 39 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ For non depinject users, simply call `RegisterLegacyAminoCodec` and `RegisterInt

Additionally, thanks to the genesis simplification, as explained in [the genesis interface update](#genesis-interface), the module manager `InitGenesis` and `ExportGenesis` methods do not require the codec anymore.

##### GRPC-WEB
##### GRPC WEB

Grpc-web embedded client has been removed from the server. If you would like to use grpc-web, you can use the [envoy proxy](https://www.envoyproxy.io/docs/envoy/latest/start/start). Here's how to set it up:

Expand Down Expand Up @@ -347,6 +347,8 @@ Also, any usages of the interfaces `AnyUnpacker` and `UnpackInterfacesMessage` m

#### `**all**`

All modules were spun out into their own `go.mod`. Replace imports by `cosmossdk.io/x/{moduleName}`.

##### 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.
Expand Down Expand Up @@ -399,7 +401,7 @@ All modules using dependency injection must update their imports.

##### Params

Previous module migrations have been removed. It is required to migrate to v0.50 prior to upgrading to v0.51 for not missing any module migrations.
Previous module migrations have been removed. It is required to migrate to v0.50 prior to upgrading to v0.52 for not missing any module migrations.

##### Genesis Interface

Expand Down Expand Up @@ -436,60 +438,31 @@ if err != nil {
}
```

#### `x/auth`

Auth was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/auth`

#### `x/authz`

Authz was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/authz`
### `x/comet`

#### `x/bank`
The `x/consensus` module has been renamed to `x/comet`. More consensus engines are supported in the Cosmos SDK for server/v2.
The renaming was done to signify that.

Bank was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/bank`
For backward compatibility the module name and its store key has been kept as `consensus`.

### `x/crsis`

The Crisis module was removed due to it not being supported or functional any longer.
The `x/crisis` module was removed due to it not being supported or functional any longer.

#### `x/distribution`

Distribution was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/distribution`

The existing chains using x/distribution module needs to add the new x/protocolpool module.

#### `x/group`

Group was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/group`
Existing chains using `x/distribution` module must add the new `x/protocolpool` module.

#### `x/gov`

Gov was spun out into its own `go.mod`. To import it use `cosmossdk.io/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`

Mint was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/mint`

#### `x/slashing`

Slashing was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/slashing`

#### `x/staking`

Staking was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/staking`

#### `x/params`

A standalone Go module was created and it is accessible at "cosmossdk.io/x/params".

#### `x/protocolpool`

Introducing a new `x/protocolpool` module to handle community pool funds. Its store must be added while upgrading to v0.51.x.
Introducing a new `x/protocolpool` module to handle community pool funds. Its store must be added while upgrading to v0.52.x.

Example:

Expand All @@ -506,7 +479,7 @@ func (app SimApp) RegisterUpgradeHandlers() {
}
```

Add `x/protocolpool` store while upgrading to v0.51.x:
Add `x/protocolpool` store while upgrading to v0.52.x:

```go
storetypes.StoreUpgrades{
Expand Down
38 changes: 19 additions & 19 deletions api/cosmos/consensus/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/cosmos/consensus/v1/consensus.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 22 additions & 20 deletions api/cosmos/consensus/v1/query.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/cosmos/consensus/v1/query_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/cosmos/consensus/v1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/cosmos/consensus/v1/tx_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion baseapp/params_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Legacy types are defined below to aid in the migration of CometBFT consensus
// parameters from use of the now deprecated x/params modules to a new dedicated
// x/consensus module.
// x/comet module.
//
// Application developers should ensure that they implement their upgrade handler
// correctly such that app.ConsensusParamsKeeper.Set() is called with the values
Expand Down
Loading
Loading