Skip to content

Commit

Permalink
feat: add runtime Env to icacontroller and fix v0.52 e2e tests (#7587)
Browse files Browse the repository at this point in the history
* feat: adding runtime Environment

* chore: run make lint-fix

* chore: remove duplicate import

* chore: rm duplicate import

* chore: migrate to env KVStoreService in icacontroller

* chore: fix duplicate import

* chore: rm kv store service

* chore: refactor events to use environment

* chore: make lint-fix

* chore: make tidy-all

* chore: rm msg service router from icacontroller

* fix: remove 32 bit arm arch from callbacks ci builds

* test: try cache false for callbacks linter

* chore: pin to updated interchaintest fork

* chore: revert relayer count to 10

* chore: continued work on upgrading e2e tests to 0.52

* chore: transfer e2e passing

* chore: fix upgrade build errors

* chore: bump interchaintest

* chore: update  sample config

* chore: reconfigure protoany to use gogoproto any in favour of codec types

* chore: tidy imports in e2e

* fix: address failure in module safe query ica e2e test

* bump golangci version to 1.60

* lint: remove duplicate import

* chore: use gogoprotoany in favour of codec types any. rm ProtoCodecMarshaler for Codec iface

* chore: bump go version in Dockerfile

* chore: add todo

* lint: fix unnecessary cast

* deps: upgrade sdk to head of release/v0.52.x, upgrade store to latest main

* deps: bump to head of release/v0.52

* fix: add unit test to reproduce e2e test failure for ScheduleIBCUpgrade, update code to expect tendermint client temporarily

* fix: error in tests

* chore: address comments from pr

---------

Co-authored-by: chatton <[email protected]>
Co-authored-by: Nikolas De Giorgis <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent 6ca4a43 commit 5cf7d7e
Show file tree
Hide file tree
Showing 73 changed files with 766 additions and 769 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.57.2
version: v1.60
only-new-issues: true
args: --timeout 5m
working-directory: modules/apps/callbacks
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm', 'arm64']
go-arch: ['amd64', 'arm64']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2emodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.57.2
version: v1.60
only-new-issues: true
args: --timeout 5m
working-directory: e2e/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.57.2
version: v1.60
only-new-issues: true
args: --timeout 10m
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.57.2
version: v1.60
only-new-issues: true
args: --timeout 10m
2 changes: 1 addition & 1 deletion .github/workflows/wasm-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.57.2
version: v1.60
only-new-issues: true
args: --timeout 10m
working-directory: modules/light-clients/08-wasm
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.20 as builder
FROM golang:1.23.2-alpine as builder
ARG IBC_GO_VERSION

RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make;
Expand Down
5 changes: 3 additions & 2 deletions e2e/dockerutil/dockerutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"path"

dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
dockerclient "github.com/docker/docker/client"
)
Expand All @@ -18,7 +19,7 @@ const testLabel = "ibc-test"
// note: the test suite name must be passed as the chains are created in SetupSuite which will label
// them with the name of the test suite rather than the test.
func GetTestContainers(ctx context.Context, suiteName string, dc *dockerclient.Client) ([]dockertypes.Container, error) {
testContainers, err := dc.ContainerList(ctx, dockertypes.ContainerListOptions{
testContainers, err := dc.ContainerList(ctx, container.ListOptions{
All: true,
Filters: filters.NewArgs(
// see: https://github.com/strangelove-ventures/interchaintest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36
Expand All @@ -35,7 +36,7 @@ func GetTestContainers(ctx context.Context, suiteName string, dc *dockerclient.C

// GetContainerLogs returns the logs of a container as a byte array.
func GetContainerLogs(ctx context.Context, dc *dockerclient.Client, containerName string) ([]byte, error) {
readCloser, err := dc.ContainerLogs(ctx, containerName, dockertypes.ContainerLogsOptions{
readCloser, err := dc.ContainerLogs(ctx, containerName, container.LogsOptions{
ShowStdout: true,
ShowStderr: true,
})
Expand Down
102 changes: 47 additions & 55 deletions e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,72 +1,71 @@
module github.com/cosmos/ibc-go/e2e

go 1.23.1
go 1.23.2

toolchain go1.23.2
toolchain go1.23.3

// needed temporarily for v9.
replace (
github.com/misko9/go-substrate-rpc-client/v4 => github.com/DimitrisJim/go-substrate-rpc-client/v4 v4.0.0-20240717100841-406da076c1d5
// github.com/strangelove-ventures/interchaintest/v8 => github.com/DimitrisJim/interchaintest/v8 v8.0.0-20240717102845-beba523a47ff
github.com/strangelove-ventures/interchaintest/v9 => github.com/DimitrisJim/interchaintest/v9 v9.0.0-20241127135837-285cf3b21950
)

require (
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.3.0
cosmossdk.io/math v1.4.0
cosmossdk.io/x/upgrade v0.1.4
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-00010101000000-000000000000
github.com/cosmos/ibc-go/v9 v9.0.0
github.com/docker/docker v24.0.9+incompatible
github.com/docker/docker v27.3.1+incompatible
github.com/pelletier/go-toml v1.9.5
github.com/strangelove-ventures/interchaintest/v9 v9.0.0-20240917013455-e59965790e64
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
go.uber.org/zap v1.27.0
golang.org/x/mod v0.21.0
golang.org/x/mod v0.22.0
google.golang.org/grpc v1.68.0
gopkg.in/yaml.v2 v2.4.0
)

require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1 // indirect
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.6.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.9 // indirect
cloud.google.com/go/storage v1.42.0 // indirect
cosmossdk.io/api v0.8.0 // indirect
cosmossdk.io/collections v0.4.1-0.20241107084833-00f3065e70ee // indirect
cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect
cosmossdk.io/core v1.0.0 // indirect
cosmossdk.io/depinject v1.1.0 // indirect
cosmossdk.io/log v1.5.0 // indirect
cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect
cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect
cosmossdk.io/store v1.1.1 // indirect
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/distribution v0.0.0-20240906090851-36d9b25e8981 // indirect
cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf // indirect
cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf // indirect
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect
cosmossdk.io/x/feegrant v0.1.1 // indirect
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
cosmossdk.io/x/mint v0.0.0-20240909082436-01c0e9ba3581 // indirect
cosmossdk.io/x/params v0.0.0-00010101000000-000000000000
cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf // indirect
cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect
cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf // indirect
cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf // indirect
cosmossdk.io/x/tx v1.0.0-alpha.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/CosmWasm/wasmvm/v2 v2.1.2 // indirect
github.com/CosmWasm/wasmvm/v2 v2.2.0-rc.2 // indirect
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
github.com/DataDog/zstd v1.5.6 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/avast/retry-go/v4 v4.5.1 // indirect
github.com/aws/aws-sdk-go v1.54.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -84,33 +83,25 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v1.0.1 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240909080621-90c99d9658b0
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc2
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 // indirect
github.com/cosmos/cosmos-db v1.1.0 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect
github.com/cosmos/crypto v0.1.2 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.3.1 // indirect
github.com/cosmos/iavl v1.3.2 // indirect
github.com/cosmos/ics23/go v0.11.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/dgraph-io/badger/v4 v4.3.0 // indirect
github.com/dgraph-io/ristretto v1.0.0 // indirect
github.com/dgraph-io/badger/v4 v4.4.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.7.0 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-ethereum v1.14.5 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand All @@ -121,7 +112,6 @@ require (
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
Expand Down Expand Up @@ -164,7 +154,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand All @@ -177,13 +167,11 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
Expand All @@ -203,7 +191,6 @@ require (
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.5 // indirect
github.com/shamaton/msgpack/v2 v2.2.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
Expand All @@ -215,11 +202,6 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
Expand All @@ -229,23 +211,23 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.25.0 // indirect
golang.org/x/tools v0.27.0 // indirect
google.golang.org/api v0.186.0 // indirect
google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand All @@ -259,7 +241,6 @@ require (
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
pgregory.net/rapid v1.1.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

Expand All @@ -275,12 +256,23 @@ require (
cosmossdk.io/x/circuit v0.1.1 // indirect
cosmossdk.io/x/evidence v0.1.1 // indirect
cosmossdk.io/x/nft v0.0.0-00010101000000-000000000000 // indirect
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/bytedance/sonic v1.12.4 // indirect
github.com/bytedance/sonic/loader v0.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/tyler-smith/go-bip32 v1.0.0 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/arch v0.12.0 // indirect
)

Expand All @@ -304,7 +296,7 @@ replace (
cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main
cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf
cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main
cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241119154552-b1f95988e597 // main latest 19th Nov
cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d
cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf
cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf
Expand All @@ -328,5 +320,5 @@ replace (
cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf
github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
// pseudo version lower than the latest tag
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.0.0-20241108061010-a0458127fccf
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1
)
Loading

0 comments on commit 5cf7d7e

Please sign in to comment.