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

feat: decouple x/slashing from simapp #12315

Merged
merged 16 commits into from
Jun 23, 2022
Merged

feat: decouple x/slashing from simapp #12315

merged 16 commits into from
Jun 23, 2022

Conversation

atheeshp
Copy link
Contributor

@atheeshp atheeshp commented Jun 21, 2022

Description

Closes: #12195


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@atheeshp atheeshp marked this pull request as ready for review June 21, 2022 13:35
@atheeshp atheeshp requested a review from a team as a code owner June 21, 2022 13:35
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but there is a few decoupling missing:

  • TestBeginBlocker
  • TestSlashingMsgs
  • TestExportAndInitGenesis
  • TestUnJailNotBonded (I think you need to move the test helpers function to testutil/sims and add a changelog)
  • TestNewQuerier
  • TestWeightedOperations (You can use the weight from testutil/sims)
  • WeightedOperations (You can use the weight from testutil/sims)

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #12315 (3286ad8) into main (464fd17) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12315      +/-   ##
==========================================
- Coverage   65.96%   65.88%   -0.08%     
==========================================
  Files         676      676              
  Lines       71295    71296       +1     
==========================================
- Hits        47028    46976      -52     
- Misses      21627    21690      +63     
+ Partials     2640     2630      -10     
Impacted Files Coverage Δ
x/slashing/simulation/operations.go 0.00% <0.00%> (-59.10%) ⬇️
x/group/keeper/keeper.go 56.96% <0.00%> (-0.43%) ⬇️
crypto/keys/internal/ecdsa/privkey.go 83.01% <0.00%> (+1.88%) ⬆️

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just two tests still missing:

  • TestNewQuerier
  • TestQueryParams

See https://github.com/cosmos/cosmos-sdk/blob/ap/decouple-slashing/x/slashing/keeper/querier_test.go

@atheeshp
Copy link
Contributor Author

LGTM, just two tests still missing:

  • TestNewQuerier
  • TestQueryParams

See https://github.com/cosmos/cosmos-sdk/blob/ap/decouple-slashing/x/slashing/keeper/querier_test.go

updated

@julienrbrt julienrbrt added A:automerge Automatically merge PR once all prerequisites pass. and removed A:automerge Automatically merge PR once all prerequisites pass. labels Jun 23, 2022
@mergify mergify bot merged commit 69c9e3e into main Jun 23, 2022
@mergify mergify bot deleted the ap/decouple-slashing branch June 23, 2022 11:02
@julienrbrt
Copy link
Member

julienrbrt commented Jun 24, 2022

Discovered while migrating x/staking: The simulation test suite actually do not actually test anything in operation. I have missed the coverage change shown here: #12315 (comment).

Fix incoming...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Simulations C:x/slashing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate x/slashing to use app wiring
3 participants