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

fix: refuse to move default user group #1139

Merged
merged 3 commits into from
May 12, 2023
Merged

Conversation

dadamu
Copy link
Contributor

@dadamu dadamu commented May 11, 2023

Description

Closes: #XXXX

This PR fixes the bug that we allow to move the default group to other section, it causes test-sim-import-export error happens the following steps:

  1. Create a new subspace and SaveSubspace creates a default user group as well
  2. Create a new section with id 1, then default group key become subspace-1 section-1 group-0
  3. Move default group to new section 1
  4. Export genesis then import it, the new app state will differ with the original one since SaveSubspace creates default group again on the key subspace-1 section-0 group-0

As every one are the members inside default group, we should refuse to move group to other sections.


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)

@dadamu dadamu requested a review from a team as a code owner May 11, 2023 07:42
@github-actions github-actions bot added the x/subspaces Issue on the x/subspaces module label May 11, 2023
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 90.00% and project coverage change: -0.25 ⚠️

Comparison is base (7b7da5f) 80.93% compared to head (c60b4b5) 80.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1139      +/-   ##
==========================================
- Coverage   80.93%   80.68%   -0.25%     
==========================================
  Files         198      189       -9     
  Lines       16966    16846     -120     
==========================================
- Hits        13731    13593     -138     
- Misses       2638     2657      +19     
+ Partials      597      596       -1     
Impacted Files Coverage Δ
app/ante.go 53.84% <ø> (-1.16%) ⬇️
x/posts/module.go 10.00% <0.00%> (+0.12%) ⬆️
x/profiles/module.go 9.75% <0.00%> (+0.11%) ⬆️
x/subspaces/types/models.go 91.78% <ø> (ø)
x/subspaces/types/msgs.go 97.57% <50.00%> (-0.72%) ⬇️
app/app.go 87.45% <100.00%> (-0.15%) ⬇️
x/subspaces/legacy/v6/store.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@RiccardoM RiccardoM merged commit 456bf2e into master May 12, 2023
33 of 34 checks passed
@RiccardoM RiccardoM deleted the paul/fix-move-group-msg branch May 12, 2023 17:42
mergify bot pushed a commit that referenced this pull request May 24, 2023
## Description

Closes: #XXXX
Deps: #1139

This PR setup app v2 app wiring feature.



---

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

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) 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)
RiccardoM added a commit that referenced this pull request Jun 15, 2023
## Description

This PR implements ADR-21: Subspace specific custom fee tokens feature.

Closes: [DCD-312](https://desmoslabs.atlassian.net/browse/DCD-312)

~~Depends-On: #1135~~
~~Depends-On: #1139~~

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

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

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR
Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [x] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
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)

[DCD-312]:
https://forbole.atlassian.net/browse/DCD-312?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: dadamu <dadamu@users.noreply.github.com>
Co-authored-by: Riccardo <riccardo.montagnin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x/subspaces Issue on the x/subspaces module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants