Skip to content

Commit

Permalink
V8 rc2 release prepare (#2027)
Browse files Browse the repository at this point in the history
* feat: Add command bech32-convert (#1845)

* add bech32-convert command to gaiad

* add changelog notice

* add review fixes

* add tests for ConvertBech32Prefix

Co-authored-by: Petr Ivanov <[email protected]>
Co-authored-by: Danilo Pantani <[email protected]>
Co-authored-by: billy rennekamp <[email protected]>

* fix feegrant test accounts (#1861)

* Updated and new links (#1862)

* Updated and added links

Current Telegram links directs to a chat that no longer exists, replaced it with the main Cosmos Telegram group. Also added link to Mintscan's list of on-chain proposals

* Updated Telegram link: t.me/atomgov

Co-authored-by: billy rennekamp <[email protected]>

* chore: bump sdk to v0.46.4 (#1863)

* chore: bump sdk

* rename flag

* prepare v8 release (#1860)

* chore: changelog

* chore: update changelog

* chore: add changelog for v7.0.3

* chore: add v7.1.0 to changelog

Co-authored-by: Yaru Wang <[email protected]>

* Add backport for v8 & future v9/v10 (#1865)

* Revert "prepare v8 release (#1860)" (#1866)

This reverts commit f0397fd.

* chore: changelog (#1868)

* fix: print in app.go (#1878)

* fix: print in app.go

* fix: change print err to panic in init

* refactor: simplify the logic in fee antehandler (#1877)

* refactor: simplify the logic in fee antehandler

* fix: test

* test: add test for disable checkTx

* fix: err check (#1880)

* fix: change log.Fatal to panic, defer iter.Close()

* update export.go

* fix: lint

* chore(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1885)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: export genesis (#1871)

* Add export test

* Add unit test for app export

* Refactor gaia helpers setup

Co-authored-by: Danilo Pantani <[email protected]>

* fix(chore): fix gosec issues (#1881)

* gosec improvements

* fix gosec issues

* defer to close iterator

* add gas adjustment

* Merge PR #1893: Delete CODE_OF_CONDUCT.md

* test: Unit tests for global fee module (#1858)

* test: add test for globalfee validateMinimumGasPrices

* test: add test for querier

* fix: panic in test

* update test

* update test

* use original test

* Update x/globalfee/types/params_test.go

Co-authored-by: Danilo Pantani <[email protected]>

Co-authored-by: Danilo Pantani <[email protected]>

* icamauth docs (#1813)

* docs: add icamauth docs

* docs: change uatom to stake

* chore: update docs

* docs: update icamuath.md according to review comments

* docs: rename icamauth.md to README.md

* docs: read mnemonic from file

* docs: add hermes download instruction

* update docs

* globalfee/README.md -> globalfee.md

* Update docs/modules/icamauth/hermes_setup.sh

Co-authored-by: Danilo Pantani <[email protected]>

* docs: fix dead link

* Update README.md

* Update README.md

* fixes

Co-authored-by: billy rennekamp <[email protected]>
Co-authored-by: Danilo Pantani <[email protected]>

* docs: correct `NoWithVeto` condition description (#1900)

According to (docs)[https://docs.cosmos.network/main/modules/gov#threshold] and [code](https://github.com/cosmos/cosmos-sdk/blob/bcff22a3767b9c5dd7d1d562aece90cf72e05e85/x/gov/keeper/tally.go#L115), it includes `abstain` when calculating the threshold of `NoWithVeto`.

* fix(CI): fix code coverage (#1903)

* fix the code test coverage measure

* fix folder type removal

* docs: update icamauth (#1905)

* docs: update icamauth

* docs: restructure icamauth docs

* docs: update links

* docs: fix dead links

* chore: update docs (#1906)

* feat(CI): skip run the go CI test for markdown/docs files (#1907)

* skip run the test CI for markdown files

* remove skip from the codeql ci

* only ignore md files for codeql

* feat(x/ica): add tests for icamauth module (#1897)

* add unit tests methods

* add tests for the types folder

* remove query test

* add test description

* refactor: e2e test (#1840)

* refactor: ica e2e test

* refactor: globalfee e2e test

* refactor: add execBankSendBatch

* refactor: add const proposalGlobalFee

* refactor: execBankSendBatch

* Update tests/e2e/e2e_exec_test.go

Co-authored-by: Danilo Pantani <[email protected]>

* test: refactor execBankSendBatch

* fix: failure test

Co-authored-by: Danilo Pantani <[email protected]>

* Update ibc-go v5.1.0 (#1898)

* Strangelove/forward middleware atomic (#1911)

* Update forward middleware to use packet memo field, async acks

* fixed e2e

Co-authored-by: Andrew Gouin <[email protected]>

* fix bank migration in upgrade handler (#1892)

* fix bank migtation in upgrade handler

* try atomated upgrade test

* fix build

* change so runs on yml change too

* change so runs on yml change too

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* change again

* passing upgrade test

* Update app/upgrades/v8/upgrades.go

Co-authored-by: Danilo Pantani <[email protected]>

* Update contrib/scripts/run-gaia-v7.sh

Co-authored-by: Danilo Pantani <[email protected]>

* Update contrib/scripts/run-gaia-v7.sh

Co-authored-by: Danilo Pantani <[email protected]>

* Update contrib/scripts/run-gaia-v7.sh

Co-authored-by: Danilo Pantani <[email protected]>

* Update contrib/scripts/run-gaia-v7.sh

Co-authored-by: Danilo Pantani <[email protected]>

* add unit test

* Update app/upgrades/v8/upgrades_test.go

Co-authored-by: Danilo Pantani <[email protected]>

* added check for deformed being removed

Co-authored-by: Danilo Pantani <[email protected]>

* chore: simplify logic of getting allFees (#1917)

* Updated codeowners, removed pantani, cmwaters & noomski

* Makefile: add govulnchecker (#1927)

Adds the Go vulnerability checker to the Makefile as a directive
dependency to the all directive.

Updates #1879

* spike to test feasibility of downgrade to v0.45 (#1902)

* pause

* no vscode errors

* rewrite go.sum, go.work.sum and fix amino import

* remove mauth docs

* gofumpt

* fix find

* cant get docker to build locally

* debug ibc test

* fix ibc test

* passing e2e

* clean up commented out tests

* remove more mauth

* forgot to save

* add back middleware test

* fix upgrade

* fix test setup

* add TODO note

* remove multihop test

* Update docs/modules/gov.md

* Update tests/e2e/query.go

Co-authored-by: lg <[email protected]>

* remove groups and gov docs

* laurens comment re moduleAccountAddress

* remove commented code that should not be added back

Co-authored-by: lg <[email protected]>

* feat: proto dependencies for downgrade to 0.45 (#1933)

* feat: add third_party proto

* feat: add script for generating go files from proto, and swagger

* feat: add protoc-doc-gen.sh

* fix: antehandler to fit sdk v0.45 (#1918)

* pause

* no vscode errors

* rewrite go.sum, go.work.sum and fix amino import

* remove mauth docs

* gofumpt

* fix find

* cant get docker to build locally

* debug ibc test

* fix ibc test

* passing e2e

* clean up commented out tests

* remove more mauth

* forgot to save

* add back middleware test

* fix upgrade

* fix test setup

* add TODO note

* remove multihop test

* fix: antehandler in sdkv0.45

* test: add back globalfee e2e test

* fix: failure of verifying sending token amount

* chore: remove comments

* feat: simplify fee logic

Co-authored-by: billy rennekamp <[email protected]>

* test re-org (#1913)

* pause

* no vscode errors

* rewrite go.sum, go.work.sum and fix amino import

* remove mauth docs

* gofumpt

* fix find

* cant get docker to build locally

* debug ibc test

* fix ibc test

* passing e2e

* clean up commented out tests

* remove more mauth

* forgot to save

* add back middleware test

* fix upgrade

* fix test setup

* add TODO note

* remove multihop test

* re-organized tests to make it easier to skip when working on a single one

* remove gov tests

* removed multihop tests

* markdownlint (#1936)

* fix: feegrant e2e test (#1940)

* docs: update state sync (#1946)

* Updated roadmap (#1947)

* bump versions, remove e2e go.mod (#1944)

* bump versions, remove e2e go.mod

* stupid gofumpt errors

* fixed packet forward configuration (#1941)

* exclude e2e tests from test coverage upload (#1953)

* exclude e2e tests from test coverage upload

* swap order of test to exclude e2e

* remove e2e from find

* updated gov docs as specified in issue #1948 (#1949)

* updated gov docs as specified in issue #1948

* fixed links

* missed a few links

* fix links (#1954)

* test: Refactor gov e2e for v0.45 Rho (#1951)

* WIP

* Refactor gov tests for v45

* Refactor gov and add community spend test

* Refactor

* Set explicit sdk & tm versions for all dependencies

Co-authored-by: billy rennekamp <[email protected]>

* Skip broken redirect link check

* Restrict disable link to single link

Co-authored-by: billy rennekamp <[email protected]>

* add back TestGaiaApp_Export  (#1955)

* pause

* unit pasing, check e2e

* Update test_helpers.go

* fix: put iterator in closure (#1934)

Co-authored-by: Milan Mulji <[email protected]>

* uncomment still existing test (#1956)

* uncomment still existing test

* forgot to include this file

* pause

* remove again

* add back rest of tests

* push e2e image and use released versions in docker push action (#1939)

Co-authored-by: billy rennekamp <[email protected]>

* lint tests, too (#1960)

* feat: Change MaxBypassMinFeeMsgGasUsage via NewFeeDecorator (#1961)

* change MaxBypassMinFeeMsgGasUsage easily

* move test to newTestGasLimit

* chore: remove unneeded replace tags (#1959)

* remove unneeded replace tags

* remove ibc dep

* Update go.mod

Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: billy rennekamp <[email protected]>

* chore(docs): add code guidelines (#1819)

* code guidelines

* add resources

* Update docs/code-guidelines.md

Co-authored-by: billy rennekamp <[email protected]>

* git guidelines

* small fixes and final steps

Co-authored-by: billy rennekamp <[email protected]>

* Update ko genesis.md (#1964)

* offboarding (#1969)

* chore(deps): bump actions/cache from 3.0.10 to 3.2.0 (#1968)

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.10 to 3.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3.0.10...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: fix global fee link (#1978)

* chore(deps): bump github.com/gravity-devs/liquidity from 1.5.1 to 1.5.3 (#1981)

Bumps [github.com/gravity-devs/liquidity](https://github.com/gravity-devs/liquidity) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/gravity-devs/liquidity/releases)
- [Changelog](https://github.com/Gravity-Devs/liquidity/blob/master/CHANGELOG.md)
- [Commits](Gravity-Devs/liquidity@v1.5.1...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/gravity-devs/liquidity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix: minor typos (#1984)

Fix: minor typos

* Migrations for quicksilver issue (#1976)

* prepare v8 release (backport #1860) (#1867)

* prepare v8 release (#1860)

* chore: changelog

* chore: update changelog

* chore: add changelog for v7.0.3

* chore: add v7.1.0 to changelog

Co-authored-by: Yaru Wang <[email protected]>
(cherry picked from commit f0397fd)

# Conflicts:
#	CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: billy rennekamp <[email protected]>

* Added migrations for quicksilver stuck fund fix

* Migrations for quicksilver

* Check if balance of the refund addess is positive

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: billy rennekamp <[email protected]>
Co-authored-by: lg <[email protected]>

* test: remove unused const (#1988)

* test: remove unused const

* fix: lint

* Changelog for V8 (#1982)

* Update changelog for v8

* Update changelog for v8

* Update changelog

* Make requested changes

* Update date

* Point to informal's fork of tendermint (#1990)

* fix: remove ica controller params setup from upgrade handler (#1989)

Signed-off-by: Yaru Wang <[email protected]>

* Update codeowners (#1993)

* preparing for v8.0.0-rc1 release (#1994)

* prepare v8 release (backport #1860) (#1867)

* prepare v8 release (#1860)

* chore: changelog

* chore: update changelog

* chore: add changelog for v7.0.3

* chore: add v7.1.0 to changelog

Co-authored-by: Yaru Wang <[email protected]>
(cherry picked from commit f0397fd)

# Conflicts:
#	CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: billy rennekamp <[email protected]>

* docs: update changelog

Signed-off-by: Yaru Wang <[email protected]>

* docs: update docs

Signed-off-by: Yaru Wang <[email protected]>

Signed-off-by: Yaru Wang <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: billy rennekamp <[email protected]>

* docs: changelog for v8.0.0-rc1 (#1997)

Signed-off-by: Yaru Wang <[email protected]>

Signed-off-by: Yaru Wang <[email protected]>

* fix: correct ica wiring and update pfm fixes for v8 upgrade (#2008)

* fix: remove duplicates of ica module

* Remove ICAController

* Add back ica new module config

* Move migration run to end of upgrade

* Update strangelove

* Fix pfm

* Add sdk logging

* Add fix for pfm spelling mistake

* Update ugrade handler logging, update pfm config

* Fix linter

* Update pfm

* Update TransferKeeper to pass ChannelKeeper instead of RouterKeeper

* Update pfm config

* Update

* Fix pfm again

Co-authored-by: lg <[email protected]>

* Update changelog for rc2 (#2022)

* Update v8 backport rules (#2025)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Yaru Wang <[email protected]>
Co-authored-by: Petr Ivanov <[email protected]>
Co-authored-by: Petr Ivanov <[email protected]>
Co-authored-by: Danilo Pantani <[email protected]>
Co-authored-by: billy rennekamp <[email protected]>
Co-authored-by: ZorroZ77 <[email protected]>
Co-authored-by: Yaru Wang <[email protected]>
Co-authored-by: yaruwangway <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: Yongwoo Lee <[email protected]>
Co-authored-by: Giancarlos Salas <[email protected]>
Co-authored-by: Andrew Gouin <[email protected]>
Co-authored-by: Milan Mulji <[email protected]>
Co-authored-by: Emmanuel T Odeke <[email protected]>
Co-authored-by: Lexa Michaelides <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: GwangIl-Park <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: stana-ethernal <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 24f255a commit 27cd4b5
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 65 deletions.
2 changes: 2 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pull_request_rules:
conditions:
- base=main
- label=A:backport/v8.0.x
- "#commits-unverified>=0"

actions:
backport:
branches:
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,28 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

## [v8.0.0-rc2] - 2023-01-16

* (gaia) Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v3.4.0](https://github.com/cosmos/ibc-go/blob/v3.4.0/CHANGELOG.md) to fix a vulnerability in ICA. See [v3.4.0 CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/v0.45.9/CHANGELOG.md) and [v3.2.1 Release Notes](https://github.com/cosmos/ibc-go/releases/tag/v3.2.1) for details.
* (gaia) Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.45.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.11). See [CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/release/v0.45.x/CHANGELOG.md) for details.
* (gaia) Bump [tendermint](https://github.com/tendermint/tendermint) to [0.34.24](https://github.com/tendermint/tendermint/tree/v0.34.24). See [CHANGELOG.md](https://github.com/tendermint/tendermint/blob/v0.34.24/CHANGELOG.md) for details.
* (gaia) Bump [liquidity](https://github.com/Gravity-Devs/liquidity) to [v1.5.3](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.5.3).
* (gaia) Bump [packet-forwarding-middleware](https://github.com/strangelove-ventures/packet-forward-middleware) to [v3.1.1-0.20230113180046-4fb516ae522e](https://github.com/strangelove-ventures/packet-forward-middleware/tree/4fb516ae522e1a36376ca856b82d9d6e75284213).
* (feat) Add [globalfee](https://github.com/cosmos/gaia/tree/main/x/globalfee) module. See [globalfee docs](https://github.com/cosmos/gaia/blob/main/docs/modules/globalfee.md) for more details.
* (feat) [#1845](https://github.com/cosmos/gaia/pull/1845) Add bech32-convert command to gaiad.
* (fix) [Add new fee decorator](https://github.com/cosmos/gaia/pull/1961) to change `MaxBypassMinFeeMsgGasUsage` so importers of x/globalfee can change `MaxGas`.
* (fix) [#1870](https://github.com/cosmos/gaia/issues/1870) Fix bank denom metadata in migration. See [#1892](https://github.com/cosmos/gaia/pull/1892) for more details.
* (fix) [#1976](https://github.com/cosmos/gaia/pull/1976) Fix Quicksilver ICA exploit in migration. See [the bug fix forum post](https://forum.cosmos.network/t/upcoming-interchain-accounts-bugfix-release/8911) for more details.
* (tests) Add [E2E tests](https://github.com/cosmos/gaia/tree/main/tests/e2e). The tests cover transactions/queries tests of different modules, including Bank, Distribution, Encode, Evidence, FeeGrant, Global Fee, Gov, IBC, packet forwarding middleware, Slashing, Staking, and Vesting module.
* (tests) [#1941](https://github.com/cosmos/gaia/pull/1941) Fix packet forward configuration for e2e tests.
* (tests) Use gaiad to swap out [Ignite](https://github.com/ignite/cli) in [liveness tests](https://github.com/cosmos/gaia/blob/main/.github/workflows/test.yml).

## [v8.0.0-rc1] - 2023-01-06

* (gaia) Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v3.4.0](https://github.com/cosmos/ibc-go/blob/v3.4.0/CHANGELOG.md) to fix a vulnerability in ICA. See [v3.4.0 CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/v0.45.9/CHANGELOG.md) and [v3.2.1 Release Notes](https://github.com/cosmos/ibc-go/releases/tag/v3.2.1) for details.
* (gaia) Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.45.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.11). See [CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/release/v0.45.x/CHANGELOG.md) for details.
* (gaia) Bump [tendermint](https://github.com/tendermint/tendermint) to [0.34.24](https://github.com/tendermint/tendermint/tree/v0.34.24). See [CHANGELOG.md](https://github.com/tendermint/tendermint/blob/v0.34.24/CHANGELOG.md) for details.
* (gaia) Bump [iquidity](https://github.com/Gravity-Devs/liquidity) to [v1.5.3](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.5.3).
* (gaia) Bump [liquidity](https://github.com/Gravity-Devs/liquidity) to [v1.5.3](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.5.3).
* (gaia) Bump [packet-forwarding-middleware](https://github.com/strangelove-ventures/packet-forward-middleware) to [v3.0.0](https://github.com/strangelove-ventures/packet-forward-middleware/releases/tag/v3.0.0).
* (feat) Add [globalfee](https://github.com/cosmos/gaia/tree/main/x/globalfee) module. See [globalfee docs](https://github.com/cosmos/gaia/blob/main/docs/modules/globalfee.md) for more details.
* (feat) [#1845](https://github.com/cosmos/gaia/pull/1845) Add bech32-convert command to gaiad.
Expand Down
85 changes: 40 additions & 45 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts"
icacontrollerkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"
Expand Down Expand Up @@ -85,14 +83,13 @@ type AppKeepers struct {
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
// IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCKeeper *ibckeeper.Keeper
ICAControllerKeeper icacontrollerkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
LiquidityKeeper liquiditykeeper.Keeper
IBCKeeper *ibckeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
LiquidityKeeper liquiditykeeper.Keeper

RouterKeeper routerkeeper.Keeper

Expand All @@ -102,10 +99,9 @@ type AppKeepers struct {
RouterModule router.AppModule

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
}

func NewAppKeeper(
Expand Down Expand Up @@ -147,7 +143,6 @@ func NewAppKeeper(
appKeepers.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, appKeepers.keys[capabilitytypes.StoreKey], appKeepers.memKeys[capabilitytypes.MemStoreKey])
appKeepers.ScopedIBCKeeper = appKeepers.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
appKeepers.ScopedTransferKeeper = appKeepers.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
appKeepers.ScopedICAControllerKeeper = appKeepers.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName)
appKeepers.ScopedICAHostKeeper = appKeepers.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName)

appKeepers.CapabilityKeeper.Seal()
Expand Down Expand Up @@ -277,26 +272,33 @@ func NewAppKeeper(
govRouter,
)

// RouterKeeper must be created before TransferKeeper
appKeepers.RouterKeeper = *routerkeeper.NewKeeper(
appCodec, appKeepers.keys[routertypes.StoreKey],
appKeepers.GetSubspace(routertypes.ModuleName),
appKeepers.TransferKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
&appKeepers.IBCKeeper.PortKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
)

appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
appKeepers.keys[ibctransfertypes.StoreKey],
appKeepers.GetSubspace(ibctransfertypes.ModuleName),
appKeepers.IBCKeeper.ChannelKeeper,
&appKeepers.RouterKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
&appKeepers.IBCKeeper.PortKeeper,
appKeepers.AccountKeeper,
appKeepers.BankKeeper,
appKeepers.ScopedTransferKeeper,
)
appKeepers.TransferModule = transfer.NewAppModule(appKeepers.TransferKeeper)
transferIBCModule := transfer.NewIBCModule(appKeepers.TransferKeeper)

appKeepers.ICAControllerKeeper = icacontrollerkeeper.NewKeeper(
appCodec, appKeepers.keys[icacontrollertypes.StoreKey], appKeepers.GetSubspace(icacontrollertypes.SubModuleName),
appKeepers.IBCKeeper.ChannelKeeper, // may be replaced with middleware such as ics29 fee
appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper,
appKeepers.ScopedICAControllerKeeper, bApp.MsgServiceRouter(),
)
appKeepers.RouterKeeper.SetTransferKeeper(appKeepers.TransferKeeper)

appKeepers.TransferModule = transfer.NewAppModule(appKeepers.TransferKeeper)

appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec, appKeepers.keys[icahosttypes.StoreKey],
Expand All @@ -308,25 +310,25 @@ func NewAppKeeper(
bApp.MsgServiceRouter(),
)

appKeepers.ICAModule = ica.NewAppModule(&appKeepers.ICAControllerKeeper, &appKeepers.ICAHostKeeper)
appKeepers.ICAModule = ica.NewAppModule(nil, &appKeepers.ICAHostKeeper)
icaHostIBCModule := icahost.NewIBCModule(appKeepers.ICAHostKeeper)

appKeepers.RouterKeeper = routerkeeper.NewKeeper(
appCodec, appKeepers.keys[routertypes.StoreKey],
appKeepers.GetSubspace(routertypes.ModuleName),
appKeepers.TransferKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
)
appKeepers.RouterModule = router.NewAppModule(appKeepers.RouterKeeper)

appKeepers.RouterModule = router.NewAppModule(appKeepers.RouterKeeper, transferIBCModule, 0,
routerkeeper.DefaultForwardTransferPacketTimeoutTimestamp, routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp)
var ibcStack porttypes.IBCModule
ibcStack = transfer.NewIBCModule(appKeepers.TransferKeeper)
ibcStack = router.NewIBCMiddleware(
ibcStack,
&appKeepers.RouterKeeper,
0,
routerkeeper.DefaultForwardTransferPacketTimeoutTimestamp,
routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp,
)

// create static IBC router, add transfer route, then set and seal it
ibcRouter := porttypes.NewRouter()
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, appKeepers.RouterModule)
ibcRouter := porttypes.NewRouter().
AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, ibcStack)

appKeepers.IBCKeeper.SetRouter(ibcRouter)

Expand Down Expand Up @@ -363,19 +365,12 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibchost.ModuleName)

paramsKeeper.Subspace(routertypes.ModuleName).WithKeyTable(routertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(globalfee.ModuleName)

return paramsKeeper
}

// TODO: find out why GetStakingKeeper was being written here,
// // GetStakingKeeper implements the TestingApp interface.
// func (appKeepers *AppKeepers) GetStakingKeeper() ibctestingtypes.StakingKeeper {
// return appKeepers.StakingKeeper
// }

// GetIBCKeeper implements the TestingApp interface.
func (appKeepers *AppKeepers) GetIBCKeeper() *ibckeeper.Keeper {
return appKeepers.IBCKeeper
Expand Down
3 changes: 1 addition & 2 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"
icahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
Expand All @@ -33,7 +32,7 @@ func (appKeepers *AppKeepers) GenerateKeys() {
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, liquiditytypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey, routertypes.StoreKey,
icacontrollertypes.StoreKey, icahosttypes.StoreKey,
icahosttypes.StoreKey,
)

// Define transient store keys
Expand Down
3 changes: 0 additions & 3 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ func orderBeginBlockers() []string {
feegrant.ModuleName,
paramstypes.ModuleName,
vestingtypes.ModuleName,
icatypes.ModuleName,
globalfee.ModuleName,
}
}
Expand Down Expand Up @@ -221,7 +220,6 @@ func orderEndBlockers() []string {
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
icatypes.ModuleName,
globalfee.ModuleName,
}
}
Expand All @@ -246,7 +244,6 @@ func orderInitBlockers() []string {
authz.ModuleName,
feegrant.ModuleName,
routertypes.ModuleName,
icatypes.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
Expand Down
30 changes: 19 additions & 11 deletions app/upgrades/v8/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v8

import (
"errors"
"fmt"

"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -16,6 +17,8 @@ import (
)

func FixBankMetadata(ctx sdk.Context, keepers *keepers.AppKeepers) error {
ctx.Logger().Info("Starting fix bank metadata...")

malformedDenom := "uatomu"
correctDenom := "uatom"

Expand Down Expand Up @@ -47,10 +50,14 @@ func FixBankMetadata(ctx sdk.Context, keepers *keepers.AppKeepers) error {
atomMetaData.Symbol = "ATOM"
keepers.BankKeeper.SetDenomMetaData(ctx, atomMetaData)

ctx.Logger().Info("Fix bank metadata complete")

return nil
}

func QuicksilverFix(ctx sdk.Context, keepers *keepers.AppKeepers) error {
ctx.Logger().Info("Starting fix quicksilver...")

// Refund stuck coins from ica address
sourceAddress, err := sdk.AccAddressFromBech32("cosmos13dqvh4qtg4gzczuktgnw8gc2ewnwmhdwnctekxctyr4azz4dcyysecgq7e")
if err != nil {
Expand Down Expand Up @@ -78,6 +85,8 @@ func QuicksilverFix(ctx sdk.Context, keepers *keepers.AppKeepers) error {
closeChannel(keepers, ctx, "channel-465")
closeChannel(keepers, ctx, "channel-466")

ctx.Logger().Info("Fix quicksilver complete")

return nil
}

Expand All @@ -95,18 +104,11 @@ func CreateUpgradeHandler(
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("start to run module migrations...")

vm, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

ctx.Logger().Info("running the rest of the upgrade handler...")
ctx.Logger().Info("Running upgrade fixes...")

err = FixBankMetadata(ctx, keepers)
err := FixBankMetadata(ctx, keepers)
if err != nil {
return vm, err
ctx.Logger().Info(fmt.Sprintf("error fixing bank metadata: %s", err.Error()))
}

err = QuicksilverFix(ctx, keepers)
Expand All @@ -123,8 +125,14 @@ func CreateUpgradeHandler(
// Update params for host & controller keepers
keepers.ICAHostKeeper.SetParams(ctx, hostParams)

ctx.Logger().Info("upgrade complete")
ctx.Logger().Info("Starting module migrations...")

vm, err = mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

ctx.Logger().Info("Upgrade complete")
return vm, err
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.14.0
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.0.0
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.1.1-0.20230113180046-4fb516ae522e
github.com/stretchr/testify v1.8.1
github.com/tendermint/tendermint v0.34.24
github.com/tendermint/tm-db v0.6.7
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,10 @@ github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRk
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc=
github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.0.0 h1:V1RVRa2hga4TV//RQpk2PCt314slS3N12024TsJoJUo=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.0.0/go.mod h1:sRBHb6KwuHQVc07vy8Ice9wUKVdvzn7eEms9scr2Zco=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.1.0 h1:EeEeCAXbNhJtO8Q++C9ZSxLs+MjygsKRK7FiScNHe1E=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.1.0/go.mod h1:sRBHb6KwuHQVc07vy8Ice9wUKVdvzn7eEms9scr2Zco=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.1.1-0.20230113180046-4fb516ae522e h1:qdK0r0xRSZjWTn5g6ORLKBZcQ/vyQxJC1vZTW9ogVl4=
github.com/strangelove-ventures/packet-forward-middleware/v3 v3.1.1-0.20230113180046-4fb516ae522e/go.mod h1:sRBHb6KwuHQVc07vy8Ice9wUKVdvzn7eEms9scr2Zco=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
Expand Down

0 comments on commit 27cd4b5

Please sign in to comment.