diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 874a3f77c6c..ffbaaf99cd1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -30,6 +30,7 @@ jobs: - name: Build 🔧 run: | + git config --global --add safe.directory /__w/ibc-go/ibc-go make build-docs LEDGER_ENABLED=false - name: Deploy 🚀 diff --git a/CHANGELOG.md b/CHANGELOG.md index 54fe9f93246..cba6f3a344c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking +* (apps/29-fee) [\#2395](https://github.com/cosmos/ibc-go/pull/2395) Remove param space from ics29 NewKeeper function. The field was unused. * (testing)[\#2028](https://github.com/cosmos/ibc-go/pull/2028) New interface `ibctestingtypes.StakingKeeper` added and set for the testing app `StakingKeeper` setup. * (core/04-channel) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) `NewPacketId` has been renamed to `NewPacketID` to comply with go linting rules. * (core/ante) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) `AnteDecorator` has been renamed to `RedundancyDecorator` to comply with go linting rules and to give more clarity to the purpose of the Decorator. diff --git a/README.md b/README.md index 5cd43cefc66..dbed9e9db14 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,10 @@ The Inter-Blockchain Communication protocol (IBC) allows blockchains to talk to For an overview of upcoming changes to ibc-go take a look at the [roadmap](./docs/roadmap/roadmap.md). +## Releases + +The release lines currently supported are v2, v3 and v4. Please refer to the [Stable Release Policy section of RELEASES.md](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md#stable-release-policy) for more details. + ## Ecosystem Discover the applications, middleware and light clients developed by other awesome teams in the ecosystem: @@ -92,10 +96,14 @@ In the table below We have active, helpful communities on Discord and Telegram. -For questions and support please use the `new-devs-support` channel in the [Cosmos Network Discord server](https://discord.com/channels/669268347736686612/699634178173698108) or join the [IBC Gang Discord server](https://discord.gg/RdpdkaXKpZ). The issue list of this repo is exclusively for bug reports and feature requests. +For questions and support please use the `developers` channel in the [Cosmos Network Discord server](https://discord.com/channels/669268347736686612/1019978171367559208) or join the [IBC Gang Discord server](https://discord.gg/RdpdkaXKpZ). The issue list of this repo is exclusively for bug reports and feature requests. To receive announcements of new releases or other technical updates, please join the [IBC is expansive Telegram group](https://t.me/ibc_is_expansive). +## Security + +To report a security vulnerability, see our [bug bounty program](https://hackerone.com/cosmos). + ## Resources - [IBC Website](https://ibcprotocol.org/) diff --git a/docs/middleware/ics29-fee/integration.md b/docs/middleware/ics29-fee/integration.md index f1d0158e702..8f11998c456 100644 --- a/docs/middleware/ics29-fee/integration.md +++ b/docs/middleware/ics29-fee/integration.md @@ -14,6 +14,90 @@ Learn how to configure the Fee Middleware module with IBC applications. The foll The Fee Middleware module, as the name suggests, plays the role of an IBC middleware and as such must be configured by chain developers to route and handle IBC messages correctly. For Cosmos SDK chains this setup is done via the `app/app.go` file, where modules are constructed and configured in order to bootstrap the blockchain application. +## Example integration of the Fee Middleware module + +``` +// app.go + +// Register the AppModule for the fee middleware module +ModuleBasics = module.NewBasicManager( + ... + ibcfee.AppModuleBasic{}, + ... +) + +... + +// Add module account permissions for the fee middleware module +maccPerms = map[string][]string{ + ... + ibcfeetypes.ModuleName: nil, +} + +... + +// Add fee middleware Keeper +type App struct { + ... + + IBCFeeKeeper ibcfeekeeper.Keeper + + ... +} + +... + +// Create store keys +keys := sdk.NewKVStoreKeys( + ... + ibcfeetypes.StoreKey, + ... +) + +... + +app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( + appCodec, keys[ibcfeetypes.StoreKey], + app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, +) + + +// See the section below for configuring an application stack with the fee middleware module + +... + +// Register fee middleware AppModule +app.moduleManager = module.NewManager( + ... + ibcfee.NewAppModule(app.IBCFeeKeeper), +) + +... + +// Add fee middleware to begin blocker logic +app.mm.SetOrderBeginBlockers( + ... + ibcfeetypes.ModuleName, + ... +) + +// Add fee middleware to end blocker logic +app.mm.SetOrderEndBlockers( + ... + ibcfeetypes.ModuleName, + ... +) + +// Add fee middleware to init genesis logic +app.mm.SetOrderInitGenesis( + ... + ibcfeetypes.ModuleName, + ... +) +``` + ## Configuring an application stack with Fee Middleware As mentioned in [IBC middleware development](../../ibc/middleware/develop.md) an application stack may be composed of many or no middlewares that nest a base application. @@ -82,4 +166,4 @@ ibcRouter. AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerStack) // ica with mock auth module stack route to ica (top level of middleware stack) AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). AddRoute(icahosttypes.SubModuleName, icaHostStack). -``` \ No newline at end of file +``` diff --git a/docs/migrations/v4-to-v5.md b/docs/migrations/v4-to-v5.md index f16bf331536..f3fb7cfe33b 100644 --- a/docs/migrations/v4-to-v5.md +++ b/docs/migrations/v4-to-v5.md @@ -38,25 +38,6 @@ The `AnteDecorator` was actually renamed twice, but in [this PR](https://github. ## IBC Apps -### ICS27 - Interchain Accounts - -An additional parameter, `ics4Wrapper` has been added to the `host` submodule `NewKeeper` function in `modules/apps/27-interchain-accounts/host/keeper`. -This allows the `host` submodule to correctly unwrap the channel version for channel reopening handshakes in the `OnChanOpenTry` callback. - -```diff -func NewKeeper( - cdc codec.BinaryCodec, - key storetypes.StoreKey, - paramSpace paramtypes.Subspace, -+ ics4Wrapper icatypes.ICS4Wrapper, - channelKeeper icatypes.ChannelKeeper, - portKeeper icatypes.PortKeeper, - accountKeeper icatypes.AccountKeeper, - scopedKeeper icatypes.ScopedKeeper, - msgRouter icatypes.MessageRouter, -) Keeper -``` - ### Core The `key` parameter of the `NewKeeper` function in `modules/core/keeper` is now of type `storetypes.StoreKey` (where `storetypes` is an import alias for `"github.com/cosmos/cosmos-sdk/store/types"`): @@ -198,6 +179,23 @@ type MessageRouter interface { The `RegisterRESTRoutes` function in `modules/apps/27-interchain-accounts` has been removed. +An additional parameter, `ics4Wrapper` has been added to the `host` submodule `NewKeeper` function in `modules/apps/27-interchain-accounts/host/keeper`. +This allows the `host` submodule to correctly unwrap the channel version for channel reopening handshakes in the `OnChanOpenTry` callback. + +```diff +func NewKeeper( + cdc codec.BinaryCodec, + key storetypes.StoreKey, + paramSpace paramtypes.Subspace, ++ ics4Wrapper icatypes.ICS4Wrapper, + channelKeeper icatypes.ChannelKeeper, + portKeeper icatypes.PortKeeper, + accountKeeper icatypes.AccountKeeper, + scopedKeeper icatypes.ScopedKeeper, + msgRouter icatypes.MessageRouter, +) Keeper +``` + #### Cosmos SDK message handler responses in packet acknowledgement The construction of the transaction response of a message execution on the host chain has changed. The `Data` field in the `sdk.TxMsgData` has been deprecated and since Cosmos SDK 0.46 the `MsgResponses` field contains the message handler responses packed into `Any`s. diff --git a/e2e/scripts/test-matricies/main/test-matrix.json b/e2e/scripts/test-matricies/main/test-matrix.json index 78c7f445e57..c4823a8e010 100644 --- a/e2e/scripts/test-matricies/main/test-matrix.json +++ b/e2e/scripts/test-matricies/main/test-matrix.json @@ -3,26 +3,90 @@ "test-entry-point": "TestTransferTestSuite", "chain-binary": "simd", "tests": [ + { + "chain-a-tag": "main", + "chain-b-tag": "v4.1.0" + }, { "chain-a-tag": "main", "chain-b-tag": "v4.0.0" }, + { + "chain-a-tag": "main", + "chain-b-tag": "v3.3.0" + }, + { + "chain-a-tag": "main", + "chain-b-tag": "v3.2.0" + }, + { + "chain-a-tag": "main", + "chain-b-tag": "v3.1.0" + }, { "chain-a-tag": "main", "chain-b-tag": "v3.0.0" }, + { + "chain-a-tag": "main", + "chain-b-tag": "v2.4.0" + }, + { + "chain-a-tag": "main", + "chain-b-tag": "v2.3.0" + }, + { + "chain-a-tag": "main", + "chain-b-tag": "v2.2.0" + }, + { + "chain-a-tag": "main", + "chain-b-tag": "v2.1.0" + }, { "chain-a-tag": "main", "chain-b-tag": "v2.0.0" }, + { + "chain-a-tag": "v4.1.0", + "chain-b-tag": "main" + }, { "chain-a-tag": "v4.0.0", "chain-b-tag": "main" }, + { + "chain-a-tag": "v3.3.0", + "chain-b-tag": "main" + }, + { + "chain-a-tag": "v3.2.0", + "chain-b-tag": "main" + }, + { + "chain-a-tag": "v3.1.0", + "chain-b-tag": "main" + }, { "chain-a-tag": "v3.0.0", "chain-b-tag": "main" }, + { + "chain-a-tag": "v2.4.0", + "chain-b-tag": "main" + }, + { + "chain-a-tag": "v2.3.0", + "chain-b-tag": "main" + }, + { + "chain-a-tag": "v2.2.0", + "chain-b-tag": "main" + }, + { + "chain-a-tag": "v2.1.0", + "chain-b-tag": "main" + }, { "chain-a-tag": "v2.0.0", "chain-b-tag": "main" @@ -33,9 +97,17 @@ "test-entry-point": "TestIncentivizedTransferTestSuite", "chain-binary": "simd", "tests": [ + { + "chain-a-tag": "main", + "chain-b-tag": "v4.1.0" + }, { "chain-a-tag": "main", "chain-b-tag": "v4.0.0" + }, + { + "chain-a-tag": "v4.1.0", + "chain-b-tag": "main" }, { "chain-a-tag": "v4.0.0", diff --git a/modules/apps/27-interchain-accounts/client/cli/cli.go b/modules/apps/27-interchain-accounts/client/cli/cli.go index 84e01e2d48d..9811c9d1df6 100644 --- a/modules/apps/27-interchain-accounts/client/cli/cli.go +++ b/modules/apps/27-interchain-accounts/client/cli/cli.go @@ -12,7 +12,7 @@ func GetQueryCmd() *cobra.Command { icaQueryCmd := &cobra.Command{ Use: "interchain-accounts", Aliases: []string{"ica"}, - Short: "interchain-accounts subcommands", + Short: "IBC interchain accounts query subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, } @@ -30,7 +30,7 @@ func NewTxCmd() *cobra.Command { icaTxCmd := &cobra.Command{ Use: "interchain-accounts", Aliases: []string{"ica"}, - Short: "interchain-accounts tx subcommands", + Short: "IBC interchain accounts transaction subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, } diff --git a/modules/apps/27-interchain-accounts/controller/client/cli/cli.go b/modules/apps/27-interchain-accounts/controller/client/cli/cli.go index 5b7989e534d..a863649c901 100644 --- a/modules/apps/27-interchain-accounts/controller/client/cli/cli.go +++ b/modules/apps/27-interchain-accounts/controller/client/cli/cli.go @@ -10,7 +10,7 @@ import ( func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ Use: "controller", - Short: "interchain-accounts controller subcommands", + Short: "IBC interchain accounts controller query subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, } @@ -27,7 +27,7 @@ func GetQueryCmd() *cobra.Command { func NewTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: "controller", - Short: "ica controller transactions subcommands", + Short: "IBC interchain accounts controller transaction subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, diff --git a/modules/apps/27-interchain-accounts/host/client/cli/cli.go b/modules/apps/27-interchain-accounts/host/client/cli/cli.go index 2ae88a48b70..1eb9b7643b1 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/cli.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/cli.go @@ -8,7 +8,7 @@ import ( func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ Use: "host", - Short: "interchain-accounts host subcommands", + Short: "IBC interchain accounts host query subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, } diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index 8a75a14c999..532c7aef066 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -5,7 +5,6 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types" @@ -34,8 +33,9 @@ type Keeper struct { // NewKeeper creates a new 29-fee Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, - ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, + cdc codec.BinaryCodec, key storetypes.StoreKey, + ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, + portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) Keeper { return Keeper{ cdc: cdc, diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 608a73321a7..843f8071907 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -224,7 +224,6 @@ type SimApp struct { // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper - ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper ScopedFeeMockKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper @@ -389,7 +388,7 @@ func NewSimApp( // IBC Fee Module keeper app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( - appCodec, keys[ibcfeetypes.StoreKey], app.GetSubspace(ibcfeetypes.ModuleName), + appCodec, keys[ibcfeetypes.StoreKey], app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper,