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/distribution)!: Use KVStoreService, context.Context and return errors instead of panic #15948

Merged
merged 29 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
29d9853
init
facundomedica Apr 19, 2023
8805808
progress
facundomedica Apr 19, 2023
46dcd03
progress
facundomedica Apr 19, 2023
2efea8d
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into facu…
facundomedica Apr 25, 2023
ee67d10
progress
facundomedica Apr 25, 2023
25cac02
progress
facundomedica Apr 25, 2023
ae008bc
progress
facundomedica Apr 25, 2023
ead54cc
progress
facundomedica Apr 25, 2023
6142f3e
fix
facundomedica Apr 25, 2023
fc4adf9
Merge branch 'main' into facu/distr-kvservice
facundomedica Apr 25, 2023
1f707cb
fix
facundomedica Apr 25, 2023
47012a8
sdk.Context -> context.Context
facundomedica Apr 25, 2023
4496fd7
some test fixes
facundomedica Apr 25, 2023
032b624
update expected keepers
facundomedica Apr 25, 2023
e56c725
fix test
facundomedica Apr 25, 2023
16ad475
fix test and linter
facundomedica Apr 25, 2023
0b21215
progress
facundomedica Apr 25, 2023
9b0e372
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into facu…
facundomedica Apr 26, 2023
3158740
update changes from bank
facundomedica Apr 26, 2023
fcd42a8
last changes
facundomedica Apr 26, 2023
d89758c
forgot about the migrationhandler
facundomedica Apr 26, 2023
be2d87c
fix
facundomedica Apr 26, 2023
180a672
fix
facundomedica Apr 26, 2023
0d8ff2e
fix
facundomedica Apr 26, 2023
b171c2a
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into facu…
facundomedica Apr 26, 2023
77ce060
cl and upgrading ++
facundomedica Apr 26, 2023
ba7b121
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into facu…
facundomedica Apr 26, 2023
7a648a1
add nolint
facundomedica Apr 26, 2023
bf3467d
added address codec to autocli opts in app v1
facundomedica Apr 26, 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
Prev Previous commit
Next Next commit
cl and upgrading ++
  • Loading branch information
facundomedica committed Apr 26, 2023
commit 77ce06096a167e94b7214f93c35f533e5c1cb47d
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* (x/distribution) [#15948](https://github.com/cosmos/cosmos-sdk/issues/15948) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Keeper methods also now return an `error`.
* (x/bank) [#15891](https://github.com/cosmos/cosmos-sdk/issues/15891) `NewKeeper` now takes a `KVStoreService` instead of a `StoreKey` and methods in the `Keeper` now take a `context.Context` instead of a `sdk.Context`. Also `FundAccount` and `FundModuleAccount` from the `testutil` package accept a `context.Context` instead of a `sdk.Context`, and it's position was moved to the first place.
* (x/bank) [#15818](https://github.com/cosmos/cosmos-sdk/issues/15818) `BaseViewKeeper`'s `Logger` method now doesn't require a context. `NewBaseKeeper`, `NewBaseSendKeeper` and `NewBaseViewKeeper` now also require a `log.Logger` to be passed in.
* (client) [#15597](https://github.com/cosmos/cosmos-sdk/pull/15597) `RegisterNodeService` now requires a config parameter.
Expand Down
8 changes: 6 additions & 2 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ The following modules `NewKeeper` function now take a `KVStoreService` instead o
* `x/auth`
* `x/bank`
* `x/consensus`
* `x/distribution`
* `x/feegrant`
* `x/nft`

Expand All @@ -91,6 +92,11 @@ The following modules `NewKeeper` function now also take a `log.Logger`:

* `x/bank`

The following modules' `Keeper` methods now take in a `context.Context` instead of `sdk.Context`. Any module that has an interfaces for them (like "expected keepers") will need to update and re-generate mocks if needed:

* `x/bank`
* `x/distribution`


### depinject

Expand Down Expand Up @@ -136,8 +142,6 @@ It is now recommended to validate message directly in the message server. When t

#### `x/auth`

Methods in the `AccountKeeper` now use `context.Context` instead of `sdk.Context`. Any module that has an interface for it will need to update and re-generate mocks if needed.

For ante handler construction via `ante.NewAnteHandler`, the field `ante.HandlerOptions.SignModeHandler` has been updated to `x/tx/signing/HandlerMap` from `x/auth/signing/SignModeHandler`. Callers typically fetch this value from `client.TxConfig.SignModeHandler()` (which is also changed) so this change should be transparent to most users.

#### `x/capability`
Expand Down