Skip to content

Commit

Permalink
Update IBC-Go to canonical v3.4.0 (#632)
Browse files Browse the repository at this point in the history
* Update gitignore

* Add ibc testing folder

* WIP replacing ibcsim

* Tests pass

* Update ibc-go dependency

* Remove TODOs

* Remove unused code

* Fixes ibcsim simapp dep

* Remove unneeded simapp code from #632 (#636)

delete code

* Fix lint

* Update dependencies and linters

* Test gosec ignore

* Fix gosec

* Fix linting

* Update sonarcloud ignore for ibc

* Revert lint change

* Removed unused code

* Refactor ibc directory

* Add back gaia tests and add ibc-testing disclosure

* Add README

Co-authored-by: Daniel <[email protected]>
Co-authored-by: Shawn <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2023
1 parent eded908 commit c804a8c
Show file tree
Hide file tree
Showing 40 changed files with 4,034 additions and 124 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [main]
pull_request:
branches: [main]
paths-ignore:
- "legacy_ibc_testing"
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# working-directory: somedir

# Optional: golangci-lint command line arguments.
args: --timeout=20m
args: --timeout=20m --skip-dirs legacy_ibc_testing

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
Expand All @@ -43,4 +43,4 @@ jobs:
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
# skip-build-cache: true
2 changes: 1 addition & 1 deletion .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -exclude-generated ./...
args: -exclude-dir=legacy_ibc_testing ./... -exclude-generated ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ docs/tla/states/
*.out
vendor/
.vscode
.idea
8 changes: 4 additions & 4 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ import (
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v3/testing"
ibctestingcore "github.com/cosmos/interchain-security/legacy_ibc_testing/core"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand Down Expand Up @@ -108,7 +109,6 @@ import (

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
)

const (
Expand Down Expand Up @@ -394,7 +394,7 @@ func New(

app.GovKeeper = *govKeeper.SetHooks(
ccvgovtypes.NewMultiGovHooks(
// register the governance hooks
// register the governance hooks
),
)

Expand Down Expand Up @@ -813,7 +813,7 @@ func (app *App) GetBaseApp() *baseapp.BaseApp {
}

// GetStakingKeeper implements the TestingApp interface.
func (app *App) GetStakingKeeper() ibcclienttypes.StakingKeeper {
func (app *App) GetStakingKeeper() ibctestingcore.StakingKeeper {
return app.ConsumerKeeper
}

Expand Down
2 changes: 1 addition & 1 deletion app/consumer-democracy/proposals_whitelisting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app_test
import (
"testing"

ibctesting "github.com/cosmos/ibc-go/v3/testing"
appConsumer "github.com/cosmos/interchain-security/app/consumer-democracy"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"
icstestingutils "github.com/cosmos/interchain-security/testutil/ibc_testing"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions app/consumer/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ import (
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v3/testing"
ibctestingcore "github.com/cosmos/interchain-security/legacy_ibc_testing/core"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand All @@ -84,7 +85,6 @@ import (

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
)

const (
Expand Down Expand Up @@ -681,7 +681,7 @@ func (app *App) GetBaseApp() *baseapp.BaseApp {
}

// GetStakingKeeper implements the TestingApp interface.
func (app *App) GetStakingKeeper() ibcclienttypes.StakingKeeper {
func (app *App) GetStakingKeeper() ibctestingcore.StakingKeeper {
return app.ConsumerKeeper
}

Expand Down
5 changes: 3 additions & 2 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ import (
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v3/testing"
ibctestingcore "github.com/cosmos/interchain-security/legacy_ibc_testing/core"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"

"github.com/gorilla/mux"
"github.com/gravity-devs/liquidity/x/liquidity"
Expand Down Expand Up @@ -834,7 +835,7 @@ func (app *App) GetBaseApp() *baseapp.BaseApp {
}

// GetStakingKeeper implements the TestingApp interface.
func (app *App) GetStakingKeeper() ibcclienttypes.StakingKeeper {
func (app *App) GetStakingKeeper() ibctestingcore.StakingKeeper {
return app.StakingKeeper
}

Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ module github.com/cosmos/interchain-security
go 1.18

require (
github.com/cosmos/cosmos-sdk v0.45.12-0.20221116140330-9c145c827001
github.com/cosmos/gaia/v8 v8.0.0-20221209131454-f73f97517b5b
github.com/cosmos/cosmos-sdk v0.45.11
github.com/cosmos/ibc-go/v3 v3.4.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
github.com/gravity-devs/liquidity v1.5.1
github.com/gravity-devs/liquidity v1.5.3
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/kylelemons/godebug v1.1.0
github.com/rakyll/statik v0.1.7
Expand All @@ -31,6 +30,7 @@ require (

require (
github.com/confio/ics23/go v0.7.0
github.com/cosmos/gaia/v8 v8.0.0-20230108202408-c3c3586e5ab8
github.com/golang/mock v1.6.0
github.com/oxyno-zeta/gomock-extra-matcher v1.1.0
github.com/regen-network/cosmos-proto v0.3.1
Expand Down Expand Up @@ -70,7 +70,6 @@ require (
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/gateway v1.1.0 // indirect
github.com/golang/glog v1.0.0 // indirect
Expand Down Expand Up @@ -139,7 +138,7 @@ require (

replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
github.com/cosmos/ibc-go/v3 => github.com/informalsystems/ibc-go/v3 v3.4.1-0.20221202165607-3dc5ba251371
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.11-ics
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/stretchr/testify => github.com/stretchr/testify v1.7.1
google.golang.org/grpc => google.golang.org/grpc v1.33.2
Expand Down
Loading

0 comments on commit c804a8c

Please sign in to comment.