-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(slashing): spinout to new go module #18201
Conversation
WalkthroughThe changes primarily involve the migration of the Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (17)
- client/v2/go.mod
- go.mod
- simapp/go.mod
- tests/go.mod
- tests/starship/tests/go.mod
- x/circuit/go.mod
- x/distribution/go.mod
- x/evidence/go.mod
- x/feegrant/go.mod
- x/gov/go.mod
- x/group/go.mod
- x/nft/go.mod
- x/params/go.mod
- x/protocolpool/go.mod
- x/slashing/go.mod
- x/slashing/go.sum
- x/upgrade/go.mod
Files selected for processing (54)
- .github/workflows/test.yml (1 hunks)
- UPGRADING.md (1 hunks)
- proto/cosmos/slashing/module/v1/module.proto (1 hunks)
- proto/cosmos/slashing/v1beta1/genesis.proto (1 hunks)
- proto/cosmos/slashing/v1beta1/query.proto (1 hunks)
- proto/cosmos/slashing/v1beta1/slashing.proto (1 hunks)
- proto/cosmos/slashing/v1beta1/tx.proto (1 hunks)
- simapp/app.go (2 hunks)
- simapp/app_config.go (2 hunks)
- simapp/app_test.go (2 hunks)
- simapp/app_v2.go (2 hunks)
- simapp/export.go (1 hunks)
- simapp/sim_test.go (2 hunks)
- tests/integration/evidence/keeper/infraction_test.go (2 hunks)
- tests/integration/rapidgen/rapidgen.go (2 hunks)
- tests/integration/slashing/keeper/keeper_test.go (2 hunks)
- tests/integration/tx/aminojson/aminojson_test.go (2 hunks)
- tests/integration/tx/decode_test.go (2 hunks)
- testutil/testnet/genesis.go (2 hunks)
- x/distribution/testutil/app_config.go (1 hunks)
- x/evidence/testutil/app_config.go (1 hunks)
- x/slashing/CHANGELOG.md (1 hunks)
- x/slashing/abci.go (1 hunks)
- x/slashing/abci_test.go (1 hunks)
- x/slashing/app_test.go (2 hunks)
- x/slashing/keeper/genesis.go (1 hunks)
- x/slashing/keeper/genesis_test.go (1 hunks)
- x/slashing/keeper/grpc_query.go (1 hunks)
- x/slashing/keeper/grpc_query_test.go (1 hunks)
- x/slashing/keeper/hooks.go (1 hunks)
- x/slashing/keeper/infractions.go (1 hunks)
- x/slashing/keeper/keeper.go (1 hunks)
- x/slashing/keeper/keeper_test.go (2 hunks)
- x/slashing/keeper/migrations.go (1 hunks)
- x/slashing/keeper/msg_server.go (1 hunks)
- x/slashing/keeper/msg_server_test.go (1 hunks)
- x/slashing/keeper/signing_info.go (1 hunks)
- x/slashing/keeper/signing_info_test.go (1 hunks)
- x/slashing/keeper/unjail.go (1 hunks)
- x/slashing/migrations/v4/migrate.go (1 hunks)
- x/slashing/migrations/v4/migrate_test.go (1 hunks)
- x/slashing/module.go (1 hunks)
- x/slashing/simulation/decoder.go (1 hunks)
- x/slashing/simulation/decoder_test.go (1 hunks)
- x/slashing/simulation/genesis.go (1 hunks)
- x/slashing/simulation/genesis_test.go (1 hunks)
- x/slashing/simulation/operations.go (2 hunks)
- x/slashing/simulation/operations_test.go (2 hunks)
- x/slashing/simulation/proposals.go (1 hunks)
- x/slashing/simulation/proposals_test.go (1 hunks)
- x/slashing/sonar-project.properties (1 hunks)
- x/slashing/testutil/app_config.go (1 hunks)
- x/slashing/testutil/params.go (1 hunks)
- x/staking/testutil/app_config.go (2 hunks)
Files skipped from review due to trivial changes (44)
- .github/workflows/test.yml
- UPGRADING.md
- proto/cosmos/slashing/module/v1/module.proto
- proto/cosmos/slashing/v1beta1/genesis.proto
- proto/cosmos/slashing/v1beta1/query.proto
- proto/cosmos/slashing/v1beta1/slashing.proto
- simapp/app.go
- simapp/export.go
- simapp/sim_test.go
- tests/integration/evidence/keeper/infraction_test.go
- tests/integration/tx/aminojson/aminojson_test.go
- tests/integration/tx/decode_test.go
- testutil/testnet/genesis.go
- x/distribution/testutil/app_config.go
- x/slashing/CHANGELOG.md
- x/slashing/abci.go
- x/slashing/app_test.go
- x/slashing/keeper/genesis.go
- x/slashing/keeper/genesis_test.go
- x/slashing/keeper/grpc_query.go
- x/slashing/keeper/grpc_query_test.go
- x/slashing/keeper/hooks.go
- x/slashing/keeper/infractions.go
- x/slashing/keeper/keeper.go
- x/slashing/keeper/keeper_test.go
- x/slashing/keeper/msg_server.go
- x/slashing/keeper/msg_server_test.go
- x/slashing/keeper/signing_info.go
- x/slashing/keeper/signing_info_test.go
- x/slashing/keeper/unjail.go
- x/slashing/migrations/v4/migrate_test.go
- x/slashing/module.go
- x/slashing/simulation/decoder.go
- x/slashing/simulation/decoder_test.go
- x/slashing/simulation/genesis.go
- x/slashing/simulation/genesis_test.go
- x/slashing/simulation/operations.go
- x/slashing/simulation/operations_test.go
- x/slashing/simulation/proposals.go
- x/slashing/simulation/proposals_test.go
- x/slashing/sonar-project.properties
- x/slashing/testutil/app_config.go
- x/slashing/testutil/params.go
- x/staking/testutil/app_config.go
Additional comments: 15
x/evidence/testutil/app_config.go (1)
- 5-5: The import path for the
slashing
module has been updated fromgit.luolix.top/cosmos/cosmos-sdk/x/slashing
tocosmossdk.io/x/slashing
. Ensure that the new path is correct and the module is accessible at this location. Also, verify that all references to theslashing
module in the codebase have been updated to use the new import path.proto/cosmos/slashing/v1beta1/tx.proto (1)
- 4-4: The
go_package
option has been updated to reflect the new import path for theslashing
module. Ensure that the new pathcosmossdk.io/x/slashing/types
is correct and accessible.x/slashing/keeper/migrations.go (1)
- 4-4: The import path for the
v4
package has been updated to reflect the new location of theslashing
module. Ensure that the new import pathcosmossdk.io/x/slashing/migrations/v4
is correct and the package is accessible at this location.x/slashing/abci_test.go (1)
- 13-15: The import paths for the
slashing
module, its keeper, and test utilities have been updated to reflect the new location of theslashing
module. Ensure that the new paths are correct and that the module, keeper, and test utilities are accessible at these locations.x/slashing/migrations/v4/migrate.go (1)
- 10-10: The import path for the
slashing
module's types has been updated fromgit.luolix.top/cosmos/cosmos-sdk/x/slashing/types
tocosmossdk.io/x/slashing/types
. Ensure that this new path is correct and accessible. Also, verify that all references to types from theslashing
module in this file have been updated to use this new import path.tests/integration/slashing/keeper/keeper_test.go (2)
14-17: The import paths for the
slashing
module, its keeper, test utilities, and types have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module, keeper, test utilities, and types are available at these locations.30-35: The import paths for the
staking
module, its keeper, and test utilities have not been updated. If thestaking
module has also been moved to a new location, these import paths should be updated to reflect the new location.tests/integration/rapidgen/rapidgen.go (2)
38-38: The import path for the
slashingtypes
has been updated fromgit.luolix.top/cosmos/cosmos-sdk/x/slashing/types
tocosmossdk.io/x/slashing/types
. Ensure that the new path is correct and the package is available at this location.45-49: The import path for
slashingtypes
has been removed from this section. This change is consistent with the update in the previous hunk.simapp/app_test.go (2)
24-24: The import path for the
slashing
module has been updated fromgit.luolix.top/cosmos/cosmos-sdk/x/slashing
tocosmossdk.io/x/slashing
. Ensure that the new import path is correct and the module is accessible at this location.40-44: The old import path for the
slashing
module (github.com/cosmos/cosmos-sdk/x/slashing
) has been removed. This change is consistent with the update to the new import path (cosmossdk.io/x/slashing
) in line 24.simapp/app_v2.go (2)
24-24: The import path for the
slashingkeeper
has been updated to reflect the new location of theslashing
module. Ensure that the new module atcosmossdk.io/x/slashing/keeper
is functionally equivalent to the old one atgit.luolix.top/cosmos/cosmos-sdk/x/slashing/keeper
. Also, verify that the new module is available and accessible at the specified location.44-48: The import path for the
slashingkeeper
has been removed from this section. This change is consistent with the addition of the new import path for theslashingkeeper
in line 24.simapp/app_config.go (2)
49-50: The import path for the
slashing
module has been updated to reflect its new location. Ensure that the new pathcosmossdk.io/x/slashing
is correct and accessible. Also, verify that all references to theslashing
module in the codebase have been updated to use this new import path.69-74: The import statement for the
slashing
module has been removed from this section. This change is consistent with the update in lines 49-50 where theslashing
module is now being imported from its new location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- contrib/images/simd-env/Dockerfile (1 hunks)
Additional comments: 1
contrib/images/simd-env/Dockerfile (1)
- 19-19: The new hunk adds the
go.mod
andgo.sum
files of thex/slashing
module to the Docker image. This is in line with the changes described in the PR summary and is necessary for thego mod download
command to download the dependencies of thex/slashing
module. Ensure that thex/slashing
module's dependencies do not conflict with the dependencies of other modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- x/slashing/simulation/operations_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
- x/slashing/simulation/operations_test.go
Additional comments: 1
CHANGELOG.md (1)
- 178-179: The changes in the
CHANGELOG.md
accurately reflect the updates made in the PR, specifically the relocation of theslashing
module to its owngo.mod
file. This is a good practice as it helps keep track of significant changes and provides a useful reference for users and developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (27)
- x/slashing/abci.go (1 hunks)
- x/slashing/abci_test.go (1 hunks)
- x/slashing/app_test.go (2 hunks)
- x/slashing/keeper/genesis.go (1 hunks)
- x/slashing/keeper/genesis_test.go (1 hunks)
- x/slashing/keeper/grpc_query.go (1 hunks)
- x/slashing/keeper/grpc_query_test.go (1 hunks)
- x/slashing/keeper/hooks.go (1 hunks)
- x/slashing/keeper/infractions.go (1 hunks)
- x/slashing/keeper/keeper.go (1 hunks)
- x/slashing/keeper/migrations.go (1 hunks)
- x/slashing/keeper/msg_server.go (1 hunks)
- x/slashing/keeper/msg_server_test.go (1 hunks)
- x/slashing/keeper/signing_info.go (1 hunks)
- x/slashing/keeper/signing_info_test.go (1 hunks)
- x/slashing/keeper/unjail.go (1 hunks)
- x/slashing/migrations/v4/migrate.go (1 hunks)
- x/slashing/migrations/v4/migrate_test.go (1 hunks)
- x/slashing/simulation/decoder.go (1 hunks)
- x/slashing/simulation/decoder_test.go (1 hunks)
- x/slashing/simulation/genesis.go (1 hunks)
- x/slashing/simulation/genesis_test.go (1 hunks)
- x/slashing/simulation/operations.go (2 hunks)
- x/slashing/simulation/operations_test.go (2 hunks)
- x/slashing/simulation/proposals.go (1 hunks)
- x/slashing/simulation/proposals_test.go (1 hunks)
- x/slashing/testutil/app_config.go (2 hunks)
Files skipped from review due to trivial changes (24)
- x/slashing/abci.go
- x/slashing/app_test.go
- x/slashing/keeper/genesis.go
- x/slashing/keeper/genesis_test.go
- x/slashing/keeper/grpc_query.go
- x/slashing/keeper/grpc_query_test.go
- x/slashing/keeper/hooks.go
- x/slashing/keeper/infractions.go
- x/slashing/keeper/keeper.go
- x/slashing/keeper/msg_server.go
- x/slashing/keeper/msg_server_test.go
- x/slashing/keeper/signing_info.go
- x/slashing/keeper/signing_info_test.go
- x/slashing/keeper/unjail.go
- x/slashing/migrations/v4/migrate.go
- x/slashing/migrations/v4/migrate_test.go
- x/slashing/simulation/decoder_test.go
- x/slashing/simulation/genesis.go
- x/slashing/simulation/genesis_test.go
- x/slashing/simulation/operations.go
- x/slashing/simulation/operations_test.go
- x/slashing/simulation/proposals.go
- x/slashing/simulation/proposals_test.go
- x/slashing/testutil/app_config.go
Additional comments: 3
x/slashing/simulation/decoder.go (1)
- 7-7: The import path for the
slashing
module has been updated fromgit.luolix.top/cosmos/cosmos-sdk/x/slashing/types
tocosmossdk.io/x/slashing/types
. Ensure that the new path is correct and accessible.x/slashing/abci_test.go (1)
- 12-14: The import paths for the
slashing
,slashing/keeper
, andslashing/testutil
packages have been updated to reflect the new location of theslashing
module. Ensure that the new paths are correct and that the module is properly set up at the new location. Also, verify that all other parts of the codebase that depend on these packages have been updated with the new import paths.x/slashing/keeper/migrations.go (1)
- 4-4: The import path for the
v4
package has been updated to reflect the new location of theslashing
module. Ensure that the new pathcosmossdk.io/x/slashing/migrations/v4
is correct and the package is accessible at this location.
@@ -0,0 +1,14 @@ | |||
sonar.projectKey=cosmos-sdk-x-slashing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, CI is complaining about Sonar not being configured as Julien pointed out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- client/v2/go.mod
Files selected for processing (1)
- UPGRADING.md (1 hunks)
Files skipped from review due to trivial changes (1)
- UPGRADING.md
[Cosmos SDK - x/slashing] Kudos, SonarCloud Quality Gate passed! |
Description
spinout slashing module into its own go.mod
ref #11899
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
slashing
module has been separated into its owngo.mod
file, improving the modularity and maintainability of the codebase. This change also updates the import paths for theslashing
module across various files.slashing
package.slashing
module, providing a structured way to track and communicate changes.slashing
module, ensuring the tests remain accurate and up-to-date.