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

Problem: ibc 8.3.x is not used #1068

Merged
merged 9 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [#1044](https://github.com/crypto-org-chain/chain-main/pull/1044) Revert the protobuf package name changes introduced in #1023.
- [#1060](https://github.com/crypto-org-chain/chain-main/pull/1060) Upgrade rocksdb to `v9.2.1` and bump versiondb.
- [#1061](https://github.com/crypto-org-chain/chain-main/pull/1061) Integrate sdk 0.50.
- [#1068](https://github.com/crypto-org-chain/chain-main/pull/1068) Upgrade ibc-go to `v8.3.2` and remove icaauth module.

*Dec 6, 2023*

Expand Down
24 changes: 2 additions & 22 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ import (
"github.com/crypto-org-chain/chain-main/v4/x/chainmain"
chainmainkeeper "github.com/crypto-org-chain/chain-main/v4/x/chainmain/keeper"
chainmaintypes "github.com/crypto-org-chain/chain-main/v4/x/chainmain/types"
icaauthmodule "github.com/crypto-org-chain/chain-main/v4/x/icaauth"
icaauthmodulekeeper "github.com/crypto-org-chain/chain-main/v4/x/icaauth/keeper"
icaauthmoduletypes "github.com/crypto-org-chain/chain-main/v4/x/icaauth/types"
"github.com/crypto-org-chain/chain-main/v4/x/nft"
nfttransfer "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer"
nfttransferkeeper "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/keeper"
Expand Down Expand Up @@ -234,7 +231,6 @@ type ChainApp struct {
IBCFeeKeeper ibcfeekeeper.Keeper
ICAControllerKeeper icacontrollerkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
ICAAuthKeeper icaauthmodulekeeper.Keeper
AuthzKeeper authzkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
Expand All @@ -253,7 +249,6 @@ type ChainApp struct {
ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper
ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
ScopedICAAuthKeeper capabilitykeeper.ScopedKeeper

// the module manager
ModuleManager *module.Manager
Expand Down Expand Up @@ -345,7 +340,6 @@ func New(
scopedNFTTransferKeeper := app.CapabilityKeeper.ScopeToModule(nfttransfertypes.ModuleName)
scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName)
scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName)
scopedICAAuthKeeper := app.CapabilityKeeper.ScopeToModule(icaauthmoduletypes.ModuleName)
app.CapabilityKeeper.Seal()

// add keepers
Expand Down Expand Up @@ -519,17 +513,11 @@ func New(
app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(),
authAddr,
)
app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter())
icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper)

app.ICAAuthKeeper = *icaauthmodulekeeper.NewKeeper(appCodec, keys[icaauthmoduletypes.StoreKey],
keys[icaauthmoduletypes.MemStoreKey], app.GetSubspace(icaauthmoduletypes.ModuleName), app.ICAControllerKeeper,
scopedICAAuthKeeper)

icaAuthModule := icaauthmodule.NewAppModule(appCodec, app.ICAAuthKeeper)

var icaControllerStack porttypes.IBCModule
icaControllerStack = icaauthmodule.NewIBCModule(app.ICAAuthKeeper)
icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper)
icaControllerStack = icacontroller.NewIBCMiddleware(nil, app.ICAControllerKeeper)
icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper)

var icaHostStack porttypes.IBCModule
Expand All @@ -542,7 +530,6 @@ func New(
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostStack)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
ibcRouter.AddRoute(nfttransfertypes.ModuleName, nftTransferStack)
ibcRouter.AddRoute(icaauthmoduletypes.ModuleName, icaControllerStack)
app.IBCKeeper.SetRouter(ibcRouter)

// create evidence keeper with router
Expand Down Expand Up @@ -593,7 +580,6 @@ func New(
nfttransfer.NewAppModule(app.NFTTransferKeeper),
feeModule,
icaModule,
icaAuthModule,
chainmain.NewAppModule(app.chainmainKeeper),
supply.NewAppModule(app.SupplyKeeper),
nft.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper),
Expand Down Expand Up @@ -640,7 +626,6 @@ func New(
paramstypes.ModuleName,
vestingtypes.ModuleName,
icatypes.ModuleName,
icaauthmoduletypes.ModuleName,
ibcfeetypes.ModuleName,
chainmaintypes.ModuleName,
nfttypes.ModuleName,
Expand Down Expand Up @@ -668,7 +653,6 @@ func New(
upgradetypes.ModuleName,
vestingtypes.ModuleName,
icatypes.ModuleName,
icaauthmoduletypes.ModuleName,
ibcfeetypes.ModuleName,
chainmaintypes.ModuleName,
nfttypes.ModuleName,
Expand Down Expand Up @@ -699,7 +683,6 @@ func New(
group.ModuleName,
ibctransfertypes.ModuleName,
icatypes.ModuleName,
icaauthmoduletypes.ModuleName,
ibcfeetypes.ModuleName,
chainmaintypes.ModuleName,
supplytypes.ModuleName,
Expand Down Expand Up @@ -808,7 +791,6 @@ func New(
app.ScopedTransferKeeper = scopedTransferKeeper
app.ScopedICAControllerKeeper = scopedICAControllerKeeper
app.ScopedICAHostKeeper = scopedICAHostKeeper
app.ScopedICAAuthKeeper = scopedICAAuthKeeper

return app
}
Expand Down Expand Up @@ -1044,7 +1026,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable())
paramsKeeper.Subspace(icaauthmoduletypes.ModuleName)

return paramsKeeper
}
Expand Down Expand Up @@ -1076,7 +1057,6 @@ func StoreKeys() (
nfttransfertypes.StoreKey,
group.StoreKey,
ibcfeetypes.StoreKey,
icaauthmoduletypes.StoreKey,
chainmaintypes.StoreKey,
supplytypes.StoreKey,
nfttypes.StoreKey,
Expand Down
8 changes: 0 additions & 8 deletions app/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@
"TotalSupply": "TotalSupply_"
}
}
},
{
"url": "./tmp-swagger-gen/chainmain/icaauth/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IcaauthParams"
}
}
}
]
}
132 changes: 0 additions & 132 deletions app/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25036,104 +25036,6 @@ paths:
format: byte
tags:
- Query
/chainmain/icaauth/v1/interchain_account_address/{connectionId}/{owner}:
get:
summary: >-
InterchainAccountAddress queries the interchain account address for
given `connectionId` and `owner`
operationId: InterchainAccountAddress
responses:
'200':
description: A successful response.
schema:
type: object
properties:
interchainAccountAddress:
type: string
description: >-
QueryInterchainAccountAddressResponse defines the response for the
InterchainAccountAddress query.
default:
description: An unexpected error response.
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
parameters:
- name: connectionId
in: path
required: true
type: string
- name: owner
in: path
required: true
type: string
tags:
- Query
/chainmain/icaauth/v1/params:
get:
summary: Parameters queries the parameters of the module.
operationId: IcaauthParams
responses:
'200':
description: A successful response.
schema:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
properties:
minTimeoutDuration:
type: string
title: >-
minTimeoutDuration defines the minimum value of packet
timeout when submitting transactions to host chain on

behalf of interchain account
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
default:
description: An unexpected error response.
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
tags:
- Query
definitions:
cosmos.auth.v1beta1.AddressBytesToStringResponse:
type: object
Expand Down Expand Up @@ -44867,37 +44769,3 @@ definitions:
title: |-
SupplyResponse is the response type for the Query/TotalSupply RPC
method
chainmain.icaauth.v1.Params:
type: object
properties:
minTimeoutDuration:
type: string
title: >-
minTimeoutDuration defines the minimum value of packet timeout when
submitting transactions to host chain on

behalf of interchain account
description: Params defines the parameters for the module.
chainmain.icaauth.v1.QueryInterchainAccountAddressResponse:
type: object
properties:
interchainAccountAddress:
type: string
description: >-
QueryInterchainAccountAddressResponse defines the response for the
InterchainAccountAddress query.
chainmain.icaauth.v1.QueryParamsResponse:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
properties:
minTimeoutDuration:
type: string
title: >-
minTimeoutDuration defines the minimum value of packet timeout
when submitting transactions to host chain on

behalf of interchain account
description: QueryParamsResponse is response type for the Query/Params RPC method.
5 changes: 4 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
panic(fmt.Sprintf("failed to read upgrade info from disk %s", err))
}
if upgradeInfo.Name == planName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Deleted: []string{"icaauth"},

Check warning on line 26 in app/upgrades.go

View check run for this annotation

Codecov / codecov/patch

app/upgrades.go#L25-L26

Added lines #L25 - L26 were not covered by tests
}
// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{}))
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))

Check warning on line 29 in app/upgrades.go

View check run for this annotation

Codecov / codecov/patch

app/upgrades.go#L29

Added line #L29 was not covered by tests
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/cosmos/cosmos-sdk v0.50.8
github.com/cosmos/gogoproto v1.5.0
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.1
github.com/cosmos/ibc-go/v8 v8.3.2
github.com/cosmos/rosetta v0.50.3-1
github.com/crypto-org-chain/cronos/store v0.0.5-0.20240716081818-7f581a697f6d
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240716081818-7f581a697f6d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y=
github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM=
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
github.com/cosmos/ibc-go/v8 v8.2.1 h1:MTsnZZjxvGD4Fv5pYyx5UkELafSX0rlPt6IfsE2BpTQ=
github.com/cosmos/ibc-go/v8 v8.2.1/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8=
github.com/cosmos/ibc-go/v8 v8.3.2 h1:8X1oHHKt2Bh9hcExWS89rntLaCKZp2EjFTUSxKlPhGI=
github.com/cosmos/ibc-go/v8 v8.3.2/go.mod h1:WVVIsG39jGrF9Cjggjci6LzySyWGloz194sjTxiGNIE=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ schema = 3
version = "v1.0.0"
hash = "sha256-xOeHJWUj6fTc2EUGiE4dgfY2WkvrqTg/FWewoUvQcvg="
[mod."github.com/cosmos/ibc-go/v8"]
version = "v8.2.1"
hash = "sha256-FYMkZG3dYTXkqoSSyJSSe5NDd9K+3KlMWKfQKahXz3s="
version = "v8.3.2"
hash = "sha256-uqt1GlZ1sQ7k5b3vGiRxawGp53yeAv0RjOotOIY7Z0E="
[mod."github.com/cosmos/ics23/go"]
version = "v0.10.0"
hash = "sha256-KYEv727BO/ht63JO02xiKFGFAddg41Ve9l2vSSZZBq0="
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def gov_propose_legacy(
event_query_tx=True,
**kwargs,
):
mode = kwargs.get("broadcast_mode")
if kind == "software-upgrade":
rsp = json.loads(
self.raw(
Expand All @@ -57,7 +58,7 @@ def gov_propose_legacy(
**kwargs,
)
)
if rsp["code"] == 0 and event_query_tx:
if rsp["code"] == 0 and event_query_tx and mode == "sync":
rsp = self.event_query_tx_for(rsp["txhash"])
return rsp
elif kind == "cancel-software-upgrade":
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading