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: Move CommunityPool to its own module #17657

Merged
merged 142 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
d20d7ea
add proto files
likhita-809 Sep 6, 2023
1348826
generate proto files
likhita-809 Sep 6, 2023
eb7f1f7
wip
likhita-809 Sep 6, 2023
7bbdb2d
wip
likhita-809 Sep 7, 2023
1523089
add grpc funcs
likhita-809 Sep 7, 2023
572c31f
remove CommunityPoolSpendProposal
likhita-809 Sep 7, 2023
b2e1e6c
add proto generated files
likhita-809 Sep 7, 2023
e3f7e49
cleanup
likhita-809 Sep 7, 2023
97d8247
remove communitypoolspendwithdeposit
likhita-809 Sep 7, 2023
d75940f
more cleanup
likhita-809 Sep 7, 2023
e2611d4
wip
likhita-809 Sep 7, 2023
1908e2f
wip: handler FundCommunityPool usage in gov
likhita-809 Sep 7, 2023
1c7ab95
more changes
likhita-809 Sep 7, 2023
e56fca0
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 7, 2023
0679095
try fixing tests
likhita-809 Sep 7, 2023
47fc417
use pseudo version in go mods
likhita-809 Sep 7, 2023
a412ed0
attempt: fix tests
likhita-809 Sep 7, 2023
dda2758
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 7, 2023
e2e16cf
fix go mods
likhita-809 Sep 7, 2023
33fe58f
fix simapp tests
likhita-809 Sep 7, 2023
afe2454
spell check
likhita-809 Sep 7, 2023
8cca8ad
add new go.mod required CI checks
likhita-809 Sep 7, 2023
00b21a0
fix tests
likhita-809 Sep 8, 2023
dd06cb1
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 8, 2023
e9edd09
fix lint
likhita-809 Sep 8, 2023
fa7ef39
fix lint
likhita-809 Sep 8, 2023
3ee3dea
deprecate pool methods in distr module
likhita-809 Sep 8, 2023
821ab59
add proto generated files
likhita-809 Sep 8, 2023
db4e769
run go mod tidy
likhita-809 Sep 8, 2023
79d6618
distr: remove deprecated keeper methods and use router to handle msgs
likhita-809 Sep 8, 2023
9b2d66d
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 8, 2023
439e2a2
run go mod tidy
likhita-809 Sep 8, 2023
331f302
fix lint
likhita-809 Sep 8, 2023
c99bafb
fix lint
likhita-809 Sep 8, 2023
a6f46ad
remove usage of x/pool in other modules
likhita-809 Sep 8, 2023
6592cb2
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 8, 2023
2cb7274
fix lint
likhita-809 Sep 8, 2023
be4421a
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 8, 2023
bca179e
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 8, 2023
e7bdd8f
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 11, 2023
33bbc97
try fixing liveness test
likhita-809 Sep 11, 2023
3df2122
address review comments & more cleanup
likhita-809 Sep 11, 2023
e370a73
add query router
likhita-809 Sep 12, 2023
62221fe
add grpcQueryRouter to runtime ProvideApp and fix tests
likhita-809 Sep 12, 2023
70595ae
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 12, 2023
cba381c
cleanup
likhita-809 Sep 12, 2023
690a3c7
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 12, 2023
9c8e497
address few comments
likhita-809 Sep 12, 2023
b8aa7c2
address few more comments
likhita-809 Sep 13, 2023
51149b8
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 13, 2023
cf601f4
go mod tidy
likhita-809 Sep 13, 2023
052f50c
add autocli
likhita-809 Sep 13, 2023
0d7e419
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 13, 2023
abd91f2
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 13, 2023
dd5e3f9
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 13, 2023
e008fe7
run go mod tidy
likhita-809 Sep 13, 2023
b7644bc
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 14, 2023
f9ea988
add migrations and address few comments
likhita-809 Sep 18, 2023
c32731e
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 18, 2023
184a530
fix handler
likhita-809 Sep 18, 2023
ad69bc4
more comments
likhita-809 Sep 20, 2023
e7f3bb0
run proto-gen
likhita-809 Sep 20, 2023
0f48c95
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 20, 2023
41ff6ad
wip
likhita-809 Sep 20, 2023
a294b72
update tests
likhita-809 Sep 20, 2023
bbe7f59
wip
likhita-809 Sep 20, 2023
572aba1
go mod tidy
likhita-809 Sep 20, 2023
6c9c171
bump consensus version
likhita-809 Sep 20, 2023
a384e45
more changes
likhita-809 Sep 20, 2023
5bf3ab6
cleanup
likhita-809 Sep 20, 2023
38fac38
more changes
likhita-809 Sep 20, 2023
860fa77
more cleanup
likhita-809 Sep 20, 2023
b95de9d
proto generated code
likhita-809 Sep 20, 2023
fe965f9
cleanup
likhita-809 Sep 20, 2023
0b39de3
wip: change pool module name to protocolpool
likhita-809 Sep 20, 2023
685fae9
run proto gen
likhita-809 Sep 20, 2023
418d0b5
run go mod tidy
likhita-809 Sep 20, 2023
0f7399f
more cleanup
likhita-809 Sep 20, 2023
034bd7b
fix lint
likhita-809 Sep 20, 2023
dd99b0f
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 20, 2023
3232fbb
fix test yml
likhita-809 Sep 20, 2023
d1807cf
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 20, 2023
7098e03
fix lint
likhita-809 Sep 20, 2023
da4b79c
address review comments
likhita-809 Sep 20, 2023
5e8facb
proto-generated files
likhita-809 Sep 20, 2023
ef725f3
remove amino usage from pool proto files
likhita-809 Sep 21, 2023
0af0967
proto-gen files
likhita-809 Sep 21, 2023
f31d339
fix changelog
likhita-809 Sep 21, 2023
1bc8c06
add upgrading and changelog
likhita-809 Sep 21, 2023
f776a5c
address nits & update changelog
likhita-809 Sep 21, 2023
ad02f5a
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 21, 2023
9c80def
more nits
likhita-809 Sep 21, 2023
9f78177
protogen
likhita-809 Sep 21, 2023
163e07b
add simulations
likhita-809 Sep 21, 2023
265c146
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 21, 2023
bd860b9
try fixing simulation
likhita-809 Sep 21, 2023
5d3ae8b
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 21, 2023
10854ca
fix lint
likhita-809 Sep 21, 2023
84ff048
wip: integration test
likhita-809 Sep 21, 2023
2cc7338
wip: fixing
likhita-809 Sep 21, 2023
424e010
fix lint
likhita-809 Sep 21, 2023
c8b04e1
remove log
likhita-809 Sep 21, 2023
49d18ba
address comments and fix lint
likhita-809 Sep 21, 2023
a292ea1
fix lint in test
likhita-809 Sep 21, 2023
505d487
address nits & fix lint
likhita-809 Sep 22, 2023
07ff495
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 22, 2023
de47ff9
wip: remove router usage & use keepers
likhita-809 Sep 25, 2023
a203f00
run go mod tidy
likhita-809 Sep 25, 2023
edb6588
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 25, 2023
8470423
add dist integration tests
likhita-809 Sep 25, 2023
acc2d5d
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 25, 2023
7655e0f
fix integration tests
likhita-809 Sep 25, 2023
a2ee6f0
fix lint
likhita-809 Sep 25, 2023
eadc851
fix integration tests
likhita-809 Sep 25, 2023
661d87b
fix lint
likhita-809 Sep 25, 2023
843d1c6
add more tests
likhita-809 Sep 25, 2023
b49f1f5
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 25, 2023
095ee20
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 25, 2023
a1bc045
fix few tests
likhita-809 Sep 25, 2023
795bf26
fix gov simulations
likhita-809 Sep 25, 2023
e22e60b
fix gov NewAppModule usage
likhita-809 Sep 25, 2023
99ece52
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
cd25cb8
fix go mod
likhita-809 Sep 26, 2023
b061b23
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
1ab9bc6
wip: go mod
likhita-809 Sep 26, 2023
5040235
fix gov tests
likhita-809 Sep 26, 2023
3ef743e
fix slashing tests
likhita-809 Sep 26, 2023
05202bf
final changes
likhita-809 Sep 26, 2023
76b0944
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
b7140ab
address few comments
likhita-809 Sep 26, 2023
58acb08
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
274389e
run go mod tidy
likhita-809 Sep 26, 2023
1136ffb
add ProposalMsg simulations
likhita-809 Sep 26, 2023
7a5d1a6
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
0b22b1d
revert rapidgen changes
likhita-809 Sep 26, 2023
0ac8cd0
fix operations test and change pool ModuleName to be same as protocol…
likhita-809 Sep 26, 2023
9a6b593
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
602338f
fix lint
likhita-809 Sep 26, 2023
2ac42c3
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 26, 2023
d32ef79
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 27, 2023
de27ffe
run go mod tidy
likhita-809 Sep 27, 2023
0823a64
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
likhita-809 Sep 27, 2023
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ updates:
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "/x/protocolpool"
schedule:
interval: weekly
day: wednesday
time: "03:00"
labels:
- "A:automerge"
- dependencies

# Dependencies should be up to date on release branch
- package-ecosystem: gomod
Expand Down
2 changes: 2 additions & 0 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
- x/consensus/**/*
"C:x/circuit":
- x/circuit/**/*
"C:x/protocolpool":
- x/protocolpool/**/*
"C:x/tx":
- x/tx/**/*
"C:collections":
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,37 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/circuit/

test-x-protocolpool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21"
check-latest: true
cache: true
cache-dependency-path: x/protocolpool/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/protocolpool/**/*.go
x/protocolpool/go.mod
x/protocolpool/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/protocolpool
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/protocolpool/

test-x-feegrant:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

* (x/protocolpool) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) Create a new `x/protocolpool` module that is responsible for handling community pool funds. This module is split out into a new module from x/distribution.
* (baseapp) [#16581](https://github.com/cosmos/cosmos-sdk/pull/16581) Implement Optimistic Execution as an experimental feature (not enabled by default).
* (client/keys) [#17639](https://github.com/cosmos/cosmos-sdk/pull/17639) Allows using and saving public keys encoded as base64
* (client) [#17513](https://github.com/cosmos/cosmos-sdk/pull/17513) Allow overwritting `client.toml`. Use `client.CreateClientConfig` in place of `client.ReadFromClientConfig` and provide a custom template and a custom config.
Expand All @@ -61,6 +62,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* (x/distribution) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) The `FundCommunityPool` and `DistributeFromFeePool` keeper methods are now removed from x/distribution.
* (x/distribution) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) The distribution module keeper now takes a new argument `PoolKeeper` in addition.
* (app) [#17838](https://github.com/cosmos/cosmos-sdk/pull/17838) Params module was removed from simapp and all imports of the params module removed throughout the repo.
* The Cosmos SDK has migrated aay from using params, if you're app still uses it, then you can leave it plugged into your app
* (x/staking) [#17778](https://github.com/cosmos/cosmos-sdk/pull/17778) Use collections for `Params`
Expand Down Expand Up @@ -154,10 +157,15 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

* (x/distribution) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) Migrate community pool funds from x/distribution to x/protocolpool.
* (x/distribution) [#17115](https://github.com/cosmos/cosmos-sdk/pull/17115) Migrate `PreviousProposer` to collections.
* (x/upgrade) [#16244](https://github.com/cosmos/cosmos-sdk/pull/16244) upgrade module no longer stores the app version but gets and sets the app version stored in the `ParamStore` of baseapp.
* (x/staking) [#17655](https://github.com/cosmos/cosmos-sdk/pull/17655) `HistoricalInfo` was replaced with `HistoricalRecord`, it removes the validator set and comet header and only keep what is needed for IBC.

### Client Breaking Changes

* (x/distribution) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) Deprecate `CommunityPool` and `FundCommunityPool` rpc methods. Use x/protocolpool module's rpc methods instead.

## [v0.50.0-rc.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0-rc.1) - 2023-09-25

### Features
Expand Down
33 changes: 33 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,39 @@ Most of Cosmos SDK modules have migrated to [collections](https://docs.cosmos.ne
Many functions have been removed due to this changes as the API can be smaller thanks to collections.
For modules that have migrated, verify you are checking against `collections.ErrNotFound` when applicable.

#### `x/distribution`

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

#### `x/protocolpool`

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

Example:

```go
func (app SimApp) RegisterUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler(
UpgradeName,
func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)
},
)

// ...
}
```

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

```go
storetypes.StoreUpgrades{
Added: []string{
protocolpooltypes.ModuleName,
},
}
```

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

### Migration to CometBFT (Part 2)
Expand Down
Loading
Loading