-
Notifications
You must be signed in to change notification settings - Fork 751
feat(ica/host)!: migrate ICA host params to be self managed #3520
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
Merged
Merged
Changes from 53 commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
4ac0e7b
feat: add proto msg
aleem1314 3e8354b
feat: add msg-server implementation
aleem1314 c17fdf2
wip: add migrations
aleem1314 dc97796
fix failing tests
aleem1314 2140a3e
cleanup
aleem1314 c9cd005
cleanup
aleem1314 98f213c
Update modules/apps/27-interchain-accounts/host/migrations/v8/migrati…
aleem1314 9c53d61
fix(transfer): 'p.AllowMessages' missing '&' in 'NewParamSetPair'
srdtrk b02d03b
fix(transfer): 'p.HostEnabled' missing '&' in 'NewParamSetPair'
srdtrk 6269d16
refactor(ica/host): reduce code duplication by removing 'IsHostEnable…
srdtrk b9f0817
refactor(ica/host): moved getter and setters to 'keeper.go'
srdtrk f5c9fea
refactor(ica/host): moved getter and setters to 'keeper.go'
srdtrk d9a12a8
fix(ica/host): handling the SetParam errors now
srdtrk 3c97fba
imp(ica/host): added failure cases to TestValidateParams
srdtrk a5f4b75
feat(ica/host): added codec for msg
srdtrk 09da84f
fix(ica/host): added host's RegisterInterfaces to module.go
srdtrk 926ffdd
fix(changelog): removed manual addition
srdtrk b8db88a
imp(ica/host): made GetParams more economical
srdtrk 9c26d08
fix(fee/test): handled ica's 'SetParams' error during testing
srdtrk b6bf06c
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk e982710
imp(ica/host): using ibcerrors instead of relying on sdk's govtypes
srdtrk 26a44df
style(ica/host): removed '*' from Migrator's keeper
srdtrk d51de4c
revert(ica/host): reverts to the previous commit as this is more cons…
srdtrk f712f93
fix(simapp): added ParamKeyTable to the icahost subspace in app.go fo…
srdtrk b67a173
feat(ica/host/test): added migrator_test.go
srdtrk 904cd3f
style(ica/host/test): ran gofumpt
srdtrk 525d431
feat(ica/host): passing legacySubspace to keeper instead
srdtrk 6ff8f38
fix(ica/host): removed unneeded reference to hss from 'NewAppModule' …
srdtrk 1ffbda6
fix(simapp): reduced modifications to simapp to 1
srdtrk 6667d99
fix(ica/host/test): updated tests
srdtrk f30f703
style(ica/host): ran gofumpt
srdtrk 6fbd88c
docs(ica/host): fixed a typo
srdtrk 3d75714
style(ica/host): added a space for import separation
srdtrk de7739e
style(ica/host): renamed 'migrator.go' to 'migrations.go'
srdtrk 9041fa4
refactor(ica/host): removed unneeded validate function
srdtrk f09f56c
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk 0b59b8e
style(ica/host): storing ParamsKey using a string
srdtrk 20d3800
fix(ica/host): registered the msg_server in ica's module.go
srdtrk 9019c73
style(ica/host): removed unneeded fmt variable assignment
srdtrk 47e72c1
imp(ica/host/test): added more test cases, and refactored the test
srdtrk 0413697
style(ica/host/test): ran gofumpt
srdtrk ac4566a
imp(ica/host): 'GetParams' panics now if it can't find the params
srdtrk 5b18258
imp(core): added 'ErrInvalidAuthority'
srdtrk 50f2b67
imp(ica/host): uses 'ErrInvalidAuthority'
srdtrk 8a3f9f2
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk ddf60d4
fix(ica/test): fixed test for the ica module
srdtrk c0ce6a3
imp(ica/host/test): added a new test case
srdtrk 588fcbe
imp(ica/host/test): added params test to genesis
srdtrk a87581b
style(ica/host): ran gofumpt
srdtrk 7ab5513
imp(ica/host/test): added unset param test to keeper
srdtrk d4b7010
docs(ica/host): added tracker issue for removing params_legacy.go
srdtrk c51e2c6
style(ica/host): improved test case naming
srdtrk 5a75a43
fix(ica/host/test): fixed a minor inaccuracy with the test in the hop…
srdtrk 3d3d8aa
style(ica/host): updated err message
srdtrk 289855d
imp(ica/transfer, core/errors): removed ErrInvalidAuthority
srdtrk df22e88
style(ica/host): updated nil check to be more consistent
srdtrk 708d5c8
style(transfer): renamed errors to errorsmod to avoid shadowing
srdtrk 72bd14d
imp(ica/host/test): made test shorter
srdtrk 2b0aaae
imp(ica/host/test): removed unneeded comment
srdtrk d804902
style(ica/host/test): removed test case field names
srdtrk ba74181
refactor(ica/host, fee/test): refactored Validate out of SetParams
srdtrk c806a23
style(ica/host): ran gofumpt
srdtrk c0f74e0
imp(ica/types): switched back to 'bz == nil'
srdtrk e19914f
style(ica/host/test): looks better
srdtrk 212945a
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk 27c9029
style(ica/host): changed panic message
srdtrk a0884ca
imp(ica/host): removed redundant Validate from msg server, handled in…
srdtrk 0bc9281
style(ica/host): added code comment
srdtrk ce98d84
fix(ica/host): increase consensus version
srdtrk e84d975
style(ica/host/test): moved success case to top
srdtrk 32ebf33
style(ica/host/test): improve test styling
srdtrk db33a85
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk 61fee14
docs(migration): added changes in app.go
srdtrk 2eb440c
imp(ica/host): improved the error message
srdtrk 8586e2e
merge: remote-tracking branch 'origin' into aleem/3504-host-params
srdtrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
modules/apps/27-interchain-accounts/host/keeper/migrations.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package keeper | ||
|
|
||
| import ( | ||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" | ||
| ) | ||
|
|
||
| // Migrator is a struct for handling in-place state migrations. | ||
| type Migrator struct { | ||
| keeper *Keeper | ||
| } | ||
|
|
||
| // NewMigrator returns Migrator instance for the state migration. | ||
| func NewMigrator(k *Keeper) Migrator { | ||
| return Migrator{ | ||
| keeper: k, | ||
| } | ||
| } | ||
|
|
||
| // MigrateParams migrates the host submodule's parameters from the x/params to self store. | ||
| func (m Migrator) MigrateParams(ctx sdk.Context) error { | ||
| var params types.Params | ||
| m.keeper.legacySubspace.GetParamSet(ctx, ¶ms) | ||
|
|
||
| return m.keeper.SetParams(ctx, params) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.